From 3fd486081798b3eafcd5def97773b6b09c4208dc Mon Sep 17 00:00:00 2001 From: parsherr Date: Wed, 1 Apr 2026 22:52:20 +0300 Subject: [PATCH 1/2] lib: update Float16Array primordials and comparisons --- lib/internal/per_context/primordials.js | 1 + lib/internal/util/comparisons.js | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/internal/per_context/primordials.js b/lib/internal/per_context/primordials.js index e2b5f763df7dd9..f28fb1079fae43 100644 --- a/lib/internal/per_context/primordials.js +++ b/lib/internal/per_context/primordials.js @@ -196,6 +196,7 @@ function copyPrototype(src, dest, prefix) { 'Error', 'EvalError', 'FinalizationRegistry', + 'Float16Array', 'Float32Array', 'Float64Array', 'Function', diff --git a/lib/internal/util/comparisons.js b/lib/internal/util/comparisons.js index b5fd65ad05f171..e44aaaba582849 100644 --- a/lib/internal/util/comparisons.js +++ b/lib/internal/util/comparisons.js @@ -15,6 +15,7 @@ const { Date, DatePrototypeGetTime, Error, + Float16Array, Float32Array, Float64Array, Function, @@ -50,7 +51,6 @@ const { Uint8ClampedArray, WeakMap, WeakSet, - globalThis: { Float16Array }, } = primordials; const { compare } = internalBinding('buffer'); @@ -70,6 +70,7 @@ const wellKnownConstructors = new SafeSet() .add(DataView) .add(Date) .add(Error) + .add(Float16Array) .add(Float32Array) .add(Float64Array) .add(Function) @@ -91,10 +92,6 @@ const wellKnownConstructors = new SafeSet() .add(WeakMap) .add(WeakSet); -if (Float16Array) { // TODO(BridgeAR): Remove when Flag got removed from V8 - wellKnownConstructors.add(Float16Array); -} - const types = require('internal/util/types'); const { isAnyArrayBuffer, From 0d2f4fb321b2dd51e1dbf5556eac2e01f168d64c Mon Sep 17 00:00:00 2001 From: parsherr Date: Wed, 1 Apr 2026 22:52:27 +0300 Subject: [PATCH 2/2] doc: fix typos and update MDN links for disposables --- doc/api/fs.md | 4 ++-- doc/api/stream_iter.md | 2 +- doc/api/util.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 8c2e91fb2c8dbb..87da4428f00903 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1609,7 +1609,7 @@ Both this function and the disposal function on the resulting object are async, so it should be used with `await` + `await using` as in `await using dir = await fsPromises.mkdtempDisposable('prefix')`. - +For more information, see [MDN's documentation for Explicit Resource Management](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/using). For detailed information, see the documentation of [`fsPromises.mkdtemp()`][]. @@ -6259,7 +6259,7 @@ removed if it still exists. If the directory cannot be deleted, disposal will throw an error. The object has a `remove()` method which will perform the same task. - +For more information, see [MDN's documentation for Explicit Resource Management](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/using). For detailed information, see the documentation of [`fs.mkdtemp()`][]. diff --git a/doc/api/stream_iter.md b/doc/api/stream_iter.md index 65bd5dbb053399..d54b2c17d300a5 100644 --- a/doc/api/stream_iter.md +++ b/doc/api/stream_iter.md @@ -1588,7 +1588,7 @@ console.log(ready); // Promise { true } -- no backpressure * Value: `Symbol.for('Stream.shareProtocol')` The value must be a function. When called by `Share.from()`, it receives the -options passed to `Share.from()` and must return an object conforming the the +options passed to `Share.from()` and must return an object conforming to the {Share} interface. The implementation is fully custom -- it can manage the shared source, consumers, buffering, and backpressure however it wants. diff --git a/doc/api/util.md b/doc/api/util.md index 596817c48a64d0..39b0e3b066983a 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -2551,7 +2551,7 @@ changes: * `format` {string | Array} A text format or an Array of text formats defined in `util.inspect.colors`. -* `text` {string} The text to to be formatted. +* `text` {string} The text to be formatted. * `options` {Object} * `validateStream` {boolean} When true, `stream` is checked to see if it can handle colors. **Default:** `true`. * `stream` {Stream} A stream that will be validated if it can be colored. **Default:** `process.stdout`.