From 6a02c2701e34eebcbbbeced061507af7d6481820 Mon Sep 17 00:00:00 2001 From: theanarkh Date: Mon, 21 Oct 2024 18:25:10 +0800 Subject: [PATCH 01/32] lib: add UV_UDP_REUSEPORT for udp PR-URL: https://github.com/nodejs/node/pull/55403 Refs: https://github.com/libuv/libuv/pull/4419 Reviewed-By: Matteo Collina Reviewed-By: James M Snell --- doc/api/dgram.md | 17 +++++++- lib/dgram.js | 7 +++- src/udp_wrap.cc | 1 + test/common/udp.js | 24 ++++++++++++ .../test-child-process-dgram-reuseport.js | 35 +++++++++++++++++ test/parallel/test-cluster-dgram-reuseport.js | 39 +++++++++++++++++++ test/parallel/test-dgram-reuseport.js | 21 ++++++++++ 7 files changed, 141 insertions(+), 3 deletions(-) create mode 100644 test/common/udp.js create mode 100644 test/parallel/test-child-process-dgram-reuseport.js create mode 100644 test/parallel/test-cluster-dgram-reuseport.js create mode 100644 test/parallel/test-dgram-reuseport.js diff --git a/doc/api/dgram.md b/doc/api/dgram.md index 26e01f100258f0..3fa7f6472f096c 100644 --- a/doc/api/dgram.md +++ b/doc/api/dgram.md @@ -343,7 +343,9 @@ used when using `dgram.Socket` objects with the [`cluster`][] module. When `exclusive` is set to `false` (the default), cluster workers will use the same underlying socket handle allowing connection handling duties to be shared. When `exclusive` is `true`, however, the handle is not shared and attempted -port sharing results in an error. +port sharing results in an error. Creating a `dgram.Socket` with the `reusePort` +option set to `true` causes `exclusive` to always be `true` when `socket.bind()` +is called. A bound datagram socket keeps the Node.js process running to receive datagram messages. @@ -916,6 +918,9 @@ chained. + +* `value` {any} +* Returns: {boolean} + +Returns `true` if the value is a BigInt object, e.g. created +by `Object(BigInt(123))`. + +```js +util.types.isBigIntObject(Object(BigInt(123))); // Returns true +util.types.isBigIntObject(BigInt(123)); // Returns false +util.types.isBigIntObject(123); // Returns false +``` + ### `util.types.isBigUint64Array(value)` - -Prior to the introduction of support for ES modules in Node.js, it was a common -pattern for package authors to include both CommonJS and ES module JavaScript -sources in their package, with `package.json` [`"main"`][] specifying the -CommonJS entry point and `package.json` `"module"` specifying the ES module -entry point. -This enabled Node.js to run the CommonJS entry point while build tools such as -bundlers used the ES module entry point, since Node.js ignored (and still -ignores) the top-level `"module"` field. - -Node.js can now run ES module entry points, and a package can contain both -CommonJS and ES module entry points (either via separate specifiers such as -`'pkg'` and `'pkg/es-module'`, or both at the same specifier via [Conditional -exports][]). Unlike in the scenario where top-level `"module"` field is only used by bundlers, -or ES module files are transpiled into CommonJS on the fly before evaluation by -Node.js, the files referenced by the ES module entry point are evaluated as ES -modules. - -### Dual package hazard - -When an application is using a package that provides both CommonJS and ES module -sources, there is a risk of certain bugs if both versions of the package get -loaded. This potential comes from the fact that the `pkgInstance` created by -`const pkgInstance = require('pkg')` is not the same as the `pkgInstance` -created by `import pkgInstance from 'pkg'` (or an alternative main path like -`'pkg/module'`). This is the “dual package hazard,” where two versions of the -same package can be loaded within the same runtime environment. While it is -unlikely that an application or package would intentionally load both versions -directly, it is common for an application to load one version while a dependency -of the application loads the other version. This hazard can happen because -Node.js supports intermixing CommonJS and ES modules, and can lead to unexpected -behavior. - -If the package main export is a constructor, an `instanceof` comparison of -instances created by the two versions returns `false`, and if the export is an -object, properties added to one (like `pkgInstance.foo = 3`) are not present on -the other. This differs from how `import` and `require` statements work in -all-CommonJS or all-ES module environments, respectively, and therefore is -surprising to users. It also differs from the behavior users are familiar with -when using transpilation via tools like [Babel][] or [`esm`][]. - -### Writing dual packages while avoiding or minimizing hazards - -First, the hazard described in the previous section occurs when a package -contains both CommonJS and ES module sources and both sources are provided for -use in Node.js, either via separate main entry points or exported paths. A -package might instead be written where any version of Node.js receives only -CommonJS sources, and any separate ES module sources the package might contain -are intended only for other environments such as browsers. Such a package -would be usable by any version of Node.js, since `import` can refer to CommonJS -files; but it would not provide any of the advantages of using ES module syntax. - -A package might also switch from CommonJS to ES module syntax in a [breaking -change](https://semver.org/) version bump. This has the disadvantage that the -newest version of the package would only be usable in ES module-supporting -versions of Node.js. - -Every pattern has tradeoffs, but there are two broad approaches that satisfy the -following conditions: - -1. The package is usable via both `require` and `import`. -2. The package is usable in both current Node.js and older versions of Node.js - that lack support for ES modules. -3. The package main entry point, e.g. `'pkg'` can be used by both `require` to - resolve to a CommonJS file and by `import` to resolve to an ES module file. - (And likewise for exported paths, e.g. `'pkg/feature'`.) -4. The package provides named exports, e.g. `import { name } from 'pkg'` rather - than `import pkg from 'pkg'; pkg.name`. -5. The package is potentially usable in other ES module environments such as - browsers. -6. The hazards described in the previous section are avoided or minimized. - -#### Approach #1: Use an ES module wrapper - -Write the package in CommonJS or transpile ES module sources into CommonJS, and -create an ES module wrapper file that defines the named exports. Using -[Conditional exports][], the ES module wrapper is used for `import` and the -CommonJS entry point for `require`. - -```json -// ./node_modules/pkg/package.json -{ - "type": "module", - "exports": { - "import": "./wrapper.mjs", - "require": "./index.cjs" - } -} -``` - -The preceding example uses explicit extensions `.mjs` and `.cjs`. -If your files use the `.js` extension, `"type": "module"` will cause such files -to be treated as ES modules, just as `"type": "commonjs"` would cause them -to be treated as CommonJS. -See [Enabling](esm.md#enabling). - -```cjs -// ./node_modules/pkg/index.cjs -exports.name = 'value'; -``` - -```js -// ./node_modules/pkg/wrapper.mjs -import cjsModule from './index.cjs'; -export const name = cjsModule.name; -``` - -In this example, the `name` from `import { name } from 'pkg'` is the same -singleton as the `name` from `const { name } = require('pkg')`. Therefore `===` -returns `true` when comparing the two `name`s and the divergent specifier hazard -is avoided. - -If the module is not simply a list of named exports, but rather contains a -unique function or object export like `module.exports = function () { ... }`, -or if support in the wrapper for the `import pkg from 'pkg'` pattern is desired, -then the wrapper would instead be written to export the default optionally -along with any named exports as well: - -```js -import cjsModule from './index.cjs'; -export const name = cjsModule.name; -export default cjsModule; -``` - -This approach is appropriate for any of the following use cases: - -* The package is currently written in CommonJS and the author would prefer not - to refactor it into ES module syntax, but wishes to provide named exports for - ES module consumers. -* The package has other packages that depend on it, and the end user might - install both this package and those other packages. For example a `utilities` - package is used directly in an application, and a `utilities-plus` package - adds a few more functions to `utilities`. Because the wrapper exports - underlying CommonJS files, it doesn't matter if `utilities-plus` is written in - CommonJS or ES module syntax; it will work either way. -* The package stores internal state, and the package author would prefer not to - refactor the package to isolate its state management. See the next section. - -A variant of this approach not requiring conditional exports for consumers could -be to add an export, e.g. `"./module"`, to point to an all-ES module-syntax -version of the package. This could be used via `import 'pkg/module'` by users -who are certain that the CommonJS version will not be loaded anywhere in the -application, such as by dependencies; or if the CommonJS version can be loaded -but doesn't affect the ES module version (for example, because the package is -stateless): - -```json -// ./node_modules/pkg/package.json -{ - "type": "module", - "exports": { - ".": "./index.cjs", - "./module": "./wrapper.mjs" - } -} -``` - -#### Approach #2: Isolate state - -A [`package.json`][] file can define the separate CommonJS and ES module entry -points directly: - -```json -// ./node_modules/pkg/package.json -{ - "type": "module", - "exports": { - "import": "./index.mjs", - "require": "./index.cjs" - } -} -``` - -This can be done if both the CommonJS and ES module versions of the package are -equivalent, for example because one is the transpiled output of the other; and -the package's management of state is carefully isolated (or the package is -stateless). - -The reason that state is an issue is because both the CommonJS and ES module -versions of the package might get used within an application; for example, the -user's application code could `import` the ES module version while a dependency -`require`s the CommonJS version. If that were to occur, two copies of the -package would be loaded in memory and therefore two separate states would be -present. This would likely cause hard-to-troubleshoot bugs. - -Aside from writing a stateless package (if JavaScript's `Math` were a package, -for example, it would be stateless as all of its methods are static), there are -some ways to isolate state so that it's shared between the potentially loaded -CommonJS and ES module instances of the package: - -1. If possible, contain all state within an instantiated object. JavaScript's - `Date`, for example, needs to be instantiated to contain state; if it were a - package, it would be used like this: - - ```js - import Date from 'date'; - const someDate = new Date(); - // someDate contains state; Date does not - ``` - - The `new` keyword isn't required; a package's function can return a new - object, or modify a passed-in object, to keep the state external to the - package. - -2. Isolate the state in one or more CommonJS files that are shared between the - CommonJS and ES module versions of the package. For example, if the CommonJS - and ES module entry points are `index.cjs` and `index.mjs`, respectively: - - ```cjs - // ./node_modules/pkg/index.cjs - const state = require('./state.cjs'); - module.exports.state = state; - ``` - - ```js - // ./node_modules/pkg/index.mjs - import state from './state.cjs'; - export { - state, - }; - ``` - - Even if `pkg` is used via both `require` and `import` in an application (for - example, via `import` in application code and via `require` by a dependency) - each reference of `pkg` will contain the same state; and modifying that - state from either module system will apply to both. - -Any plugins that attach to the package's singleton would need to separately -attach to both the CommonJS and ES module singletons. - -This approach is appropriate for any of the following use cases: - -* The package is currently written in ES module syntax and the package author - wants that version to be used wherever such syntax is supported. -* The package is stateless or its state can be isolated without too much - difficulty. -* The package is unlikely to have other public packages that depend on it, or if - it does, the package is stateless or has state that need not be shared between - dependencies or with the overall application. - -Even with isolated state, there is still the cost of possible extra code -execution between the CommonJS and ES module versions of a package. - -As with the previous approach, a variant of this approach not requiring -conditional exports for consumers could be to add an export, e.g. -`"./module"`, to point to an all-ES module-syntax version of the package: - -```json -// ./node_modules/pkg/package.json -{ - "type": "module", - "exports": { - ".": "./index.cjs", - "./module": "./index.mjs" - } -} -``` +See [the package examples repository][] for details. ## Node.js `package.json` field definitions @@ -1412,7 +1146,6 @@ Package imports permit mapping to external packages. This field defines [subpath imports][] for the current package. -[Babel]: https://babeljs.io/ [CommonJS]: modules.md [Conditional exports]: #conditional-exports [Corepack]: corepack.md @@ -1432,7 +1165,6 @@ This field defines [subpath imports][] for the current package. [`--experimental-default-type`]: cli.md#--experimental-default-typetype [`--no-addons` flag]: cli.md#--no-addons [`ERR_PACKAGE_PATH_NOT_EXPORTED`]: errors.md#err_package_path_not_exported -[`esm`]: https://github.com/standard-things/esm#readme [`package.json`]: #nodejs-packagejson-field-definitions [entry points]: #package-entry-points [folders as modules]: modules.md#folders-as-modules @@ -1446,3 +1178,4 @@ This field defines [subpath imports][] for the current package. [supported package managers]: corepack.md#supported-package-managers [the dual CommonJS/ES module packages section]: #dual-commonjses-module-packages [the full specifier path]: esm.md#mandatory-file-extensions +[the package examples repository]: https://github.com/nodejs/package-examples From e90704cd9ed351e6e1709e696f9daae783685fe7 Mon Sep 17 00:00:00 2001 From: Cheng Date: Wed, 23 Oct 2024 12:48:59 +0900 Subject: [PATCH 25/32] build: fix GN build for cares/uv deps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/55477 Reviewed-By: Juan José Arboleda Reviewed-By: Luigi Pinca Reviewed-By: Rafael Gonzaga Reviewed-By: Michael Dawson --- deps/cares/unofficial.gni | 8 ++++---- deps/uv/unofficial.gni | 1 + unofficial.gni | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/deps/cares/unofficial.gni b/deps/cares/unofficial.gni index 9296548239fcde..e02d7f425194c9 100644 --- a/deps/cares/unofficial.gni +++ b/deps/cares/unofficial.gni @@ -38,7 +38,10 @@ template("cares_gn_build") { ] } - include_dirs = [ "src/lib" ] + include_dirs = [ + "src/lib", + "src/lib/include", + ] if (is_win) { include_dirs += [ "config/win32" ] } else if (is_linux) { @@ -55,9 +58,6 @@ template("cares_gn_build") { } sources = gypi_values.cares_sources_common - if (is_win) { - sources += gypi_values.cares_sources_win - } if (is_linux) { sources += [ "config/linux/ares_config.h" ] } diff --git a/deps/uv/unofficial.gni b/deps/uv/unofficial.gni index ce30341044e907..7a73f891e3fc32 100644 --- a/deps/uv/unofficial.gni +++ b/deps/uv/unofficial.gni @@ -40,6 +40,7 @@ template("uv_gn_build") { "-Wno-extra-semi", "-Wno-implicit-fallthrough", "-Wno-missing-braces", + "-Wno-sign-compare", "-Wno-string-conversion", "-Wno-shadow", "-Wno-unreachable-code", diff --git a/unofficial.gni b/unofficial.gni index 3ff9815357dd36..4a2eeed18766b1 100644 --- a/unofficial.gni +++ b/unofficial.gni @@ -68,6 +68,7 @@ template("node_gn_build") { "-Wno-extra-semi", "-Wno-implicit-fallthrough", "-Wno-macro-redefined", + "-Wno-missing-braces", "-Wno-return-type", "-Wno-shadow", "-Wno-sometimes-uninitialized", From 025d8ada5fffb109e8f66c7d1bcf0c2e90a1383c Mon Sep 17 00:00:00 2001 From: Pietro Marchini Date: Wed, 23 Oct 2024 08:51:50 +0200 Subject: [PATCH 26/32] lib: ensure FORCE_COLOR forces color output in non-TTY environments PR-URL: https://github.com/nodejs/node/pull/55404 Reviewed-By: Luigi Pinca Reviewed-By: Jake Yuesong Li Reviewed-By: Matteo Collina Reviewed-By: Chemi Atlow Reviewed-By: Moshe Atlow Reviewed-By: James M Snell --- lib/internal/util/colors.js | 22 +++++------ .../output/assertion-color-tty.mjs | 6 +++ .../output/assertion-color-tty.snapshot | 37 +++++++++++++++++++ .../output/non-tty-forced-color-output.js | 6 +++ .../non-tty-forced-color-output.snapshot | 9 +++++ test/parallel/test-runner-output.mjs | 10 +++++ 6 files changed, 78 insertions(+), 12 deletions(-) create mode 100644 test/fixtures/test-runner/output/assertion-color-tty.mjs create mode 100644 test/fixtures/test-runner/output/assertion-color-tty.snapshot create mode 100644 test/fixtures/test-runner/output/non-tty-forced-color-output.js create mode 100644 test/fixtures/test-runner/output/non-tty-forced-color-output.snapshot diff --git a/lib/internal/util/colors.js b/lib/internal/util/colors.js index 054f9c4b4090d8..812048c923bee7 100644 --- a/lib/internal/util/colors.js +++ b/lib/internal/util/colors.js @@ -24,18 +24,16 @@ module.exports = { stream.getColorDepth() > 2 : true); }, refresh() { - if (process.stderr.isTTY) { - const hasColors = module.exports.shouldColorize(process.stderr); - module.exports.blue = hasColors ? '\u001b[34m' : ''; - module.exports.green = hasColors ? '\u001b[32m' : ''; - module.exports.white = hasColors ? '\u001b[39m' : ''; - module.exports.yellow = hasColors ? '\u001b[33m' : ''; - module.exports.red = hasColors ? '\u001b[31m' : ''; - module.exports.gray = hasColors ? '\u001b[90m' : ''; - module.exports.clear = hasColors ? '\u001bc' : ''; - module.exports.reset = hasColors ? '\u001b[0m' : ''; - module.exports.hasColors = hasColors; - } + const hasColors = module.exports.shouldColorize(process.stderr); + module.exports.blue = hasColors ? '\u001b[34m' : ''; + module.exports.green = hasColors ? '\u001b[32m' : ''; + module.exports.white = hasColors ? '\u001b[39m' : ''; + module.exports.yellow = hasColors ? '\u001b[33m' : ''; + module.exports.red = hasColors ? '\u001b[31m' : ''; + module.exports.gray = hasColors ? '\u001b[90m' : ''; + module.exports.clear = hasColors ? '\u001bc' : ''; + module.exports.reset = hasColors ? '\u001b[0m' : ''; + module.exports.hasColors = hasColors; }, }; diff --git a/test/fixtures/test-runner/output/assertion-color-tty.mjs b/test/fixtures/test-runner/output/assertion-color-tty.mjs new file mode 100644 index 00000000000000..28845882c10002 --- /dev/null +++ b/test/fixtures/test-runner/output/assertion-color-tty.mjs @@ -0,0 +1,6 @@ +import assert from 'node:assert/strict' +import { test } from 'node:test' + +test('failing assertion', () => { + assert.strictEqual('!Hello World', 'Hello World!') +}) diff --git a/test/fixtures/test-runner/output/assertion-color-tty.snapshot b/test/fixtures/test-runner/output/assertion-color-tty.snapshot new file mode 100644 index 00000000000000..2909d909351743 --- /dev/null +++ b/test/fixtures/test-runner/output/assertion-color-tty.snapshot @@ -0,0 +1,37 @@ +[31m✖ failing assertion [90m(*ms)[39m[39m + [AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: + [32mactual[39m [31mexpected[39m + + [39m'[39m[32m![39m[39mH[39m[39me[39m[39ml[39m[39ml[39m[39mo[39m[39m [39m[39mW[39m[39mo[39m[39mr[39m[39ml[39m[39md[39m[31m![39m[39m'[39m + ] { + generatedMessage: [33mtrue[39m, + code: [32m'ERR_ASSERTION'[39m, + actual: [32m'!Hello World'[39m, + expected: [32m'Hello World!'[39m, + operator: [32m'strictEqual'[39m + } + +[34mℹ tests 1[39m +[34mℹ suites 0[39m +[34mℹ pass 0[39m +[34mℹ fail 1[39m +[34mℹ cancelled 0[39m +[34mℹ skipped 0[39m +[34mℹ todo 0[39m +[34mℹ duration_ms *[39m + +[31m✖ failing tests:[39m + +* +[31m✖ failing assertion [90m(*ms)[39m[39m + [AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: + [32mactual[39m [31mexpected[39m + + [39m'[39m[32m![39m[39mH[39m[39me[39m[39ml[39m[39ml[39m[39mo[39m[39m [39m[39mW[39m[39mo[39m[39mr[39m[39ml[39m[39md[39m[31m![39m[39m'[39m + ] { + generatedMessage: [33mtrue[39m, + code: [32m'ERR_ASSERTION'[39m, + actual: [32m'!Hello World'[39m, + expected: [32m'Hello World!'[39m, + operator: [32m'strictEqual'[39m + } diff --git a/test/fixtures/test-runner/output/non-tty-forced-color-output.js b/test/fixtures/test-runner/output/non-tty-forced-color-output.js new file mode 100644 index 00000000000000..4d3c9de969a13f --- /dev/null +++ b/test/fixtures/test-runner/output/non-tty-forced-color-output.js @@ -0,0 +1,6 @@ +'use strict'; + +process.env.FORCE_COLOR = 1; + +const test = require('node:test'); +test('passing test', () => {}); diff --git a/test/fixtures/test-runner/output/non-tty-forced-color-output.snapshot b/test/fixtures/test-runner/output/non-tty-forced-color-output.snapshot new file mode 100644 index 00000000000000..3d1f593832fe77 --- /dev/null +++ b/test/fixtures/test-runner/output/non-tty-forced-color-output.snapshot @@ -0,0 +1,9 @@ +✔ passing test (*ms) +ℹ tests 1 +ℹ suites 0 +ℹ pass 1 +ℹ fail 0 +ℹ cancelled 0 +ℹ skipped 0 +ℹ todo 0 +ℹ duration_ms * diff --git a/test/parallel/test-runner-output.mjs b/test/parallel/test-runner-output.mjs index 72bd42ff73e163..4f745a5d4a9be7 100644 --- a/test/parallel/test-runner-output.mjs +++ b/test/parallel/test-runner-output.mjs @@ -203,6 +203,16 @@ const tests = [ name: 'test-runner/output/arbitrary-output.js', flags: ['--test-reporter=tap'], }, + { + name: 'test-runner/output/non-tty-forced-color-output.js', + transform: specTransform, + }, + canColorize ? { + name: 'test-runner/output/assertion-color-tty.mjs', + flags: ['--test', '--stack-trace-limit=0'], + transform: specTransform, + tty: true, + } : false, { name: 'test-runner/output/async-test-scheduling.mjs', flags: ['--test-reporter=tap'], From c1bbd634581eec25e6254d80fd9e6d1423de8827 Mon Sep 17 00:00:00 2001 From: adriancuadrado <29214635+adriancuadrado@users.noreply.github.com> Date: Wed, 23 Oct 2024 14:06:41 +0200 Subject: [PATCH 27/32] doc: changed the command used to verify SHASUMS256 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/55420 Reviewed-By: Antoine du Hamel Reviewed-By: Ulises Gascón --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2bb65e5dcc4d6d..efbd31e03f9bdb 100644 --- a/README.md +++ b/README.md @@ -104,11 +104,10 @@ To download `SHASUMS256.txt` using `curl`: curl -O https://nodejs.org/dist/vx.y.z/SHASUMS256.txt ``` -To check that a downloaded file matches the checksum, run -it through `sha256sum` with a command such as: +To check that downloaded files match the checksum, use `sha256sum`: ```bash -grep node-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c - +sha256sum -c SHASUMS256.txt --ignore-missing ``` For Current and LTS, the GPG detached signature of `SHASUMS256.txt` is in From f630fde68baf1c80b0b4312c24920a47373a5394 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Mon, 21 Oct 2024 13:33:55 +0100 Subject: [PATCH 28/32] deps: V8: cherry-pick f915fa4c9f41 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: [osr] Ensure trying to osr does not skip loop interrupts Fixed: 374013413 Change-Id: I52d7b4e165e0abd0bd517a81d2e8ef3f1f802bfb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5946288 Commit-Queue: Darius Mercadier Auto-Submit: Olivier Flückiger Reviewed-by: Darius Mercadier Cr-Commit-Position: refs/heads/main@{#96708} Refs: https://github.com/v8/v8/commit/f915fa4c9f4162dd9258535eee03b1b0484bf38e PR-URL: https://github.com/nodejs/node/pull/55484 Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca --- common.gypi | 2 +- deps/v8/src/codegen/compiler.cc | 9 ++++++++- .../v8/test/debugger/regress/regress-374013413.js | 15 +++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 deps/v8/test/debugger/regress/regress-374013413.js diff --git a/common.gypi b/common.gypi index 350b54ad9d54cd..23196aae451f6a 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.10', + 'v8_embedder_string': '-node.11', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/codegen/compiler.cc b/deps/v8/src/codegen/compiler.cc index a6407a56aa8d6d..ce82b744f327d5 100644 --- a/deps/v8/src/codegen/compiler.cc +++ b/deps/v8/src/codegen/compiler.cc @@ -1338,7 +1338,14 @@ MaybeHandle GetOrCompileOptimized( } // Do not optimize when debugger needs to hook into every call. - if (isolate->debug()->needs_check_on_function_call()) return {}; + if (isolate->debug()->needs_check_on_function_call()) { + // Reset the OSR urgency to avoid triggering this compilation request on + // every iteration and thereby skipping other interrupts. + if (IsOSR(osr_offset)) { + function->feedback_vector()->reset_osr_urgency(); + } + return {}; + } // Do not optimize if we need to be able to set break points. if (shared->HasBreakInfo(isolate)) return {}; diff --git a/deps/v8/test/debugger/regress/regress-374013413.js b/deps/v8/test/debugger/regress/regress-374013413.js new file mode 100644 index 00000000000000..d414dfdffa8e6d --- /dev/null +++ b/deps/v8/test/debugger/regress/regress-374013413.js @@ -0,0 +1,15 @@ +// Copyright 2024 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Flags: --enable-inspector + +var Debug = debug.Debug; +Debug.sendMessageForMethodChecked('Runtime.enable', {}); +const {msgid, msg} = Debug.createMessage('Runtime.evaluate', { + expression: 'while(true) {}', + throwOnSideEffect: true, + timeout: 1000, +}) +Debug.sendMessage(msg); +Debug.takeReplyChecked(msgid).toString(); From 7b5d660bb184afdc8d723a856484e648bf7f17ae Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Mon, 21 Oct 2024 13:52:36 +0100 Subject: [PATCH 29/32] test: add repl preview timeout test PR-URL: https://github.com/nodejs/node/pull/55484 Refs: https://github.com/v8/v8/commit/f915fa4c9f4162dd9258535eee03b1b0484bf38e Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca --- test/parallel/test-repl-preview-timeout.js | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/parallel/test-repl-preview-timeout.js diff --git a/test/parallel/test-repl-preview-timeout.js b/test/parallel/test-repl-preview-timeout.js new file mode 100644 index 00000000000000..df6a8cf2b1cba7 --- /dev/null +++ b/test/parallel/test-repl-preview-timeout.js @@ -0,0 +1,27 @@ +'use strict'; + +const common = require('../common'); +const ArrayStream = require('../common/arraystream'); +const assert = require('assert'); +const repl = require('repl'); + +common.skipIfInspectorDisabled(); + +const inputStream = new ArrayStream(); +const outputStream = new ArrayStream(); +repl.start({ + input: inputStream, + output: outputStream, + useGlobal: false, + terminal: true, + useColors: true +}); + +let output = ''; +outputStream.write = (chunk) => output += chunk; + +// Input without '\n' triggering actual run. +const input = 'while (true) {}'; +inputStream.emit('data', input); +// No preview available when timed out. +assert.strictEqual(output, input); From cbb72ebfa7888504c2347624c19f6648ccee2679 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 24 Oct 2024 15:37:15 +0200 Subject: [PATCH 30/32] test,crypto: make crypto tests work with BoringSSL PR-URL: https://github.com/nodejs/node/pull/55491 Reviewed-By: Richard Lau Reviewed-By: Yagiz Nizipli Reviewed-By: Luigi Pinca Reviewed-By: Filip Skokan --- test/parallel/test-crypto-dh-errors.js | 4 ++-- test/parallel/test-crypto-private-decrypt-gh32240.js | 2 +- test/parallel/test-tls-getcertificate-x509.js | 9 ++------- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/test/parallel/test-crypto-dh-errors.js b/test/parallel/test-crypto-dh-errors.js index fcf1922bcdba73..476ca64b4425b5 100644 --- a/test/parallel/test-crypto-dh-errors.js +++ b/test/parallel/test-crypto-dh-errors.js @@ -43,7 +43,7 @@ for (const g of [-1, 1]) { const ex = { code: 'ERR_OSSL_DH_BAD_GENERATOR', name: 'Error', - message: /bad generator/, + message: /(?:bad[_ ]generator)/i, }; assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex); assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex); @@ -55,7 +55,7 @@ for (const g of [Buffer.from([]), const ex = { code: 'ERR_OSSL_DH_BAD_GENERATOR', name: 'Error', - message: /bad generator/, + message: /(?:bad[_ ]generator)/i, }; assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex); assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex); diff --git a/test/parallel/test-crypto-private-decrypt-gh32240.js b/test/parallel/test-crypto-private-decrypt-gh32240.js index 1785f5eef3d202..e88227a215ba4f 100644 --- a/test/parallel/test-crypto-private-decrypt-gh32240.js +++ b/test/parallel/test-crypto-private-decrypt-gh32240.js @@ -24,7 +24,7 @@ const pkeyEncrypted = pair.privateKey.export({ type: 'pkcs1', format: 'pem', - cipher: 'aes128', + cipher: 'aes-128-cbc', passphrase: 'secret', }); diff --git a/test/parallel/test-tls-getcertificate-x509.js b/test/parallel/test-tls-getcertificate-x509.js index aa685ca9e09cf0..704aa33e6edfab 100644 --- a/test/parallel/test-tls-getcertificate-x509.js +++ b/test/parallel/test-tls-getcertificate-x509.js @@ -20,9 +20,7 @@ const server = tls.createServer(options, function(cleartext) { server.once('secureConnection', common.mustCall(function(socket) { const cert = socket.getX509Certificate(); assert(cert instanceof X509Certificate); - assert.strictEqual( - cert.serialNumber, - '5B75D77EDC7FB5B7FA9F1424DA4C64FB815DCBDE'); + assert.match(cert.serialNumber, /5B75D77EDC7FB5B7FA9F1424DA4C64FB815DCBDE/i); })); server.listen(0, common.mustCall(function() { @@ -33,10 +31,7 @@ server.listen(0, common.mustCall(function() { const peerCert = socket.getPeerX509Certificate(); assert(peerCert.issuerCertificate instanceof X509Certificate); assert.strictEqual(peerCert.issuerCertificate.issuerCertificate, undefined); - assert.strictEqual( - peerCert.issuerCertificate.serialNumber, - '147D36C1C2F74206DE9FAB5F2226D78ADB00A425' - ); + assert.match(peerCert.issuerCertificate.serialNumber, /147D36C1C2F74206DE9FAB5F2226D78ADB00A425/i); server.close(); })); socket.end('Hello'); From 53b1050e6f692ee0330e1076e045b58aada0032d Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Thu, 24 Oct 2024 20:27:58 +0200 Subject: [PATCH 31/32] module: add module.stripTypeScriptTypes PR-URL: https://github.com/nodejs/node/pull/55282 Fixes: https://github.com/nodejs/node/issues/54300 Reviewed-By: Yagiz Nizipli Reviewed-By: Joyee Cheung Reviewed-By: Chemi Atlow Reviewed-By: Paolo Insogna Reviewed-By: Chengzhong Wu Reviewed-By: James M Snell Reviewed-By: Richard Lau --- doc/api/module.md | 101 ++++++++++++++++ lib/internal/main/eval_string.js | 6 +- lib/internal/modules/cjs/loader.js | 10 +- lib/internal/modules/esm/get_format.js | 5 +- lib/internal/modules/esm/translators.js | 8 +- lib/internal/modules/helpers.js | 74 +----------- lib/internal/modules/typescript.js | 146 +++++++++++++++++++++++ lib/module.js | 3 +- test/parallel/test-bootstrap-modules.js | 1 + test/parallel/test-module-strip-types.js | 92 ++++++++++++++ 10 files changed, 358 insertions(+), 88 deletions(-) create mode 100644 lib/internal/modules/typescript.js create mode 100644 test/parallel/test-module-strip-types.js diff --git a/doc/api/module.md b/doc/api/module.md index 8fe1aa13d6849f..8662cc218898d5 100644 --- a/doc/api/module.md +++ b/doc/api/module.md @@ -270,6 +270,105 @@ changes: Register a module that exports [hooks][] that customize Node.js module resolution and loading behavior. See [Customization hooks][]. +## `module.stripTypeScriptTypes(code[, options])` + + + +> Stability: 1.0 - Early development + +* `code` {string} The code to strip type annotations from. +* `options` {Object} + * `mode` {string} **Default:** `'strip'`. Possible values are: + * `'strip'` Only strip type annotations without performing the transformation of TypeScript features. + * `'transform'` Strip type annotations and transform TypeScript features to JavaScript. + * `sourceMap` {boolean} **Default:** `false`. Only when `mode` is `'transform'`, if `true`, a source map + will be generated for the transformed code. + * `sourceUrl` {string} Specifies the source url used in the source map. +* Returns: {string} The code with type annotations stripped. + `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It + can be used to strip type annotations from TypeScript code before running it + with `vm.runInContext()` or `vm.compileFunction()`. + By default, it will throw an error if the code contains TypeScript features + that require transformation such as `Enums`, + see [type-stripping][] for more information. + When mode is `'transform'`, it also transforms TypeScript features to JavaScript, + see [transform TypeScript features][] for more information. + When mode is `'strip'`, source maps are not generated, because locations are preserved. + If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown. + +_WARNING_: The output of this function should not be considered stable across Node.js versions, +due to changes in the TypeScript parser. + +```mjs +import { stripTypeScriptTypes } from 'node:module'; +const code = 'const a: number = 1;'; +const strippedCode = stripTypeScriptTypes(code); +console.log(strippedCode); +// Prints: const a = 1; +``` + +```cjs +const { stripTypeScriptTypes } = require('node:module'); +const code = 'const a: number = 1;'; +const strippedCode = stripTypeScriptTypes(code); +console.log(strippedCode); +// Prints: const a = 1; +``` + +If `sourceUrl` is provided, it will be used appended as a comment at the end of the output: + +```mjs +import { stripTypeScriptTypes } from 'node:module'; +const code = 'const a: number = 1;'; +const strippedCode = stripTypeScriptTypes(code, { mode: 'strip', sourceUrl: 'source.ts' }); +console.log(strippedCode); +// Prints: const a = 1\n\n//# sourceURL=source.ts; +``` + +```cjs +const { stripTypeScriptTypes } = require('node:module'); +const code = 'const a: number = 1;'; +const strippedCode = stripTypeScriptTypes(code, { mode: 'strip', sourceUrl: 'source.ts' }); +console.log(strippedCode); +// Prints: const a = 1\n\n//# sourceURL=source.ts; +``` + +When `mode` is `'transform'`, the code is transformed to JavaScript: + +```mjs +import { stripTypeScriptTypes } from 'node:module'; +const code = ` + namespace MathUtil { + export const add = (a: number, b: number) => a + b; + }`; +const strippedCode = stripTypeScriptTypes(code, { mode: 'transform', sourceMap: true }); +console.log(strippedCode); +// Prints: +// var MathUtil; +// (function(MathUtil) { +// MathUtil.add = (a, b)=>a + b; +// })(MathUtil || (MathUtil = {})); +// # sourceMappingURL=data:application/json;base64, ... +``` + +```cjs +const { stripTypeScriptTypes } = require('node:module'); +const code = ` + namespace MathUtil { + export const add = (a: number, b: number) => a + b; + }`; +const strippedCode = stripTypeScriptTypes(code, { mode: 'transform', sourceMap: true }); +console.log(strippedCode); +// Prints: +// var MathUtil; +// (function(MathUtil) { +// MathUtil.add = (a, b)=>a + b; +// })(MathUtil || (MathUtil = {})); +// # sourceMappingURL=data:application/json;base64, ... +``` + ### `module.syncBuiltinESMExports()` * {boolean} diff --git a/doc/api/test.md b/doc/api/test.md index b7f7c1d79ab079..a6ca7531d503a2 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -2225,7 +2225,7 @@ added: - v20.4.0 - v18.19.0 changes: - - version: REPLACEME + - version: v23.1.0 pr-url: https://github.com/nodejs/node/pull/55398 description: The Mock Timers is now stable. --> diff --git a/doc/api/util.md b/doc/api/util.md index 3306407b85968b..12527b794d0948 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -466,7 +466,7 @@ fs.access('file/that/does/not/exist', (err) => { ## `util.getSystemErrorMessage(err)` * `err` {number} diff --git a/doc/changelogs/CHANGELOG_V23.md b/doc/changelogs/CHANGELOG_V23.md index 2dc053e21035a8..0d851e09655999 100644 --- a/doc/changelogs/CHANGELOG_V23.md +++ b/doc/changelogs/CHANGELOG_V23.md @@ -8,6 +8,7 @@ +23.1.0
23.0.0
@@ -38,6 +39,157 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + + +## 2024-10-24, Version 23.1.0 (Current), @aduh95 + +### Notable Changes + +#### `Buffer` now work with resizable `ArrayBuffer` + +When a `Buffer` is created using a resizable `ArrayBuffer`, the `Buffer` length +will now correctly change as the underlying `ArrayBuffer` size is changed. + +```js +const ab = new ArrayBuffer(10, { maxByteLength: 20 }); +const buffer = Buffer.from(ab); +console.log(buffer.byteLength); 10 +ab.resize(15); +console.log(buffer.byteLength); 15 +ab.resize(5); +console.log(buffer.byteLength); 5 +``` + +Contributed by James M Snell in [#55377](https://github.com/nodejs/node/pull/55377). + +#### `MockTimers` test runner API is now stable + +`MockTimers`, introduced in April 2023, has just reached **stable status**. This +API provides comprehensive support for mocking `Date` and all major timers in +Node.js, including `setTimeout`, `setInterval`, and `setImmediate`, both from +the `node:timers`, `node:timers/promises` modules and global objects. After +months of refinement, developers can now fully rely on `MockTimers` for testing +time-based operations with confidence, ensuring better control over asynchronous +behavior in their Node.js applications. + +Example usage with initial `Date` object as time set: + +```mjs +import { mock } from 'node:test'; +mock.timers.enable({ apis: ['Date'], now: new Date('1970-01-01') }); +``` + +Contributed by Erick Wendel in [#55398](https://github.com/nodejs/node/pull/55398). + +#### JSON modules and import attributes are now stable + +The two proposals reached stage 4 of the TC39 process, at the October 2024 +meeting. The Node.js implementation already matches exactly the semantics +required by the proposals. + +Contributed by Nicolò Ribaudo by [#55333](https://github.com/nodejs/node/pull/55333). + +#### Other Notable Changes + +* \[[`4ba31b7f20`](https://github.com/nodejs/node/commit/4ba31b7f20)] - **(SEMVER-MINOR)** **assert**: make `assertion_error` use Myers diff algorithm (Giovanni Bucci) [#54862](https://github.com/nodejs/node/pull/54862) +* \[[`dcbc5fbe65`](https://github.com/nodejs/node/commit/dcbc5fbe65)] - **(SEMVER-MINOR)** **lib**: add `UV_UDP_REUSEPORT` for udp (theanarkh) [#55403](https://github.com/nodejs/node/pull/55403) +* \[[`ec867ac7ce`](https://github.com/nodejs/node/commit/ec867ac7ce)] - **(SEMVER-MINOR)** **net**: add `UV_TCP_REUSEPORT` for tcp (theanarkh) [#55408](https://github.com/nodejs/node/pull/55408) + +### Commits + +* \[[`4ba31b7f20`](https://github.com/nodejs/node/commit/4ba31b7f20)] - **(SEMVER-MINOR)** **assert**: make assertion\_error use Myers diff algorithm (Giovanni Bucci) [#54862](https://github.com/nodejs/node/pull/54862) +* \[[`fe667bea28`](https://github.com/nodejs/node/commit/fe667bea28)] - **assert**: fix deepEqual always return true on URL (Xuguang Mei) [#50853](https://github.com/nodejs/node/pull/50853) +* \[[`aca03d9083`](https://github.com/nodejs/node/commit/aca03d9083)] - **benchmark**: add --runs support to run.js (Rafael Gonzaga) [#55158](https://github.com/nodejs/node/pull/55158) +* \[[`c5abf50692`](https://github.com/nodejs/node/commit/c5abf50692)] - **benchmark**: adjust byte size for buffer-copy (Rafael Gonzaga) [#55295](https://github.com/nodejs/node/pull/55295) +* \[[`d3618b2334`](https://github.com/nodejs/node/commit/d3618b2334)] - **benchmark**: adjust config for deepEqual object (Rafael Gonzaga) [#55254](https://github.com/nodejs/node/pull/55254) +* \[[`c05582da3d`](https://github.com/nodejs/node/commit/c05582da3d)] - **(SEMVER-MINOR)** **buffer**: make Buffer work with resizable ArrayBuffer (James M Snell) [#55377](https://github.com/nodejs/node/pull/55377) +* \[[`194bb0fca5`](https://github.com/nodejs/node/commit/194bb0fca5)] - **build**: fix GN build for cares/uv deps (Cheng) [#55477](https://github.com/nodejs/node/pull/55477) +* \[[`8eb5359592`](https://github.com/nodejs/node/commit/8eb5359592)] - **build**: fix uninstall script for AIX 7.1 (Cloorc) [#55438](https://github.com/nodejs/node/pull/55438) +* \[[`32f7d5ad1c`](https://github.com/nodejs/node/commit/32f7d5ad1c)] - **build**: conditionally compile bundled sqlite (Richard Lau) [#55409](https://github.com/nodejs/node/pull/55409) +* \[[`2147e496e7`](https://github.com/nodejs/node/commit/2147e496e7)] - **build**: tidy up cares.gyp (Richard Lau) [#55445](https://github.com/nodejs/node/pull/55445) +* \[[`2beae50c77`](https://github.com/nodejs/node/commit/2beae50c77)] - **build**: synchronize list of c-ares source files (Richard Lau) [#55445](https://github.com/nodejs/node/pull/55445) +* \[[`f48d30eb9f`](https://github.com/nodejs/node/commit/f48d30eb9f)] - **build**: fix path concatenation (Mohammed Keyvanzadeh) [#55387](https://github.com/nodejs/node/pull/55387) +* \[[`d42522eec5`](https://github.com/nodejs/node/commit/d42522eec5)] - **build**: fix make errors that occur in Makefile (minkyu\_kim) [#55287](https://github.com/nodejs/node/pull/55287) +* \[[`52da293471`](https://github.com/nodejs/node/commit/52da293471)] - **cli**: add `--heap-prof` flag available to `NODE_OPTIONS` (Juan José) [#54259](https://github.com/nodejs/node/pull/54259) +* \[[`adead26815`](https://github.com/nodejs/node/commit/adead26815)] - **crypto**: include openssl/rand.h explicitly (Shelley Vohr) [#55425](https://github.com/nodejs/node/pull/55425) +* \[[`df2f1adf9e`](https://github.com/nodejs/node/commit/df2f1adf9e)] - **deps**: V8: cherry-pick f915fa4c9f41 (Chengzhong Wu) [#55484](https://github.com/nodejs/node/pull/55484) +* \[[`bfc10a975f`](https://github.com/nodejs/node/commit/bfc10a975f)] - **deps**: update googletest to df1544b (Node.js GitHub Bot) [#55465](https://github.com/nodejs/node/pull/55465) +* \[[`45ef1809bd`](https://github.com/nodejs/node/commit/45ef1809bd)] - **deps**: update c-ares to v1.34.2 (Node.js GitHub Bot) [#55463](https://github.com/nodejs/node/pull/55463) +* \[[`c2b5ebfeca`](https://github.com/nodejs/node/commit/c2b5ebfeca)] - **deps**: update ada to 2.9.1 (Node.js GitHub Bot) [#54679](https://github.com/nodejs/node/pull/54679) +* \[[`903863cafa`](https://github.com/nodejs/node/commit/903863cafa)] - **deps**: update simdutf to 5.6.0 (Node.js GitHub Bot) [#55379](https://github.com/nodejs/node/pull/55379) +* \[[`008fb5f7f4`](https://github.com/nodejs/node/commit/008fb5f7f4)] - **deps**: patch V8 to 12.9.202.28 (Node.js GitHub Bot) [#55371](https://github.com/nodejs/node/pull/55371) +* \[[`8b282228ae`](https://github.com/nodejs/node/commit/8b282228ae)] - **deps**: update c-ares to v1.34.1 (Node.js GitHub Bot) [#55369](https://github.com/nodejs/node/pull/55369) +* \[[`54d55f2337`](https://github.com/nodejs/node/commit/54d55f2337)] - _**Revert**_ "**deps**: disable io\_uring support in libuv by default" (Santiago Gimeno) [#55114](https://github.com/nodejs/node/pull/55114) +* \[[`bfb3c621c4`](https://github.com/nodejs/node/commit/bfb3c621c4)] - **deps**: update libuv to 1.49.1 (Santiago Gimeno) [#55114](https://github.com/nodejs/node/pull/55114) +* \[[`055d2b8919`](https://github.com/nodejs/node/commit/055d2b8919)] - **deps**: update amaro to 0.1.9 (Node.js GitHub Bot) [#55348](https://github.com/nodejs/node/pull/55348) +* \[[`c028d21b44`](https://github.com/nodejs/node/commit/c028d21b44)] - **diagnostics\_channel**: fix unsubscribe during publish (simon-id) [#55116](https://github.com/nodejs/node/pull/55116) +* \[[`b4b6ddb777`](https://github.com/nodejs/node/commit/b4b6ddb777)] - **dns**: honor the order option (Luigi Pinca) [#55392](https://github.com/nodejs/node/pull/55392) +* \[[`37352cef7f`](https://github.com/nodejs/node/commit/37352cef7f)] - **doc**: changed the command used to verify SHASUMS256 (adriancuadrado) [#55420](https://github.com/nodejs/node/pull/55420) +* \[[`66bcf4c065`](https://github.com/nodejs/node/commit/66bcf4c065)] - **doc**: move dual package shipping docs to separate repo (Joyee Cheung) [#55444](https://github.com/nodejs/node/pull/55444) +* \[[`04b41bda03`](https://github.com/nodejs/node/commit/04b41bda03)] - **doc**: add note about stdio streams in child\_process (Ederin (Ed) Igharoro) [#55322](https://github.com/nodejs/node/pull/55322) +* \[[`689d3a3e41`](https://github.com/nodejs/node/commit/689d3a3e41)] - **doc**: add `isBigIntObject` to documentation (leviscar) [#55450](https://github.com/nodejs/node/pull/55450) +* \[[`784c825a27`](https://github.com/nodejs/node/commit/784c825a27)] - **doc**: remove outdated remarks about `highWaterMark` in fs (Ian Kerins) [#55462](https://github.com/nodejs/node/pull/55462) +* \[[`1ec25e8573`](https://github.com/nodejs/node/commit/1ec25e8573)] - **doc**: move Danielle Adams key to old gpg keys (RafaelGSS) [#55399](https://github.com/nodejs/node/pull/55399) +* \[[`7d5bb097eb`](https://github.com/nodejs/node/commit/7d5bb097eb)] - **doc**: move Bryan English key to old gpg keys (RafaelGSS) [#55399](https://github.com/nodejs/node/pull/55399) +* \[[`2967471f67`](https://github.com/nodejs/node/commit/2967471f67)] - **doc**: move Beth Griggs keys to old gpg keys (RafaelGSS) [#55399](https://github.com/nodejs/node/pull/55399) +* \[[`0be3a7505f`](https://github.com/nodejs/node/commit/0be3a7505f)] - **doc**: add changelog for mocktimers (Erick Wendel) [#55398](https://github.com/nodejs/node/pull/55398) +* \[[`e15f779794`](https://github.com/nodejs/node/commit/e15f779794)] - **doc**: spell out condition restrictions (Jan Martin) [#55187](https://github.com/nodejs/node/pull/55187) +* \[[`c3f2216a7d`](https://github.com/nodejs/node/commit/c3f2216a7d)] - **doc**: add instructions for WinGet build (Hüseyin Açacak) [#55356](https://github.com/nodejs/node/pull/55356) +* \[[`bdc2c3bb94`](https://github.com/nodejs/node/commit/bdc2c3bb94)] - **doc**: add missing return values in buffer docs (Karl Horky) [#55273](https://github.com/nodejs/node/pull/55273) +* \[[`41f68f59af`](https://github.com/nodejs/node/commit/41f68f59af)] - **doc**: fix ambasador markdown list (Rafael Gonzaga) [#55361](https://github.com/nodejs/node/pull/55361) +* \[[`bbd5318729`](https://github.com/nodejs/node/commit/bbd5318729)] - **esm**: add a fallback when importer in not a file (Antoine du Hamel) [#55471](https://github.com/nodejs/node/pull/55471) +* \[[`22d77773fd`](https://github.com/nodejs/node/commit/22d77773fd)] - **esm**: fix inconsistency with `importAssertion` in `resolve` hook (Wei Zhu) [#55365](https://github.com/nodejs/node/pull/55365) +* \[[`48bb87b059`](https://github.com/nodejs/node/commit/48bb87b059)] - **esm**: mark import attributes and JSON module as stable (Nicolò Ribaudo) [#55333](https://github.com/nodejs/node/pull/55333) +* \[[`8ceefebaf2`](https://github.com/nodejs/node/commit/8ceefebaf2)] - **events**: optimize EventTarget.addEventListener (Robert Nagy) [#55312](https://github.com/nodejs/node/pull/55312) +* \[[`45f960cab6`](https://github.com/nodejs/node/commit/45f960cab6)] - **fs**: pass correct path to `DirentFromStats` during `glob` (Aviv Keller) [#55071](https://github.com/nodejs/node/pull/55071) +* \[[`d9494a7641`](https://github.com/nodejs/node/commit/d9494a7641)] - **fs**: use `wstring` on Windows paths (jazelly) [#55171](https://github.com/nodejs/node/pull/55171) +* \[[`0f1d13e359`](https://github.com/nodejs/node/commit/0f1d13e359)] - **lib**: ensure FORCE\_COLOR forces color output in non-TTY environments (Pietro Marchini) [#55404](https://github.com/nodejs/node/pull/55404) +* \[[`dcbc5fbe65`](https://github.com/nodejs/node/commit/dcbc5fbe65)] - **(SEMVER-MINOR)** **lib**: add UV\_UDP\_REUSEPORT for udp (theanarkh) [#55403](https://github.com/nodejs/node/pull/55403) +* \[[`714f272423`](https://github.com/nodejs/node/commit/714f272423)] - **lib**: remove startsWith/endsWith primordials for char checks (Gürgün Dayıoğlu) [#55407](https://github.com/nodejs/node/pull/55407) +* \[[`4e5c90bb41`](https://github.com/nodejs/node/commit/4e5c90bb41)] - **lib**: replace `createDeferredPromise` util with `Promise.withResolvers` (Yagiz Nizipli) [#54836](https://github.com/nodejs/node/pull/54836) +* \[[`db18aca47a`](https://github.com/nodejs/node/commit/db18aca47a)] - **lib**: add flag to drop connection when running in cluster mode (theanarkh) [#54927](https://github.com/nodejs/node/pull/54927) +* \[[`dd848f2d1e`](https://github.com/nodejs/node/commit/dd848f2d1e)] - **lib**: test\_runner#mock:timers respeced timeout\_max behaviour (BadKey) [#55375](https://github.com/nodejs/node/pull/55375) +* \[[`a9473bb8e3`](https://github.com/nodejs/node/commit/a9473bb8e3)] - **lib**: remove settled dependant signals when they are GCed (Edigleysson Silva (Edy)) [#55354](https://github.com/nodejs/node/pull/55354) +* \[[`07ad987aa1`](https://github.com/nodejs/node/commit/07ad987aa1)] - **lib**: convert transfer sequence to array in js (Jason Zhang) [#55317](https://github.com/nodejs/node/pull/55317) +* \[[`d54d3b24c3`](https://github.com/nodejs/node/commit/d54d3b24c3)] - **meta**: move one or more collaborators to emeritus (Node.js GitHub Bot) [#55381](https://github.com/nodejs/node/pull/55381) +* \[[`12d709bd27`](https://github.com/nodejs/node/commit/12d709bd27)] - **meta**: assign CODEOWNERS for /deps/ncrypto/\* (Filip Skokan) [#55426](https://github.com/nodejs/node/pull/55426) +* \[[`0130780eec`](https://github.com/nodejs/node/commit/0130780eec)] - **meta**: change color to blue notify review-wanted (Rafael Gonzaga) [#55423](https://github.com/nodejs/node/pull/55423) +* \[[`335a507027`](https://github.com/nodejs/node/commit/335a507027)] - **meta**: bump codecov/codecov-action from 4.5.0 to 4.6.0 (dependabot\[bot]) [#55222](https://github.com/nodejs/node/pull/55222) +* \[[`5ffc721d09`](https://github.com/nodejs/node/commit/5ffc721d09)] - **meta**: bump github/codeql-action from 3.26.6 to 3.26.10 (dependabot\[bot]) [#55221](https://github.com/nodejs/node/pull/55221) +* \[[`d9fde2c45b`](https://github.com/nodejs/node/commit/d9fde2c45b)] - **meta**: bump step-security/harden-runner from 2.9.1 to 2.10.1 (dependabot\[bot]) [#55220](https://github.com/nodejs/node/pull/55220) +* \[[`2c960a212e`](https://github.com/nodejs/node/commit/2c960a212e)] - **module**: include module information in require(esm) warning (Joyee Cheung) [#55397](https://github.com/nodejs/node/pull/55397) +* \[[`a12dbf03d9`](https://github.com/nodejs/node/commit/a12dbf03d9)] - **module**: simplify ts under node\_modules check (Marco Ippolito) [#55440](https://github.com/nodejs/node/pull/55440) +* \[[`ec867ac7ce`](https://github.com/nodejs/node/commit/ec867ac7ce)] - **(SEMVER-MINOR)** **net**: add UV\_TCP\_REUSEPORT for tcp (theanarkh) [#55408](https://github.com/nodejs/node/pull/55408) +* \[[`9e320279a2`](https://github.com/nodejs/node/commit/9e320279a2)] - _**Revert**_ "**path**: fix bugs and inconsistencies" (Aviv Keller) [#55414](https://github.com/nodejs/node/pull/55414) +* \[[`1ce8928db3`](https://github.com/nodejs/node/commit/1ce8928db3)] - **sqlite**: cache column names in stmt.all() (Fedor Indutny) [#55373](https://github.com/nodejs/node/pull/55373) +* \[[`cc775d314a`](https://github.com/nodejs/node/commit/cc775d314a)] - **src**: switch from `Get/SetPrototype` to `Get/SetPrototypeV2` (Aviv Keller) [#55453](https://github.com/nodejs/node/pull/55453) +* \[[`89c96ade53`](https://github.com/nodejs/node/commit/89c96ade53)] - **src**: remove icu based `ToASCII` and `ToUnicode` (Yagiz Nizipli) [#55156](https://github.com/nodejs/node/pull/55156) +* \[[`57dbbf8402`](https://github.com/nodejs/node/commit/57dbbf8402)] - **src**: fix winapi\_strerror error string (Hüseyin Açacak) [#55207](https://github.com/nodejs/node/pull/55207) +* \[[`a490bb8745`](https://github.com/nodejs/node/commit/a490bb8745)] - **src**: remove uv\_\_node\_patch\_is\_using\_io\_uring (Santiago Gimeno) [#55114](https://github.com/nodejs/node/pull/55114) +* \[[`0da1632937`](https://github.com/nodejs/node/commit/0da1632937)] - **src,lib**: introduce `util.getSystemErrorMessage(err)` (Juan José) [#54075](https://github.com/nodejs/node/pull/54075) +* \[[`6764273127`](https://github.com/nodejs/node/commit/6764273127)] - **stream**: propagate AbortSignal reason (Marvin ROGER) [#55473](https://github.com/nodejs/node/pull/55473) +* \[[`4dc2791cdd`](https://github.com/nodejs/node/commit/4dc2791cdd)] - **test**: add repl preview timeout test (Chengzhong Wu) [#55484](https://github.com/nodejs/node/pull/55484) +* \[[`8634e054d4`](https://github.com/nodejs/node/commit/8634e054d4)] - **test**: make test-node-output-v8-warning more flexible (Shelley Vohr) [#55401](https://github.com/nodejs/node/pull/55401) +* \[[`6c8564b55d`](https://github.com/nodejs/node/commit/6c8564b55d)] - **test**: fix addons and node-api test assumptions (Antoine du Hamel) [#55441](https://github.com/nodejs/node/pull/55441) +* \[[`94e863cdb7`](https://github.com/nodejs/node/commit/94e863cdb7)] - **test**: update wpt test for webmessaging/broadcastchannel (devstone) [#55205](https://github.com/nodejs/node/pull/55205) +* \[[`c10c6715cd`](https://github.com/nodejs/node/commit/c10c6715cd)] - **test**: deflake `test-cluster-shared-handle-bind-privileged-port` (Aviv Keller) [#55378](https://github.com/nodejs/node/pull/55378) +* \[[`6f7379a048`](https://github.com/nodejs/node/commit/6f7379a048)] - **test**: fix invalid `file:` URL in `test-fs-path-dir` (Antoine du Hamel) [#55454](https://github.com/nodejs/node/pull/55454) +* \[[`dd5a08d022`](https://github.com/nodejs/node/commit/dd5a08d022)] - **test**: update `console` wpt (Aviv Keller) [#55192](https://github.com/nodejs/node/pull/55192) +* \[[`9b7b4a6b25`](https://github.com/nodejs/node/commit/9b7b4a6b25)] - **test**: remove duplicate tests (Luigi Pinca) [#55393](https://github.com/nodejs/node/pull/55393) +* \[[`eb2fab3da1`](https://github.com/nodejs/node/commit/eb2fab3da1)] - **test**: update test\_util.cc for coverage (minkyu\_kim) [#55291](https://github.com/nodejs/node/pull/55291) +* \[[`59923d137e`](https://github.com/nodejs/node/commit/59923d137e)] - **test**: update `compression` wpt (Aviv Keller) [#55191](https://github.com/nodejs/node/pull/55191) +* \[[`1b63a822ac`](https://github.com/nodejs/node/commit/1b63a822ac)] - **test,crypto**: update WebCryptoAPI WPT (Filip Skokan) [#55427](https://github.com/nodejs/node/pull/55427) +* \[[`97c6448f63`](https://github.com/nodejs/node/commit/97c6448f63)] - **test\_runner**: mark mockTimers as stable (Erick Wendel) [#55398](https://github.com/nodejs/node/pull/55398) +* \[[`69ee56aacd`](https://github.com/nodejs/node/commit/69ee56aacd)] - **test\_runner**: add support for scheduler.wait on mock timers (Erick Wendel) [#55244](https://github.com/nodejs/node/pull/55244) +* \[[`d9f0407cf6`](https://github.com/nodejs/node/commit/d9f0407cf6)] - **test\_runner**: require `--enable-source-maps` for sourcemap coverage (Aviv Keller) [#55359](https://github.com/nodejs/node/pull/55359) +* \[[`2ac2c5a7e7`](https://github.com/nodejs/node/commit/2ac2c5a7e7)] - **tools**: update lint-md-dependencies (Node.js GitHub Bot) [#55470](https://github.com/nodejs/node/pull/55470) +* \[[`10f6b90f7d`](https://github.com/nodejs/node/commit/10f6b90f7d)] - **tools**: update gyp-next to 0.18.3 (Node.js GitHub Bot) [#55464](https://github.com/nodejs/node/pull/55464) +* \[[`65936a8bb6`](https://github.com/nodejs/node/commit/65936a8bb6)] - **tools**: add script to synch c-ares source lists (Richard Lau) [#55445](https://github.com/nodejs/node/pull/55445) +* \[[`1da4168486`](https://github.com/nodejs/node/commit/1da4168486)] - **tools**: add `polyfilled` option to `prefer-primordials` rule (Antoine du Hamel) [#55318](https://github.com/nodejs/node/pull/55318) +* \[[`3b2b3a8df2`](https://github.com/nodejs/node/commit/3b2b3a8df2)] - **tools**: fix typos (Nathan Baulch) [#55061](https://github.com/nodejs/node/pull/55061) +* \[[`736c085a5d`](https://github.com/nodejs/node/commit/736c085a5d)] - **typings**: add missing type of `ArrayBufferPrototypeGetByteLength` (Wuli Zuo) [#55439](https://github.com/nodejs/node/pull/55439) +* \[[`7b3e38b855`](https://github.com/nodejs/node/commit/7b3e38b855)] - **url**: handle "unsafe" characters properly in `pathToFileURL` (Antoine du Hamel) [#54545](https://github.com/nodejs/node/pull/54545) + ## 2024-10-16, Version 23.0.0 (Current), @RafaelGSS