Commit 96ee81c708a for nodejs

commit 96ee81c708a382fb72c9b5eb69dd5c9097ab2bfb
Author: Noah <noah.webber@pmg.com>
Date:   Tue Sep 22 18:53:54 2026 -0500

    doc,src,test: fix typos in code comments

    Correct miscellaneous spelling and grammar typos in code comments and
    documentation. No code identifiers or runtime logic were modified.

    Signed-off-by: Noah Webber <noah.webber@pmg.com>
    Assisted-by: Gemini
    PR-URL: https://github.com/nodejs/node/pull/66218
    Reviewed-By: Tim Perry <pimterry@gmail.com>
    Reviewed-By: Filip Skokan <panva.ip@gmail.com>

diff --git a/benchmark/fixtures/coverage-many-branches.js b/benchmark/fixtures/coverage-many-branches.js
index 9cb6360336e..45f9c4b7f52 100644
--- a/benchmark/fixtures/coverage-many-branches.js
+++ b/benchmark/fixtures/coverage-many-branches.js
@@ -30,7 +30,7 @@ class CoveredClass {
   }
 }

-// Excercise coverage of functions:
+// Exercise coverage of functions:
 function add(x, y) {
   const mt = new CoveredClass(x, y);
   return mt.add();
diff --git a/benchmark/misc/startup-cli-version.js b/benchmark/misc/startup-cli-version.js
index a553f90621f..f67be6263fe 100644
--- a/benchmark/misc/startup-cli-version.js
+++ b/benchmark/misc/startup-cli-version.js
@@ -8,7 +8,7 @@ const path = require('path');
 // checked into the source code. We use --version because the output
 // tends to be minimal and fewer operations are done to generate
 // these so that the startup cost is still dominated by a more
-// indispensible part of the CLI.
+// indispensable part of the CLI.
 // NOTE: not all tools are present in tarball hence need to filter
 const availableCli = [
   'tools/eslint/node_modules/eslint/bin/eslint.js',
diff --git a/lib/internal/bootstrap/realm.js b/lib/internal/bootstrap/realm.js
index 92314a873d3..0be0998e7ee 100644
--- a/lib/internal/bootstrap/realm.js
+++ b/lib/internal/bootstrap/realm.js
@@ -120,7 +120,7 @@ const legacyWrapperList = new SafeSet([
   'util',
 ]);

-// The code bellow assumes that the two lists must not contain any modules
+// The code below assumes that the two lists must not contain any modules
 // beginning with "internal/".
 // Modules that can only be imported via the node: scheme.
 const schemelessBlockList = new SafeSet([
diff --git a/lib/internal/main/embedding.js b/lib/internal/main/embedding.js
index 31c55459a13..cb88a443c40 100644
--- a/lib/internal/main/embedding.js
+++ b/lib/internal/main/embedding.js
@@ -121,7 +121,7 @@ function embedderRunESM(content, filename) {
   const wrap = compileSourceTextModule(resourceName, content, kEmbedder, context);

   // TODO(joyeecheung): we may want to return the v8::Module via a vm.SourceTextModule
-  // when vm.SourceTextModule stablizes, or put it in an out parameter.
+  // when vm.SourceTextModule stabilizes, or put it in an out parameter.
   return wrap.getNamespace();
 }

diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
index e3baaaefa6c..84ff29f0803 100644
--- a/lib/internal/modules/esm/translators.js
+++ b/lib/internal/modules/esm/translators.js
@@ -264,7 +264,7 @@ function createCJSModuleWrap(url, translateContext, parentURL) {
           !ObjectPrototypeHasOwnProperty(exports, exportName)) {
         continue;
       }
-      // We might trigger a getter -> dont fail.
+      // We might trigger a getter -> don't fail.
       let value;
       try {
         value = exports[exportName];
diff --git a/lib/internal/quic/quic.js b/lib/internal/quic/quic.js
index b1584cd0dfb..4922ce56275 100644
--- a/lib/internal/quic/quic.js
+++ b/lib/internal/quic/quic.js
@@ -1537,7 +1537,7 @@ async function consumeSyncSource(handle, stream, source) {
       stream.destroy(err);
     } else {
       // If the stream is already destroyed, rethrow the error to avoid
-      // silently swallowing it. Tho in practice this shouldn't happen.
+      // silently swallowing it. Though in practice this shouldn't happen.
       throw err;
     }
   }
@@ -4984,7 +4984,7 @@ class QuicEndpoint {
     // As QuicSessions are closed they are expected to remove themselves
     // from the sessions collection. Just in case they don't, let's force
     // it by resetting the set so we don't leak memory. Let's emit a warning,
-    // tho, if the set is not empty at this point as that would indicate a
+    // though, if the set is not empty at this point as that would indicate a
     // bug in Node.js that should be fixed.
     if (inner.sessions.size > 0) {
       process.emitWarning(
diff --git a/src/cppgc_helpers.h b/src/cppgc_helpers.h
index f1363d5da78..3dfd31bcb29 100644
--- a/src/cppgc_helpers.h
+++ b/src/cppgc_helpers.h
@@ -90,7 +90,7 @@ class CppgcMixin : public cppgc::GarbageCollectedMixin, public MemoryRetainer {
   // during Realm shutdown. The destruction of the wrappers would happen later,
   // when the final garbage collection is triggered when CppHeap is torn down as
   // part of the Isolate teardown. If subclasses of CppgcMixin wish to perform
-  // cleanups that depend on the Realm during destruction, they should implment
+  // cleanups that depend on the Realm during destruction, they should implement
   // it in a Clean() override, and then call this->Finalize() from their
   // destructor. Outside of Finalize(), subclasses should avoid calling
   // into JavaScript or perform any operation that can trigger garbage
diff --git a/src/dataqueue/queue.cc b/src/dataqueue/queue.cc
index cef5f4456b3..96a7956b874 100644
--- a/src/dataqueue/queue.cc
+++ b/src/dataqueue/queue.cc
@@ -943,11 +943,11 @@ class FdEntry final : public EntryImpl {
     uv_fs_t req = uv_fs_t();
     auto cleanup = OnScopeLeave([&] { uv_fs_req_cleanup(&req); });
     // TODO(jasnell): Note the use of a sync fs call here is a bit unfortunate.
-    // Doing this asynchronously creates a bit of a race condition tho, a file
-    // could be unmodified when we call the operation but then by the time the
-    // async callback is triggered to give us that answer the file is modified.
-    // While such silliness is still possible here, the sync call at least makes
-    // it less likely to hit the race.
+    // Doing this asynchronously creates a bit of a race condition though, a
+    // file could be unmodified when we call the operation but then by the time
+    // the async callback is triggered to give us that answer the file is
+    // modified. While such silliness is still possible here, the sync call at
+    // least makes it less likely to hit the race.
     if (uv_fs_fstat(nullptr, &req, fd, nullptr) < 0) return true;
     return entry->is_modified(req.statbuf);
   }
diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc
index 6d954e3de17..464fea7a612 100644
--- a/src/fs_event_wrap.cc
+++ b/src/fs_event_wrap.cc
@@ -221,7 +221,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename,
     // TODO(@jasnell): Historically, this code has failed to correctly
     // propagate any error returned by the StringBytes::Encode method,
     // and would instead just crash the process. That behavior is preserved
-    // here but should be looked at. Preferrably errors would be handled
+    // here but should be looked at. Preferably errors would be handled
     // correctly here.
     TryCatch try_catch(env->isolate());
     MaybeLocal<Value> fn =
diff --git a/src/node.cc b/src/node.cc
index 2993fda0e9c..94805b74123 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -516,7 +516,7 @@ void ResetSignalHandlers() {
       // The only bad handler value we can inherit from before exec is SIG_IGN
       // (any actual function pointer is reset to SIG_DFL during exec).
       // If that's the case, we want to reset it back to SIG_DFL.
-      // However, it's also possible that an embeder (or an LD_PRELOAD-ed
+      // However, it's also possible that an embedder (or an LD_PRELOAD-ed
       // library) has set up own signal handler for own purposes
       // (e.g. profiling). If that's the case, we want to keep it intact.
       struct sigaction old;
diff --git a/src/node_file.cc b/src/node_file.cc
index a95cd5eba14..b624e9da41b 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -461,7 +461,7 @@ void FileHandle::CloseReq::MemoryInfo(MemoryTracker* tracker) const {
 // Closes this FileHandle asynchronously and returns a Promise that will be
 // resolved when the callback is invoked, or rejects with a UVException if
 // there was a problem closing the fd. This is the preferred mechanism for
-// closing the FD object even tho the object will attempt to close
+// closing the FD object even though the object will attempt to close
 // automatically on gc.
 MaybeLocal<Promise> FileHandle::ClosePromise() {
   Isolate* isolate = env()->isolate();
diff --git a/src/node_http2.cc b/src/node_http2.cc
index 3b8d87a2215..86b09c1d4ef 100644
--- a/src/node_http2.cc
+++ b/src/node_http2.cc
@@ -792,7 +792,7 @@ void Http2Session::HasPendingData(const FunctionCallbackInfo<Value>& args) {
 bool Http2Session::HasPendingData() const {
   nghttp2_session* session = session_.get();
   int want_write = nghttp2_session_want_write(session);
-  // It is expected that want_read will alway be 0 if graceful
+  // It is expected that want_read will always be 0 if graceful
   // session close is initiated and goaway frame is sent.
   int want_read = nghttp2_session_want_read(session);
   if (want_write == 0 && want_read == 0) {
@@ -962,7 +962,7 @@ ssize_t Http2Session::OnDWordAlignedPadding(size_t frameLen,
   size_t pad = frameLen + (8 - r);

   // If maxPayloadLen happens to be less than the calculated pad length,
-  // use the max instead, even tho this means the frame will not be
+  // use the max instead, even though this means the frame will not be
   // aligned.
   pad = std::min(maxPayloadLen, pad);
   Debug(this, "using frame size padding: %d", pad);
diff --git a/src/node_platform.cc b/src/node_platform.cc
index 4bb8ac52b15..ff4b139a72e 100644
--- a/src/node_platform.cc
+++ b/src/node_platform.cc
@@ -233,7 +233,7 @@ class WorkerThreadsTaskRunner::DelayedTaskScheduler {
   // to it when the timer expires.
   TaskQueue<TaskQueueEntry>* pending_worker_tasks_;

-  // Locally scheduled tasks to be poped into the worker task runner queue.
+  // Locally scheduled tasks to be popped into the worker task runner queue.
   // It is flushed whenever the next closest timer expires.
   TaskQueue<Task> tasks_;
   uv_loop_t loop_;
diff --git a/src/quic/session.h b/src/quic/session.h
index 936c9e68db6..9834aa7ec13 100644
--- a/src/quic/session.h
+++ b/src/quic/session.h
@@ -536,7 +536,7 @@ class Session final : public AsyncWrap, private SessionTicket::AppData::Source {
   void set_priority_supported(bool on = true);

   // Open a new locally-initialized stream with the specified directionality.
-  // If the session is not yet in a state where the stream can be openen --
+  // If the session is not yet in a state where the stream can be opened --
   // such as when the handshake is not yet sufficiently far along and ORTT
   // session resumption is not being used -- then the stream will be created
   // in a pending state where actually opening the stream will be deferred.
diff --git a/src/quic/streams.h b/src/quic/streams.h
index 38e8f2ae978..db6caaec088 100644
--- a/src/quic/streams.h
+++ b/src/quic/streams.h
@@ -248,7 +248,7 @@ class Stream final : public AsyncWrap,
   ~Stream() override;

   // While the stream is still pending, the id will be kMaxStreamId,
-  // inidicating the maximum possible stream id is kMaxStreamId - 1.
+  // indicating the maximum possible stream id is kMaxStreamId - 1.
   stream_id id() const;

   // While the stream is still pending, the origin will be invalid.
@@ -315,7 +315,7 @@ class Stream final : public AsyncWrap,

   // Called by the session/application to indicate that the specified number
   // of bytes have been transmitted to the peer.  This is an initial
-  // indication occuring the first time data is sent. It does not indicate
+  // indication occurring the first time data is sent. It does not indicate
   // that the data has been retransmitted due to loss or has been
   // acknowledged to have been received by the peer.
   void Commit(size_t datalen, bool fin = false);
diff --git a/src/tracing/traced_value.h b/src/tracing/traced_value.h
index e04ffff48ef..4e0e8715aee 100644
--- a/src/tracing/traced_value.h
+++ b/src/tracing/traced_value.h
@@ -92,7 +92,8 @@ class ProcessMeta {
 // a conversion method so that the class can be used with both V8 legacy
 // trace API and perfetto API.
 //
-// These classes provide a JSON-inspired way to write structed data into traces.
+// These classes provide a JSON-inspired way to write structured data into
+// traces.
 //
 // To define how a custom class should be written into the trace, users should
 // define one of the two following functions:
diff --git a/test/common/gc.js b/test/common/gc.js
index 87625068c2c..688979789a4 100644
--- a/test/common/gc.js
+++ b/test/common/gc.js
@@ -42,7 +42,7 @@ function onGC(obj, gcListener) {

 /**
  * Repeatedly triggers garbage collection until a specified condition is met or a maximum number of attempts is reached.
- * This utillity must be run in a Node.js instance that enables --expose-gc.
+ * This utility must be run in a Node.js instance that enables --expose-gc.
  * @param {string|Function} [name] - Optional name, used in the rejection message if the condition is not met.
  * @param {Function} condition - A function that returns true when the desired condition is met.
  * @param {number} maxCount - Maximum number of garbage collections that should be tried.
diff --git a/test/internet/test-dgram-multicast-set-interface-lo.js b/test/internet/test-dgram-multicast-set-interface-lo.js
index 8944f695f37..4850ffca940 100644
--- a/test/internet/test-dgram-multicast-set-interface-lo.js
+++ b/test/internet/test-dgram-multicast-set-interface-lo.js
@@ -31,7 +31,7 @@ const LOOPBACK = { IPv4: '127.0.0.1', IPv6: '::1' };
 const ANY = { IPv4: '0.0.0.0', IPv6: '::' };
 const FAM = 'IPv4';

-// Windows wont bind on multicasts so its filtering is by port.
+// Windows won't bind on multicasts so its filtering is by port.
 const PORTS = {};
 for (let i = 0; i < MULTICASTS[FAM].length; i++) {
   PORTS[MULTICASTS[FAM][i]] = common.PORT + (common.isWindows ? i : 0);
diff --git a/test/internet/test-uv-threadpool-schedule.js b/test/internet/test-uv-threadpool-schedule.js
index 33ddf7fa3f0..76440331e38 100644
--- a/test/internet/test-uv-threadpool-schedule.js
+++ b/test/internet/test-uv-threadpool-schedule.js
@@ -46,8 +46,8 @@ function onResolve() {


 for (let i = 0; i < slowIOmax; i++) {
-  // We need to refresh the domain string everytime,
-  // otherwise the TCP stack that cache the previous lookup
+  // We need to refresh the domain string every time,
+  // otherwise the TCP stack that caches the previous lookup
   // returns result from memory, breaking all our Math.
   dns.lookup(`${randomDomain()}.com`, {}, common.mustCall(onResolve));
 }
diff --git a/test/parallel/test-eventtarget.js b/test/parallel/test-eventtarget.js
index ed6590176d3..558ee58f8be 100644
--- a/test/parallel/test-eventtarget.js
+++ b/test/parallel/test-eventtarget.js
@@ -24,7 +24,7 @@ process.on('warning', (e) => {
   lastWarning = e;
 });

-// Utility promise for parts of the test that need to wait for eachother -
+// Utility promise for parts of the test that need to wait for each other -
 // Namely tests for warning events
 /* eslint-disable no-unused-vars */
 let asyncTest = Promise.resolve();
diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js
index c85ee620d63..3fc17bc6ae9 100644
--- a/test/parallel/test-util-inspect.js
+++ b/test/parallel/test-util-inspect.js
@@ -2705,7 +2705,7 @@ assert.strictEqual(
   );
 }

-// Property getter throwing an error with getters that throws recursivly.
+// Property getter throwing an error with getters that throws recursively.
 {
   const recursivelyThrowingErrorDesc = {
     __proto__: null,
diff --git a/test/parallel/test-vm-module-evaluate-synthethic-module-rejection.js b/test/parallel/test-vm-module-evaluate-synthethic-module-rejection.js
index ad7b2f922fb..b6594732da3 100644
--- a/test/parallel/test-vm-module-evaluate-synthethic-module-rejection.js
+++ b/test/parallel/test-vm-module-evaluate-synthethic-module-rejection.js
@@ -12,7 +12,7 @@ const assert = require('assert');
 const { inspect } = require('util');
 const vm = require('vm');

-// The promise _synchronously_ resolves to undefined, because for a synthethic module,
+// The promise _synchronously_ resolves to undefined, because for a synthetic module,
 // the evaluation operation can only either resolve or reject immediately.
 // In this case, the asynchronously rejected promise can't be handled from the outside,
 // so we'll catch it with the isolate-level unhandledRejection handler.