benchmark,doc,lib,src,test,tools: fix typos

PR-URL: https://github.com/nodejs/node/pull/23302
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
Brandon Smith authored and Vse Mozhet Byt committed 2018-10-09 16:53:12 +03:00
1 parent 4d58c08865
commit 13340d47fc
36 files changed
+47 -47

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, {
function main({ n, v }) {
const method = require(v).getCiphers;
var i = 0;
// First call to getChipers will dominate the results
// First call to getCiphers will dominate the results
if (n > 1) {
for (; i < n; i++)
method();
+1 -1
View File
@@ -1757,7 +1757,7 @@ added: v10.7.0
```C
napi_status napi_create_bigint_uint64(napi_env env,
uint64_t vaue,
uint64_t value,
napi_value* result);
```
+1 -1
View File
@@ -128,7 +128,7 @@
const browserGlobals = !process._noBrowserGlobals;
if (browserGlobals) {
// we are setting this here to foward it to the inspector later
// we are setting this here to forward it to the inspector later
perThreadSetup.originalConsole = global.console;
setupGlobalTimeouts();
setupGlobalConsole();
+1 -1
View File
@@ -761,7 +761,7 @@ const proxySocketHandler = {
// indicate if the ping was successful or not. The duration indicates the
// number of milliseconds elapsed since the ping was sent and the ack
// received. The payload is a Buffer containing the 8 bytes of payload
// data received on the PING acknowlegement.
// data received on the PING acknowledgement.
function pingCallback(cb) {
return function pingCallback(ack, duration, payload) {
if (ack) {
+1 -1
View File
@@ -5,7 +5,7 @@ const { tokTypes: tt } = acorn;
// If the error is that we've unexpectedly ended the input,
// then let the user try to recover by adding more input.
// Note: `e` (the original exception) is not used by the current implemention,
// Note: `e` (the original exception) is not used by the current implementation,
// but may be needed in the future.
function isRecoverableError(e, code) {
let recoverable = false;
+1 -1
View File
@@ -14,7 +14,7 @@ namespace node {
* going through JS, and the data is then available to user's via the exposed
* JS object.
*
* While this technique is computationaly efficient, it is effectively a
* While this technique is computationally efficient, it is effectively a
* write to JS program state w/out going through the standard
* (monitored) API. Thus any VM capabilities to detect the modification are
* circumvented.
+2 -2
View File
@@ -576,10 +576,10 @@ void Environment::RunTimers(uv_timer_t* handle) {
ret = cb->Call(env->context(), process, 1, &arg);
} while (ret.IsEmpty() && env->can_call_into_js());
// NOTE(apapirovski): If it ever becomes possibble that `call_into_js` above
// NOTE(apapirovski): If it ever becomes possible that `call_into_js` above
// is reset back to `true` after being previously set to `false` then this
// code becomes invalid and needs to be rewritten. Otherwise catastrophic
// timers corruption will occurr and all timers behaviour will become
// timers corruption will occur and all timers behaviour will become
// entirely unpredictable.
if (ret.IsEmpty())
return;
+1 -1
View File
@@ -57,7 +57,7 @@ class Agent {
bool IsListening() { return io_ != nullptr; }
// Returns true if the Node inspector is actually in use. It will be true
// if either the user explicitely opted into inspector (e.g. with the
// if either the user explicitly opted into inspector (e.g. with the
// --inspect command line flag) or if inspector JS API had been used.
bool IsActive();
+1 -1
View File
@@ -598,7 +598,7 @@ NAPI_EXTERN napi_status napi_adjust_external_memory(napi_env env,
int64_t change_in_bytes,
int64_t* adjusted_value);
// Runnig a script
// Running a script
NAPI_EXTERN napi_status napi_run_script(napi_env env,
napi_value script,
napi_value* result);
+1 -1
View File
@@ -2515,7 +2515,7 @@ int VerifyCallback(int preverify_ok, X509_STORE_CTX* ctx) {
//
// Since we cannot perform I/O quickly enough in this callback, we ignore
// all preverify_ok errors and let the handshake continue. It is
// imparative that the user use Connection::VerifyError after the
// imperative that the user use Connection::VerifyError after the
// 'secure' callback has been made.
return 1;
}
+3 -3
View File
@@ -98,7 +98,7 @@ MaybeLocal<Value> Message::Deserialize(Environment* env,
message_ports_.clear();
std::vector<Local<SharedArrayBuffer>> shared_array_buffers;
// Attach all transfered SharedArrayBuffers to their new Isolate.
// Attach all transferred SharedArrayBuffers to their new Isolate.
for (uint32_t i = 0; i < shared_array_buffers_.size(); ++i) {
Local<SharedArrayBuffer> sab;
if (!shared_array_buffers_[i]->GetSharedArrayBuffer(env, context)
@@ -116,7 +116,7 @@ MaybeLocal<Value> Message::Deserialize(Environment* env,
&delegate);
delegate.deserializer = &deserializer;
// Attach all transfered ArrayBuffers to their new Isolate.
// Attach all transferred ArrayBuffers to their new Isolate.
for (uint32_t i = 0; i < array_buffer_contents_.size(); ++i) {
Local<ArrayBuffer> ab =
ArrayBuffer::New(env->isolate(),
@@ -234,7 +234,7 @@ class SerializerDelegate : public ValueSerializer::Delegate {
friend class worker::Message;
};
} // anynomous namespace
} // anonymous namespace
Maybe<bool> Message::Serialize(Environment* env,
Local<Context> context,
+1 -1
View File
@@ -231,7 +231,7 @@ class OptionsParser {
void AddAlias(const std::string& from,
const std::initializer_list<std::string>& to);
// Add implications from some arbitary option to a boolean one, either
// Add implications from some arbitrary option to a boolean one, either
// in a way that makes `from` set `to` to true or to false.
void Implies(const std::string& from, const std::string& to);
void ImpliesNot(const std::string& from, const std::string& to);
+1 -1
View File
@@ -21,7 +21,7 @@ namespace {
// Yield a JS constructor for SABLifetimePartner objects in the form of a
// standard API object, that has a single field for containing the raw
// SABLiftimePartner* pointer.
// SABLifetimePartner* pointer.
Local<Function> GetSABLifetimePartnerConstructor(
Environment* env, Local<Context> context) {
Local<FunctionTemplate> templ;
@@ -19,7 +19,7 @@ if (process.argv[2] === 'child') {
// Therefore the 'after' of event2 needs to occur before the
// 'after' of event 1.
// The first test of the two below follows that rule,
// the second one doesnt.
// the second one doesn't.
const event1 = new AsyncResource('event1', async_hooks.executionAsyncId());
const event2 = new AsyncResource('event2', async_hooks.executionAsyncId());
@@ -146,7 +146,7 @@ if (process.argv[2] !== 'child') {
}
});
console.error('[PARENT] %d received %d matching messges.',
console.error('[PARENT] %d received %d matching messages.',
worker.pid,
count);
@@ -45,7 +45,7 @@ if (!process.argv[2]) {
} else if (cluster.isMaster) {
cluster.setupMaster({
silient: true,
silent: true,
windowsHide: true
});
@@ -40,7 +40,7 @@ console.log('ok sets defaults');
cluster.setupMaster({ exec: 'overridden' });
assert.strictEqual(cluster.settings.exec, 'overridden');
console.log('ok overrids defaults');
console.log('ok overrides defaults');
cluster.setupMaster({ args: ['foo', 'bar'] });
assert.strictEqual(cluster.settings.exec, 'overridden');
+1 -1
View File
@@ -40,7 +40,7 @@ if (!common.hasFipsCrypto) {
});
}
_write(data, encodeing, done) {
_write(data, encoding, done) {
this._buffers.push(data);
return done(null);
}
+1 -1
View File
@@ -31,7 +31,7 @@ function connect() {
const externalMemoryUsage = process.memoryUsage().external;
assert(externalMemoryUsage >= 0, `${externalMemoryUsage} < 0`);
if (runs++ === 512) {
// Make sure at least half the TLS sockets have been gargbage collected
// Make sure at least half the TLS sockets have been garbage collected
// (so that this test can actually check what it's testing):
assert(gced >= 256, `${gced} < 256`);
return;
+1 -1
View File
@@ -27,7 +27,7 @@ const http = require('http');
// This is a regression test for https://github.com/joyent/node/issues/44
// It is separate from test-http-malformed-request.js because it is only
// reproduceable on the first packet on the first connection to a server.
// reproducible on the first packet on the first connection to a server.
const server = http.createServer(common.mustNotCall());
server.listen(0);
+2 -2
View File
@@ -56,10 +56,10 @@ function runAb(opts, callback) {
const completeRequests = parseInt(m[1]);
m = /HTML transferred:\s*(\d+) bytes/i.exec(stdout);
const htmlTransfered = parseInt(m[1]);
const htmlTransferred = parseInt(m[1]);
assert.strictEqual(bodyLength, documentLength);
assert.strictEqual(completeRequests * documentLength, htmlTransfered);
assert.strictEqual(completeRequests * documentLength, htmlTransferred);
if (callback) callback();
});
+1 -1
View File
@@ -9,7 +9,7 @@ const common = require('../common');
// processed).
// Normally when the writable stream emits a 'drain' event, the server then
// uncorks the readable stream, although we arent testing that part here.
// uncorks the readable stream, although we aren't testing that part here.
// The issue being tested exists in Node.js 0.10.20 and is resolved in 0.10.21
// and newer.
@@ -15,15 +15,15 @@ const {
HTTP_STATUS_NOT_MODIFIED
} = h2.constants;
const statusWithouBody = [
const statusWithoutBody = [
HTTP_STATUS_NO_CONTENT,
HTTP_STATUS_RESET_CONTENT,
HTTP_STATUS_NOT_MODIFIED,
];
const STATUS_CODES_COUNT = statusWithouBody.length;
const STATUS_CODES_COUNT = statusWithoutBody.length;
const server = h2.createServer(common.mustCall(function(req, res) {
res.writeHead(statusWithouBody.pop());
res.writeHead(statusWithoutBody.pop());
res.end();
}, STATUS_CODES_COUNT));
@@ -24,7 +24,7 @@ function getBaseOptions(port) {
path: '/',
port: port,
ca: options.ca,
rejectUnautorized: true,
rejectUnauthorized: true,
servername: 'agent1',
};
}
+1 -1
View File
@@ -38,7 +38,7 @@ try {
except = err;
}
// Remove the expliclty granted rights, and reenable inheritance
// Remove the explicitly granted rights, and re-enable inheritance
cp.execSync(
`icacls.exe "${readOnlyModFullPath}" /remove "%USERNAME%" /inheritance:e`);
@@ -34,7 +34,7 @@ const originalMaxLength = 1000;
const params = createManyParams(count);
// thealphanerd
// 27def4f introduced a change to parse that would cause Inifity
// 27def4f introduced a change to parse that would cause Infinity
// to be passed to String.prototype.split as an argument for limit
// In this instance split will always return an empty array
// this test confirms that the output of parse is the expected length
+2 -2
View File
@@ -74,7 +74,7 @@ const tests = [
tests.forEach(run);
// Auto code alignment for .editor mode
function testCodeAligment({ input, cursor = 0, line = '' }) {
function testCodeAlignment({ input, cursor = 0, line = '' }) {
const stream = new ArrayStream();
const outputStream = new ArrayStream();
@@ -121,4 +121,4 @@ const codeAlignmentTests = [
}
];
codeAlignmentTests.forEach(testCodeAligment);
codeAlignmentTests.forEach(testCodeAlignment);
+1 -1
View File
@@ -3,7 +3,7 @@ const common = require('../common');
if (!common.isMainThread)
common.skip("Workers don't have process-like stdio");
// Test if Node handles acessing process.stdin if it is a redirected
// Test if Node handles accessing process.stdin if it is a redirected
// pipe without deadlocking
const { spawn, spawnSync } = require('child_process');
@@ -174,7 +174,7 @@ const stream = require('stream');
};
w.on('error', common.mustCall());
w.on('finish', () => {
w.write("should't write in finish listener");
w.write("shouldn't write in finish listener");
});
w.end();
}
@@ -16,7 +16,7 @@ const timer = setInterval(common.mustCall(() => {
if (--N === 0) {
clearInterval(timer);
timer._onTimeout =
common.mustNotCall('Unrefd interal fired after being cleared');
common.mustNotCall('Unrefd interval fired after being cleared');
clearTimeout(keepOpen);
}
}, N), 1);
+2 -2
View File
@@ -130,11 +130,11 @@ class WorkerSession extends EventEmitter {
async function testBasicWorkerDebug(session, post) {
/*
1. Do 'enble' with waitForDebuggerOnStart = true
1. Do 'enable' with waitForDebuggerOnStart = true
2. Run worker. It should break on start.
3. Enable Runtime (to get console message) and Debugger. Resume.
4. Breaks on the 'debugger' statement. Resume.
5. Console message recieved, worker runs to a completion.
5. Console message received, worker runs to a completion.
6. contextCreated/contextDestroyed had been properly dispatched
*/
console.log('Test basic debug scenario');
+2 -2
View File
@@ -129,7 +129,7 @@ Syntax: cpplint.py [--verbose=#] [--output=emacs|eclipse|vs7|junit]
likely to be false positives.
quiet
Supress output other than linting errors, such as information about
Suppress output other than linting errors, such as information about
which files have been processed and excluded.
filter=-x,+y,...
@@ -650,7 +650,7 @@ _repository = None
# Files to exclude from linting. This is set by the --exclude flag.
_excludes = None
# Whether to supress PrintInfo messages
# Whether to suppress PrintInfo messages
_quiet = False
# The allowed line length of files.
+1 -1
View File
@@ -35,7 +35,7 @@ function execSync(command) {
}
}
// Determine orign repo and tag (or hash) of the most recent commit.
// Determine origin repo and tag (or hash) of the most recent commit.
const local_branch = execSync('git name-rev --name-only HEAD');
const tracking_remote = execSync(`git config branch.${local_branch}.remote`);
const remote_url = execSync(`git config remote.${tracking_remote}.url`);
+1 -1
View File
@@ -78,7 +78,7 @@ for line in pipe:
# format, but this is the most obvious robust approach. We could almost
# rely on looking at numbered fields, but some instructions look very
# much like hex numbers (e.g., "adc"), and we don't want to risk picking
# those up by mistake, so we look at character-based columns intead.
# those up by mistake, so we look at character-based columns instead.
#
for i in range (0, 3):
# 6-character margin, 2-characters + 1 space for each field
+1 -1
View File
@@ -192,7 +192,7 @@ if (cluster.isMaster) {
const sliceLen = Math.min(maxWorkload, Math.ceil(files.length / numCPUs));
var slice;
if (sliceLen === files.length) {
// Micro-ptimization to avoid splicing to an empty array
// Micro-optimization to avoid splicing to an empty array
slice = files;
files = null;
} else {
+3 -3
View File
@@ -90,7 +90,7 @@ function wrap(fn, callback) {
* pipeline), but later also threw an error.
* We’re not about to restart the pipeline again,
* so the only thing left to do is to throw the
* thing instea. */
* thing instead. */
if (callback && invoked) {
throw err
}
@@ -901,7 +901,7 @@ function representYamlFloat(object, style) {
res = object.toString(10);
// JS stringifier can build scientific format without dots: 5e-100,
// while YAML requres dot: 5.e-100. Fix it with simple hack
// while YAML requires dot: 5.e-100. Fix it with simple hack
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;
}
@@ -2322,7 +2322,7 @@ function readBlockScalar(state, nodeIndent) {
}
}
// Break this `while` cycle and go to the funciton's epilogue.
// Break this `while` cycle and go to the function's epilogue.
break;
}