mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 09:02:50 +08:00
refactor: prefix node:* (#1769)
* refactor: prefix node:* to path * refactor: prefix node:* to os * refactor: prefix node:* to fs * refactor: prefix node:* to util
This commit is contained in:
parent
92116dee48
commit
9f5518000f
@ -17,7 +17,7 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const os = require('os');
|
const os = require('node:os');
|
||||||
const execa = require('execa');
|
const execa = require('execa');
|
||||||
const events = require('cordova-common').events;
|
const events = require('cordova-common').events;
|
||||||
const CordovaError = require('cordova-common').CordovaError;
|
const CordovaError = require('cordova-common').CordovaError;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('node:fs');
|
||||||
const xml = require('cordova-common').xmlHelpers;
|
const xml = require('cordova-common').xmlHelpers;
|
||||||
|
|
||||||
const DEFAULT_ORIENTATION = 'default';
|
const DEFAULT_ORIENTATION = 'default';
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('node:fs');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const properties_parser = require('properties-parser');
|
const properties_parser = require('properties-parser');
|
||||||
const pluginHandlers = require('./pluginHandlers');
|
const pluginHandlers = require('./pluginHandlers');
|
||||||
const CordovaGradleConfigParserFactory = require('./config/CordovaGradleConfigParserFactory');
|
const CordovaGradleConfigParserFactory = require('./config/CordovaGradleConfigParserFactory');
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
|
|
||||||
const AndroidProject = require('./AndroidProject');
|
const AndroidProject = require('./AndroidProject');
|
||||||
const PluginManager = require('cordova-common').PluginManager;
|
const PluginManager = require('cordova-common').PluginManager;
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const fs = require('fs');
|
const fs = require('node:fs');
|
||||||
const nopt = require('nopt');
|
const nopt = require('nopt');
|
||||||
const untildify = require('untildify');
|
const untildify = require('untildify');
|
||||||
const { parseArgsStringToArgv } = require('string-argv');
|
const { parseArgsStringToArgv } = require('string-argv');
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const execa = require('execa');
|
const execa = require('execa');
|
||||||
const glob = require('fast-glob');
|
const glob = require('fast-glob');
|
||||||
const events = require('cordova-common').events;
|
const events = require('cordova-common').events;
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const execa = require('execa');
|
const execa = require('execa');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const { forgivingWhichSync, isWindows, isDarwin } = require('./utils');
|
const { forgivingWhichSync, isWindows, isDarwin } = require('./utils');
|
||||||
const java = require('./env/java');
|
const java = require('./env/java');
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const events = require('cordova-common').events;
|
const events = require('cordova-common').events;
|
||||||
|
|
||||||
class CordovaGradleConfigParser {
|
class CordovaGradleConfigParser {
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('node:fs');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const propertiesParser = require('properties-parser');
|
const propertiesParser = require('properties-parser');
|
||||||
const events = require('cordova-common').events;
|
const events = require('cordova-common').events;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const utils = require('./utils');
|
const utils = require('./utils');
|
||||||
const check_reqs = require('./check_reqs');
|
const check_reqs = require('./check_reqs');
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
const execa = require('execa');
|
const execa = require('execa');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const android_versions = require('android-versions');
|
const android_versions = require('android-versions');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const Adb = require('./Adb');
|
const Adb = require('./Adb');
|
||||||
const events = require('cordova-common').events;
|
const events = require('cordova-common').events;
|
||||||
const CordovaError = require('cordova-common').CordovaError;
|
const CordovaError = require('cordova-common').CordovaError;
|
||||||
|
2
lib/env/java.js
vendored
2
lib/env/java.js
vendored
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
const execa = require('execa');
|
const execa = require('execa');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const glob = require('fast-glob');
|
const glob = require('fast-glob');
|
||||||
const { CordovaError, events } = require('cordova-common');
|
const { CordovaError, events } = require('cordova-common');
|
||||||
const utils = require('../utils');
|
const utils = require('../utils');
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const isPathInside = require('is-path-inside');
|
const isPathInside = require('is-path-inside');
|
||||||
const events = require('cordova-common').events;
|
const events = require('cordova-common').events;
|
||||||
const CordovaError = require('cordova-common').CordovaError;
|
const CordovaError = require('cordova-common').CordovaError;
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const nopt = require('nopt');
|
const nopt = require('nopt');
|
||||||
const glob = require('fast-glob');
|
const glob = require('fast-glob');
|
||||||
const dedent = require('dedent');
|
const dedent = require('dedent');
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { inspect } = require('util');
|
const { inspect } = require('node:util');
|
||||||
const execa = require('execa');
|
const execa = require('execa');
|
||||||
const Adb = require('./Adb');
|
const Adb = require('./Adb');
|
||||||
const build = require('./build');
|
const build = require('./build');
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const which = require('which');
|
const which = require('which');
|
||||||
const os = require('os');
|
const os = require('node:os');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads, searches, and replaces the found occurences with replacementString and then writes the file back out.
|
* Reads, searches, and replaces the found occurences with replacementString and then writes the file back out.
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const os = require('os');
|
const os = require('node:os');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const { EventEmitter } = require('events');
|
const { EventEmitter } = require('events');
|
||||||
const { ConfigParser, PluginInfoProvider } = require('cordova-common');
|
const { ConfigParser, PluginInfoProvider } = require('cordova-common');
|
||||||
const Api = require('../../lib/Api');
|
const Api = require('../../lib/Api');
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('node:fs');
|
||||||
const os = require('os');
|
const os = require('node:os');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const rewire = require('rewire');
|
const rewire = require('rewire');
|
||||||
|
|
||||||
describe('AndroidManifest', () => {
|
describe('AndroidManifest', () => {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const rewire = require('rewire');
|
const rewire = require('rewire');
|
||||||
const MockCordovaGradleConfigParser = require('./mocks/config/MockCordovaGradleConfigParser');
|
const MockCordovaGradleConfigParser = require('./mocks/config/MockCordovaGradleConfigParser');
|
||||||
const CordovaGradleConfigParserFactory = require('../../lib/config/CordovaGradleConfigParserFactory');
|
const CordovaGradleConfigParserFactory = require('../../lib/config/CordovaGradleConfigParserFactory');
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const os = require('os');
|
const os = require('node:os');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const common = require('cordova-common');
|
const common = require('cordova-common');
|
||||||
const EventEmitter = require('events');
|
const EventEmitter = require('events');
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('node:fs');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const rewire = require('rewire');
|
const rewire = require('rewire');
|
||||||
|
|
||||||
describe('android_sdk', () => {
|
describe('android_sdk', () => {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const rewire = require('rewire');
|
const rewire = require('rewire');
|
||||||
const { isWindows } = require('../../../lib/utils');
|
const { isWindows } = require('../../../lib/utils');
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
const rewire = require('rewire');
|
const rewire = require('rewire');
|
||||||
const android_sdk = require('../../lib/android_sdk');
|
const android_sdk = require('../../lib/android_sdk');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const events = require('cordova-common').events;
|
const events = require('cordova-common').events;
|
||||||
const which = require('which');
|
const which = require('which');
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ const utils = require('../../lib/utils');
|
|||||||
const create = rewire('../../lib/create');
|
const create = rewire('../../lib/create');
|
||||||
const check_reqs = require('../../lib/check_reqs');
|
const check_reqs = require('../../lib/check_reqs');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const MockCordovaGradleConfigParser = require('./mocks/config/MockCordovaGradleConfigParser');
|
const MockCordovaGradleConfigParser = require('./mocks/config/MockCordovaGradleConfigParser');
|
||||||
const CordovaGradleConfigParserFactory = require('../../lib/config/CordovaGradleConfigParserFactory');
|
const CordovaGradleConfigParserFactory = require('../../lib/config/CordovaGradleConfigParserFactory');
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const rewire = require('rewire');
|
const rewire = require('rewire');
|
||||||
const which = require('which');
|
const which = require('which');
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const rewire = require('rewire');
|
const rewire = require('rewire');
|
||||||
const { CordovaError } = require('cordova-common');
|
const { CordovaError } = require('cordova-common');
|
||||||
const utils = require('../../lib/utils');
|
const utils = require('../../lib/utils');
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
const rewire = require('rewire');
|
const rewire = require('rewire');
|
||||||
const common = rewire('../../../lib/pluginHandlers');
|
const common = rewire('../../../lib/pluginHandlers');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const osenv = require('os');
|
const osenv = require('node:os');
|
||||||
|
|
||||||
const test_dir = path.join(osenv.tmpdir(), 'test_plugman');
|
const test_dir = path.join(osenv.tmpdir(), 'test_plugman');
|
||||||
const project_dir = path.join(test_dir, 'project');
|
const project_dir = path.join(test_dir, 'project');
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
const rewire = require('rewire');
|
const rewire = require('rewire');
|
||||||
const common = rewire('../../../lib/pluginHandlers');
|
const common = rewire('../../../lib/pluginHandlers');
|
||||||
const android = common.__get__('handlers');
|
const android = common.__get__('handlers');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const os = require('os');
|
const os = require('node:os');
|
||||||
const temp = path.join(os.tmpdir(), 'plugman');
|
const temp = path.join(os.tmpdir(), 'plugman');
|
||||||
const plugins_dir = path.join(temp, 'cordova/plugins');
|
const plugins_dir = path.join(temp, 'cordova/plugins');
|
||||||
const dummyplugin = path.join(__dirname, '../../fixtures/org.test.plugins.dummyplugin');
|
const dummyplugin = path.join(__dirname, '../../fixtures/org.test.plugins.dummyplugin');
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const rewire = require('rewire');
|
const rewire = require('rewire');
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const CordovaError = require('cordova-common').CordovaError;
|
const CordovaError = require('cordova-common').CordovaError;
|
||||||
const GradlePropertiesParser = require('../../lib/config/GradlePropertiesParser');
|
const GradlePropertiesParser = require('../../lib/config/GradlePropertiesParser');
|
||||||
const utils = require('../../lib/utils');
|
const utils = require('../../lib/utils');
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
under the License.
|
under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('node:path');
|
||||||
const execa = require('execa');
|
const execa = require('execa');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const ProjectBuilder = require('../lib/builders/ProjectBuilder');
|
const ProjectBuilder = require('../lib/builders/ProjectBuilder');
|
||||||
|
Loading…
Reference in New Issue
Block a user