Skip to content

Commit 5c3e7b3

Browse files
authored
Merge branch 'main' into write-arraybuffer
2 parents 11892ad + 0084fc7 commit 5c3e7b3

File tree

1,986 files changed

+20596
-9325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,986 files changed

+20596
-9325
lines changed

.github/workflows/daily-wpt-fyi.yml

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# This workflow runs every night and tests various releases of Node.js
2+
# (latest nightly, current, and two latest LTS release lines) against the
3+
# `epochs/daily` branch of WPT.
4+
5+
name: Daily WPT report
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
node-versions:
11+
description: Node.js versions (as supported by actions/setup-node) to test as JSON array
12+
required: false
13+
default: '["current", "lts/*", "lts/-1"]'
14+
schedule:
15+
# This is 20 minutes after `epochs/daily` branch is triggered to be created
16+
# in WPT repo.
17+
# https://github.com/web-platform-tests/wpt/blob/master/.github/workflows/epochs.yml
18+
- cron: 30 0 * * *
19+
20+
env:
21+
PYTHON_VERSION: '3.11'
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
report:
28+
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
29+
strategy:
30+
matrix:
31+
node-version: ${{ fromJSON(github.event.inputs.node-versions || '["latest-nightly", "current", "lts/*", "lts/-1"]') }}
32+
fail-fast: false
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Set up Python ${{ env.PYTHON_VERSION }}
36+
uses: actions/setup-python@v4
37+
with:
38+
python-version: ${{ env.PYTHON_VERSION }}
39+
- name: Environment Information
40+
run: npx envinfo
41+
42+
# install a version and checkout
43+
- name: Get latest nightly
44+
if: matrix.node-version == 'latest-nightly'
45+
run: echo "NIGHTLY=$(curl -s https://nodejs.org/download/nightly/index.json | jq -r '.[0].version')" >> $GITHUB_ENV
46+
- name: Install Node.js
47+
id: setup-node
48+
uses: actions/setup-node@v3
49+
with:
50+
node-version: ${{ env.NIGHTLY || matrix.node-version }}
51+
- name: Get nightly ref
52+
if: contains(matrix.node-version, 'nightly')
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
run: |
56+
SHORT_SHA=$(node -p 'process.version.split(/-nightly\d{8}/)[1]')
57+
echo "NIGHTLY_REF=$(gh api /repos/nodejs/node/commits/$SHORT_SHA | jq -r '.sha')" >> $GITHUB_ENV
58+
- name: Checkout ${{ steps.setup-node.outputs.node-version }}
59+
uses: actions/checkout@v3
60+
with:
61+
persist-credentials: false
62+
ref: ${{ env.NIGHTLY_REF || steps.setup-node.outputs.node-version }}
63+
- name: Set env.NODE
64+
run: echo "NODE=$(which node)" >> $GITHUB_ENV
65+
66+
# replace checked out WPT with the synchronized branch
67+
- name: Remove stale WPT
68+
run: rm -rf wpt
69+
working-directory: test/fixtures
70+
- name: Checkout epochs/daily WPT
71+
uses: actions/checkout@v3
72+
with:
73+
repository: web-platform-tests/wpt
74+
persist-credentials: false
75+
path: test/fixtures/wpt
76+
clean: false
77+
ref: epochs/daily
78+
- name: Set env.WPT_REVISION
79+
run: echo "WPT_REVISION=$(git rev-parse HEAD)" >> $GITHUB_ENV
80+
working-directory: test/fixtures/wpt
81+
82+
- name: Run WPT and generate report
83+
run: make test-wpt-report || true
84+
- name: Clone report for upload
85+
run: |
86+
if [ -e out/wpt/wptreport.json ]; then
87+
cd out/wpt
88+
cp wptreport.json wptreport-${{ steps.setup-node.outputs.node-version }}.json
89+
fi
90+
- name: Upload GitHub Actions artifact
91+
uses: actions/upload-artifact@v3
92+
with:
93+
path: out/wpt/wptreport-*.json
94+
name: WPT Reports
95+
if-no-files-found: warn
96+
- name: Upload WPT Report to wpt.fyi API
97+
env:
98+
WPT_FYI_ENDPOINT: ${{ vars.WPT_FYI_ENDPOINT }}
99+
WPT_FYI_USERNAME: ${{ vars.WPT_FYI_USERNAME }}
100+
WPT_FYI_PASSWORD: ${{ secrets.WPT_FYI_PASSWORD }}
101+
run: |
102+
if [ -e out/wpt/wptreport.json ]; then
103+
cd out/wpt
104+
gzip wptreport.json
105+
curl \
106+
-u "$WPT_FYI_USERNAME:$WPT_FYI_PASSWORD" \
107+
-F "result_file=@wptreport.json.gz" \
108+
-F "labels=master" \
109+
$WPT_FYI_ENDPOINT
110+
fi

.github/workflows/tools.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
./tools/update-undici.sh
7979
fi
8080
- id: postject
81-
subsystem: test
81+
subsystem: deps,test
8282
label: test
8383
run: |
8484
NEW_VERSION=$(npm view postject dist-tags.latest)

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -3608,5 +3608,6 @@ José Dapena Paz <jdapena@igalia.com>
36083608
Mohamed Akram <mohd-akram@users.noreply.github.com>
36093609
三咲智子 Kevin Deng <sxzz@sxzz.moe>
36103610
Nicolas DUBIEN <github@dubien.org>
3611+
richiemccoll <richie.mccoll@hotmail.co.uk>
36113612

36123613
# Generated by tools/update-authors.mjs

CHANGELOG.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ release.
3535
</tr>
3636
<tr>
3737
<td valign="top">
38-
<b><a href="doc/changelogs/CHANGELOG_V19.md#19.6.0">19.6.0</a></b><br/>
38+
<b><a href="doc/changelogs/CHANGELOG_V19.md#19.6.1">19.6.1</a></b><br/>
39+
<a href="doc/changelogs/CHANGELOG_V19.md#19.6.0">19.6.0</a><br/>
3940
<a href="doc/changelogs/CHANGELOG_V19.md#19.5.0">19.5.0</a><br/>
4041
<a href="doc/changelogs/CHANGELOG_V19.md#19.4.0">19.4.0</a><br/>
4142
<a href="doc/changelogs/CHANGELOG_V19.md#19.3.0">19.3.0</a><br/>
@@ -45,7 +46,8 @@ release.
4546
<a href="doc/changelogs/CHANGELOG_V19.md#19.0.0">19.0.0</a><br/>
4647
</td>
4748
<td valign="top">
48-
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.14.0">18.14.0</a></b><br/>
49+
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.14.1">18.14.1</a></b><br/>
50+
<a href="doc/changelogs/CHANGELOG_V18.md#18.14.0">18.14.0</a><br/>
4951
<a href="doc/changelogs/CHANGELOG_V18.md#18.13.0">18.13.0</a><br/>
5052
<a href="doc/changelogs/CHANGELOG_V18.md#18.12.1">18.12.1</a><br/>
5153
<a href="doc/changelogs/CHANGELOG_V18.md#18.12.0">18.12.0</a><br/>
@@ -64,7 +66,8 @@ release.
6466
<a href="doc/changelogs/CHANGELOG_V18.md#18.0.0">18.0.0</a><br/>
6567
</td>
6668
<td valign="top">
67-
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.19.0">16.19.0</a></b><br/>
69+
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.19.1">16.19.1</a></b><br/>
70+
<a href="doc/changelogs/CHANGELOG_V16.md#16.19.0">16.19.0</a><br/>
6871
<a href="doc/changelogs/CHANGELOG_V16.md#16.18.1">16.18.1</a><br/>
6972
<a href="doc/changelogs/CHANGELOG_V16.md#16.18.0">16.18.0</a><br/>
7073
<a href="doc/changelogs/CHANGELOG_V16.md#16.17.1">16.17.1</a><br/>
@@ -99,7 +102,8 @@ release.
99102
<a href="doc/changelogs/CHANGELOG_V16.md#16.0.0">16.0.0</a><br/>
100103
</td>
101104
<td valign="top">
102-
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.21.2">14.21.2</a></b><br/>
105+
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.21.3">14.21.3</a></b><br/>
106+
<a href="doc/changelogs/CHANGELOG_V14.md#14.21.2">14.21.2</a><br/>
103107
<a href="doc/changelogs/CHANGELOG_V14.md#14.21.1">14.21.1</a><br/>
104108
<a href="doc/changelogs/CHANGELOG_V14.md#14.21.0">14.21.0</a><br/>
105109
<a href="doc/changelogs/CHANGELOG_V14.md#14.20.1">14.20.1</a><br/>

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,12 @@ test-message: test-build
595595
test-wpt: all
596596
$(PYTHON) tools/test.py $(PARALLEL_ARGS) wpt
597597

598+
.PHONY: test-wpt-report
599+
test-wpt-report:
600+
$(RM) -r out/wpt
601+
mkdir -p out/wpt
602+
WPT_REPORT=1 $(PYTHON) tools/test.py --shell $(NODE) $(PARALLEL_ARGS) wpt
603+
598604
.PHONY: test-simple
599605
test-simple: | cctest # Depends on 'all'.
600606
$(PYTHON) tools/test.py $(PARALLEL_ARGS) parallel sequential

benchmark/.eslintrc.yaml

-16
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,3 @@ env:
66

77
rules:
88
prefer-arrow-callback: error
9-
10-
overrides:
11-
- files:
12-
- crypto/*.js
13-
- http/*.js
14-
- http2/*.js
15-
- path/*.js
16-
- url/*.js
17-
rules:
18-
comma-dangle: [error, {
19-
arrays: always-multiline,
20-
exports: always-multiline,
21-
functions: only-multiline,
22-
imports: always-multiline,
23-
objects: only-multiline,
24-
}]

benchmark/crypto/aes-gcm-throughput.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const keylen = { 'aes-128-gcm': 16, 'aes-192-gcm': 24, 'aes-256-gcm': 32 };
55
const bench = common.createBenchmark(main, {
66
n: [500],
77
cipher: ['aes-128-gcm', 'aes-192-gcm', 'aes-256-gcm'],
8-
len: [1024, 4 * 1024, 16 * 1024, 64 * 1024, 256 * 1024, 1024 * 1024]
8+
len: [1024, 4 * 1024, 16 * 1024, 64 * 1024, 256 * 1024, 1024 * 1024],
99
});
1010

1111
function main({ n, len, cipher }) {

benchmark/crypto/cipher-stream.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const bench = common.createBenchmark(main, {
66
cipher: ['AES192', 'AES256'],
77
type: ['asc', 'utf', 'buf'],
88
len: [2, 1024, 102400, 1024 * 1024],
9-
api: ['legacy', 'stream']
9+
api: ['legacy', 'stream'],
1010
}, {
11-
flags: ['--no-warnings']
11+
flags: ['--no-warnings'],
1212
});
1313

1414
function main({ api, cipher, type, len, writes }) {

benchmark/crypto/get-ciphers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const common = require('../common.js');
44

55
const bench = common.createBenchmark(main, {
66
n: [1, 5000],
7-
v: ['crypto', 'tls']
7+
v: ['crypto', 'tls'],
88
});
99

1010
function main({ n, v }) {

benchmark/crypto/hash-stream-creation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, {
1010
type: ['asc', 'utf', 'buf'],
1111
out: ['hex', 'binary', 'buffer'],
1212
len: [2, 1024, 102400, 1024 * 1024],
13-
api: ['legacy', 'stream']
13+
api: ['legacy', 'stream'],
1414
});
1515

1616
function main({ api, type, len, out, writes, algo }) {

benchmark/crypto/hash-stream-throughput.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, {
99
algo: ['sha1', 'sha256', 'sha512'],
1010
type: ['asc', 'utf', 'buf'],
1111
len: [2, 1024, 102400, 1024 * 1024],
12-
api: ['legacy', 'stream']
12+
api: ['legacy', 'stream'],
1313
});
1414

1515
function main({ api, type, len, algo, writes }) {

benchmark/crypto/hkdf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const common = require('../common.js');
44
const assert = require('assert');
55
const {
66
hkdf,
7-
hkdfSync
7+
hkdfSync,
88
} = require('crypto');
99

1010
const bench = common.createBenchmark(main, {

benchmark/crypto/keygen.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const common = require('../common.js');
44
const assert = require('assert');
55
const {
66
generateKeyPair,
7-
generateKeyPairSync
7+
generateKeyPairSync,
88
} = require('crypto');
99

1010
const bench = common.createBenchmark(main, {
@@ -18,7 +18,7 @@ const methods = {
1818
for (let i = 0; i < n; ++i) {
1919
generateKeyPairSync('rsa', {
2020
modulusLength: 1024,
21-
publicExponent: 0x10001
21+
publicExponent: 0x10001,
2222
});
2323
}
2424
bench.end(n);
@@ -35,7 +35,7 @@ const methods = {
3535
for (let i = 0; i < n; ++i)
3636
generateKeyPair('rsa', {
3737
modulusLength: 512,
38-
publicExponent: 0x10001
38+
publicExponent: 0x10001,
3939
}, done);
4040
},
4141

benchmark/crypto/oneshot-sign-verify.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const keyFixtures = {
99
publicKey: fs.readFileSync(`${fixtures_keydir}/ec_p256_public.pem`)
1010
.toString(),
1111
privateKey: fs.readFileSync(`${fixtures_keydir}/ec_p256_private.pem`)
12-
.toString()
12+
.toString(),
1313
};
1414

1515
const data = crypto.randomBytes(256);
@@ -20,7 +20,7 @@ let keyObjects;
2020
function getKeyObject({ privateKey, publicKey }) {
2121
return {
2222
privateKey: crypto.createPrivateKey(privateKey),
23-
publicKey: crypto.createPublicKey(publicKey)
23+
publicKey: crypto.createPublicKey(publicKey),
2424
};
2525
}
2626

@@ -60,15 +60,15 @@ function measureAsyncSerial(n, privateKey, publicKey, keys) {
6060
data,
6161
{
6262
key: privateKey || keys[n - remaining].privateKey,
63-
dsaEncoding: 'ieee-p1363'
63+
dsaEncoding: 'ieee-p1363',
6464
},
6565
(err, signature) => {
6666
crypto.verify(
6767
'sha256',
6868
data,
6969
{
7070
key: publicKey || keys[n - remaining].publicKey,
71-
dsaEncoding: 'ieee-p1363'
71+
dsaEncoding: 'ieee-p1363',
7272
},
7373
signature,
7474
done);
@@ -104,7 +104,7 @@ function measureAsyncParallel(n, privateKey, publicKey, keys) {
104104
function main({ n, mode, keyFormat }) {
105105
pems ||= [...Buffer.alloc(n)].map(() => ({
106106
privateKey: keyFixtures.privateKey,
107-
publicKey: keyFixtures.publicKey
107+
publicKey: keyFixtures.publicKey,
108108
}));
109109
keyObjects ||= pems.map(getKeyObject);
110110

benchmark/crypto/randomInt.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const bench = common.createBenchmark(main, {
77
mode: ['sync', 'async-sequential', 'async-parallel'],
88
min: [-(2 ** 47) + 1, -10_000, -100],
99
max: [100, 10_000, 2 ** 47],
10-
n: [1e3, 1e5]
10+
n: [1e3, 1e5],
1111
});
1212

1313
function main({ mode, min, max, n }) {

benchmark/crypto/rsa-encrypt-decrypt-throughput.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ keylen_list.forEach((key) => {
1919
const bench = common.createBenchmark(main, {
2020
n: [500],
2121
keylen: keylen_list,
22-
len: [16, 32, 64]
22+
len: [16, 32, 64],
2323
});
2424

2525
function main({ len, algo, keylen, n }) {

benchmark/crypto/rsa-sign-verify-throughput.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const bench = common.createBenchmark(main, {
2020
writes: [500],
2121
algo: ['SHA1', 'SHA224', 'SHA256', 'SHA384', 'SHA512'],
2222
keylen: keylen_list,
23-
len: [1024, 102400, 2 * 102400, 3 * 102400, 1024 * 1024]
23+
len: [1024, 102400, 2 * 102400, 3 * 102400, 1024 * 1024],
2424
});
2525

2626
function main({ len, algo, keylen, writes }) {

benchmark/crypto/webcrypto-digest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const kMethods = {
1515
'SHA-1': 'sha1',
1616
'SHA-256': 'sha256',
1717
'SHA-384': 'sha384',
18-
'SHA-512': 'sha512'
18+
'SHA-512': 'sha512',
1919
};
2020

2121
// This benchmark only looks at clock time and ignores factors

benchmark/http/bench-parser.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ const common = require('../common');
44

55
const bench = common.createBenchmark(main, {
66
len: [4, 8, 16, 32],
7-
n: [1e5]
7+
n: [1e5],
88
}, {
9-
flags: ['--expose-internals', '--no-warnings']
9+
flags: ['--expose-internals', '--no-warnings'],
1010
});
1111

1212
function main({ len, n }) {

benchmark/http/check_invalid_header_char.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const groupedInputs = {
2323

2424
// Put it here so the benchmark result lines will not be super long.
2525
LONG_AND_INVALID: ['Here is a value that is really a folded header ' +
26-
'value\r\n this should be supported, but it is not currently']
26+
'value\r\n this should be supported, but it is not currently'],
2727
};
2828

2929
const inputs = [

benchmark/http/chunked.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const bench = common.createBenchmark(main, {
1414
n: [1, 4, 8, 16],
1515
len: [1, 64, 256],
1616
c: [100],
17-
duration: 5
17+
duration: 5,
1818
});
1919

2020
function main({ len, n, c, duration }) {

0 commit comments

Comments
 (0)