Skip to content

Commit

Permalink
Merge branch 'main' into write-arraybuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
SRHerzog committed Feb 17, 2023
2 parents 11892ad + 0084fc7 commit 5c3e7b3
Show file tree
Hide file tree
Showing 1,986 changed files with 20,596 additions and 9,325 deletions.
110 changes: 110 additions & 0 deletions .github/workflows/daily-wpt-fyi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# This workflow runs every night and tests various releases of Node.js
# (latest nightly, current, and two latest LTS release lines) against the
# `epochs/daily` branch of WPT.

name: Daily WPT report

on:
workflow_dispatch:
inputs:
node-versions:
description: Node.js versions (as supported by actions/setup-node) to test as JSON array
required: false
default: '["current", "lts/*", "lts/-1"]'
schedule:
# This is 20 minutes after `epochs/daily` branch is triggered to be created
# in WPT repo.
# https://github.com/web-platform-tests/wpt/blob/master/.github/workflows/epochs.yml
- cron: 30 0 * * *

env:
PYTHON_VERSION: '3.11'

permissions:
contents: read

jobs:
report:
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
strategy:
matrix:
node-version: ${{ fromJSON(github.event.inputs.node-versions || '["latest-nightly", "current", "lts/*", "lts/-1"]') }}
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo

# install a version and checkout
- name: Get latest nightly
if: matrix.node-version == 'latest-nightly'
run: echo "NIGHTLY=$(curl -s https://nodejs.org/download/nightly/index.json | jq -r '.[0].version')" >> $GITHUB_ENV
- name: Install Node.js
id: setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NIGHTLY || matrix.node-version }}
- name: Get nightly ref
if: contains(matrix.node-version, 'nightly')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
SHORT_SHA=$(node -p 'process.version.split(/-nightly\d{8}/)[1]')
echo "NIGHTLY_REF=$(gh api /repos/nodejs/node/commits/$SHORT_SHA | jq -r '.sha')" >> $GITHUB_ENV
- name: Checkout ${{ steps.setup-node.outputs.node-version }}
uses: actions/checkout@v3
with:
persist-credentials: false
ref: ${{ env.NIGHTLY_REF || steps.setup-node.outputs.node-version }}
- name: Set env.NODE
run: echo "NODE=$(which node)" >> $GITHUB_ENV

# replace checked out WPT with the synchronized branch
- name: Remove stale WPT
run: rm -rf wpt
working-directory: test/fixtures
- name: Checkout epochs/daily WPT
uses: actions/checkout@v3
with:
repository: web-platform-tests/wpt
persist-credentials: false
path: test/fixtures/wpt
clean: false
ref: epochs/daily
- name: Set env.WPT_REVISION
run: echo "WPT_REVISION=$(git rev-parse HEAD)" >> $GITHUB_ENV
working-directory: test/fixtures/wpt

- name: Run WPT and generate report
run: make test-wpt-report || true
- name: Clone report for upload
run: |
if [ -e out/wpt/wptreport.json ]; then
cd out/wpt
cp wptreport.json wptreport-${{ steps.setup-node.outputs.node-version }}.json
fi
- name: Upload GitHub Actions artifact
uses: actions/upload-artifact@v3
with:
path: out/wpt/wptreport-*.json
name: WPT Reports
if-no-files-found: warn
- name: Upload WPT Report to wpt.fyi API
env:
WPT_FYI_ENDPOINT: ${{ vars.WPT_FYI_ENDPOINT }}
WPT_FYI_USERNAME: ${{ vars.WPT_FYI_USERNAME }}
WPT_FYI_PASSWORD: ${{ secrets.WPT_FYI_PASSWORD }}
run: |
if [ -e out/wpt/wptreport.json ]; then
cd out/wpt
gzip wptreport.json
curl \
-u "$WPT_FYI_USERNAME:$WPT_FYI_PASSWORD" \
-F "result_file=@wptreport.json.gz" \
-F "labels=master" \
$WPT_FYI_ENDPOINT
fi
2 changes: 1 addition & 1 deletion .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
./tools/update-undici.sh
fi
- id: postject
subsystem: test
subsystem: deps,test
label: test
run: |
NEW_VERSION=$(npm view postject dist-tags.latest)
Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3608,5 +3608,6 @@ José Dapena Paz <jdapena@igalia.com>
Mohamed Akram <mohd-akram@users.noreply.github.com>
三咲智子 Kevin Deng <sxzz@sxzz.moe>
Nicolas DUBIEN <github@dubien.org>
richiemccoll <richie.mccoll@hotmail.co.uk>

# Generated by tools/update-authors.mjs
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V19.md#19.6.0">19.6.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V19.md#19.6.1">19.6.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V19.md#19.6.0">19.6.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V19.md#19.5.0">19.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V19.md#19.4.0">19.4.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V19.md#19.3.0">19.3.0</a><br/>
Expand All @@ -45,7 +46,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V19.md#19.0.0">19.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.14.0">18.14.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.14.1">18.14.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.14.0">18.14.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.13.0">18.13.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.12.1">18.12.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.12.0">18.12.0</a><br/>
Expand All @@ -64,7 +66,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V18.md#18.0.0">18.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.19.0">16.19.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.19.1">16.19.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.19.0">16.19.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.18.1">16.18.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.18.0">16.18.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.17.1">16.17.1</a><br/>
Expand Down Expand Up @@ -99,7 +102,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V16.md#16.0.0">16.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.21.2">14.21.2</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.21.3">14.21.3</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.21.2">14.21.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.21.1">14.21.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.21.0">14.21.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.20.1">14.20.1</a><br/>
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,12 @@ test-message: test-build
test-wpt: all
$(PYTHON) tools/test.py $(PARALLEL_ARGS) wpt

.PHONY: test-wpt-report
test-wpt-report:
$(RM) -r out/wpt
mkdir -p out/wpt
WPT_REPORT=1 $(PYTHON) tools/test.py --shell $(NODE) $(PARALLEL_ARGS) wpt

.PHONY: test-simple
test-simple: | cctest # Depends on 'all'.
$(PYTHON) tools/test.py $(PARALLEL_ARGS) parallel sequential
Expand Down
16 changes: 0 additions & 16 deletions benchmark/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,3 @@ env:

rules:
prefer-arrow-callback: error

overrides:
- files:
- crypto/*.js
- http/*.js
- http2/*.js
- path/*.js
- url/*.js
rules:
comma-dangle: [error, {
arrays: always-multiline,
exports: always-multiline,
functions: only-multiline,
imports: always-multiline,
objects: only-multiline,
}]
2 changes: 1 addition & 1 deletion benchmark/crypto/aes-gcm-throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const keylen = { 'aes-128-gcm': 16, 'aes-192-gcm': 24, 'aes-256-gcm': 32 };
const bench = common.createBenchmark(main, {
n: [500],
cipher: ['aes-128-gcm', 'aes-192-gcm', 'aes-256-gcm'],
len: [1024, 4 * 1024, 16 * 1024, 64 * 1024, 256 * 1024, 1024 * 1024]
len: [1024, 4 * 1024, 16 * 1024, 64 * 1024, 256 * 1024, 1024 * 1024],
});

function main({ n, len, cipher }) {
Expand Down
4 changes: 2 additions & 2 deletions benchmark/crypto/cipher-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const bench = common.createBenchmark(main, {
cipher: ['AES192', 'AES256'],
type: ['asc', 'utf', 'buf'],
len: [2, 1024, 102400, 1024 * 1024],
api: ['legacy', 'stream']
api: ['legacy', 'stream'],
}, {
flags: ['--no-warnings']
flags: ['--no-warnings'],
});

function main({ api, cipher, type, len, writes }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/get-ciphers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const common = require('../common.js');

const bench = common.createBenchmark(main, {
n: [1, 5000],
v: ['crypto', 'tls']
v: ['crypto', 'tls'],
});

function main({ n, v }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/hash-stream-creation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, {
type: ['asc', 'utf', 'buf'],
out: ['hex', 'binary', 'buffer'],
len: [2, 1024, 102400, 1024 * 1024],
api: ['legacy', 'stream']
api: ['legacy', 'stream'],
});

function main({ api, type, len, out, writes, algo }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/hash-stream-throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, {
algo: ['sha1', 'sha256', 'sha512'],
type: ['asc', 'utf', 'buf'],
len: [2, 1024, 102400, 1024 * 1024],
api: ['legacy', 'stream']
api: ['legacy', 'stream'],
});

function main({ api, type, len, algo, writes }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/hkdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const common = require('../common.js');
const assert = require('assert');
const {
hkdf,
hkdfSync
hkdfSync,
} = require('crypto');

const bench = common.createBenchmark(main, {
Expand Down
6 changes: 3 additions & 3 deletions benchmark/crypto/keygen.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const common = require('../common.js');
const assert = require('assert');
const {
generateKeyPair,
generateKeyPairSync
generateKeyPairSync,
} = require('crypto');

const bench = common.createBenchmark(main, {
Expand All @@ -18,7 +18,7 @@ const methods = {
for (let i = 0; i < n; ++i) {
generateKeyPairSync('rsa', {
modulusLength: 1024,
publicExponent: 0x10001
publicExponent: 0x10001,
});
}
bench.end(n);
Expand All @@ -35,7 +35,7 @@ const methods = {
for (let i = 0; i < n; ++i)
generateKeyPair('rsa', {
modulusLength: 512,
publicExponent: 0x10001
publicExponent: 0x10001,
}, done);
},

Expand Down
10 changes: 5 additions & 5 deletions benchmark/crypto/oneshot-sign-verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const keyFixtures = {
publicKey: fs.readFileSync(`${fixtures_keydir}/ec_p256_public.pem`)
.toString(),
privateKey: fs.readFileSync(`${fixtures_keydir}/ec_p256_private.pem`)
.toString()
.toString(),
};

const data = crypto.randomBytes(256);
Expand All @@ -20,7 +20,7 @@ let keyObjects;
function getKeyObject({ privateKey, publicKey }) {
return {
privateKey: crypto.createPrivateKey(privateKey),
publicKey: crypto.createPublicKey(publicKey)
publicKey: crypto.createPublicKey(publicKey),
};
}

Expand Down Expand Up @@ -60,15 +60,15 @@ function measureAsyncSerial(n, privateKey, publicKey, keys) {
data,
{
key: privateKey || keys[n - remaining].privateKey,
dsaEncoding: 'ieee-p1363'
dsaEncoding: 'ieee-p1363',
},
(err, signature) => {
crypto.verify(
'sha256',
data,
{
key: publicKey || keys[n - remaining].publicKey,
dsaEncoding: 'ieee-p1363'
dsaEncoding: 'ieee-p1363',
},
signature,
done);
Expand Down Expand Up @@ -104,7 +104,7 @@ function measureAsyncParallel(n, privateKey, publicKey, keys) {
function main({ n, mode, keyFormat }) {
pems ||= [...Buffer.alloc(n)].map(() => ({
privateKey: keyFixtures.privateKey,
publicKey: keyFixtures.publicKey
publicKey: keyFixtures.publicKey,
}));
keyObjects ||= pems.map(getKeyObject);

Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/randomInt.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const bench = common.createBenchmark(main, {
mode: ['sync', 'async-sequential', 'async-parallel'],
min: [-(2 ** 47) + 1, -10_000, -100],
max: [100, 10_000, 2 ** 47],
n: [1e3, 1e5]
n: [1e3, 1e5],
});

function main({ mode, min, max, n }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/rsa-encrypt-decrypt-throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ keylen_list.forEach((key) => {
const bench = common.createBenchmark(main, {
n: [500],
keylen: keylen_list,
len: [16, 32, 64]
len: [16, 32, 64],
});

function main({ len, algo, keylen, n }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/rsa-sign-verify-throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const bench = common.createBenchmark(main, {
writes: [500],
algo: ['SHA1', 'SHA224', 'SHA256', 'SHA384', 'SHA512'],
keylen: keylen_list,
len: [1024, 102400, 2 * 102400, 3 * 102400, 1024 * 1024]
len: [1024, 102400, 2 * 102400, 3 * 102400, 1024 * 1024],
});

function main({ len, algo, keylen, writes }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/webcrypto-digest.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const kMethods = {
'SHA-1': 'sha1',
'SHA-256': 'sha256',
'SHA-384': 'sha384',
'SHA-512': 'sha512'
'SHA-512': 'sha512',
};

// This benchmark only looks at clock time and ignores factors
Expand Down
4 changes: 2 additions & 2 deletions benchmark/http/bench-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ const common = require('../common');

const bench = common.createBenchmark(main, {
len: [4, 8, 16, 32],
n: [1e5]
n: [1e5],
}, {
flags: ['--expose-internals', '--no-warnings']
flags: ['--expose-internals', '--no-warnings'],
});

function main({ len, n }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/http/check_invalid_header_char.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const groupedInputs = {

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

const inputs = [
Expand Down
2 changes: 1 addition & 1 deletion benchmark/http/chunked.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const bench = common.createBenchmark(main, {
n: [1, 4, 8, 16],
len: [1, 64, 256],
c: [100],
duration: 5
duration: 5,
});

function main({ len, n, c, duration }) {
Expand Down

0 comments on commit 5c3e7b3

Please sign in to comment.