nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
104.27k stars 28.06k forks source link

v20.13.0 proposal #52793

Closed marco-ippolito closed 1 week ago

marco-ippolito commented 2 weeks ago

2024-05-07, Version 20.13.0 'Iron' (LTS), @marco-ippolito

buffer: improve base64 and base64url performance

The performance of the base64 and base64url encoding and decoding functions has been improved significantly.

Contributed by Yagiz Nizipli in #52428

crypto: deprecate implicitly shortened GCM tags

This release, introduces a doc-only deprecation of using GCM authentication tags that are shorter than the cipher's block size, unless the user specified the authTagLength option.

Contributed by Tobias Nießen in #52345

events,doc: mark CustomEvent as stable

From this release CustomEvent has been marked stable.

Contributed by Daeyeon Jeong in #52618

fs: add stacktrace to fs/promises

Sync functions in fs throwed an error with a stacktrace which is helpful for debugging. But functions in fs/promises throwed an error without a stacktrace. This commit adds stacktraces by calling Error.captureStacktrace and re-throwing the error.

Contributed by 翠 / green in #49849

report: add --report-exclude-network option

New option --report-exclude-network, also available as report.excludeNetwork, enables the user to exclude networking interfaces in their diagnostic report. On some systems, this can cause the report to take minutes to generate so this option can be used to optimize that.

Contributed by Ethan Arrowood in #51645

src: add uv_get_available_memory to report and process

From this release it is possible to get the available memory in the system by calling process.getAvailableMemory().

Contributed by theanarkh #52023

stream: support typed arrays

This commit adds support for typed arrays in streams.

Contributed by IlyasShabi #51866

util: support array of formats in util.styleText

It is now possible to pass an array of format strings to util.styleText to apply multiple formats to the same text.

console.log(util.styleText(['underline', 'italic'], 'My italic underlined message'));

Contributed by Marco Ippolito in #52040

v8: implement v8.queryObjects() for memory leak regression testing

This is similar to the queryObjects() console API provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain in the heap after a full garbage collection, which can be useful for memory leak regression tests. To avoid surprising results, users should avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the application.

To avoid accidental leaks, this API does not return raw references to the objects found. By default, it returns the count of the objects found. If options.format is 'summary', it returns an array containing brief string representations for each object. The visibility provided in this API is similar to what the heap snapshot provides, while users can save the cost of serialization and parsing and directly filer the target objects during the search.

We have been using this API internally for the test suite, which has been more stable than any other leak regression testing strategies in the CI. With a public implementation we can now use the public API instead.

const { queryObjects } = require('node:v8');
class A { foo = 'bar'; }
console.log(queryObjects(A)); // 0
let a = new A();
console.log(queryObjects(A)); // 1
// [ "A { foo: 'bar' }" ]
console.log(queryObjects(A, { format: 'summary' }));

// Release the object.
a = null;
// Search again. queryObjects() includes a full garbage collection
// so a should disappear.
console.log(queryObjects(A)); // 0

class B extends A { bar = 'qux'; }
// The child class B's prototype has A's prototype on its prototype chain
// so the prototype object shows up too.
console.log(queryObjects(A, { format: 'summary' })); // [ A {}' ]

Contributed by Joyee Cheung in #51927

watch: mark as stable

From this release Watch Mode is considered stable. When in watch mode, changes in the watched files cause the Node.js process to restart.

Contributed by Moshe Atlow in #52074

Other Notable Changes

Commits

nodejs-github-bot commented 2 weeks ago

Review requested:

nodejs-github-bot commented 2 weeks ago

CI: https://ci.nodejs.org/job/node-test-pull-request/58857/

targos commented 2 weeks ago

PR-URL: TODO

to be updated

marco-ippolito commented 2 weeks ago

There is an unverified commit https://github.com/nodejs/node/pull/52793/commits/a714c55777df4412725bc4013344ddb6ecc55bfe show we drop it?

aduh95 commented 2 weeks ago

There is an unverified commit a714c55 show we drop it?

Unverified means the commit author (Eugene <eugene7@gmail.com>) corresponds to a GitHub account that has Vigilent Mode enabled, and the commit wasn't signed with one of their signature (which makes sense because you're the one who committed the backport). It's not a reason to drop it IMO.

nodejs-github-bot commented 2 weeks ago

CI: https://ci.nodejs.org/job/node-test-pull-request/58868/ CITGM: https://ci.nodejs.org/job/citgm-smoker/3426/ RELEASE-CI: https://ci-release.nodejs.org/job/iojs+release/10173/

richardlau commented 2 weeks ago

Looks like parallel/test-runner-output is broken on Windows.

targos commented 2 weeks ago
17:56:13         # Subtest: test-runner/output/source_mapped_locations.mjs
17:56:13         not ok 28 - test-runner/output/source_mapped_locations.mjs
17:56:13           ---
17:56:13           duration_ms: 1687.5303
17:56:13           location: 'file:///C:/workspace/node-test-binary-windows-js-suites/node/test/parallel/test-runner-output.mjs:153:5'
17:56:13           failureType: 'testCodeFailure'
17:56:13           error: |-
17:56:13             Expected values to be strictly equal:
17:56:13             + actual - expected ... Lines skipped
17:56:13             
17:56:13               'TAP version 13\n' +
17:56:13                 '# Subtest: fails\n' +
17:56:13                 'not ok 1 - fails\n' +
17:56:13                 '  ---\n' +
17:56:13                 '  duration_ms: *\n' +
17:56:13             +   "  location: 'file:///C:/workspace/node-test-binary-windows-js-suites/node/test/fixtures/test-runner/output/source_mapped_locations.ts:5:1'\n" +
17:56:13             -   "  location: 'file:///test/fixtures/test-runner/output/source_mapped_locations.ts:5:1'\n" +
17:56:13                 "  failureType: 'testCodeFailure'\n" +
17:56:13             ...
17:56:13                 '# skipped 0\n' +
17:56:13                 '# todo 0\n' +
17:56:13                 '# duration_ms *\n'
targos commented 2 weeks ago

The proposal contains only one commit from https://github.com/nodejs/node/pull/52010. https://github.com/nodejs/node/commit/328642bbb98d6d581f06e5e67b6f2d045e719bd4 is missing.

marco-ippolito commented 2 weeks ago

The proposal contains only one commit from #52010. 328642b is missing.

Yes I noticed, I removed it, it requires a backport since its not landing clean

nodejs-github-bot commented 2 weeks ago

CI: https://ci.nodejs.org/job/node-test-pull-request/58885/

nodejs-github-bot commented 2 weeks ago

CI: https://ci.nodejs.org/job/node-test-pull-request/58900/ CITGM: https://ci.nodejs.org/job/citgm-smoker/3428/

targos commented 2 weeks ago

@marco-ippolito Any reason to trigger the release CI so early in the process?

marco-ippolito commented 2 weeks ago

@marco-ippolito Any reason to trigger the release CI so early in the process?

I didn't find any detail regard when to start the release CI, I just wanted to get ahead with the work, should I wait for CI and CITGM to end?

targos commented 2 weeks ago

It's true that the release guide doesn't exactly say when to run it, but I think it should be at least when the release PR is ready (approved, CI ok). I would personally recommend to run it on the release day, to avoid any mistakes. Now that you built the release once, it is in staging and you could technically promote the wrong files if you forget to rerun it after making changes to the proposal.

marco-ippolito commented 2 weeks ago

It's true that the release guide doesn't exactly say when to run it, but I think it should be at least when the release PR is ready (approved, CI ok). I would personally recommend to run it on the release day, to avoid any mistakes. Now that you built the release once, it is in staging and you could technically promote the wrong files if you forget to rerun it after making changes to the proposal.

Thanks for the heads up

targos commented 2 weeks ago

FTR I deleted the v20.13.0 folder from the staging area.

richardlau commented 1 week ago

Opened https://github.com/nodejs/build/pull/3699 for https://ci.nodejs.org/job/node-test-commit-arm/52344/nodes=ubuntu1804-arm64/.

nodejs-github-bot commented 1 week ago

CI: https://ci.nodejs.org/job/node-test-pull-request/58900/ 🟢 CITGM: https://ci.nodejs.org/job/citgm-smoker/3428/ 🟢 V8-CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/5960/ 🟢

marco-ippolito commented 1 week ago

CITGM looks good I'm marking it as green, V8-ci is not needed since in this release we are not patching or updating v8

richardlau commented 1 week ago

since in this release we are not patching or updating v8

  • [ecadd638cd] - deps: V8: remove references to non-existent flags (Richard Lau) #52256

🙂

nodejs-github-bot commented 1 week ago

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=benchmark-ubuntu2204-intel-64,v8test=v8test/5960/

nodejs-github-bot commented 1 week ago

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel8-s390x,v8test=v8test/5960/

nodejs-github-bot commented 1 week ago

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel8-ppc64le,v8test=v8test/5960/

marco-ippolito commented 1 week ago

V8 CI looks good apart from the fail I've seen in previous releases

20:57:44         at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-v8-linux/test/v8-updates/test-linux-perf.js:108:8)
20:57:44         at Module._compile (node:internal/modules/cjs/loader:1358:14)
20:57:44         at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
20:57:44         at Module.load (node:internal/modules/cjs/loader:1208:32)
20:57:44         at Module._load (node:internal/modules/cjs/loader:1024:12)
20:57:44         at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
20:57:44         at node:internal/main/run_main_module:28:49 {
20:57:44       generatedMessage: false,
20:57:44       code: 'ERR_ASSERTION',
20:57:44       actual: null,
20:57:44       expected: true,
20:57:44       operator: '=='
panva commented 1 week ago

crypto: deprecate implicitly shortened GCM tags

This release, introduces a doc-only deprecation of using GCM authentication tags that are shorter than the cipher's block size, unless the user specified the authTagLength option.

Contribute by Tobias Nießen in #52345

Typo in Contribute by Tobias Nießen -> Contributed by Tobias Nießen

marco-ippolito commented 1 week ago

Release CI: https://ci-release.nodejs.org/job/iojs+release/10184/

targos commented 1 week ago

@marco-ippolito The typo noted by @panva hasn't been fixed.

marco-ippolito commented 1 week ago

@marco-ippolito The typo noted by @panva hasn't been fixed.

Is it ok to amend it now without re running the whole CI?

targos commented 1 week ago

It's ok but you still have to cancel and start a new release CI with the new commit sha

marco-ippolito commented 1 week ago

It's ok but you still have to cancel and start a new release CI with the new commit sha

I've started a new release with the updated commit sha https://ci-release.nodejs.org/job/iojs+release/10186/ 🟩

otaviomacedo commented 1 week ago

@marco-ippolito when I install version 20.13.0 on Windows, I get the error:

Error: Cannot find module 'C:\<Path>\npm\node_modules\npm\bin\npm-cli.js'
marco-ippolito commented 1 week ago

@marco-ippolito when I install version 20.13.0 on Windows, I get the error:

Error: Cannot find module 'C:\<Path>\npm\node_modules\npm\bin\npm-cli.js'

There is already an issue open https://github.com/nodejs/node/issues/52884