Skip to content

Commit 2d7e4e0

Browse files
brandon93stargos
authored andcommitted
benchmark,doc,lib,src,test,tools: fix typos
PR-URL: #23302 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent 12ff395 commit 2d7e4e0

35 files changed

+45
-45
lines changed

benchmark/crypto/get-ciphers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, {
1010
function main({ n, v }) {
1111
const method = require(v).getCiphers;
1212
var i = 0;
13-
// First call to getChipers will dominate the results
13+
// First call to getCiphers will dominate the results
1414
if (n > 1) {
1515
for (; i < n; i++)
1616
method();

doc/api/n-api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,7 @@ added: v10.7.0
17571757

17581758
```C
17591759
napi_status napi_create_bigint_uint64(napi_env env,
1760-
uint64_t vaue,
1760+
uint64_t value,
17611761
napi_value* result);
17621762
```
17631763

lib/internal/bootstrap/node.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137

138138
const browserGlobals = !process._noBrowserGlobals;
139139
if (browserGlobals) {
140-
// we are setting this here to foward it to the inspector later
140+
// we are setting this here to forward it to the inspector later
141141
perThreadSetup.originalConsole = global.console;
142142
setupGlobalTimeouts();
143143
setupGlobalConsole();

lib/internal/http2/core.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ const proxySocketHandler = {
762762
// indicate if the ping was successful or not. The duration indicates the
763763
// number of milliseconds elapsed since the ping was sent and the ack
764764
// received. The payload is a Buffer containing the 8 bytes of payload
765-
// data received on the PING acknowlegement.
765+
// data received on the PING acknowledgement.
766766
function pingCallback(cb) {
767767
return function pingCallback(ack, duration, payload) {
768768
if (ack) {

lib/internal/repl/recoverable.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { tokTypes: tt } = acorn;
55

66
// If the error is that we've unexpectedly ended the input,
77
// then let the user try to recover by adding more input.
8-
// Note: `e` (the original exception) is not used by the current implemention,
8+
// Note: `e` (the original exception) is not used by the current implementation,
99
// but may be needed in the future.
1010
function isRecoverableError(e, code) {
1111
let recoverable = false;

src/aliased_buffer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace node {
1414
* going through JS, and the data is then available to user's via the exposed
1515
* JS object.
1616
*
17-
* While this technique is computationaly efficient, it is effectively a
17+
* While this technique is computationally efficient, it is effectively a
1818
* write to JS program state w/out going through the standard
1919
* (monitored) API. Thus any VM capabilities to detect the modification are
2020
* circumvented.

src/inspector_agent.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Agent {
5757

5858
bool IsListening() { return io_ != nullptr; }
5959
// Returns true if the Node inspector is actually in use. It will be true
60-
// if either the user explicitely opted into inspector (e.g. with the
60+
// if either the user explicitly opted into inspector (e.g. with the
6161
// --inspect command line flag) or if inspector JS API had been used.
6262
bool IsActive();
6363

src/node_api.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ NAPI_EXTERN napi_status napi_adjust_external_memory(napi_env env,
598598
int64_t change_in_bytes,
599599
int64_t* adjusted_value);
600600

601-
// Runnig a script
601+
// Running a script
602602
NAPI_EXTERN napi_status napi_run_script(napi_env env,
603603
napi_value script,
604604
napi_value* result);

src/node_crypto.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2511,7 +2511,7 @@ int VerifyCallback(int preverify_ok, X509_STORE_CTX* ctx) {
25112511
//
25122512
// Since we cannot perform I/O quickly enough in this callback, we ignore
25132513
// all preverify_ok errors and let the handshake continue. It is
2514-
// imparative that the user use Connection::VerifyError after the
2514+
// imperative that the user use Connection::VerifyError after the
25152515
// 'secure' callback has been made.
25162516
return 1;
25172517
}

src/node_messaging.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ MaybeLocal<Value> Message::Deserialize(Environment* env,
9898
message_ports_.clear();
9999

100100
std::vector<Local<SharedArrayBuffer>> shared_array_buffers;
101-
// Attach all transfered SharedArrayBuffers to their new Isolate.
101+
// Attach all transferred SharedArrayBuffers to their new Isolate.
102102
for (uint32_t i = 0; i < shared_array_buffers_.size(); ++i) {
103103
Local<SharedArrayBuffer> sab;
104104
if (!shared_array_buffers_[i]->GetSharedArrayBuffer(env, context)
@@ -116,7 +116,7 @@ MaybeLocal<Value> Message::Deserialize(Environment* env,
116116
&delegate);
117117
delegate.deserializer = &deserializer;
118118

119-
// Attach all transfered ArrayBuffers to their new Isolate.
119+
// Attach all transferred ArrayBuffers to their new Isolate.
120120
for (uint32_t i = 0; i < array_buffer_contents_.size(); ++i) {
121121
Local<ArrayBuffer> ab =
122122
ArrayBuffer::New(env->isolate(),
@@ -234,7 +234,7 @@ class SerializerDelegate : public ValueSerializer::Delegate {
234234
friend class worker::Message;
235235
};
236236

237-
} // anynomous namespace
237+
} // anonymous namespace
238238

239239
Maybe<bool> Message::Serialize(Environment* env,
240240
Local<Context> context,

src/node_options.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class OptionsParser {
231231
void AddAlias(const std::string& from,
232232
const std::initializer_list<std::string>& to);
233233

234-
// Add implications from some arbitary option to a boolean one, either
234+
// Add implications from some arbitrary option to a boolean one, either
235235
// in a way that makes `from` set `to` to true or to false.
236236
void Implies(const std::string& from, const std::string& to);
237237
void ImpliesNot(const std::string& from, const std::string& to);

src/sharedarraybuffer_metadata.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace {
2121

2222
// Yield a JS constructor for SABLifetimePartner objects in the form of a
2323
// standard API object, that has a single field for containing the raw
24-
// SABLiftimePartner* pointer.
24+
// SABLifetimePartner* pointer.
2525
Local<Function> GetSABLifetimePartnerConstructor(
2626
Environment* env, Local<Context> context) {
2727
Local<FunctionTemplate> templ;

test/async-hooks/test-embedder.api.async-resource.improper-unwind.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (process.argv[2] === 'child') {
1919
// Therefore the 'after' of event2 needs to occur before the
2020
// 'after' of event 1.
2121
// The first test of the two below follows that rule,
22-
// the second one doesnt.
22+
// the second one doesn't.
2323

2424
const event1 = new AsyncResource('event1', async_hooks.executionAsyncId());
2525
const event2 = new AsyncResource('event2', async_hooks.executionAsyncId());

test/internet/test-dgram-broadcast-multi-process.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ if (process.argv[2] !== 'child') {
146146
}
147147
});
148148

149-
console.error('[PARENT] %d received %d matching messges.',
149+
console.error('[PARENT] %d received %d matching messages.',
150150
worker.pid,
151151
count);
152152

test/parallel/test-cluster-fork-windowsHide.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ if (!process.argv[2]) {
4545

4646
} else if (cluster.isMaster) {
4747
cluster.setupMaster({
48-
silient: true,
48+
silent: true,
4949
windowsHide: true
5050
});
5151

test/parallel/test-cluster-setup-master-cumulative.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ console.log('ok sets defaults');
4040

4141
cluster.setupMaster({ exec: 'overridden' });
4242
assert.strictEqual(cluster.settings.exec, 'overridden');
43-
console.log('ok overrids defaults');
43+
console.log('ok overrides defaults');
4444

4545
cluster.setupMaster({ args: ['foo', 'bar'] });
4646
assert.strictEqual(cluster.settings.exec, 'overridden');

test/parallel/test-crypto-stream.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if (!common.hasFipsCrypto) {
4040
});
4141
}
4242

43-
_write(data, encodeing, done) {
43+
_write(data, encoding, done) {
4444
this._buffers.push(data);
4545
return done(null);
4646
}

test/parallel/test-gc-tls-external-memory.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function connect() {
3131
const externalMemoryUsage = process.memoryUsage().external;
3232
assert(externalMemoryUsage >= 0, `${externalMemoryUsage} < 0`);
3333
if (runs++ === 512) {
34-
// Make sure at least half the TLS sockets have been gargbage collected
34+
// Make sure at least half the TLS sockets have been garbage collected
3535
// (so that this test can actually check what it's testing):
3636
assert(gced >= 256, `${gced} < 256`);
3737
return;

test/parallel/test-http-eof-on-connect.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const http = require('http');
2727

2828
// This is a regression test for https://github.com/joyent/node/issues/44
2929
// It is separate from test-http-malformed-request.js because it is only
30-
// reproduceable on the first packet on the first connection to a server.
30+
// reproducible on the first packet on the first connection to a server.
3131

3232
const server = http.createServer(common.mustNotCall());
3333
server.listen(0);

test/parallel/test-http-full-response.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ function runAb(opts, callback) {
5656
const completeRequests = parseInt(m[1]);
5757

5858
m = /HTML transferred:\s*(\d+) bytes/i.exec(stdout);
59-
const htmlTransfered = parseInt(m[1]);
59+
const htmlTransferred = parseInt(m[1]);
6060

6161
assert.strictEqual(bodyLength, documentLength);
62-
assert.strictEqual(completeRequests * documentLength, htmlTransfered);
62+
assert.strictEqual(completeRequests * documentLength, htmlTransferred);
6363

6464
if (callback) callback();
6565
});

test/parallel/test-http-pipeline-flood.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const common = require('../common');
99
// processed).
1010

1111
// Normally when the writable stream emits a 'drain' event, the server then
12-
// uncorks the readable stream, although we arent testing that part here.
12+
// uncorks the readable stream, although we aren't testing that part here.
1313

1414
// The issue being tested exists in Node.js 0.10.20 and is resolved in 0.10.21
1515
// and newer.

test/parallel/test-http2-compat-serverresponse-end-after-statuses-without-body.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ const {
1515
HTTP_STATUS_NOT_MODIFIED
1616
} = h2.constants;
1717

18-
const statusWithouBody = [
18+
const statusWithoutBody = [
1919
HTTP_STATUS_NO_CONTENT,
2020
HTTP_STATUS_RESET_CONTENT,
2121
HTTP_STATUS_NOT_MODIFIED,
2222
];
23-
const STATUS_CODES_COUNT = statusWithouBody.length;
23+
const STATUS_CODES_COUNT = statusWithoutBody.length;
2424

2525
const server = h2.createServer(common.mustCall(function(req, res) {
26-
res.writeHead(statusWithouBody.pop());
26+
res.writeHead(statusWithoutBody.pop());
2727
res.end();
2828
}, STATUS_CODES_COUNT));
2929

test/parallel/test-https-agent-additional-options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function getBaseOptions(port) {
2424
path: '/',
2525
port: port,
2626
ca: options.ca,
27-
rejectUnautorized: true,
27+
rejectUnauthorized: true,
2828
servername: 'agent1',
2929
};
3030
}

test/parallel/test-module-readonly.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ try {
3838
except = err;
3939
}
4040

41-
// Remove the expliclty granted rights, and reenable inheritance
41+
// Remove the explicitly granted rights, and re-enable inheritance
4242
cp.execSync(
4343
`icacls.exe "${readOnlyModFullPath}" /remove "%USERNAME%" /inheritance:e`);
4444

test/parallel/test-querystring-maxKeys-non-finite.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const originalMaxLength = 1000;
3434
const params = createManyParams(count);
3535

3636
// thealphanerd
37-
// 27def4f introduced a change to parse that would cause Inifity
37+
// 27def4f introduced a change to parse that would cause Infinity
3838
// to be passed to String.prototype.split as an argument for limit
3939
// In this instance split will always return an empty array
4040
// this test confirms that the output of parse is the expected length

test/parallel/test-repl-editor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const tests = [
7474
tests.forEach(run);
7575

7676
// Auto code alignment for .editor mode
77-
function testCodeAligment({ input, cursor = 0, line = '' }) {
77+
function testCodeAlignment({ input, cursor = 0, line = '' }) {
7878
const stream = new ArrayStream();
7979
const outputStream = new ArrayStream();
8080

@@ -121,4 +121,4 @@ const codeAlignmentTests = [
121121
}
122122
];
123123

124-
codeAlignmentTests.forEach(testCodeAligment);
124+
codeAlignmentTests.forEach(testCodeAlignment);

test/parallel/test-stdio-pipe-access.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const common = require('../common');
33
if (!common.isMainThread)
44
common.skip("Workers don't have process-like stdio");
55

6-
// Test if Node handles acessing process.stdin if it is a redirected
6+
// Test if Node handles accessing process.stdin if it is a redirected
77
// pipe without deadlocking
88
const { spawn, spawnSync } = require('child_process');
99

test/parallel/test-stream-writable-write-writev-finish.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const stream = require('stream');
174174
};
175175
w.on('error', common.mustCall());
176176
w.on('finish', () => {
177-
w.write("should't write in finish listener");
177+
w.write("shouldn't write in finish listener");
178178
});
179179
w.end();
180180
}

test/parallel/test-timers-unrefd-interval-still-fires.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const timer = setInterval(common.mustCall(() => {
1616
if (--N === 0) {
1717
clearInterval(timer);
1818
timer._onTimeout =
19-
common.mustNotCall('Unrefd interal fired after being cleared');
19+
common.mustNotCall('Unrefd interval fired after being cleared');
2020
clearTimeout(keepOpen);
2121
}
2222
}, N), 1);

test/parallel/test-worker-debug.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ class WorkerSession extends EventEmitter {
130130

131131
async function testBasicWorkerDebug(session, post) {
132132
/*
133-
1. Do 'enble' with waitForDebuggerOnStart = true
133+
1. Do 'enable' with waitForDebuggerOnStart = true
134134
2. Run worker. It should break on start.
135135
3. Enable Runtime (to get console message) and Debugger. Resume.
136136
4. Breaks on the 'debugger' statement. Resume.
137-
5. Console message recieved, worker runs to a completion.
137+
5. Console message received, worker runs to a completion.
138138
6. contextCreated/contextDestroyed had been properly dispatched
139139
*/
140140
console.log('Test basic debug scenario');

tools/cpplint.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def GetNonHeaderExtensions():
129129
likely to be false positives.
130130
131131
quiet
132-
Supress output other than linting errors, such as information about
132+
Suppress output other than linting errors, such as information about
133133
which files have been processed and excluded.
134134
135135
filter=-x,+y,...
@@ -650,7 +650,7 @@ def GetNonHeaderExtensions():
650650
# Files to exclude from linting. This is set by the --exclude flag.
651651
_excludes = None
652652

653-
# Whether to supress PrintInfo messages
653+
# Whether to suppress PrintInfo messages
654654
_quiet = False
655655

656656
# The allowed line length of files.

tools/doc/apilinks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function execSync(command) {
3535
}
3636
}
3737

38-
// Determine orign repo and tag (or hash) of the most recent commit.
38+
// Determine origin repo and tag (or hash) of the most recent commit.
3939
const local_branch = execSync('git name-rev --name-only HEAD');
4040
const tracking_remote = execSync(`git config branch.${local_branch}.remote`);
4141
const remote_url = execSync(`git config remote.${tracking_remote}.url`);

tools/genv8constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def out_define():
7878
# format, but this is the most obvious robust approach. We could almost
7979
# rely on looking at numbered fields, but some instructions look very
8080
# much like hex numbers (e.g., "adc"), and we don't want to risk picking
81-
# those up by mistake, so we look at character-based columns intead.
81+
# those up by mistake, so we look at character-based columns instead.
8282
#
8383
for i in range (0, 3):
8484
# 6-character margin, 2-characters + 1 space for each field

tools/lint-js.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ if (cluster.isMaster) {
192192
const sliceLen = Math.min(maxWorkload, Math.ceil(files.length / numCPUs));
193193
var slice;
194194
if (sliceLen === files.length) {
195-
// Micro-ptimization to avoid splicing to an empty array
195+
// Micro-optimization to avoid splicing to an empty array
196196
slice = files;
197197
files = null;
198198
} else {

tools/lint-md.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function wrap(fn, callback) {
9090
* pipeline), but later also threw an error.
9191
* We’re not about to restart the pipeline again,
9292
* so the only thing left to do is to throw the
93-
* thing instea. */
93+
* thing instead. */
9494
if (callback && invoked) {
9595
throw err
9696
}
@@ -901,7 +901,7 @@ function representYamlFloat(object, style) {
901901
res = object.toString(10);
902902

903903
// JS stringifier can build scientific format without dots: 5e-100,
904-
// while YAML requres dot: 5.e-100. Fix it with simple hack
904+
// while YAML requires dot: 5.e-100. Fix it with simple hack
905905

906906
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;
907907
}
@@ -2322,7 +2322,7 @@ function readBlockScalar(state, nodeIndent) {
23222322
}
23232323
}
23242324

2325-
// Break this `while` cycle and go to the funciton's epilogue.
2325+
// Break this `while` cycle and go to the function's epilogue.
23262326
break;
23272327
}
23282328

0 commit comments

Comments
 (0)