diff --git a/benchmark/compare.R b/benchmark/compare.R index 3f37cad74ad847..5085f4ea73b71a 100644 --- a/benchmark/compare.R +++ b/benchmark/compare.R @@ -47,7 +47,7 @@ statistics = ddply(dat, "name", function(subdat) { p.value = NA; confidence = 'NA'; - # Check if there is enough data to calulate the calculate the p-value + # Check if there is enough data to calculate the calculate the p-value if (length(old.rate) > 1 && length(new.rate) > 1) { # Perform a statistics test to see of there actually is a difference in # performance. diff --git a/benchmark/compare.js b/benchmark/compare.js index af36d1c4239edf..a671bc9f3d7be6 100644 --- a/benchmark/compare.js +++ b/benchmark/compare.js @@ -9,7 +9,7 @@ const BenchmarkProgress = require('./_benchmark_progress.js'); // Parse arguments // const cli = CLI(`usage: ./node compare.js [options] [--] ... - Run each benchmark in the directory many times using two diffrent + Run each benchmark in the directory many times using two different node versions. More than one directory can be specified. The output is formatted as csv, which can be processed using for example 'compare.R'. diff --git a/configure b/configure index e1e8ab5a861c29..0ec69229a8530f 100755 --- a/configure +++ b/configure @@ -503,7 +503,7 @@ def warn(msg): prefix = '\033[1m\033[93mWARNING\033[0m' if os.isatty(1) else 'WARNING' print('%s: %s' % (prefix, msg)) -# track if warnings occured +# track if warnings occurred warn.warned = False def b(value): diff --git a/doc/api_assets/dnt_helper.js b/doc/api_assets/dnt_helper.js index f255d916c2df32..9906db4f276cd7 100644 --- a/doc/api_assets/dnt_helper.js +++ b/doc/api_assets/dnt_helper.js @@ -26,7 +26,7 @@ function _dntEnabled(dnt, userAgent) { var fxMatch = ua.match(/Firefox\/(\d+)/); var ieRegEx = /MSIE|Trident/i; var isIE = ieRegEx.test(ua); - // Matches from Windows up to the first occurance of ; un-greedily + // Matches from Windows up to the first occurrence of ; un-greedily // http://www.regexr.com/3c2el var platform = ua.match(/Windows.+?(?=;)/g); diff --git a/doc/changelogs/CHANGELOG_ARCHIVE.md b/doc/changelogs/CHANGELOG_ARCHIVE.md index 797317ea43fe81..7a643ca5c3a397 100644 --- a/doc/changelogs/CHANGELOG_ARCHIVE.md +++ b/doc/changelogs/CHANGELOG_ARCHIVE.md @@ -3025,7 +3025,7 @@ https://github.com/nodejs/node/commit/311d7dee19034ff1c6bc9098c36973b8d687eaba * After V8 heap is compact, don't use a timer every 2 seconds. * Improve nextTick implementation. - * Add primative support for Upgrading HTTP connections. + * Add primitive support for Upgrading HTTP connections. (See commit log for docs 760bba5) * Add timeout and maxBuffer options to child_process.exec diff --git a/doc/changelogs/CHANGELOG_V5.md b/doc/changelogs/CHANGELOG_V5.md index aa69d93f7ce180..5fefbcc81a6b85 100644 --- a/doc/changelogs/CHANGELOG_V5.md +++ b/doc/changelogs/CHANGELOG_V5.md @@ -215,7 +215,7 @@ This is a security release. All Node.js users should consult the security releas ### Notable changes **http**: - * Enclose IPv6 Host header in square brackets. This will enable proper separation of the host adress from any port reference (Mihai Potra) [#5314](https://github.com/nodejs/node/pull/5314) + * Enclose IPv6 Host header in square brackets. This will enable proper separation of the host address from any port reference (Mihai Potra) [#5314](https://github.com/nodejs/node/pull/5314) **path**: * Make win32.isAbsolute more consistent (Brian White) [#6028](https://github.com/nodejs/node/pull/6028) diff --git a/src/debug-agent.cc b/src/debug-agent.cc index 2d8ed8afc980ec..2ce8381fc51462 100644 --- a/src/debug-agent.cc +++ b/src/debug-agent.cc @@ -182,7 +182,7 @@ void Agent::WorkerRun() { CHECK_EQ(&child_loop_, env.event_loop()); uv_run(&child_loop_, UV_RUN_DEFAULT); - // Clean-up peristent + // Clean-up persistent api_.Reset(); } isolate->Dispose(); diff --git a/src/node.cc b/src/node.cc index 57415bba41805c..a7c171b75cee83 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3464,7 +3464,7 @@ void LoadEnvironment(Environment* env) { // (FatalException(), break on uncaught exception in debugger) // // This is not strictly necessary since it's almost impossible - // to attach the debugger fast enought to break on exception + // to attach the debugger fast enough to break on exception // thrown during process startup. try_catch.SetVerbose(true); diff --git a/src/node_crypto.cc b/src/node_crypto.cc index e2a83a548a967c..9cbabcd530c900 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -913,7 +913,7 @@ void SecureContext::SetDHParam(const FunctionCallbackInfo& args) { (void) &clear_error_on_return; // Silence compiler warning. // Auto DH is not supported in openssl 1.0.1, so dhparam needs - // to be specifed explicitly + // to be specified explicitly if (args.Length() != 1) return env->ThrowTypeError("DH argument is mandatory"); diff --git a/src/string_search.h b/src/string_search.h index abc69edb87621d..6040888110c2ec 100644 --- a/src/string_search.h +++ b/src/string_search.h @@ -238,7 +238,7 @@ inline const void* MemrchrFill(const void* haystack, uint8_t needle, } -// Finds the first occurence of *two-byte* character pattern[0] in the string +// Finds the first occurrence of *two-byte* character pattern[0] in the string // `subject`. Does not check that the whole pattern matches. template inline size_t FindFirstCharacter(Vector pattern, @@ -284,7 +284,7 @@ inline size_t FindFirstCharacter(Vector pattern, } -// Finds the first occurance of the byte pattern[0] in string `subject`. +// Finds the first occurrence of the byte pattern[0] in string `subject`. // Does not verify that the whole pattern matches. template <> inline size_t FindFirstCharacter(Vector pattern, @@ -373,7 +373,7 @@ size_t StringSearch::BoyerMooreSearch( // Only preprocess at most kBMMaxShift last characters of pattern. size_t start = search->start_; - int* bad_char_occurence = search->bad_char_table(); + int* bad_char_occurrence = search->bad_char_table(); int* good_suffix_shift = search->good_suffix_shift_table(); Char last_char = pattern[pattern_length - 1]; @@ -383,7 +383,7 @@ size_t StringSearch::BoyerMooreSearch( size_t j = pattern_length - 1; int c; while (last_char != (c = subject[index + j])) { - int shift = j - CharOccurrence(bad_char_occurence, c); + int shift = j - CharOccurrence(bad_char_occurrence, c); index += shift; if (index > subject_length - pattern_length) { return subject.length(); @@ -399,11 +399,11 @@ size_t StringSearch::BoyerMooreSearch( // we have matched more than our tables allow us to be smart about. // Fall back on BMH shift. index += pattern_length - 1 - - CharOccurrence(bad_char_occurence, + CharOccurrence(bad_char_occurrence, static_cast(last_char)); } else { int gs_shift = good_suffix_shift[j + 1]; - int bc_occ = CharOccurrence(bad_char_occurence, c); + int bc_occ = CharOccurrence(bad_char_occurrence, c); int shift = j - bc_occ; if (gs_shift > shift) { shift = gs_shift; diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index d56128fec6c5ce..581e017ef85016 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -123,7 +123,7 @@ void TLSWrap::InitSSL() { SSL_set_bio(ssl_, enc_in_, enc_out_); - // NOTE: This could be overriden in SetVerifyMode + // NOTE: This could be overridden in SetVerifyMode SSL_set_verify(ssl_, SSL_VERIFY_NONE, crypto::VerifyCallback); #ifdef SSL_MODE_RELEASE_BUFFERS diff --git a/test/internet/test-dgram-broadcast-multi-process.js b/test/internet/test-dgram-broadcast-multi-process.js index da3bd8cceb74e3..8414e558bab6d1 100644 --- a/test/internet/test-dgram-broadcast-multi-process.js +++ b/test/internet/test-dgram-broadcast-multi-process.js @@ -227,7 +227,7 @@ if (process.argv[2] === 'child') { listenSocket.on('close', function() { //HACK: Wait to exit the process to ensure that the parent //process has had time to receive all messages via process.send() - //This may be indicitave of some other issue. + //This may be indicative of some other issue. setTimeout(function() { process.exit(); }, 1000); diff --git a/test/parallel/test-child-process-fork-dgram.js b/test/parallel/test-child-process-fork-dgram.js index 4447c54cae8f0c..37b40dccd3f369 100644 --- a/test/parallel/test-child-process-fork-dgram.js +++ b/test/parallel/test-child-process-fork-dgram.js @@ -63,7 +63,7 @@ if (process.argv[2] === 'child') { const timer = setInterval(function() { /* * Both the parent and the child got at least one message, - * test passed, clean up everyting. + * test passed, clean up everything. */ if (parentGotMessage && childGotMessage) { clearInterval(timer); diff --git a/test/parallel/test-cluster-message.js b/test/parallel/test-cluster-message.js index 5b537bbe73a755..0b699093821b82 100644 --- a/test/parallel/test-cluster-message.js +++ b/test/parallel/test-cluster-message.js @@ -102,7 +102,7 @@ if (cluster.isWorker) { if (data.code === 'received message') { check('worker', data.echo === 'message from master'); } else { - throw new Error('wrong TCP message recived: ' + data); + throw new Error('wrong TCP message received: ' + data); } }); diff --git a/test/parallel/test-cluster-setup-master-multiple.js b/test/parallel/test-cluster-setup-master-multiple.js index 25cff7cb33e0c1..c8fefddc39a23e 100644 --- a/test/parallel/test-cluster-setup-master-multiple.js +++ b/test/parallel/test-cluster-setup-master-multiple.js @@ -6,7 +6,7 @@ const cluster = require('cluster'); assert(cluster.isMaster); // The cluster.settings object is cloned even though the current implementation -// makes that unecessary. This is to make the test less fragile if the +// makes that unnecessary. This is to make the test less fragile if the // implementation ever changes such that cluster.settings is mutated instead of // replaced. function cheapClone(obj) { diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js index 6ee3aeac36dd89..7dbd5e41639a38 100644 --- a/test/parallel/test-crypto-binary-default.js +++ b/test/parallel/test-crypto-binary-default.js @@ -477,7 +477,7 @@ function testCipher2(key) { function testCipher3(key, iv) { - // Test encyrption and decryption with explicit key and iv + // Test encryption and decryption with explicit key and iv const plaintext = '32|RmVZZkFUVmpRRkp0TmJaUm56ZU9qcnJkaXNNWVNpTTU*|iXmckfRWZBGWWELw' + 'eCBsThSsfUHLeRe0KCsK8ooHgxie0zOINpXxfZi/oNG7uq9JWFVCk70gfzQH8ZUJ' + @@ -496,7 +496,7 @@ function testCipher3(key, iv) { function testCipher4(key, iv) { - // Test encyrption and decryption with explicit key and iv + // Test encryption and decryption with explicit key and iv const plaintext = '32|RmVZZkFUVmpRRkp0TmJaUm56ZU9qcnJkaXNNWVNpTTU*|iXmckfRWZBGWWELw' + 'eCBsThSsfUHLeRe0KCsK8ooHgxie0zOINpXxfZi/oNG7uq9JWFVCk70gfzQH8ZUJ' + diff --git a/test/parallel/test-crypto-cipheriv-decipheriv.js b/test/parallel/test-crypto-cipheriv-decipheriv.js index 6f22dbe71affb1..a03a25d511fe16 100644 --- a/test/parallel/test-crypto-cipheriv-decipheriv.js +++ b/test/parallel/test-crypto-cipheriv-decipheriv.js @@ -9,7 +9,7 @@ if (!common.hasCrypto) { const crypto = require('crypto'); function testCipher1(key, iv) { - // Test encyrption and decryption with explicit key and iv + // Test encryption and decryption with explicit key and iv const plaintext = '32|RmVZZkFUVmpRRkp0TmJaUm56ZU9qcnJkaXNNWVNpTTU*|iXmckfRWZBGWWELw' + 'eCBsThSsfUHLeRe0KCsK8ooHgxie0zOINpXxfZi/oNG7uq9JWFVCk70gfzQH8ZUJ' + @@ -41,7 +41,7 @@ function testCipher1(key, iv) { function testCipher2(key, iv) { - // Test encyrption and decryption with explicit key and iv + // Test encryption and decryption with explicit key and iv const plaintext = '32|RmVZZkFUVmpRRkp0TmJaUm56ZU9qcnJkaXNNWVNpTTU*|iXmckfRWZBGWWELw' + 'eCBsThSsfUHLeRe0KCsK8ooHgxie0zOINpXxfZi/oNG7uq9JWFVCk70gfzQH8ZUJ' + diff --git a/test/parallel/test-event-emitter-add-listeners.js b/test/parallel/test-event-emitter-add-listeners.js index 33125daabdb3b3..81af3fd50c8b50 100644 --- a/test/parallel/test-event-emitter-add-listeners.js +++ b/test/parallel/test-event-emitter-add-listeners.js @@ -5,8 +5,8 @@ const EventEmitter = require('events'); { const ee = new EventEmitter(); - const events_new_listener_emited = []; - const listeners_new_listener_emited = []; + const events_new_listener_emitted = []; + const listeners_new_listener_emitted = []; // Sanity check assert.strictEqual(ee.addListener, ee.on); @@ -16,8 +16,8 @@ const EventEmitter = require('events'); if (event === 'newListener') return; - events_new_listener_emited.push(event); - listeners_new_listener_emited.push(listener); + events_new_listener_emitted.push(event); + listeners_new_listener_emitted.push(listener); }); const hello = common.mustCall(function(a, b) { @@ -33,8 +33,8 @@ const EventEmitter = require('events'); ee.on('hello', hello); ee.once('foo', common.fail); - assert.deepStrictEqual(['hello', 'foo'], events_new_listener_emited); - assert.deepStrictEqual([hello, common.fail], listeners_new_listener_emited); + assert.deepStrictEqual(['hello', 'foo'], events_new_listener_emitted); + assert.deepStrictEqual([hello, common.fail], listeners_new_listener_emitted); ee.emit('hello', 'a', 'b'); } diff --git a/test/parallel/test-fs-access.js b/test/parallel/test-fs-access.js index b03bf572f6a5bd..d5934dd614ec04 100644 --- a/test/parallel/test-fs-access.js +++ b/test/parallel/test-fs-access.js @@ -32,11 +32,11 @@ createFileWithPerms(readWriteFile, 0o666); * * There's not really any point in resetting the process' user id to 0 after * changing it to 'nobody', since in the case that the test runs without - * superuser priviledge, it is not possible to change its process user id to + * superuser privilege, it is not possible to change its process user id to * superuser. * * It can prevent the test from removing files created before the change of user - * id, but that's fine. In this case, it is the responsability of the + * id, but that's fine. In this case, it is the responsibility of the * continuous integration platform to take care of that. */ let hasWriteAccessForReadonlyFile = false; diff --git a/test/parallel/test-process-no-deprecation.js b/test/parallel/test-process-no-deprecation.js index 60394ea0d38ddf..4d4dfa86fb67ad 100644 --- a/test/parallel/test-process-no-deprecation.js +++ b/test/parallel/test-process-no-deprecation.js @@ -1,7 +1,7 @@ 'use strict'; // Flags: --no-warnings -// The --no-warnings flag only supresses writing the warning to stderr, not the +// The --no-warnings flag only suppresses writing the warning to stderr, not the // emission of the corresponding event. This test file can be run without it. const common = require('../common'); diff --git a/test/parallel/test-stream-readable-needReadable.js b/test/parallel/test-stream-readable-needReadable.js index 48229edd202333..be397dc5dc5f74 100644 --- a/test/parallel/test-stream-readable-needReadable.js +++ b/test/parallel/test-stream-readable-needReadable.js @@ -74,7 +74,7 @@ const slowProducer = new Readable({ slowProducer.on('readable', common.mustCall(() => { if (slowProducer.read(8) === null) { - // The buffer doesn't have enough data, and the stream is not ened, + // The buffer doesn't have enough data, and the stream is not need, // we need to notify the reader when data arrives. assert.strictEqual(slowProducer._readableState.needReadable, true); } else { diff --git a/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js b/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js index f42144360b6941..5d57bbaae0011e 100644 --- a/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js +++ b/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js @@ -25,7 +25,7 @@ const server = net.createServer(function onClient(client) { clients[1].end(); }); - // Use a delay that is higher than the lowest timer resolution accross all + // Use a delay that is higher than the lowest timer resolution across all // supported platforms, so that the two timers don't fire at the same time. clients[1].setTimeout(50); } diff --git a/test/parallel/test-tls-check-server-identity.js b/test/parallel/test-tls-check-server-identity.js index 5c89ef8bf4d425..9439735ce069b4 100644 --- a/test/parallel/test-tls-check-server-identity.js +++ b/test/parallel/test-tls-check-server-identity.js @@ -177,7 +177,7 @@ const tests = [ error: 'Host: a.b.a.com. is not in the cert\'s altnames: ' + 'DNS:*b.a.com' }, - // Mutliple DNS names + // Multiple DNS names { host: 'a.b.a.com', cert: { subjectaltname: 'DNS:*b.a.com, DNS:a.b.a.com',