Skip to content

Commit 9c2ceb6

Browse files
authored
Merge branch 'main' into do-not-crash-with-disabled-shared-array-buffer
2 parents d7846e4 + 7796692 commit 9c2ceb6

File tree

13,919 files changed

+1438467
-1426875
lines changed

Some content is hidden

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

13,919 files changed

+1438467
-1426875
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ test/message/esm_display_syntax_error.mjs
66
tools/icu
77
tools/lint-md/lint-md.mjs
88
benchmark/tmp
9+
benchmark/fixtures
910
doc/**/*.js
1011
!doc/api_assets/*.js
1112
!.eslintrc.js

.eslintrc.js

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ module.exports = {
6868
files: ['**/*.md/*.cjs', '**/*.md/*.js'],
6969
parserOptions: {
7070
sourceType: 'script',
71-
ecmaFeatures: { impliedStrict: true }
71+
ecmaFeatures: { impliedStrict: true },
7272
},
7373
rules: { strict: 'off' },
7474
},
@@ -103,11 +103,11 @@ module.exports = {
103103
},
104104
{
105105
name: 'Buffer',
106-
message: 'Import Buffer instead of using the global'
106+
message: 'Import Buffer instead of using the global',
107107
},
108108
{
109109
name: 'process',
110-
message: 'Import process instead of using the global'
110+
message: 'Import process instead of using the global',
111111
},
112112
] },
113113
},
@@ -117,31 +117,24 @@ module.exports = {
117117
// https://eslint.org/docs/rules/
118118
'accessor-pairs': 'error',
119119
'array-callback-return': 'error',
120-
'arrow-parens': ['error', 'always'],
121-
'arrow-spacing': ['error', { before: true, after: true }],
120+
'arrow-parens': 'error',
121+
'arrow-spacing': 'error',
122122
'block-scoped-var': 'error',
123123
'block-spacing': 'error',
124124
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
125125
'capitalized-comments': ['error', 'always', {
126126
line: {
127127
// Ignore all lines that have less characters than 20 and all lines that
128128
// start with something that looks like a variable name or code.
129-
// eslint-disable-next-line max-len
130-
ignorePattern: '.{0,20}$|[a-z]+ ?[0-9A-Z_.(/=:[#-]|std|http|ssh|ftp|(let|var|const) [a-z_A-Z0-9]+ =|[b-z] |[a-z]*[0-9].* ',
129+
ignorePattern: '.{0,20}$|[a-z]+ ?[0-9A-Z_.(/=:[#-]|std|http|ssh|ftp',
131130
ignoreInlineComments: true,
132131
ignoreConsecutiveComments: true,
133132
},
134133
block: {
135134
ignorePattern: '.*',
136135
},
137136
}],
138-
'comma-dangle': ['error', {
139-
arrays: 'always-multiline',
140-
exports: 'only-multiline',
141-
functions: 'only-multiline',
142-
imports: 'only-multiline',
143-
objects: 'only-multiline',
144-
}],
137+
'comma-dangle': ['error', 'always-multiline'],
145138
'comma-spacing': 'error',
146139
'comma-style': 'error',
147140
'computed-property-spacing': 'error',
@@ -162,9 +155,9 @@ module.exports = {
162155
ObjectExpression: 'first',
163156
SwitchCase: 1,
164157
}],
165-
'key-spacing': ['error', { mode: 'strict' }],
158+
'key-spacing': 'error',
166159
'keyword-spacing': 'error',
167-
'linebreak-style': ['error', 'unix'],
160+
'linebreak-style': 'error',
168161
'max-len': ['error', {
169162
code: 120,
170163
ignorePattern: '^// Flags:',
@@ -178,7 +171,7 @@ module.exports = {
178171
'no-constant-condition': ['error', { checkLoops: false }],
179172
'no-constructor-return': 'error',
180173
'no-duplicate-imports': 'error',
181-
'no-else-return': ['error', { allowElseIf: true }],
174+
'no-else-return': 'error',
182175
'no-extra-parens': ['error', 'functions'],
183176
'no-lonely-if': 'error',
184177
'no-mixed-requires': 'error',
@@ -240,6 +233,12 @@ module.exports = {
240233
selector: "CallExpression[callee.name='isNaN']",
241234
message: 'Use Number.isNaN() instead of the global isNaN() function.',
242235
},
236+
{
237+
// TODO(@panva): move this to no-restricted-properties
238+
// when https://github.com/eslint/eslint/issues/16412 is fixed
239+
selector: "Identifier[name='webcrypto']",
240+
message: 'Use `globalThis.crypto`.',
241+
},
243242
],
244243
'no-return-await': 'error',
245244
'no-self-compare': 'error',
@@ -285,7 +284,7 @@ module.exports = {
285284
named: 'never',
286285
asyncArrow: 'always',
287286
}],
288-
'space-in-parens': ['error', 'never'],
287+
'space-in-parens': 'error',
289288
'space-infix-ops': 'error',
290289
'space-unary-ops': 'error',
291290
'spaced-comment': ['error', 'always', {
@@ -311,16 +310,18 @@ module.exports = {
311310
'jsdoc/require-param': 'off',
312311
'jsdoc/check-tag-names': 'off',
313312
'jsdoc/require-returns': 'off',
314-
'jsdoc/require-property-description': 'off',
315313

316314
// Custom rules from eslint-plugin-node-core
317315
'node-core/no-unescaped-regexp-dot': 'error',
318316
'node-core/no-duplicate-requires': 'error',
317+
'node-core/prefer-proto': 'error',
319318
},
320319
globals: {
321320
ByteLengthQueuingStrategy: 'readable',
322321
CompressionStream: 'readable',
323322
CountQueuingStrategy: 'readable',
323+
CustomEvent: 'readable',
324+
crypto: 'readable',
324325
Crypto: 'readable',
325326
CryptoKey: 'readable',
326327
DecompressionStream: 'readable',

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
test/fixtures/* -text
22
vcbuild.bat text eol=crlf
3+
deps/npm/bin/npm text eol=lf
4+
deps/npm/bin/npx text eol=lf
5+
deps/corepack/shims/corepack text eol=lf
36
tools/msvs/find_python.cmd text eol=crlf

.github/CODEOWNERS

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# Node.js Project Codeowners
22

3-
# 1. Codeowners must always be teams, never individuals
4-
# 2. Each codeowner team should contain at least one TSC member
5-
# 3. PRs touching any code with a codeowner must be signed off by at least one
6-
# person on the code owner team.
3+
# This file does not define any requirements for landing PRs.
4+
# Its purpose is to allow automation of courtesy pings to the
5+
# relevant team(s) when any of the paths listed here are modified.
6+
# Criteria for landing PRs are defined in
7+
# https://github.com/nodejs/node/blob/main/doc/contributing/collaborator-guide.md#code-reviews.
8+
#
9+
# Codeowners must always be teams, never individuals.
710

811
# tsc
912

@@ -71,16 +74,18 @@
7174
/src/node_http2* @nodejs/http2 @nodejs/net
7275
/src/node_mem* @nodejs/http2
7376

74-
# modules
77+
# modules, including loaders
7578

76-
/doc/api/modules.md @nodejs/modules
77-
/doc/api/esm.md @nodejs/modules
78-
/doc/api/module.md @nodejs/modules
79-
/doc/api/packages.md @nodejs/modules
80-
/lib/module.js @nodejs/modules
81-
/lib/internal/modules/* @nodejs/modules
82-
/lib/internal/bootstrap/loaders.js @nodejs/modules
83-
/src/module_wrap* @nodejs/modules @nodejs/vm
79+
/doc/api/esm.md @nodejs/modules @nodejs/loaders
80+
/doc/api/module.md @nodejs/modules @nodejs/loaders
81+
/doc/api/modules.md @nodejs/modules @nodejs/loaders
82+
/doc/api/packages.md @nodejs/modules @nodejs/loaders
83+
/lib/internal/bootstrap/loaders.js @nodejs/modules @nodejs/loaders
84+
/lib/internal/modules/* @nodejs/modules @nodejs/loaders
85+
/lib/internal/process/esm_loader.js @nodejs/modules @nodejs/loaders
86+
/lib/internal/process/execution.js @nodejs/modules @nodejs/loaders
87+
/lib/module.js @nodejs/modules @nodejs/loaders
88+
/src/module_wrap* @nodejs/modules @nodejs/loaders @nodejs/vm
8489

8590
# Node-API
8691

@@ -96,6 +101,7 @@
96101
/tools/gyp/**/* @nodejs/gyp
97102

98103
# WASI
104+
99105
/deps/uvwasi/ @nodejs/wasi
100106
/doc/api/wasi.md @nodejs/wasi
101107
/lib/wasi.js @nodejs/wasi
@@ -107,15 +113,26 @@
107113

108114
/benchmark/misc/startup.js @nodejs/startup
109115
/src/node.cc @nodejs/startup
110-
/src/node_native_module* @nodejs/startup
116+
/src/node_builtins* @nodejs/startup
117+
/src/node_snapshot* @nodejs/startup
111118
/lib/internal/bootstrap/* @nodejs/startup
112119
/tools/snapshot/* @nodejs/startup
113120

114121
# V8
122+
115123
/deps/v8/* @nodejs/v8-update
116124
/tools/v8_gypfiles/* @nodejs/v8-update
117125

118126
# Actions
119127

120128
/.github/workflows/* @nodejs/actions
121129
/tools/actions/* @nodejs/actions
130+
131+
# Test runner
132+
133+
/test/message/test_runner_* @nodejs/test_runner
134+
/test/parallel/test-runner-* @nodejs/test_runner
135+
/doc/api/test.md @nodejs/test_runner
136+
/lib/test.js @nodejs/test_runner
137+
/lib/internal/main/test_runner.js @nodejs/test_runner
138+
/lib/internal/test_runner/* @nodejs/test_runner

.github/ISSUE_TEMPLATE/1-bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ body:
1919
label: Platform
2020
description: |
2121
UNIX: output of `uname -a`
22-
Windows: output of `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` in PowerShell console
22+
Windows: output of `"$([Environment]::OSVersion.VersionString) $(('x86', 'x64')[[Environment]::Is64BitOperatingSystem])"` in PowerShell console
2323
- type: input
2424
attributes:
2525
label: Subsystem

.github/ISSUE_TEMPLATE/4-report-a-flaky-test.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,24 @@ body:
1919
placeholder: e.g. `test-fs-stat-bigint`
2020
validations:
2121
required: true
22-
- type: input
22+
- type: dropdown
2323
attributes:
2424
label: Platform
2525
description: The platform the test is flaky on.
26-
placeholder: e.g. `macos` or `linux`
26+
multiple: true
27+
options:
28+
- AIX
29+
- FreeBSD
30+
- Linux ARM64
31+
- Linux ARMv7
32+
- Linux PPC64LE
33+
- Linux s390x
34+
- Linux x64
35+
- macOS ARM64
36+
- macOS x64
37+
- SmartOS
38+
- Windows
39+
- Other
2740
- type: textarea
2841
attributes:
2942
label: Console output

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
blank_issues_enabled: false
1+
blank_issues_enabled: true
22
contact_links:
33
- name: ⁉️ Need help with Node.js?
44
url: https://github.com/nodejs/help

.github/label-pr-config.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ subSystemLabels:
2121
/^src\/tty_/: c++, tty
2222
/^src\/node_url/: c++, whatwg-url
2323
/^src\/node_util/: c++, util
24-
/^src\/(?:node_v8|v8abbr)/: c++, v8 engine
24+
/^src\/node_v8/: c++, v8 engine
2525
/^src\/node_contextify/: c++, vm
2626
/^src\/.*win32.*/: c++, windows
2727
/^src\/node_zlib/: c++, zlib
2828
/^src\/tracing/: c++, tracing
29-
/^src\/node_api/: c++, node-api
29+
/^src\/(?:node_api|js_native_api)/: c++, node-api
3030
/^src\/node_http2/: c++, http2
3131
/^src\/node_report/: c++, report
3232
/^src\/node_wasi/: c++, wasi
3333
/^src\/node_worker/: c++, worker
34-
/^src\/quic\/*/: c++, quic, dont-land-on-v14.x, dont-land-on-v12.x
35-
/^src\/node_bob*/: c++, quic, dont-land-on-v14.x, dont-land-on-v12.x
34+
/^src\/quic\/*/: c++, quic, dont-land-on-v14.x
35+
/^src\/node_bob*/: c++, quic, dont-land-on-v14.x
3636

3737
# don't label python files as c++
3838
/^src\/.+\.py$/: python, needs-ci
@@ -54,7 +54,7 @@ subSystemLabels:
5454
/^vcbuild\.bat$/: build, windows, needs-ci
5555
/^(android-)?configure|node\.gyp|common\.gypi$/: build, needs-ci
5656
# more specific tools
57-
/^tools\/gyp/: tools, build, gyp, needs-ci, dont-land-on-v14.x, dont-land-on-v12.x
57+
/^tools\/gyp/: tools, build, gyp, needs-ci, dont-land-on-v14.x
5858
/^tools\/doc\//: tools, doc
5959
/^tools\/icu\//: tools, i18n-api, icu, needs-ci
6060
/^tools\/(?:osx-pkg\.pmdoc|pkgsrc)\//: tools, macos, install
@@ -80,11 +80,11 @@ subSystemLabels:
8080
/^deps\/v8\/tools\/gen-postmortem-metadata\.py/: v8 engine, python, post-mortem
8181
/^deps\/v8\//: v8 engine
8282
/^deps\/uvwasi\//: wasi
83-
/^deps\/npm\//: npm, fast-track, dont-land-on-v14.x, dont-land-on-v12.x
83+
/^deps\/npm\//: npm, fast-track, dont-land-on-v14.x
8484
/^deps\/nghttp2\/nghttp2\.gyp/: build, http2
8585
/^deps\/nghttp2\//: http2
86-
/^deps\/ngtcp2\//: quic, dont-land-on-v14.x, dont-land-on-v12.x
87-
/^deps\/nghttp3\//: quic, dont-land-on-v14.x, dont-land-on-v12.x
86+
/^deps\/ngtcp2\//: quic, dont-land-on-v14.x
87+
/^deps\/nghttp3\//: quic, dont-land-on-v14.x
8888
/^deps\/([^/]+)/: dependencies, $1
8989

9090
## JS subsystems
@@ -99,8 +99,11 @@ subSystemLabels:
9999
/^lib\/\w+\/streams$/: stream
100100
/^lib\/.*http2/: http2
101101
/^lib\/worker_threads.js$/: worker
102+
/^lib\/test.js$/: test_runner, dont-land-on-v14.x
102103
/^lib\/internal\/url\.js$/: whatwg-url
103104
/^lib\/internal\/modules\/esm/: esm
105+
/^lib\/internal\/webstreams/: web streams
106+
/^lib\/internal\/test_runner/: test_runner, dont-land-on-v14.x
104107

105108
# All other lib/ files map directly
106109
/^lib\/_(\w+)_\w+\.js?$/: $1 # e.g. _(stream)_wrap
@@ -117,11 +120,13 @@ exlusiveLabels:
117120
/^test\/inspector\//: test, inspector
118121
/^test\/cctest\/test_inspector/: test, inspector
119122
/^test\/cctest\/test_url/: test, whatwg-url
120-
/^test\/addons-napi\//: test, node-api
123+
/^test\/node-api\//: test, node-api
124+
/^test\/js-native-api\//: test, node-api
121125
/^test\/async-hooks\//: test, async_hooks
122126
/^test\/report\//: test, report
123127
/^test\/fixtures\/es-module/: test, esm
124128
/^test\/es-module\//: test, esm
129+
/^test\/fixtures\/wpt\/streams//: test, web streams
125130

126131
/^test\//: test
127132

@@ -133,9 +138,11 @@ exlusiveLabels:
133138
# considered a subsystem of sorts
134139
/^doc\/api\/n-api.md$/: doc, node-api
135140
# quic
136-
/^doc\/api\/quic.md$/: doc, quic, dont-land-on-v14.x, dont-land-on-v12.x
141+
/^doc\/api\/quic.md$/: doc, quic, dont-land-on-v14.x
137142
# Add worker label to PRs that affect doc/api/worker_threads.md
138143
/^doc\/api\/worker_threads.md$/: doc, worker
144+
# test runner documentation
145+
/^doc\/api\/test.md$/: doc, test_runner, dont-land-on-v14.x
139146
# Automatically tag JS subsystem-specific API doc changes
140147
/^doc\/api\/(\w+)\.md$/: doc, $1
141148
# Add deprecations label to PRs that affect doc/api/deprecations.md

.github/workflows/authors.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66

77
workflow_dispatch:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
authors_update:
1114
if: github.repository == 'nodejs/node'
@@ -16,7 +19,7 @@ jobs:
1619
fetch-depth: '0' # This is required to actually get all the authors
1720
persist-credentials: false
1821
- run: tools/update-authors.mjs # Run the AUTHORS tool
19-
- uses: gr2m/create-or-update-pull-request-action@6720400cad8e74d7adc64640e4e6ea6748b83d8f
22+
- uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5
2023
# Creates a PR or update the Action's existing PR, or
2124
# no-op if the base branch is already up-to-date.
2225
env:
@@ -27,6 +30,9 @@ jobs:
2730
Here are some new additions to the AUTHORS file.
2831
This is an automatically generated PR by the
2932
`authors.yml` GitHub Action, which runs `tools/update-authors.mjs`.
33+
Check the output of
34+
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
35+
for possible duplicates.
3036
branch: actions/authors-update # Custom branch *just* for this Action.
3137
commit-message: 'meta: update AUTHORS'
3238
labels: meta

0 commit comments

Comments
 (0)