Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v21.1.0 release proposal #50335

Merged
merged 87 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
bf7b94f
tools: refactor checkimports.py
VoltrexKeyva Oct 15, 2023
943047e
deps: V8: cherry-pick 25902244ad1a
joyeecheung Oct 15, 2023
f3a9ea0
stream: call helper function from push and unshift
rluvaton Oct 15, 2023
5df3d5a
tools: update comment in `update-uncidi.sh` and `acorn_version.h`
Oct 15, 2023
ae905a8
test: fix defect path traversal tests
tniessen Oct 16, 2023
1f40ca1
doc: update security release process
mhdawson Oct 12, 2023
47633ab
doc: add loong64 to list of architectures
shipujin Oct 16, 2023
789372a
stream: allow pass stream class to `stream.compose`
himself65 Oct 14, 2023
06b7724
doc: add command to keep major branch sync
RafaelGSS Oct 16, 2023
bac872c
doc: update release-stewards with last sec-release
RafaelGSS Oct 16, 2023
b6021ab
lib: reduce overhead of blob clone
H4ad Oct 17, 2023
a54179f
vm: unify host-defined option generation in vm.compileFunction
joyeecheung Oct 5, 2023
3999362
vm: use internal versions of compileFunction and Script
joyeecheung Oct 11, 2023
dda33c2
vm: reject in importModuleDynamically without --experimental-vm-modules
joyeecheung Oct 5, 2023
571f7ef
deps: patch V8 to 11.8.172.15
targos Oct 17, 2023
514ac86
stream: reduce scope of readable bitmap details
ronag Oct 17, 2023
3729e33
doc: add H4ad to collaborators
H4ad Oct 17, 2023
8c1a46c
doc: fix H4ad collaborator sort
H4ad Oct 17, 2023
82363be
doc: fix typo in dgram docs
missinglink Oct 18, 2023
18862e4
fs: add flush option to appendFile() functions
cjihrig Oct 18, 2023
143ddde
test: set sea snapshot tests as flaky
anonrig Oct 18, 2023
7740bf8
esm: rename error code related to import attributes
aduh95 Oct 18, 2023
c76eb27
esm: improve check for ESM syntax
GeoffreyBooth Oct 18, 2023
8efb75f
test: set `test-runner-watch-mode` as flaky
anonrig Oct 18, 2023
a38d131
test: set test-worker-nearheaplimit-deadlock flaky
StefanStojanovic Oct 18, 2023
610036c
fs: improve error performance of `renameSync`
anonrig Sep 29, 2023
f766c04
fs: improve error performance of `chownSync`
anonrig Sep 29, 2023
81f1527
fs: improve error performance of `linkSync`
anonrig Sep 29, 2023
2759878
fs: improve error performance of `mkdtempSync`
anonrig Sep 29, 2023
bc6f279
fs: improve error performance of `readlinkSync`
anonrig Sep 29, 2023
dc9ac8d
fs: improve error performance of `symlinkSync`
anonrig Sep 29, 2023
6eeaa02
fs: improve error performance of `lchownSync`
anonrig Sep 29, 2023
c5ff000
fs: improve error performance of `realpathSync`
anonrig Oct 1, 2023
dd66fdf
test: set parallel http server test as flaky
anonrig Oct 18, 2023
dacee4d
doc: add ReflectConstruct to known perf issues
H4ad Oct 18, 2023
3e38001
test: skip test-benchmark-os.js on IBM i
abmusse Oct 17, 2023
ce27ee7
tls: reduce TLS 'close' event listener warnings
pimterry Oct 18, 2023
c874490
test: set inspector async hook test as flaky
anonrig Oct 18, 2023
7c6e4d7
test: set `test-esm-loader-resolve-type` as flaky
anonrig Oct 19, 2023
ce9d84e
doc: update api `stream.compose`
himself65 Oct 19, 2023
0c710da
test: improve code coverage of diagnostics_channel
MrJithil Oct 19, 2023
317e447
test: deflake `test-loaders-workers-spawned`
aduh95 Oct 18, 2023
9cd68b9
buffer: remove unnecessary assignment in fromString
tniessen Oct 19, 2023
9bc5ab5
test: set `test-structuredclone-*` as flaky
anonrig Oct 19, 2023
be19d9b
meta: move Trott to TSC regular member
Trott Oct 19, 2023
5129bed
test: set crypto-timing test as flaky
anonrig Oct 20, 2023
2473aa3
doc: fix release process table of contents
richardlau Oct 20, 2023
c55f8f3
test: reduce the number of requests and parsers
lpinca Oct 20, 2023
3f8cbb1
http2: allow streams to complete gracefully after goaway
murgatroid99 Oct 20, 2023
21a6ba5
test: set `test-cli-node-options` as flaky
anonrig Oct 19, 2023
6507f66
test: set test-worker-nearheaplimit-deadlock flaky
StefanStojanovic Oct 19, 2023
57adbdd
test: set inspector async stack test as flaky
anonrig Oct 18, 2023
3b80a68
test: set `test-emit-after-on-destroyed` as flaky
anonrig Oct 20, 2023
e375063
esm: detect ESM syntax in ambiguous JavaScript
GeoffreyBooth Oct 20, 2023
a362c27
crypto: ensure valid point on elliptic curve in SubtleCrypto.importKey
panva Oct 20, 2023
5a52c51
lib: add `navigator.userAgent`
anonrig Oct 20, 2023
465ad2a
test: update `url` web platform tests
anonrig Oct 20, 2023
6ec5aba
fs: improve error performance for `mkdirSync`
CanadaHonk Oct 20, 2023
5942edb
fs: improve error performance for `fsyncSync`
Oct 20, 2023
ba258b6
deps: update c-ares to 1.20.0
nodejs-github-bot Oct 8, 2023
f050668
deps: update c-ares to 1.20.1
nodejs-github-bot Oct 11, 2023
0cc176e
fs: improve error performance for `readSync`
Oct 21, 2023
5dc454a
util: remove internal mime fns from benchmarks
Uzlopak Oct 21, 2023
af31d51
test: replace forEach with for..of in test-http2-client-destroy.js
niyashiyas Oct 21, 2023
2d8d6c5
test: replace forEach with for..of in test-http2-server
niyashiyas Sep 23, 2023
19d3ce2
test: deflake `test-esm-loader-resolve-type`
aduh95 Oct 21, 2023
67c599e
test: replace forEach with for..of in test-net-isipv4.js
niyashiyas Oct 21, 2023
4d390e2
test: replace forEach with for..of in test-http-perf_hooks.js
niyashiyas Sep 23, 2023
ab4bae8
tools: drop support for osx notarization with gon
UlisesGascon Oct 21, 2023
7f87084
Revert "test: set `test-esm-loader-resolve-type` as flaky"
aduh95 Oct 21, 2023
1c21a18
doc: update release process LTS step
richardlau Oct 21, 2023
c40de82
doc: add loong64 info into platform list
shipujin Oct 22, 2023
0005317
deps: update undici to 5.26.4
nodejs-github-bot Oct 22, 2023
531a3ae
stream: simplify prefinish
ronag Oct 22, 2023
63b7059
test: set `test-watch-mode-inspect` as flaky
anonrig Oct 22, 2023
1464eba
lib: improve performance of validateStringArray and validateBooleanArray
Uzlopak Oct 22, 2023
87be790
worker: handle detached `MessagePort` from a different context
juanarbol Oct 22, 2023
6e537ae
doc: explain how to disable navigator
GeoffreyBooth Oct 22, 2023
03a31ce
deps: update corepack to 0.22.0
nodejs-github-bot Oct 24, 2023
91e373f
node-api: return napi_exception_pending on proxy handlers
legendecas Jun 15, 2023
a9ca7b3
test: improve watch mode test
MoLow Oct 23, 2023
8f7eb15
vm: use import attributes instead of import assertions
aduh95 Oct 23, 2023
db2a1cf
doc: fix `navigator.hardwareConcurrency` example
tniessen Oct 23, 2023
269e268
deps: update ada to 2.7.2
nodejs-github-bot Oct 23, 2023
998feda
esm: do not give wrong hints when detecting file format
aduh95 Oct 23, 2023
f4da308
deps: V8: cherry-pick f7d000a7ae7b
lukealbao Oct 23, 2023
f4e5beb
2023-10-24, Version 21.1.0 (Current)
targos Oct 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ platforms. This is true regardless of entries in the table below.
| GNU/Linux | armv6 | kernel >= 4.14, glibc >= 2.24 | Experimental | Downgraded as of Node.js 12 |
| GNU/Linux | ppc64le >=power8 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. Ubuntu 20.04, RHEL 8 |
| GNU/Linux | s390x | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. RHEL 8 |
| GNU/Linux | loong64 | kernel >= 5.19, glibc >= 2.36 | Experimental | |
| Windows | x64, x86 (WoW64) | >= Windows 10/Server 2016 | Tier 1 | [^2],[^3] |
| Windows | x86 (native) | >= Windows 10/Server 2016 | Tier 1 (running) / Experimental (compiling)[^4] | |
| Windows | x64, x86 | Windows 8.1/Server 2012 | Experimental | |
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V21.md#21.0.0">21.0.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V21.md#21.1.0">21.1.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V21.md#21.0.0">21.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.8.1">20.8.1</a></b><br/>
Expand Down
31 changes: 21 additions & 10 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,30 @@ The externally maintained libraries used by Node.js are:

- c-ares, located at deps/cares, is licensed as follows:
"""
Copyright (c) 2007 - 2018, Daniel Stenberg with many contributors, see AUTHORS
MIT License

Copyright (c) 1998 Massachusetts Institute of Technology
Copyright (c) 2007 - 2023 Daniel Stenberg with many contributors, see AUTHORS
file.

Copyright 1998 by the Massachusetts Institute of Technology.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted, provided that
the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation, and that
the name of M.I.T. not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
M.I.T. makes no representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""

- cjs-module-lexer, located at deps/cjs-module-lexer, is licensed as follows:
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ For information about the governance of the Node.js project, see
**Michaël Zasso** <<targos@protonmail.com>> (he/him)
* [tniessen](https://github.com/tniessen) -
**Tobias Nießen** <<tniessen@tnie.de>> (he/him)
* [Trott](https://github.com/Trott) -
**Rich Trott** <<rtrott@gmail.com>> (he/him)

#### TSC regular members

Expand Down Expand Up @@ -233,6 +231,8 @@ For information about the governance of the Node.js project, see
**Rod Vagg** <<r@va.gg>>
* [TimothyGu](https://github.com/TimothyGu) -
**Tiancheng "Timothy" Gu** <<timothygu99@gmail.com>> (he/him)
* [Trott](https://github.com/Trott) -
**Rich Trott** <<rtrott@gmail.com>> (he/him)

<details>

Expand Down Expand Up @@ -357,6 +357,8 @@ For information about the governance of the Node.js project, see
**Gireesh Punathil** <<gpunathi@in.ibm.com>> (he/him)
* [guybedford](https://github.com/guybedford) -
**Guy Bedford** <<guybedford@gmail.com>> (he/him)
* [H4ad](https://github.com/H4ad) -
**Vinícius Lourenço Claro Cardoso** <<contact@viniciusl.com.br>> (he/him)
* [HarshithaKP](https://github.com/HarshithaKP) -
**Harshitha K P** <<harshitha014@gmail.com>> (she/her)
* [himself65](https://github.com/himself65) -
Expand Down
7 changes: 5 additions & 2 deletions benchmark/blob/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ const assert = require('assert');

const bench = common.createBenchmark(main, {
n: [50e3],
bytes: [128, 1024, 1024 ** 2],
});

let _cloneResult;

function main({ n }) {
function main({ n, bytes }) {
const buff = Buffer.allocUnsafe(bytes);
const blob = new Blob(buff);
bench.start();
for (let i = 0; i < n; ++i)
_cloneResult = structuredClone(new Blob(['hello']));
_cloneResult = structuredClone(blob);
bench.end(n);

// Avoid V8 deadcode (elimination)
Expand Down
37 changes: 37 additions & 0 deletions benchmark/esm/detect-esm-syntax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
'use strict';

// This benchmarks the cost of running `containsModuleSyntax` on a CommonJS module being imported.
// We use the TypeScript fixture because it's a very large CommonJS file with no ESM syntax: the worst case.
const common = require('../common.js');
const tmpdir = require('../../test/common/tmpdir.js');
const fixtures = require('../../test/common/fixtures.js');
const scriptPath = fixtures.path('snapshot', 'typescript.js');
const fs = require('node:fs');

const bench = common.createBenchmark(main, {
type: ['with-module-syntax-detection', 'without-module-syntax-detection'],
n: [1e4],
}, {
flags: ['--experimental-detect-module'],
});

const benchmarkDirectory = tmpdir.fileURL('benchmark-detect-esm-syntax');
const ambiguousURL = new URL('./typescript.js', benchmarkDirectory);
const explicitURL = new URL('./typescript.cjs', benchmarkDirectory);

async function main({ n, type }) {
tmpdir.refresh();

fs.mkdirSync(benchmarkDirectory, { recursive: true });
fs.cpSync(scriptPath, ambiguousURL);
fs.cpSync(scriptPath, explicitURL);

bench.start();

for (let i = 0; i < n; i++) {
const url = type === 'with-module-syntax-detection' ? ambiguousURL : explicitURL;
await import(url);
}

bench.end(n);
}
54 changes: 54 additions & 0 deletions benchmark/fs/bench-chownSync.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
'use strict';

const common = require('../common');
const fs = require('fs');
const assert = require('assert');
const tmpdir = require('../../test/common/tmpdir');

if (process.platform === 'win32') {
console.log('Skipping: Windows does not have `getuid` or `getgid`');
process.exit(0);
}

const bench = common.createBenchmark(main, {
type: ['existing', 'non-existing'],
method: ['chownSync', 'lchownSync'],
n: [1e4],
});

function main({ n, type, method }) {
const uid = process.getuid();
const gid = process.getgid();
const fsMethod = fs[method];

switch (type) {
case 'existing': {
tmpdir.refresh();
const tmpfile = tmpdir.resolve(`.existing-file-${process.pid}`);
fs.writeFileSync(tmpfile, 'this-is-for-a-benchmark', 'utf8');
bench.start();
for (let i = 0; i < n; i++) {
fsMethod(tmpfile, uid, gid);
}
bench.end(n);
break;
}
case 'non-existing': {
const path = tmpdir.resolve(`.non-existing-file-${Date.now()}`);
let hasError = false;
bench.start();
for (let i = 0; i < n; i++) {
try {
fs[method](path, uid, gid);
} catch {
hasError = true;
}
}
bench.end(n);
assert(hasError);
break;
}
default:
new Error('Invalid type');
}
}
42 changes: 42 additions & 0 deletions benchmark/fs/bench-fsyncSync.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
'use strict';

const common = require('../common');
const fs = require('fs');
const tmpdir = require('../../test/common/tmpdir');
tmpdir.refresh();

const tmpfile = tmpdir.resolve(`.existing-file-${process.pid}`);
fs.writeFileSync(tmpfile, 'this-is-for-a-benchmark', 'utf8');

const bench = common.createBenchmark(main, {
type: ['existing', 'non-existing'],
n: [1e4],
});

function main({ n, type }) {
let fd;

switch (type) {
case 'existing':
fd = fs.openSync(tmpfile, 'r', 0o666);
break;
case 'non-existing':
fd = 1 << 30;
break;
default:
new Error('Invalid type');
}

bench.start();
for (let i = 0; i < n; i++) {
try {
fs.fsyncSync(fd);
} catch {
// do nothing
}
}

bench.end(n);

if (type === 'existing') fs.closeSync(fd);
}
50 changes: 50 additions & 0 deletions benchmark/fs/bench-linkSync.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
'use strict';

const common = require('../common');
const fs = require('fs');
const assert = require('assert');
const tmpdir = require('../../test/common/tmpdir');

tmpdir.refresh();
const tmpfile = tmpdir.resolve(`.bench-file-data-${Date.now()}`);
fs.writeFileSync(tmpfile, 'bench-file', 'utf-8');

const bench = common.createBenchmark(main, {
type: ['valid', 'invalid'],
n: [1e3],
});

function main({ n, type }) {
switch (type) {
case 'valid': {
bench.start();
for (let i = 0; i < n; i++) {
fs.linkSync(tmpfile, tmpdir.resolve(`.valid-${i}`), 'file');
}
bench.end(n);

break;
}

case 'invalid': {
let hasError = false;
bench.start();
for (let i = 0; i < n; i++) {
try {
fs.linkSync(
tmpdir.resolve(`.non-existing-file-for-linkSync-${i}`),
__filename,
'file',
);
} catch {
hasError = true;
}
}
bench.end(n);
assert(hasError);
break;
}
default:
new Error('Invalid type');
}
}
44 changes: 44 additions & 0 deletions benchmark/fs/bench-mkdirSync.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
'use strict';

const common = require('../common');
const fs = require('fs');
const tmpdir = require('../../test/common/tmpdir');
tmpdir.refresh();

const bench = common.createBenchmark(main, {
type: ['existing', 'non-existing'],
recursive: ['true', 'false'],
n: [1e3],
});

function main({ n, type, recursive }) {
recursive = recursive === 'true';
let files;

switch (type) {
case 'non-existing':
files = [];

// Populate tmpdir with target dirs
for (let i = 0; i < n; i++) {
const path = tmpdir.resolve(recursive ? `rmdirsync-bench-dir-${process.pid}-${i}/a/b/c` : `rmdirsync-bench-dir-${process.pid}-${i}`);
files.push(path);
}
break;
case 'existing':
files = new Array(n).fill(__dirname);
break;
default:
new Error('Invalid type');
}

bench.start();
for (let i = 0; i < n; i++) {
try {
fs.mkdirSync(files[i], { recursive });
} catch {
// do nothing
}
}
bench.end(n);
}
57 changes: 57 additions & 0 deletions benchmark/fs/bench-readSync.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
'use strict';

const common = require('../common');
const fs = require('fs');
const tmpdir = require('../../test/common/tmpdir');
tmpdir.refresh();

const bufferSize = 1024;
const sectorSize = 512;

const bench = common.createBenchmark(main, {
type: ['existing', 'non-existing'],
n: [1e4],
});

function main({ n, type }) {
let fd;

const tmpfile = { name: tmpdir.resolve(`.existing-file-${process.pid}`),
len: bufferSize * n };


tmpfile.contents = Buffer.allocUnsafe(tmpfile.len);

for (let offset = 0; offset < tmpfile.len; offset += sectorSize) {
const fillByte = 256 * Math.random();
const nBytesToFill = Math.min(sectorSize, tmpfile.len - offset);
tmpfile.contents.fill(fillByte, offset, offset + nBytesToFill);
}

fs.writeFileSync(tmpfile.name, tmpfile.contents);

switch (type) {
case 'existing':
fd = fs.openSync(tmpfile.name, 'r', 0o666);
break;
case 'non-existing':
fd = 1 << 30;
break;
default:
new Error('Invalid type');
}

const buffer = Buffer.alloc(bufferSize);

bench.start();
for (let i = 0; i < n; i++) {
try {
fs.readSync(fd, buffer);
} catch {
// Continue regardless of error.
}
}
bench.end(n);

if (type === 'existing') fs.closeSync(fd);
}
Loading