Skip to content

Commit

Permalink
Merge branch 'nodejs:main' into fix-abort-listener-events-on
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Jan 27, 2024
2 parents b81974d + af3e2b2 commit aeff3ff
Show file tree
Hide file tree
Showing 447 changed files with 6,916 additions and 18,754 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
/.github/workflows/tools.yml @nodejs/security-wg
/.github/workflows/update-openssl.yml @nodejs/security-wg
/.github/workflows/update-v8.yml @nodejs/security-wg @nodejs/v8-update
/deps @nodejs/security-wg
/tools/dep_updaters/* @nodejs/security-wg

# Web Standards
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 @@ -90,8 +90,8 @@ jobs:
- name: Build
run: |
cd $TAR_DIR
make build-ci -j2 V=1
make build-ci -j4 V=1
- name: Test
run: |
cd $TAR_DIR
make run-ci -j2 V=1 TEST_CI_ARGS="-p dots --node-args='--test-reporter=spec' --measure-flakiness 9"
make run-ci -j4 V=1 TEST_CI_ARGS="-p dots --node-args='--test-reporter=spec' --measure-flakiness 9"
4 changes: 2 additions & 2 deletions .github/workflows/coverage-linux-without-intl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ jobs:
- name: Install gcovr
run: pip install gcovr==4.2
- name: Build
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
# The cause is most likely coverage's use of the inspector.
- name: Test
run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j2 V=1 TEST_CI_ARGS="-p dots --node-args='--test-reporter=spec' --measure-flakiness 9" || exit 0
run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j4 V=1 TEST_CI_ARGS="-p dots --node-args='--test-reporter=spec' --measure-flakiness 9" || exit 0
- name: Report JS
run: npx c8 report --check-coverage
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ jobs:
- name: Install gcovr
run: pip install gcovr==4.2
- name: Build
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage"
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage"
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
# The cause is most likely coverage's use of the inspector.
- name: Test
run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j2 V=1 TEST_CI_ARGS="-p dots --node-args='--test-reporter=spec' --measure-flakiness 9" || exit 0
run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j4 V=1 TEST_CI_ARGS="-p dots --node-args='--test-reporter=spec' --measure-flakiness 9" || exit 0
- name: Report JS
run: npx c8 report --check-coverage
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Build
run: make build-ci -j2 V=1
run: make build-ci -j4 V=1
- name: Test
run: make run-ci -j2 V=1 TEST_CI_ARGS="-p actions --node-args='--test-reporter=spec' --node-args='--test-reporter-destination=stdout' -t 300 --measure-flakiness 9"
run: make run-ci -j4 V=1 TEST_CI_ARGS="-p actions --node-args='--test-reporter=spec' --node-args='--test-reporter-destination=stdout' -t 300 --measure-flakiness 9"
4 changes: 2 additions & 2 deletions .github/workflows/test-internet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Build
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn"
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn"
- name: Test Internet
run: make test-internet -j2 V=1;
run: make test-internet -j4 V=1;
4 changes: 2 additions & 2 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Build
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn"
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn"
- name: Test
run: make run-ci -j2 V=1 TEST_CI_ARGS="-p actions --node-args='--test-reporter=spec' --node-args='--test-reporter-destination=stdout' --measure-flakiness 9"
run: make run-ci -j4 V=1 TEST_CI_ARGS="-p actions --node-args='--test-reporter=spec' --node-args='--test-reporter-destination=stdout' --measure-flakiness 9"
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ 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.1">21.6.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V21.md#21.6.0">21.6.0</a><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
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ For information about the governance of the Node.js project, see
**Moshe Atlow** <<moshe@atlow.co.il>> (he/him)
* [RafaelGSS](https://github.com/RafaelGSS) -
**Rafael Gonzaga** <<rafael.nunu@hotmail.com>> (he/him)
* [RaisinTen](https://github.com/RaisinTen) -
**Darshan Sen** <<raisinten@gmail.com>> (he/him)
* [richardlau](https://github.com/richardlau) -
**Richard Lau** <<rlau@redhat.com>>
* [ronag](https://github.com/ronag) -
Expand Down Expand Up @@ -266,6 +264,8 @@ For information about the governance of the Node.js project, see
**Alexis Campailla** <<orangemocha@nodejs.org>>
* [piscisaureus](https://github.com/piscisaureus) -
**Bert Belder** <<bertbelder@gmail.com>>
* [RaisinTen](https://github.com/RaisinTen) -
**Darshan Sen** <<raisinten@gmail.com>> (he/him)
* [sam-github](https://github.com/sam-github) -
**Sam Roberts** <<vieuxtech@gmail.com>>
* [shigeki](https://github.com/shigeki) -
Expand Down Expand Up @@ -389,6 +389,8 @@ For information about the governance of the Node.js project, see
**Keyhan Vakil** <<kvakil@sylph.kvakil.me>>
* [legendecas](https://github.com/legendecas) -
**Chengzhong Wu** <<legendecas@gmail.com>> (he/him)
* [lemire](https://github.com/lemire) -
**Daniel Lemire** <<lemire@gmail.com>>
* [linkgoron](https://github.com/linkgoron) -
**Nitzan Uziely** <<linkgoron@gmail.com>>
* [LiviaMedeiros](https://github.com/LiviaMedeiros) -
Expand Down Expand Up @@ -425,16 +427,12 @@ For information about the governance of the Node.js project, see
**Myles Borins** <<myles.borins@gmail.com>> (he/him)
* [ovflowd](https://github.com/ovflowd) -
**Claudio Wunder** <<cwunder@gnome.org>> (he/they)
* [oyyd](https://github.com/oyyd) -
**Ouyang Yadong** <<oyydoibh@gmail.com>> (he/him)
* [panva](https://github.com/panva) -
**Filip Skokan** <<panva.ip@gmail.com>> (he/him)
* [Qard](https://github.com/Qard) -
**Stephen Belanger** <<admin@stephenbelanger.com>> (he/him)
* [RafaelGSS](https://github.com/RafaelGSS) -
**Rafael Gonzaga** <<rafael.nunu@hotmail.com>> (he/him)
* [RaisinTen](https://github.com/RaisinTen) -
**Darshan Sen** <<raisinten@gmail.com>> (he/him)
* [rluvaton](https://github.com/rluvaton) -
**Raz Luvaton** <<rluvaton@gmail.com>> (he/him)
* [richardlau](https://github.com/richardlau) -
Expand Down Expand Up @@ -623,6 +621,8 @@ For information about the governance of the Node.js project, see
**Alexis Campailla** <<orangemocha@nodejs.org>>
* [othiym23](https://github.com/othiym23) -
**Forrest L Norvell** <<ogd@aoaioxxysz.net>> (they/them/themself)
* [oyyd](https://github.com/oyyd) -
**Ouyang Yadong** <<oyydoibh@gmail.com>> (he/him)
* [petkaantonov](https://github.com/petkaantonov) -
**Petka Antonov** <<petka_antonov@hotmail.com>>
* [phillipj](https://github.com/phillipj) -
Expand All @@ -639,6 +639,8 @@ For information about the governance of the Node.js project, see
**Peter Marshall** <<petermarshall@chromium.org>> (he/him)
* [puzpuzpuz](https://github.com/puzpuzpuz) -
**Andrey Pechkurov** <<apechkurov@gmail.com>> (he/him)
* [RaisinTen](https://github.com/RaisinTen) -
**Darshan Sen** <<raisinten@gmail.com>> (he/him)
* [refack](https://github.com/refack) -
**Refael Ackermann (רפאל פלחי)** <<refack@gmail.com>> (he/him/הוא/אתה)
* [rexagod](https://github.com/rexagod) -
Expand Down Expand Up @@ -737,8 +739,6 @@ maintaining the Node.js project.
**Preveen Padmanabhan** <<wide4head@gmail.com>> (he/him)
* [PoojaDurgad](https://github.com/PoojaDurgad) -
**Pooja Durgad** <<Pooja.D.P@ibm.com>>
* [RaisinTen](https://github.com/RaisinTen) -
**Darshan Sen** <<raisinten@gmail.com>>
* [VoltrexKeyva](https://github.com/VoltrexKeyva) -
**Mohammed Keyvanzadeh** <<mohammadkeyvanzade94@gmail.com>> (he/him)

Expand Down
19 changes: 19 additions & 0 deletions benchmark/url/url-searchparams-append.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use strict';
const common = require('../common.js');

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

function main({ type, n }) {
const params = type === 'URL' ?
new URL('https://nodejs.org').searchParams :
new URLSearchParams();

bench.start();
for (let i = 0; i < n; i++) {
params.append('test', i);
}
bench.end(n);
}
29 changes: 29 additions & 0 deletions benchmark/url/url-searchparams-update.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use strict';
const common = require('../common.js');
const assert = require('assert');

const bench = common.createBenchmark(main, {
searchParams: ['true', 'false'],
property: ['pathname', 'search', 'hash'],
n: [1e6],
});

function getMethod(url, property) {
if (property === 'pathname') return (x) => url.pathname = `/${x}`;
if (property === 'search') return (x) => url.search = `?${x}`;
if (property === 'hash') return (x) => url.hash = `#${x}`;
throw new Error(`Unsupported property "${property}"`);
}

function main({ searchParams, property, n }) {
const url = new URL('https://nodejs.org');
if (searchParams === 'true') assert(url.searchParams);

const method = getMethod(url, property);

bench.start();
for (let i = 0; i < n; i++) {
method(i);
}
bench.end(n);
}
61 changes: 33 additions & 28 deletions deps/acorn/acorn-walk/dist/walk.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ export function simple<TState>(

/**
* does a 'simple' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter.
* @param node
* @param visitors
* @param base
* @param state
* @param node
* @param visitors
* @param base
* @param state
*/
export function ancestor<TState>(
node: acorn.Node,
Expand All @@ -79,8 +79,8 @@ export function ancestor<TState>(
): void

/**
* does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node.
* @param node
* does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node.
* @param node
* @param state the start state
* @param functions contain an object that maps node types to walker functions
* @param base provides the fallback walker functions for node types that aren't handled in the {@link functions} object. If not given, the default walkers will be used.
Expand All @@ -94,10 +94,10 @@ export function recursive<TState>(

/**
* does a 'full' walk over a tree, calling the {@link callback} with the arguments (node, state, type) for each node
* @param node
* @param callback
* @param base
* @param state
* @param node
* @param callback
* @param base
* @param state
*/
export function full<TState>(
node: acorn.Node,
Expand All @@ -108,10 +108,10 @@ export function full<TState>(

/**
* does a 'full' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter.
* @param node
* @param callback
* @param base
* @param state
* @param node
* @param callback
* @param base
* @param state
*/
export function fullAncestor<TState>(
node: acorn.Node,
Expand All @@ -122,8 +122,8 @@ export function fullAncestor<TState>(

/**
* builds a new walker object by using the walker functions in {@link functions} and filling in the missing ones by taking defaults from {@link base}.
* @param functions
* @param base
* @param functions
* @param base
*/
export function make<TState>(
functions: RecursiveVisitors<TState>,
Expand All @@ -132,12 +132,12 @@ export function make<TState>(

/**
* tries to locate a node in a tree at the given start and/or end offsets, which satisfies the predicate test. {@link start} and {@link end} can be either `null` (as wildcard) or a `number`. {@link test} may be a string (indicating a node type) or a function that takes (nodeType, node) arguments and returns a boolean indicating whether this node is interesting. {@link base} and {@link state} are optional, and can be used to specify a custom walker. Nodes are tested from inner to outer, so if two nodes match the boundaries, the inner one will be preferred.
* @param node
* @param start
* @param end
* @param type
* @param base
* @param state
* @param node
* @param start
* @param end
* @param type
* @param base
* @param state
*/
export function findNodeAt<TState>(
node: acorn.Node,
Expand All @@ -150,11 +150,11 @@ export function findNodeAt<TState>(

/**
* like {@link findNodeAt}, but will match any node that exists 'around' (spanning) the given position.
* @param node
* @param start
* @param type
* @param base
* @param state
* @param node
* @param start
* @param type
* @param base
* @param state
*/
export function findNodeAround<TState>(
node: acorn.Node,
Expand All @@ -165,8 +165,13 @@ export function findNodeAround<TState>(
): Found<TState> | undefined

/**
* similar to {@link findNodeAround}, but will match all nodes after the given position (testing outer nodes before inner nodes).
* Find the outermost matching node after a given position.
*/
export const findNodeAfter: typeof findNodeAround

/**
* Find the outermost matching node before a given position.
*/
export const findNodeBefore: typeof findNodeAround

export const base: RecursiveVisitors<any>
Loading

0 comments on commit aeff3ff

Please sign in to comment.