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.6.0 proposal #51342

Merged
merged 112 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
e54ddf8
src: support configurable snapshot
joyeecheung Oct 28, 2023
efa13e1
doc: add documentation for --build-snapshot-config
addaleax Nov 16, 2023
e2f8d74
deps: update zlib to 1.3.0.1-motley-dd5fc13
nodejs-github-bot Dec 16, 2023
2c227b0
doc: fix simdjson wrong link
marco-ippolito Dec 16, 2023
3f4fd6e
watch: fix infinite loop when passing --watch=true flag
pulkit-30 Dec 16, 2023
e5017a5
crypto: update CryptoKey symbol properties
panva Nov 25, 2023
13a1241
assert,crypto: make KeyObject and CryptoKey testable for equality
panva Nov 24, 2023
63db82a
test_runner: fixed to run after hook if before throws an error
pulkit-30 Dec 17, 2023
89eee77
http2: addtl http/2 settings
martenrichter Dec 18, 2023
1c71435
doc: fix `TestsStream` parent class
Dec 18, 2023
e636d83
doc: correct note on behavior of stats.isDirectory
NReilingh Dec 18, 2023
5b229d7
fs: validate fd synchronously on c++
anonrig Dec 18, 2023
df8927a
doc: mention native addons are restricted in pm
RafaelGSS Dec 19, 2023
c96ef65
tools: update eslint to 8.56.0
nodejs-github-bot Dec 19, 2023
b2135ae
node-api: segregate nogc APIs from rest via type system
gabrielschulhof Dec 19, 2023
a325746
http: do not override user-provided options object
KuthorX Dec 19, 2023
f9d4e07
doc: remove version from `maintaining-dependencies.md`
aduh95 Dec 19, 2023
d0d2faf
tools: update lint-md-dependencies to [email protected]
nodejs-github-bot Dec 19, 2023
3ecc7dc
deps: update acorn-walk to 8.3.0
nodejs-github-bot Oct 29, 2023
75e5615
deps: update acorn-walk to 8.3.1
nodejs-github-bot Dec 10, 2023
8a2dd93
src: implement FastByteLengthUtf8 with simdutf::utf8_length_from_latin1
lemire Dec 19, 2023
d7c2572
test: fix flakiness in worker*.test-free-called
MrJithil Dec 19, 2023
5453abd
doc: set exit code in custom test runner example
mcollina Dec 20, 2023
7421467
fs: improve mkdtemp performance for buffer prefix
anonrig Dec 20, 2023
6d1bfcb
deps: update googletest to 530d5c8
nodejs-github-bot Dec 20, 2023
a07d6e2
deps: update simdjson to 3.6.3
nodejs-github-bot Dec 10, 2023
3759491
tools: check timezone current version
marco-ippolito Dec 20, 2023
7e9a0b1
test: use tmpdir.refresh() in test-esm-json.mjs
lpinca Dec 20, 2023
8a2178c
test: use tmpdir.refresh() in test-esm-loader-resolve-type.mjs
lpinca Dec 20, 2023
4b19e62
doc: remove ambiguous 'considered'
Trott Dec 20, 2023
e4be5b6
net: add connection attempt events
ShogunPanda Dec 21, 2023
83a99cc
meta: update artifact actions to v4
targos Dec 21, 2023
c13a5c0
doc: mention node:wasi in the Threat Model
RafaelGSS Dec 21, 2023
b6f232e
test: add URL tests to fs-read in pm
RafaelGSS Dec 21, 2023
7e98349
test: replace forEach with for-of in test-v8-serders.js
iannonoss Dec 21, 2023
3310095
repl: fix prepareStackTrace frames array order
legendecas Nov 21, 2023
291265c
lib: expose default prepareStackTrace
legendecas Nov 20, 2023
ec6fcff
doc: fix limitations and known issues in pm
RafaelGSS Dec 21, 2023
8f4325d
permission: fix wildcard when children > 1
RafaelGSS Dec 21, 2023
8ff6bc4
lib,permission: handle buffer on fs.symlink
RafaelGSS Dec 21, 2023
a69c7d7
src,permission: add --allow-addon flag
RafaelGSS Dec 21, 2023
25eba3d
deps: V8: cherry-pick de611e69ad51
kvakil Dec 21, 2023
c7a1359
http: remove misleading warning
lpinca Dec 21, 2023
e24249c
fs: remove `internalModuleReadJSON` binding
anonrig Dec 21, 2023
c87e5d5
fs: add missing jsdoc parameters to `readSync`
anonrig Dec 21, 2023
9bfd84c
test: replace forEach with for of in test-trace-events-api.js
andp97 Nov 18, 2023
b621ada
module: move the CJS exports cache to internal/modules/cjs/loader
joyeecheung Dec 14, 2023
f1cb583
test: replace forEach() with for...of in test/parallel/test-util-log.js
edodusi Nov 18, 2023
38232d1
test: replace forEach with for of in file test-trace-events-net.js
Ianna83 Nov 18, 2023
3db376f
test: skip test-watch-mode-inspect on arm
mhdawson Dec 22, 2023
876743e
doc: run license-builder
github-actions[bot] Dec 22, 2023
88e8651
test: move to for of loop in test-http-hostname-typechecking.js
Puppo Dec 22, 2023
57c6455
test: replace forEach with for-of in test-webcrypto-export-import-ec
cricciardi Dec 22, 2023
3a49205
node-api: type tag external values without v8::Private
legendecas Dec 22, 2023
e5a8fa0
fs: make offset, position & length args in fh.read() optional
pulkit-30 Dec 22, 2023
96d64ed
src: use BignumPointer and use BN_clear_free
jasnell Oct 28, 2023
ed7305e
lib: reduce overhead of `SafePromiseAllSettledReturnVoid` calls
aduh95 Dec 22, 2023
6648a5c
meta: notify tsc on changes in SECURITY.md
RafaelGSS Dec 22, 2023
8f845eb
lib: move function declaration outside of loop
sanjaiyan-dev Dec 23, 2023
efa12a8
deps: update simdutf to 4.0.8
nodejs-github-bot Dec 23, 2023
c31ed51
timers: export timers.promises
marco-ippolito Dec 23, 2023
8ee882a
doc: mark `--jitless` as experimental
aduh95 Dec 23, 2023
6241429
lib: fix use of `--frozen-intrinsics` with `--jitless`
aduh95 Dec 23, 2023
17c73e6
src: fix unix abstract socket path for trace event
theanarkh Dec 23, 2023
941aedc
errors: fix stacktrace of SystemError
Uzlopak Sep 29, 2023
aaf710f
test: replace forEach test-http-server-multiheaders2
mmachera Nov 18, 2023
8412751
doc: improve localWindowSize event descriptions
DavyLandman Dec 6, 2023
47548d9
esm: fix hint on invalid module specifier
aduh95 Dec 23, 2023
979cebc
test_runner: fixed test object is incorrectly passed to setup()
pulkit-30 Dec 24, 2023
917d887
tools: update lint-md-dependencies to [email protected]
nodejs-github-bot Dec 24, 2023
cd61fce
build: add `-flax-vector-conversions` to V8 build
targos Dec 24, 2023
e443953
stream: fix cloned webstreams not being unref'd
jasnell Dec 24, 2023
df31c81
src: eliminate duplicate code in histogram.cc
jasnell Dec 25, 2023
684dd9d
test: fix inconsistency write size in `test-fs-readfile-tostring-fail`
Dec 25, 2023
f4f781d
util: pass invalidSubtypeIndex instead of trimmedSubtype to error
gaurishhs Dec 25, 2023
864ecb0
src: do not treat all paths ending with node_modules as such
targos Dec 25, 2023
54dd978
src: enter isolate before destructing IsolateData
bnoordhuis Dec 25, 2023
4dcc511
benchmark: remove dependency on unshipped tools
AdamMajer Dec 13, 2023
a41dca0
deps: update zlib to 1.3.0.1-motley-40e35a7
nodejs-github-bot Dec 26, 2023
82de660
stream: fix code style
MattiasBuelens Dec 26, 2023
5b32e21
quic: add quic internalBinding, refine Endpoint, add types
jasnell Dec 9, 2023
e03ac83
build: fix arm64 cross-compilation
targos Dec 27, 2023
f00f120
deps: update brotli to 1.1.0
nodejs-github-bot Dec 27, 2023
29b8157
src: refactor `GetCreationContext` calls
anonrig Dec 28, 2023
652af45
test: replace forEach() with for...of
jialiu54321 Nov 7, 2023
091098f
fs: fix fs.promises.realpath for long paths on Windows
sapphi-red Dec 28, 2023
4a5d3bd
doc: the GN files should use Node's license
zcbenz Dec 28, 2023
56e8969
watch: fix null `fileName` on windows systems
vnc5 Dec 28, 2023
c3126fc
tools: update inspector_protocol to ca525fc
cola119 Dec 27, 2023
ef4f46f
tools: update inspector_protocol to 547c5b8
cola119 Dec 27, 2023
d181684
tools: update inspector_protocol to 912eb68
cola119 Dec 27, 2023
60d8048
tools: update inspector_protocol to d7b099b
cola119 Dec 27, 2023
e325f49
tools: update inspector_protocol to 2f51e05
cola119 Dec 27, 2023
69a46ad
tools: update inspector_protocol to 9b4a4aa
cola119 Dec 27, 2023
bdcb5ed
tools: update inspector_protocol to c488ba2
cola119 Dec 27, 2023
d5a5f12
tools: fix dep_updaters dir updates
targos Dec 29, 2023
e53cbb2
deps: update ngtcp2 and nghttp3
jasnell Dec 26, 2023
7ecf994
quic: update quic impl to use latest ngtcp2/nghttp3
jasnell Dec 26, 2023
115e058
src: add fast api for Histogram
jasnell Dec 29, 2023
ef44f9b
test: replace foreach with for of
lucacapocci94-dev Dec 29, 2023
549e4b4
test: replace forEach with for...of
Nov 18, 2023
85ee2f7
test: replace forEach() with for...of
Nov 10, 2023
e7925e6
src,stream: improve WriteString
ywave620 Dec 30, 2023
416b4f8
lib,src,permission: port path.resolve to C++
RafaelGSS Dec 30, 2023
867b484
watch: clarify that the fileName parameter can be null
lpinca Dec 30, 2023
2eb41f8
build: fix for VScode "Reopen in Container"
ohhmm Dec 31, 2023
24a9a72
deps: update acorn to 8.11.3
nodejs-github-bot Jan 2, 2024
c0d2e8b
deps: update corepack to 0.24.0
nodejs-github-bot Jan 2, 2024
fc10f88
tools: update lint-md-dependencies to [email protected]
nodejs-github-bot Jan 2, 2024
a0ff00b
src: avoid draining platform tasks at FreeEnvironment
legendecas Jan 8, 2024
757a84c
test: fix flaky conditions for ppc64 SEA tests
richardlau Jan 11, 2024
f38a9a5
2024-01-15, Version 21.6.0 (Current)
RafaelGSS Jan 2, 2024
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: 0 additions & 1 deletion .devcontainer/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "Node.js Core Developer Environment",
"extensions": [
"github.vscode-pull-request-github",
"ms-vsliveshare.vsliveshare",
"vscode-icons-team.vscode-icons",
"visualstudioexptteam.vscodeintellicode"
"github.vscode-pull-request-github",
"ms-vsliveshare.vsliveshare",
"vscode-icons-team.vscode-icons",
"visualstudioexptteam.vscodeintellicode"
],
"dockerFile": "Dockerfile",
"image": "nodejs/devcontainer:nightly",
"initializeCommand": "docker system prune -f -a",
"settings": {
"terminal.integrated.profiles.linux": {
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/CONTRIBUTING.md @nodejs/tsc
/doc/contributing/*.md @nodejs/tsc
/GOVERNANCE.md @nodejs/tsc
/SECURITY.md @nodejs/tsc
/LICENSE @nodejs/tsc
/onboarding.md @nodejs/tsc

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
mkdir tarballs
mv *.tar.gz tarballs
- name: Upload tarball artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: tarballs
path: tarballs
Expand All @@ -75,7 +75,7 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Download tarball
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: tarballs
path: tarballs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/daily-wpt-fyi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ jobs:
run: cp wptreport.json wptreport-${{ steps.setup-node.outputs.node-version }}.json
- name: Upload GitHub Actions artifact
if: ${{ env.WPT_REPORT != '' }}
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
path: out/wpt/wptreport-*.json
name: WPT Reports
name: WPT Report for ${{ steps.setup-node.outputs.node-version }}
if-no-files-found: error
- name: Upload WPT Report to wpt.fyi API
if: ${{ env.WPT_REPORT != '' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: npx envinfo
- name: Build
run: NODE=$(command -v node) make doc-only
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
- uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: docs
path: out/doc
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: SARIF file
path: results.sarif
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/timezone-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,22 @@ jobs:
- name: Record new version
run: echo "new_version=$(ls icu-data/tzdata/icunew | tail -1)" >> $GITHUB_ENV

- name: Record current version
run: echo "current_version=$(cat ./test/fixtures/tz-version.txt)" >> $GITHUB_ENV

- name: Compare versions
run: |
echo "Comparing current version ${{ env.current_version }} to new version ${{ env.new_version }}"

- run: ./tools/update-timezone.mjs
if: ${{ env.new_version != env.current_version }}

- name: Update the expected timezone version in test
if: ${{ env.new_version != env.current_version }}
run: echo "${{ env.new_version }}" > test/fixtures/tz-version.txt

- name: Open Pull Request
if: ${{ env.new_version != env.current_version }}
uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5 # Create a PR or update the Action's existing PR
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
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.5.0">21.5.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V21.md#21.6.0">21.6.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V21.md#21.5.0">21.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V21.md#21.4.0">21.4.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V21.md#21.3.0">21.3.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V21.md#21.2.0">21.2.0</a><br/>
Expand Down
31 changes: 30 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ The externally maintained libraries used by Node.js are:
- zlib, located at deps/zlib, is licensed as follows:
"""
zlib.h -- interface of the 'zlib' general purpose compression library
version 1.3, August 18th, 2023
version 1.3.0.1, August xxth, 2023

Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler

Expand Down Expand Up @@ -1972,6 +1972,35 @@ The externally maintained libraries used by Node.js are:
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

- gypi_to_gn.py, located at tools/gypi_to_gn.py, is licensed as follows:
"""
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

- ESLint, located at tools/node_modules/eslint, is licensed as follows:
"""
Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
Expand Down
2 changes: 2 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ lead to a loss of confidentiality, integrity, or availability.
end being on the local machine or remote.
6. The file system when requiring a module.
See <https://nodejs.org/api/modules.html#all-together>.
7. The `node:wasi` module does not currently provide the comprehensive file
system security properties provided by some WASI runtimes.

Any unexpected behavior from the data manipulation from Node.js Internal
functions may be considered a vulnerability if they are exploitable via
Expand Down
5 changes: 4 additions & 1 deletion benchmark/buffers/buffer-bytelength-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
const common = require('../common');

const bench = common.createBenchmark(main, {
type: ['one_byte', 'two_bytes', 'three_bytes', 'four_bytes'],
type: ['one_byte', 'two_bytes', 'three_bytes',
'four_bytes', 'latin1'],
encoding: ['utf8', 'base64'],
repeat: [1, 2, 16, 256], // x16
n: [4e6],
Expand All @@ -14,6 +15,8 @@ const chars = {
two_bytes: 'ΰαβγδεζηθικλμνξο',
three_bytes: '挰挱挲挳挴挵挶挷挸挹挺挻挼挽挾挿',
four_bytes: '𠜎𠜱𠝹𠱓𠱸𠲖𠳏𠳕𠴕𠵼𠵿𠸎𠸏𠹷𠺝𠺢',
latin1: 'Un homme sage est supérieur à toutes ' +
'les insultes qui peuvent lui être adressées, et la meilleure réponse est la patience et la modération.',
};

function getInput(type, repeat, encoding) {
Expand Down
64 changes: 64 additions & 0 deletions benchmark/error/system-error-instantiation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
'use strict';

const common = require('../common');
const assert = require('assert');

const bench = common.createBenchmark(main, {
n: [1e6],
code: [
'built-in',
'ERR_FS_CP_DIR_TO_NON_DIR',
],
stackTraceLimit: [0, 10],
}, {
flags: ['--expose-internals'],
});

function getErrorFactory(code) {
const {
ERR_FS_CP_DIR_TO_NON_DIR,
} = require('internal/errors').codes;

switch (code) {
case 'built-in':
return (n) => new Error();
case 'ERR_FS_CP_DIR_TO_NON_DIR':
return (n) => new ERR_FS_CP_DIR_TO_NON_DIR({
message: 'cannot overwrite directory',
path: 'dest',
syscall: 'cp',
errno: 21,
code: 'EISDIR',
});
default:
throw new Error(`${code} not supported`);
}
}

function main({ n, code, stackTraceLimit }) {
const getError = getErrorFactory(code);

Error.stackTraceLimit = stackTraceLimit;

// Warm up.
const length = 1024;
const array = [];
for (let i = 0; i < length; ++i) {
array.push(getError(i));
}

bench.start();

for (let i = 0; i < n; ++i) {
const index = i % length;
array[index] = getError(index);
}

bench.end(n);

// Verify the entries to prevent dead code elimination from making
// the benchmark invalid.
for (let i = 0; i < length; ++i) {
assert.strictEqual(typeof array[i], 'object');
}
}
43 changes: 43 additions & 0 deletions benchmark/fs/bench-mkdtempSync.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
'use strict';

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

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

function main({ n, type }) {
tmpdir.refresh();
const options = { encoding: 'utf8' };
let prefix;
let out = true;

switch (type) {
case 'valid-string':
prefix = tmpdir.resolve(`${Date.now()}`);
break;
case 'valid-buffer':
prefix = Buffer.from(tmpdir.resolve(`${Date.now()}`));
break;
case 'invalid':
prefix = tmpdir.resolve('non-existent', 'foo', 'bar');
break;
default:
new Error('Invalid type');
}

bench.start();
for (let i = 0; i < n; i++) {
try {
out = fs.mkdtempSync(prefix, options);
} catch {
// do nothing
}
}
bench.end(n);
assert.ok(out);
}
6 changes: 6 additions & 0 deletions benchmark/misc/startup-cli-version.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
const common = require('../common.js');
const { spawnSync } = require('child_process');
const { existsSync } = require('fs');
const path = require('path');

// This benchmarks the startup of various CLI tools that are already
Expand All @@ -11,6 +12,7 @@ const path = require('path');
const bench = common.createBenchmark(main, {
cli: [
'tools/node_modules/eslint/bin/eslint.js',
'deps/npm/bin/npx-cli.js',
'deps/npm/bin/npm-cli.js',
'deps/corepack/dist/corepack.js',
],
Expand Down Expand Up @@ -45,6 +47,10 @@ function spawnProcess(cli, bench, state) {

function main({ count, cli }) {
cli = path.resolve(__dirname, '../../', cli);
if (!existsSync(cli)) {
return;
}

const warmup = 3;
const state = { count, finished: -warmup };
spawnProcess(cli, bench, state);
Expand Down
26 changes: 26 additions & 0 deletions benchmark/perf_hooks/histogram-record.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'use strict';

const assert = require('assert');
const common = require('../common.js');

const { createHistogram } = require('perf_hooks');

const bench = common.createBenchmark(main, {
n: [1e5],
});

function main({ n }) {
const histogram = createHistogram();
bench.start();
for (let i = 0; i < n; i++) {
histogram.record(i + 1);
/* eslint-disable no-unused-expressions */
histogram.max;
histogram.mean;
/* eslint-enable no-unused-expressions */
}
bench.end(n);

// Avoid V8 deadcode (elimination)
assert.ok(histogram);
}
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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.18',
'v8_embedder_string': '-node.19',

##### V8 defaults for Node.js #####

Expand Down
2 changes: 0 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,9 +1273,7 @@ def configure_node(o):

o['variables']['want_separate_host_toolset'] = int(cross_compiling)

# Enable branch protection for arm64
if target_arch == 'arm64':
o['cflags']+=['-msign-return-address=all']
o['variables']['arm_fpu'] = options.arm_fpu or 'neon'

if options.node_snapshot_main is not None:
Expand Down
14 changes: 14 additions & 0 deletions deps/acorn/acorn-walk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 8.3.1 (2023-12-06)

### Bug fixes

Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error.

Visitor functions are now called in such a way that their `this` refers to the object they are part of.

## 8.3.0 (2023-10-26)

### New features

Use a set of new, much more precise, TypeScript types.

## 8.2.0 (2021-09-06)

### New features
Expand Down
Loading