Skip to content

Commit aeff3ff

Browse files
authored
Merge branch 'nodejs:main' into fix-abort-listener-events-on
2 parents b81974d + af3e2b2 commit aeff3ff

File tree

447 files changed

+6916
-18754
lines changed

Some content is hidden

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

447 files changed

+6916
-18754
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
/.github/workflows/tools.yml @nodejs/security-wg
175175
/.github/workflows/update-openssl.yml @nodejs/security-wg
176176
/.github/workflows/update-v8.yml @nodejs/security-wg @nodejs/v8-update
177+
/deps @nodejs/security-wg
177178
/tools/dep_updaters/* @nodejs/security-wg
178179

179180
# Web Standards

.github/workflows/build-tarball.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ jobs:
9090
- name: Build
9191
run: |
9292
cd $TAR_DIR
93-
make build-ci -j2 V=1
93+
make build-ci -j4 V=1
9494
- name: Test
9595
run: |
9696
cd $TAR_DIR
97-
make run-ci -j2 V=1 TEST_CI_ARGS="-p dots --node-args='--test-reporter=spec' --measure-flakiness 9"
97+
make run-ci -j4 V=1 TEST_CI_ARGS="-p dots --node-args='--test-reporter=spec' --measure-flakiness 9"

.github/workflows/coverage-linux-without-intl.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ jobs:
5353
- name: Install gcovr
5454
run: pip install gcovr==4.2
5555
- name: Build
56-
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
56+
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
5757
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
5858
# The cause is most likely coverage's use of the inspector.
5959
- name: Test
60-
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
60+
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
6161
- name: Report JS
6262
run: npx c8 report --check-coverage
6363
env:

.github/workflows/coverage-linux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ jobs:
5353
- name: Install gcovr
5454
run: pip install gcovr==4.2
5555
- name: Build
56-
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage"
56+
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage"
5757
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
5858
# The cause is most likely coverage's use of the inspector.
5959
- name: Test
60-
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
60+
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
6161
- name: Report JS
6262
run: npx c8 report --check-coverage
6363
env:

.github/workflows/test-asan.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ jobs:
5757
- name: Environment Information
5858
run: npx envinfo
5959
- name: Build
60-
run: make build-ci -j2 V=1
60+
run: make build-ci -j4 V=1
6161
- name: Test
62-
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"
62+
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"

.github/workflows/test-internet.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ jobs:
5050
- name: Environment Information
5151
run: npx envinfo
5252
- name: Build
53-
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn"
53+
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn"
5454
- name: Test Internet
55-
run: make test-internet -j2 V=1;
55+
run: make test-internet -j4 V=1;

.github/workflows/test-linux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ jobs:
4444
- name: Environment Information
4545
run: npx envinfo
4646
- name: Build
47-
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn"
47+
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn"
4848
- name: Test
49-
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"
49+
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"

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ release.
3636
</tr>
3737
<tr>
3838
<td valign="top">
39-
<b><a href="doc/changelogs/CHANGELOG_V21.md#21.5.0">21.5.0</a></b><br/>
39+
<b><a href="doc/changelogs/CHANGELOG_V21.md#21.6.1">21.6.1</a></b><br/>
40+
<a href="doc/changelogs/CHANGELOG_V21.md#21.6.0">21.6.0</a><br/>
41+
<a href="doc/changelogs/CHANGELOG_V21.md#21.5.0">21.5.0</a><br/>
4042
<a href="doc/changelogs/CHANGELOG_V21.md#21.4.0">21.4.0</a><br/>
4143
<a href="doc/changelogs/CHANGELOG_V21.md#21.3.0">21.3.0</a><br/>
4244
<a href="doc/changelogs/CHANGELOG_V21.md#21.2.0">21.2.0</a><br/>

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,6 @@ For information about the governance of the Node.js project, see
190190
**Moshe Atlow** <<moshe@atlow.co.il>> (he/him)
191191
* [RafaelGSS](https://github.com/RafaelGSS) -
192192
**Rafael Gonzaga** <<rafael.nunu@hotmail.com>> (he/him)
193-
* [RaisinTen](https://github.com/RaisinTen) -
194-
**Darshan Sen** <<raisinten@gmail.com>> (he/him)
195193
* [richardlau](https://github.com/richardlau) -
196194
**Richard Lau** <<rlau@redhat.com>>
197195
* [ronag](https://github.com/ronag) -
@@ -266,6 +264,8 @@ For information about the governance of the Node.js project, see
266264
**Alexis Campailla** <<orangemocha@nodejs.org>>
267265
* [piscisaureus](https://github.com/piscisaureus) -
268266
**Bert Belder** <<bertbelder@gmail.com>>
267+
* [RaisinTen](https://github.com/RaisinTen) -
268+
**Darshan Sen** <<raisinten@gmail.com>> (he/him)
269269
* [sam-github](https://github.com/sam-github) -
270270
**Sam Roberts** <<vieuxtech@gmail.com>>
271271
* [shigeki](https://github.com/shigeki) -
@@ -389,6 +389,8 @@ For information about the governance of the Node.js project, see
389389
**Keyhan Vakil** <<kvakil@sylph.kvakil.me>>
390390
* [legendecas](https://github.com/legendecas) -
391391
**Chengzhong Wu** <<legendecas@gmail.com>> (he/him)
392+
* [lemire](https://github.com/lemire) -
393+
**Daniel Lemire** <<lemire@gmail.com>>
392394
* [linkgoron](https://github.com/linkgoron) -
393395
**Nitzan Uziely** <<linkgoron@gmail.com>>
394396
* [LiviaMedeiros](https://github.com/LiviaMedeiros) -
@@ -425,16 +427,12 @@ For information about the governance of the Node.js project, see
425427
**Myles Borins** <<myles.borins@gmail.com>> (he/him)
426428
* [ovflowd](https://github.com/ovflowd) -
427429
**Claudio Wunder** <<cwunder@gnome.org>> (he/they)
428-
* [oyyd](https://github.com/oyyd) -
429-
**Ouyang Yadong** <<oyydoibh@gmail.com>> (he/him)
430430
* [panva](https://github.com/panva) -
431431
**Filip Skokan** <<panva.ip@gmail.com>> (he/him)
432432
* [Qard](https://github.com/Qard) -
433433
**Stephen Belanger** <<admin@stephenbelanger.com>> (he/him)
434434
* [RafaelGSS](https://github.com/RafaelGSS) -
435435
**Rafael Gonzaga** <<rafael.nunu@hotmail.com>> (he/him)
436-
* [RaisinTen](https://github.com/RaisinTen) -
437-
**Darshan Sen** <<raisinten@gmail.com>> (he/him)
438436
* [rluvaton](https://github.com/rluvaton) -
439437
**Raz Luvaton** <<rluvaton@gmail.com>> (he/him)
440438
* [richardlau](https://github.com/richardlau) -
@@ -623,6 +621,8 @@ For information about the governance of the Node.js project, see
623621
**Alexis Campailla** <<orangemocha@nodejs.org>>
624622
* [othiym23](https://github.com/othiym23) -
625623
**Forrest L Norvell** <<ogd@aoaioxxysz.net>> (they/them/themself)
624+
* [oyyd](https://github.com/oyyd) -
625+
**Ouyang Yadong** <<oyydoibh@gmail.com>> (he/him)
626626
* [petkaantonov](https://github.com/petkaantonov) -
627627
**Petka Antonov** <<petka_antonov@hotmail.com>>
628628
* [phillipj](https://github.com/phillipj) -
@@ -639,6 +639,8 @@ For information about the governance of the Node.js project, see
639639
**Peter Marshall** <<petermarshall@chromium.org>> (he/him)
640640
* [puzpuzpuz](https://github.com/puzpuzpuz) -
641641
**Andrey Pechkurov** <<apechkurov@gmail.com>> (he/him)
642+
* [RaisinTen](https://github.com/RaisinTen) -
643+
**Darshan Sen** <<raisinten@gmail.com>> (he/him)
642644
* [refack](https://github.com/refack) -
643645
**Refael Ackermann (רפאל פלחי)** <<refack@gmail.com>> (he/him/הוא/אתה)
644646
* [rexagod](https://github.com/rexagod) -
@@ -737,8 +739,6 @@ maintaining the Node.js project.
737739
**Preveen Padmanabhan** <<wide4head@gmail.com>> (he/him)
738740
* [PoojaDurgad](https://github.com/PoojaDurgad) -
739741
**Pooja Durgad** <<Pooja.D.P@ibm.com>>
740-
* [RaisinTen](https://github.com/RaisinTen) -
741-
**Darshan Sen** <<raisinten@gmail.com>>
742742
* [VoltrexKeyva](https://github.com/VoltrexKeyva) -
743743
**Mohammed Keyvanzadeh** <<mohammadkeyvanzade94@gmail.com>> (he/him)
744744

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'use strict';
2+
const common = require('../common.js');
3+
4+
const bench = common.createBenchmark(main, {
5+
type: ['URL', 'URLSearchParams'],
6+
n: [1e3, 1e6],
7+
});
8+
9+
function main({ type, n }) {
10+
const params = type === 'URL' ?
11+
new URL('https://nodejs.org').searchParams :
12+
new URLSearchParams();
13+
14+
bench.start();
15+
for (let i = 0; i < n; i++) {
16+
params.append('test', i);
17+
}
18+
bench.end(n);
19+
}
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use strict';
2+
const common = require('../common.js');
3+
const assert = require('assert');
4+
5+
const bench = common.createBenchmark(main, {
6+
searchParams: ['true', 'false'],
7+
property: ['pathname', 'search', 'hash'],
8+
n: [1e6],
9+
});
10+
11+
function getMethod(url, property) {
12+
if (property === 'pathname') return (x) => url.pathname = `/${x}`;
13+
if (property === 'search') return (x) => url.search = `?${x}`;
14+
if (property === 'hash') return (x) => url.hash = `#${x}`;
15+
throw new Error(`Unsupported property "${property}"`);
16+
}
17+
18+
function main({ searchParams, property, n }) {
19+
const url = new URL('https://nodejs.org');
20+
if (searchParams === 'true') assert(url.searchParams);
21+
22+
const method = getMethod(url, property);
23+
24+
bench.start();
25+
for (let i = 0; i < n; i++) {
26+
method(i);
27+
}
28+
bench.end(n);
29+
}

deps/acorn/acorn-walk/dist/walk.d.mts

+33-28
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ export function simple<TState>(
6666

6767
/**
6868
* 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.
69-
* @param node
70-
* @param visitors
71-
* @param base
72-
* @param state
69+
* @param node
70+
* @param visitors
71+
* @param base
72+
* @param state
7373
*/
7474
export function ancestor<TState>(
7575
node: acorn.Node,
@@ -79,8 +79,8 @@ export function ancestor<TState>(
7979
): void
8080

8181
/**
82-
* does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node.
83-
* @param node
82+
* does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node.
83+
* @param node
8484
* @param state the start state
8585
* @param functions contain an object that maps node types to walker functions
8686
* @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.
@@ -94,10 +94,10 @@ export function recursive<TState>(
9494

9595
/**
9696
* does a 'full' walk over a tree, calling the {@link callback} with the arguments (node, state, type) for each node
97-
* @param node
98-
* @param callback
99-
* @param base
100-
* @param state
97+
* @param node
98+
* @param callback
99+
* @param base
100+
* @param state
101101
*/
102102
export function full<TState>(
103103
node: acorn.Node,
@@ -108,10 +108,10 @@ export function full<TState>(
108108

109109
/**
110110
* 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.
111-
* @param node
112-
* @param callback
113-
* @param base
114-
* @param state
111+
* @param node
112+
* @param callback
113+
* @param base
114+
* @param state
115115
*/
116116
export function fullAncestor<TState>(
117117
node: acorn.Node,
@@ -122,8 +122,8 @@ export function fullAncestor<TState>(
122122

123123
/**
124124
* 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}.
125-
* @param functions
126-
* @param base
125+
* @param functions
126+
* @param base
127127
*/
128128
export function make<TState>(
129129
functions: RecursiveVisitors<TState>,
@@ -132,12 +132,12 @@ export function make<TState>(
132132

133133
/**
134134
* 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.
135-
* @param node
136-
* @param start
137-
* @param end
138-
* @param type
139-
* @param base
140-
* @param state
135+
* @param node
136+
* @param start
137+
* @param end
138+
* @param type
139+
* @param base
140+
* @param state
141141
*/
142142
export function findNodeAt<TState>(
143143
node: acorn.Node,
@@ -150,11 +150,11 @@ export function findNodeAt<TState>(
150150

151151
/**
152152
* like {@link findNodeAt}, but will match any node that exists 'around' (spanning) the given position.
153-
* @param node
154-
* @param start
155-
* @param type
156-
* @param base
157-
* @param state
153+
* @param node
154+
* @param start
155+
* @param type
156+
* @param base
157+
* @param state
158158
*/
159159
export function findNodeAround<TState>(
160160
node: acorn.Node,
@@ -165,8 +165,13 @@ export function findNodeAround<TState>(
165165
): Found<TState> | undefined
166166

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

172+
/**
173+
* Find the outermost matching node before a given position.
174+
*/
175+
export const findNodeBefore: typeof findNodeAround
176+
172177
export const base: RecursiveVisitors<any>

0 commit comments

Comments
 (0)