Skip to content

Commit

Permalink
Merge branch 'main' into actions/tools-update-undici
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Feb 13, 2023
2 parents 2b4bb00 + ecd385e commit 1f7ae10
Show file tree
Hide file tree
Showing 999 changed files with 10,377 additions and 4,976 deletions.
12 changes: 11 additions & 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 Expand Up @@ -144,6 +144,16 @@ jobs:
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
./tools/dep_updaters/update-simdutf.sh "$NEW_VERSION"
fi
- id: ada
subsystem: deps
label: dependencies
run: |
NEW_VERSION=$(gh api repos/ada-url/ada/releases/latest -q '.tag_name|ltrimstr("v")')
CURRENT_VERSION=$(grep "#define ADA_VERSION" ./deps/ada/ada.h | sed -n "s/^.*VERSION \(.*\)/\1/p")
if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
./tools/dep_updaters/update-ada.sh "$NEW_VERSION"
fi
steps:
- uses: actions/checkout@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ Tierney Cyren <hello@bnb.im> <accounts@bnb.im>
Tierney Cyren <hello@bnb.im> <tieliaco@gmail.com>
Tim Caswell <tim@creationix.com> <tim@0-26-8-e9-4c-e1.dyn.utdallas.edu>
Tim Costa <tim@timcosta.io> <tjsail33@gmail.com>
Tim Perry <pimterry@gmail.com> <1526883+pimterry@users.noreply.github.com>
Tim Price <timprice@mangoraft.com>
Tim Ruffles <timruffles@googlemail.com> <oi@truffles.me.uk>
Tim Smart <timehandgod@gmail.com>
Expand Down
3 changes: 3 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3605,5 +3605,8 @@ Suyash Nayan <89125422+7suyash7@users.noreply.github.com>
Alec Mev <alec@mev.earth>
Miguel Teixeira <miguel.teixeira@poli.ufrj.br>
José Dapena Paz <jdapena@igalia.com>
Mohamed Akram <mohd-akram@users.noreply.github.com>
三咲智子 Kevin Deng <sxzz@sxzz.moe>
Nicolas DUBIEN <github@dubien.org>

# Generated by tools/update-authors.mjs
7 changes: 6 additions & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,17 @@ the `--help` option:
$ tools/test.py --help
```

> Note: On Windows you should use `python3` executable.
> Example: `python3 tools/test.py test/message`
You can usually run tests directly with node:

```text
$ ./node ./test/parallel/test-stream2-transform.js
$ ./node test/parallel/test-stream2-transform.js
```

> Info: `./node` points to your local Node.js build.
Remember to recompile with `make -j4` in between test runs if you change code in
the `lib` or `src` directories.

Expand Down
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,28 @@ The externally maintained libraries used by Node.js are:
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

- ada, located at deps/ada, is licensed as follows:
"""
Copyright 2023 Ada authors

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 shall be included in all
copies or substantial portions of the Software.

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.
"""

- npm, located at deps/npm, is licensed as follows:
"""
The npm application
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ with-code-cache test-code-cache:

out/Makefile: config.gypi common.gypi node.gyp \
deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
deps/simdutf/simdutf.gyp \
deps/simdutf/simdutf.gyp deps/ada/ada.gyp \
tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
$(PYTHON) tools/gyp_node.py -f make
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,6 @@ For information about the governance of the Node.js project, see
**Paolo Insogna** <<paolo@cowtech.it>> (he/him)
* [srl295](https://github.com/srl295) -
**Steven R Loomis** <<srl295@gmail.com>>
* [starkwang](https://github.com/starkwang) -
**Weijia Wang** <<starkwang@126.com>>
* [sxa](https://github.com/sxa) -
**Stewart X Addison** <<sxa@redhat.com>> (he/him)
* [targos](https://github.com/targos) -
Expand Down Expand Up @@ -638,6 +636,8 @@ For information about the governance of the Node.js project, see
**Shigeki Ohtsu** <<ohtsu@ohtsu.org>> (he/him)
* [silverwind](https://github.com/silverwind) -
**Roman Reiss** <<me@silverwind.io>>
* [starkwang](https://github.com/starkwang) -
**Weijia Wang** <<starkwang@126.com>>
* [stefanmb](https://github.com/stefanmb) -
**Stefan Budeanu** <<stefan@budeanu.com>>
* [tellnes](https://github.com/tellnes) -
Expand Down
5 changes: 0 additions & 5 deletions benchmark/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ rules:

overrides:
- files:
- crypto/*.js
- http/*.js
- http2/*.js
- path/*.js
- process/*.js
- url/*.js
rules:
comma-dangle: [error, {
arrays: always-multiline,
Expand Down
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
4 changes: 2 additions & 2 deletions benchmark/http/client-request-body.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
dur: [5],
type: ['asc', 'utf', 'buf'],
len: [32, 256, 1024],
method: ['write', 'end']
method: ['write', 'end'],
});

function main({ dur, len, type, method }) {
Expand All @@ -33,7 +33,7 @@ function main({ dur, len, type, method }) {
agent: new http.Agent({ maxSockets: 1 }),
host: '127.0.0.1',
path: '/',
method: 'POST'
method: 'POST',
};

const server = http.createServer((req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/http/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function main({ type, len, c, duration }) {
bench.http({
path: path,
connections: c,
duration
duration,
}, () => {
w1.destroy();
w2.destroy();
Expand Down
4 changes: 2 additions & 2 deletions benchmark/http/create-clientrequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const bench = common.createBenchmark(main, {
// Use 'url' to avoid name clash with other http benchmark
url: types.concat(['wpt']),
arg: ['URL', 'string', 'options'],
e: [1]
e: [1],
});

function noop() {}
Expand All @@ -25,7 +25,7 @@ function main({ url: type, arg, e }) {
switch (arg) {
case 'options': {
const options = data.map((i) => ({
path: new URL(i).path, createConnection: noop
path: new URL(i).path, createConnection: noop,
}));
bench.start();
for (let i = 0; i < len; i++) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/http/end-vs-write-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const bench = common.createBenchmark(main, {
len: [64 * 1024, 128 * 1024, 256 * 1024, 1024 * 1024],
c: [100],
method: ['write', 'end'],
duration: 5
duration: 5,
});

function main({ len, type, method, c, duration }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/http/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const http = require('http');
const bench = common.createBenchmark(main, {
n: [10, 600],
len: [1, 100],
duration: 5
duration: 5,
});

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

0 comments on commit 1f7ae10

Please sign in to comment.