mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
lib: rename js source to lower snake_case
This commit renames all JavaScript source files in lib to lower snake_case. PR-URL: https://github.com/nodejs/node/pull/19556 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
This commit is contained in:
parent
b5884fba9a
commit
f2b10799ef
@ -29,7 +29,7 @@ const Stream = require('stream');
|
||||
const { Buffer } = require('buffer');
|
||||
const util = require('util');
|
||||
const debug = util.debuglog('stream');
|
||||
const BufferList = require('internal/streams/BufferList');
|
||||
const BufferList = require('internal/streams/buffer_list');
|
||||
const destroyImpl = require('internal/streams/destroy');
|
||||
const { getHighWaterMark } = require('internal/streams/state');
|
||||
const {
|
||||
|
@ -54,8 +54,9 @@ module.exports = Module;
|
||||
|
||||
// these are below module.exports for the circular reference
|
||||
const asyncESM = require('internal/process/esm_loader');
|
||||
const ModuleJob = require('internal/modules/esm/ModuleJob');
|
||||
const createDynamicModule = require('internal/modules/esm/CreateDynamicModule');
|
||||
const ModuleJob = require('internal/modules/esm/module_job');
|
||||
const createDynamicModule = require(
|
||||
'internal/modules/esm/create_dynamic_module');
|
||||
const {
|
||||
CHAR_UPPERCASE_A,
|
||||
CHAR_LOWERCASE_A,
|
||||
|
@ -6,11 +6,12 @@ const {
|
||||
ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK,
|
||||
ERR_UNKNOWN_MODULE_FORMAT
|
||||
} = require('internal/errors').codes;
|
||||
const ModuleMap = require('internal/modules/esm/ModuleMap');
|
||||
const ModuleJob = require('internal/modules/esm/ModuleJob');
|
||||
const defaultResolve = require('internal/modules/esm/DefaultResolve');
|
||||
const createDynamicModule = require('internal/modules/esm/CreateDynamicModule');
|
||||
const translators = require('internal/modules/esm/Translators');
|
||||
const ModuleMap = require('internal/modules/esm/module_map');
|
||||
const ModuleJob = require('internal/modules/esm/module_job');
|
||||
const defaultResolve = require('internal/modules/esm/default_resolve');
|
||||
const createDynamicModule = require(
|
||||
'internal/modules/esm/create_dynamic_module');
|
||||
const translators = require('internal/modules/esm/translators');
|
||||
|
||||
const FunctionBind = Function.call.bind(Function.prototype.bind);
|
||||
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const ModuleJob = require('internal/modules/esm/ModuleJob');
|
||||
const ModuleJob = require('internal/modules/esm/module_job');
|
||||
const { SafeMap } = require('internal/safe_globals');
|
||||
const debug = require('util').debuglog('esm');
|
||||
const { ERR_INVALID_ARG_TYPE } = require('internal/errors').codes;
|
@ -8,7 +8,8 @@ const {
|
||||
} = require('internal/modules/cjs/helpers');
|
||||
const CJSModule = require('internal/modules/cjs/loader');
|
||||
const internalURLModule = require('internal/url');
|
||||
const createDynamicModule = require('internal/modules/esm/CreateDynamicModule');
|
||||
const createDynamicModule = require(
|
||||
'internal/modules/esm/create_dynamic_module');
|
||||
const fs = require('fs');
|
||||
const { _makeLong } = require('path');
|
||||
const { SafeMap } = require('internal/safe_globals');
|
@ -7,7 +7,7 @@ const {
|
||||
} = internalBinding('module_wrap');
|
||||
|
||||
const { getURLFromFilePath } = require('internal/url');
|
||||
const Loader = require('internal/modules/esm/Loader');
|
||||
const Loader = require('internal/modules/esm/loader');
|
||||
const path = require('path');
|
||||
const { URL } = require('url');
|
||||
|
||||
|
@ -240,4 +240,4 @@ module.exports = {
|
||||
};
|
||||
|
||||
if (process.binding('config').experimentalVMModules)
|
||||
module.exports.Module = require('internal/vm/Module').Module;
|
||||
module.exports.Module = require('internal/vm/module').Module;
|
||||
|
16
node.gyp
16
node.gyp
@ -106,12 +106,12 @@
|
||||
'lib/internal/linkedlist.js',
|
||||
'lib/internal/modules/cjs/helpers.js',
|
||||
'lib/internal/modules/cjs/loader.js',
|
||||
'lib/internal/modules/esm/Loader.js',
|
||||
'lib/internal/modules/esm/CreateDynamicModule.js',
|
||||
'lib/internal/modules/esm/DefaultResolve.js',
|
||||
'lib/internal/modules/esm/ModuleJob.js',
|
||||
'lib/internal/modules/esm/ModuleMap.js',
|
||||
'lib/internal/modules/esm/Translators.js',
|
||||
'lib/internal/modules/esm/loader.js',
|
||||
'lib/internal/modules/esm/create_dynamic_module.js',
|
||||
'lib/internal/modules/esm/default_resolve.js',
|
||||
'lib/internal/modules/esm/module_job.js',
|
||||
'lib/internal/modules/esm/module_map.js',
|
||||
'lib/internal/modules/esm/translators.js',
|
||||
'lib/internal/safe_globals.js',
|
||||
'lib/internal/net.js',
|
||||
'lib/internal/os.js',
|
||||
@ -143,11 +143,11 @@
|
||||
'lib/internal/v8.js',
|
||||
'lib/internal/v8_prof_polyfill.js',
|
||||
'lib/internal/v8_prof_processor.js',
|
||||
'lib/internal/vm/Module.js',
|
||||
'lib/internal/stream_base_commons.js',
|
||||
'lib/internal/vm/module.js',
|
||||
'lib/internal/streams/lazy_transform.js',
|
||||
'lib/internal/streams/async_iterator.js',
|
||||
'lib/internal/streams/BufferList.js',
|
||||
'lib/internal/streams/buffer_list.js',
|
||||
'lib/internal/streams/duplex_base.js',
|
||||
'lib/internal/streams/duplexpair.js',
|
||||
'lib/internal/streams/legacy.js',
|
||||
|
@ -7,10 +7,11 @@
|
||||
const common = require('../common');
|
||||
|
||||
const { URL } = require('url');
|
||||
const Loader = require('internal/modules/esm/Loader');
|
||||
const ModuleMap = require('internal/modules/esm/ModuleMap');
|
||||
const ModuleJob = require('internal/modules/esm/ModuleJob');
|
||||
const createDynamicModule = require('internal/modules/esm/CreateDynamicModule');
|
||||
const Loader = require('internal/modules/esm/loader');
|
||||
const ModuleMap = require('internal/modules/esm/module_map');
|
||||
const ModuleJob = require('internal/modules/esm/module_job');
|
||||
const createDynamicModule = require(
|
||||
'internal/modules/esm/create_dynamic_module');
|
||||
|
||||
const stubModuleUrl = new URL('file://tmp/test');
|
||||
const stubModule = createDynamicModule(['default'], stubModuleUrl);
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
const common = require('../common');
|
||||
|
||||
const { search } = require('internal/modules/esm/DefaultResolve');
|
||||
const { search } = require('internal/modules/esm/default_resolve');
|
||||
|
||||
common.expectsError(
|
||||
() => search('target', undefined),
|
||||
|
@ -3,4 +3,4 @@ file:///*/test/message/esm_display_syntax_error.mjs:3
|
||||
await async () => 0;
|
||||
^^^^^
|
||||
SyntaxError: Unexpected reserved word
|
||||
at translators.set (internal/modules/esm/Translators.js:*:*)
|
||||
at translators.set (internal/modules/esm/translators.js:*:*)
|
||||
|
@ -3,4 +3,4 @@ file:///*/test/message/esm_display_syntax_error_import.mjs:6
|
||||
notfound
|
||||
^^^^^^^^
|
||||
SyntaxError: The requested module '../fixtures/es-module-loaders/module-named-exports' does not provide an export named 'notfound'
|
||||
at ModuleJob._instantiate (internal/modules/esm/ModuleJob.js:*:*)
|
||||
at ModuleJob._instantiate (internal/modules/esm/module_job.js:*:*)
|
||||
|
@ -3,4 +3,4 @@ file:///*/test/fixtures/es-module-loaders/syntax-error-import.mjs:1
|
||||
import { foo, notfound } from './module-named-exports';
|
||||
^^^^^^^^
|
||||
SyntaxError: The requested module './module-named-exports' does not provide an export named 'notfound'
|
||||
at ModuleJob._instantiate (internal/modules/esm/ModuleJob.js:*:*)
|
||||
at ModuleJob._instantiate (internal/modules/esm/module_job.js:*:*)
|
||||
|
@ -3,4 +3,4 @@ file:///*/test/fixtures/es-module-loaders/syntax-error.mjs:2
|
||||
await async () => 0;
|
||||
^^^^^
|
||||
SyntaxError: Unexpected reserved word
|
||||
at translators.set (internal/modules/esm/Translators.js:*:*)
|
||||
at translators.set (internal/modules/esm/translators.js:*:*)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const ModuleMap = require('internal/modules/esm/ModuleMap');
|
||||
const ModuleMap = require('internal/modules/esm/module_map');
|
||||
|
||||
// ModuleMap.get, ModuleMap.has and ModuleMap.set should only accept string
|
||||
// values as url argument.
|
||||
|
@ -2,7 +2,7 @@
|
||||
'use strict';
|
||||
require('../common');
|
||||
const assert = require('assert');
|
||||
const BufferList = require('internal/streams/BufferList');
|
||||
const BufferList = require('internal/streams/buffer_list');
|
||||
const util = require('util');
|
||||
|
||||
// Test empty buffer list.
|
||||
|
@ -24,7 +24,7 @@
|
||||
require('../common');
|
||||
const assert = require('assert');
|
||||
const fromList = require('_stream_readable')._fromList;
|
||||
const BufferList = require('internal/streams/BufferList');
|
||||
const BufferList = require('internal/streams/buffer_list');
|
||||
|
||||
function bufferListFromArray(arr) {
|
||||
const bl = new BufferList();
|
||||
|
Loading…
Reference in New Issue
Block a user