Skip to content

Commit bf7d7ae

Browse files
NathanBaulchtargos
authored andcommitted
lib: fix typos
PR-URL: #55065 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 73b05cf commit bf7d7ae

File tree

13 files changed

+30
-30
lines changed

13 files changed

+30
-30
lines changed

lib/internal/crypto/keys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ for (const m of [[kKeyEncodingPKCS1, 'pkcs1'], [kKeyEncodingPKCS8, 'pkcs8'],
8888
encodingNames[m[0]] = m[1];
8989

9090
// Creating the KeyObject class is a little complicated due to inheritance
91-
// and the fact that KeyObjects should be transferrable between threads,
91+
// and the fact that KeyObjects should be transferable between threads,
9292
// which requires the KeyObject base class to be implemented in C++.
9393
// The creation requires a callback to make sure that the NativeKeyObject
9494
// base class cannot exist without the other KeyObject implementations.

lib/internal/crypto/webidl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function type(V) {
8080
case 'object': // Fall through
8181
case 'function': // Fall through
8282
default:
83-
// Per ES spec, typeof returns an implemention-defined value that is not
83+
// Per ES spec, typeof returns an implementation-defined value that is not
8484
// any of the existing ones for uncallable non-standard exotic objects.
8585
// Yet Type() which the Web IDL spec depends on returns Object for such
8686
// cases. So treat the default case as an object.

lib/internal/dns/utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const kSerializeResolver = Symbol('dns:resolver:serialize');
5959
const kDeserializeResolver = Symbol('dns:resolver:deserialize');
6060
const kSnapshotStates = Symbol('dns:resolver:config');
6161
const kInitializeHandle = Symbol('dns:resolver:initializeHandle');
62-
const kSetServersInteral = Symbol('dns:resolver:setServers');
62+
const kSetServersInternal = Symbol('dns:resolver:setServers');
6363

6464
// Resolver instances correspond 1:1 to c-ares channels.
6565

@@ -139,10 +139,10 @@ class ResolverBase {
139139
throw new ERR_INVALID_IP_ADDRESS(serv);
140140
});
141141

142-
this[kSetServersInteral](newSet, servers);
142+
this[kSetServersInternal](newSet, servers);
143143
}
144144

145-
[kSetServersInteral](newSet, servers) {
145+
[kSetServersInternal](newSet, servers) {
146146
const orig = ArrayPrototypeMap(this._handle.getServers() || [], (val) => {
147147
val.unshift(isIP(val[0]));
148148
return val;
@@ -194,7 +194,7 @@ class ResolverBase {
194194
this._handle.setLocalAddress(ipv4, ipv6);
195195
}
196196
if (servers) {
197-
this[kSetServersInteral](servers, servers);
197+
this[kSetServersInternal](servers, servers);
198198
}
199199
}
200200
}

lib/internal/fs/glob.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class Glob {
337337
const subPatterns = new SafeSet();
338338
const nSymlinks = new SafeSet();
339339
for (const index of pattern.indexes) {
340-
// For each child, chek potential patterns
340+
// For each child, check potential patterns
341341
if (this.#cache.seen(entryPath, pattern, index) || this.#cache.seen(entryPath, pattern, index + 1)) {
342342
return;
343343
}
@@ -365,7 +365,7 @@ class Glob {
365365
// If next pattern is the last one, add to results
366366
this.#results.add(entryPath);
367367
} else if (nextMatches && entry.isDirectory()) {
368-
// Pattern mached, meaning two patterns forward
368+
// Pattern matched, meaning two patterns forward
369369
// are also potential patterns
370370
// e.g **/b/c when entry is a/b - add c to potential patterns
371371
subPatterns.add(index + 2);
@@ -532,7 +532,7 @@ class Glob {
532532
const subPatterns = new SafeSet();
533533
const nSymlinks = new SafeSet();
534534
for (const index of pattern.indexes) {
535-
// For each child, chek potential patterns
535+
// For each child, check potential patterns
536536
if (this.#cache.seen(entryPath, pattern, index) || this.#cache.seen(entryPath, pattern, index + 1)) {
537537
return;
538538
}
@@ -566,7 +566,7 @@ class Glob {
566566
yield this.#withFileTypes ? entry : entryPath;
567567
}
568568
} else if (nextMatches && entry.isDirectory()) {
569-
// Pattern mached, meaning two patterns forward
569+
// Pattern matched, meaning two patterns forward
570570
// are also potential patterns
571571
// e.g **/b/c when entry is a/b - add c to potential patterns
572572
subPatterns.add(index + 2);

lib/internal/modules/esm/fetch_module.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ const cacheForGET = new SafeMap();
4141
// [1] The V8 snapshot doesn't like some C++ APIs to be loaded eagerly. Do it
4242
// lazily/at runtime and not top level of an internal module.
4343

44-
// [2] Creating a new agent instead of using the gloabl agent improves
44+
// [2] Creating a new agent instead of using the global agent improves
4545
// performance and precludes the agent becoming tainted.
4646

4747
/** @type {import('https').Agent} The Cached HTTP Agent for **secure** HTTP requests. */
4848
let HTTPSAgent;
4949
/**
5050
* Make a HTTPs GET request (handling agent setup if needed, caching the agent to avoid
51-
* redudant instantiations).
51+
* redundant instantiations).
5252
* @param {Parameters<import('https').get>[0]} input - The URI to fetch.
5353
* @param {Parameters<import('https').get>[1]} options - See https.get() options.
5454
*/
@@ -67,7 +67,7 @@ function HTTPSGet(input, options) {
6767
let HTTPAgent;
6868
/**
6969
* Make a HTTP GET request (handling agent setup if needed, caching the agent to avoid
70-
* redudant instantiations).
70+
* redundant instantiations).
7171
* @param {Parameters<import('http').get>[0]} input - The URI to fetch.
7272
* @param {Parameters<import('http').get>[1]} options - See http.get() options.
7373
*/

lib/internal/modules/esm/loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ class ModuleLoader {
415415
/**
416416
* Translate a loaded module source into a ModuleWrap. This is run synchronously,
417417
* but the translator may return the ModuleWrap in a Promise.
418-
* @param {stirng} url URL of the module to be translated.
418+
* @param {string} url URL of the module to be translated.
419419
* @param {string} format Format of the module to be translated. This is used to find
420420
* matching translators.
421421
* @param {ModuleSource} source Source of the module to be translated.

lib/internal/process/finalization.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function createFinalization() {
6464
const fn = ref.fn;
6565

6666
// This should always happen, however GC is
67-
// undeterministic so it might not happen.
67+
// indeterministic so it might not happen.
6868
/* istanbul ignore else */
6969
if (obj !== undefined) {
7070
fn(obj, event);

lib/internal/source_map/source_map_cache_map.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const {
2626
* Obsolete `weakModuleMap` entries are removed by the `finalizationRegistry`
2727
* callback. This pattern decouples the strong url reference to the source map
2828
* data and allow the cache to be reclaimed eagerly, without depending on an
29-
* undeterministic callback of a finalization registry.
29+
* indeterministic callback of a finalization registry.
3030
*/
3131
class SourceMapCacheMap {
3232
/**

lib/internal/test_runner/mock/mock_timers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ class MockTimers {
377377
return FunctionPrototypeToString(MockDate[kMock].#nativeDateDescriptor.value);
378378
};
379379

380-
// We need to polute the prototype of this
380+
// We need to pollute the prototype of this
381381
ObjectDefineProperties(MockDate, {
382382
__proto__: null,
383383
[kMock]: {

lib/internal/test_runner/reporter/v8-serializer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = async function* v8Reporter(source) {
1616
for await (const item of source) {
1717
const originalError = item.data.details?.error;
1818
if (originalError) {
19-
// Error is overriden with a serialized version, so that it can be
19+
// Error is overridden with a serialized version, so that it can be
2020
// deserialized in the parent process.
2121
// Error is restored after serialization.
2222
item.data.details.error = serializeError(originalError);

0 commit comments

Comments
 (0)