Skip to content

Commit

Permalink
benchmark,doc,lib,src,test,tools: fix typos
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
brandon93s authored and targos committed Oct 10, 2018
1 parent 12ff395 commit 2d7e4e0
Show file tree
Hide file tree
Showing 35 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion benchmark/crypto/get-ciphers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
```

Expand Down
2 changes: 1 addition & 1 deletion lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,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();
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/http2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/repl/recoverable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/aliased_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/inspector_agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion src/node_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2511,7 +2511,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;
}
Expand Down
6 changes: 3 additions & 3 deletions src/node_messaging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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(),
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/node_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/sharedarraybuffer_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion test/internet/test-dgram-broadcast-multi-process.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-cluster-fork-windowsHide.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if (!process.argv[2]) {

} else if (cluster.isMaster) {
cluster.setupMaster({
silient: true,
silent: true,
windowsHide: true
});

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-cluster-setup-master-cumulative.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if (!common.hasFipsCrypto) {
});
}

_write(data, encodeing, done) {
_write(data, encoding, done) {
this._buffers.push(data);
return done(null);
}
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-gc-tls-external-memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http-eof-on-connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http-full-response.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http-pipeline-flood.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-https-agent-additional-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function getBaseOptions(port) {
path: '/',
port: port,
ca: options.ca,
rejectUnautorized: true,
rejectUnauthorized: true,
servername: 'agent1',
};
}
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-module-readonly.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-querystring-maxKeys-non-finite.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-repl-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -121,4 +121,4 @@ const codeAlignmentTests = [
}
];

codeAlignmentTests.forEach(testCodeAligment);
codeAlignmentTests.forEach(testCodeAlignment);
2 changes: 1 addition & 1 deletion test/parallel/test-stdio-pipe-access.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-stream-writable-write-writev-finish.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion test/parallel/test-timers-unrefd-interval-still-fires.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-worker-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions tools/cpplint.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def GetNonHeaderExtensions():
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,...
Expand Down Expand Up @@ -650,7 +650,7 @@ def GetNonHeaderExtensions():
# 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.
Expand Down
2 changes: 1 addition & 1 deletion tools/doc/apilinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down
2 changes: 1 addition & 1 deletion tools/genv8constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def out_define():
# 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
Expand Down
2 changes: 1 addition & 1 deletion tools/lint-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions tools/lint-md.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 2d7e4e0

Please sign in to comment.