Skip to content

Commit 81c3100

Browse files
vsemozhetbytMylesBorins
authored andcommitted
lib: fix comment nits in bootstrap\loaders.js
Backport-PR-URL: #30338 PR-URL: #24641 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
1 parent 4ae8d20 commit 81c3100

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/internal/bootstrap/loaders.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// can be created using NODE_MODULE_CONTEXT_AWARE_CPP() with the flag
2020
// NM_F_LINKED.
2121
// - internalBinding(): the private internal C++ binding loader, inaccessible
22-
// from user land because they are only available from NativeModule.require()
22+
// from user land because they are only available from NativeModule.require().
2323
// These C++ bindings are created using NODE_MODULE_CONTEXT_AWARE_INTERNAL()
2424
// and have their nm_flags set to NM_F_INTERNAL.
2525
//
@@ -61,7 +61,7 @@
6161
keys: ObjectKeys,
6262
} = Object;
6363

64-
// Set up process.moduleLoadList
64+
// Set up process.moduleLoadList.
6565
const moduleLoadList = [];
6666
ObjectDefineProperty(process, 'moduleLoadList', {
6767
value: moduleLoadList,
@@ -70,7 +70,7 @@
7070
writable: false
7171
});
7272

73-
// Set up process.binding() and process._linkedBinding()
73+
// Set up process.binding() and process._linkedBinding().
7474
{
7575
const bindingObj = ObjectCreate(null);
7676

@@ -93,7 +93,7 @@
9393
};
9494
}
9595

96-
// Set up internalBinding() in the closure
96+
// Set up internalBinding() in the closure.
9797
let internalBinding;
9898
{
9999
const bindingObj = ObjectCreate(null);
@@ -115,11 +115,11 @@
115115
};
116116
}
117117

118-
// Create this WeakMap in js-land because V8 has no C++ API for WeakMap
118+
// Create this WeakMap in js-land because V8 has no C++ API for WeakMap.
119119
internalBinding('module_wrap').callbackMap = new WeakMap();
120120
const { ContextifyScript } = process.binding('contextify');
121121

122-
// Set up NativeModule
122+
// Set up NativeModule.
123123
function NativeModule(id) {
124124
this.filename = `${id}.js`;
125125
this.id = id;
@@ -128,7 +128,7 @@
128128
this.exportKeys = undefined;
129129
this.loaded = false;
130130
this.loading = false;
131-
this.script = null; // The ContextifyScript of the module
131+
this.script = null; // The ContextifyScript of the module.
132132
}
133133

134134
NativeModule._source = getBinding('natives');
@@ -160,7 +160,7 @@
160160
if (!NativeModule.exists(id)) {
161161
// Model the error off the internal/errors.js model, but
162162
// do not use that module given that it could actually be
163-
// the one causing the error if there's a bug in Node.js
163+
// the one causing the error if there's a bug in Node.js.
164164
// eslint-disable-next-line no-restricted-syntax
165165
const err = new Error(`No such built-in module: ${id}`);
166166
err.code = 'ERR_UNKNOWN_BUILTIN_MODULE';
@@ -201,15 +201,15 @@
201201

202202
if (config.exposeInternals) {
203203
NativeModule.nonInternalExists = function(id) {
204-
// Do not expose this to user land even with --expose-internals
204+
// Do not expose this to user land even with --expose-internals.
205205
if (id === loaderId) {
206206
return false;
207207
}
208208
return NativeModule.exists(id);
209209
};
210210

211211
NativeModule.isInternal = function(id) {
212-
// Do not expose this to user land even with --expose-internals
212+
// Do not expose this to user land even with --expose-internals.
213213
return id === loaderId;
214214
};
215215
} else {
@@ -243,7 +243,7 @@
243243
};
244244

245245
// Provide named exports for all builtin libraries so that the libraries
246-
// may be imported in a nicer way for esm users. The default export is left
246+
// may be imported in a nicer way for ESM users. The default export is left
247247
// as the entire namespace (module.exports) and wrapped in a proxy such
248248
// that APMs and other behavior are still left intact.
249249
NativeModule.prototype.proxifyExports = function() {

0 commit comments

Comments
 (0)