Skip to content

Commit 5401243

Browse files
committed
Merge branch 'master' into refactor-internal-timer
2 parents 27651f5 + 889ad35 commit 5401243

File tree

8,093 files changed

+438147
-247602
lines changed

Some content is hidden

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

8,093 files changed

+438147
-247602
lines changed

.eslintrc.js

Lines changed: 53 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ Module._findPath = (request, paths, isMain) => {
2525
if (!r && hacks.includes(request)) {
2626
try {
2727
return require.resolve(`./tools/node_modules/${request}`);
28-
// Keep the variable in place to ensure that ESLint started by older Node.js
29-
// versions work as expected.
30-
// eslint-disable-next-line no-unused-vars
31-
} catch (e) {
28+
} catch {
3229
return require.resolve(
3330
`./tools/node_modules/eslint/node_modules/${request}`);
3431
}
@@ -53,12 +50,6 @@ module.exports = {
5350
overrides: [
5451
{
5552
files: [
56-
'doc/api/esm.md',
57-
'doc/api/fs.md',
58-
'doc/api/module.md',
59-
'doc/api/modules.md',
60-
'doc/api/packages.md',
61-
'doc/api/wasi.md',
6253
'test/es-module/test-esm-type-flag.js',
6354
'test/es-module/test-esm-type-flag-alias.js',
6455
'*.mjs',
@@ -68,9 +59,47 @@ module.exports = {
6859
},
6960
{
7061
files: ['**/*.md'],
71-
parserOptions: { ecmaFeatures: { impliedStrict: true } },
62+
processor: 'markdown/markdown',
63+
},
64+
{
65+
files: ['**/*.md/*.cjs', '**/*.md/*.js'],
66+
parserOptions: {
67+
sourceType: 'script',
68+
ecmaFeatures: { impliedStrict: true }
69+
},
7270
rules: { strict: 'off' },
7371
},
72+
{
73+
files: [
74+
'**/*.md/*.mjs',
75+
'doc/api/esm.md/*.js',
76+
'doc/api/packages.md/*.js',
77+
],
78+
parserOptions: { sourceType: 'module' },
79+
rules: { 'no-restricted-globals': [
80+
'error',
81+
{
82+
name: '__filename',
83+
message: 'Use import.meta.url instead',
84+
},
85+
{
86+
name: '__dirname',
87+
message: 'Not available in ESM',
88+
},
89+
{
90+
name: 'exports',
91+
message: 'Not available in ESM',
92+
},
93+
{
94+
name: 'module',
95+
message: 'Not available in ESM',
96+
},
97+
{
98+
name: 'require',
99+
message: 'Use import instead',
100+
},
101+
] },
102+
},
74103
],
75104
rules: {
76105
// ESLint built-in rules
@@ -95,7 +124,13 @@ module.exports = {
95124
ignorePattern: '.*',
96125
},
97126
}],
98-
'comma-dangle': ['error', 'only-multiline'],
127+
'comma-dangle': ['error', {
128+
arrays: 'always-multiline',
129+
exports: 'only-multiline',
130+
functions: 'only-multiline',
131+
imports: 'only-multiline',
132+
objects: 'only-multiline',
133+
}],
99134
'comma-spacing': 'error',
100135
'comma-style': 'error',
101136
'computed-property-spacing': 'error',
@@ -126,6 +161,7 @@ module.exports = {
126161
code: 80,
127162
ignorePattern: '^// Flags:',
128163
ignoreRegExpLiterals: true,
164+
ignoreTemplateLiterals: true,
129165
ignoreUrls: true,
130166
tabWidth: 2,
131167
}],
@@ -292,14 +328,15 @@ module.exports = {
292328
'template-curly-spacing': 'error',
293329
'unicode-bom': 'error',
294330
'use-isnan': 'error',
295-
'valid-typeof': 'error',
331+
'valid-typeof': ['error', { requireStringLiterals: true }],
296332

297333
// Custom rules from eslint-plugin-node-core
298334
'node-core/no-unescaped-regexp-dot': 'error',
299335
'node-core/no-duplicate-requires': 'error',
300336
},
301337
globals: {
302338
AbortController: 'readable',
339+
AbortSignal: 'readable',
303340
Atomics: 'readable',
304341
BigInt: 'readable',
305342
BigInt64Array: 'readable',
@@ -313,5 +350,8 @@ module.exports = {
313350
TextDecoder: 'readable',
314351
queueMicrotask: 'readable',
315352
globalThis: 'readable',
353+
btoa: 'readable',
354+
atob: 'readable',
355+
performance: 'readable',
316356
},
317357
};

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,7 @@
115115
/lib/internal/bootstrap/* @nodejs/startup
116116
/tools/code_cache/* @nodejs/startup
117117
/tools/snapshot/* @nodejs/startup
118+
119+
# V8
120+
/deps/v8/* @nodejs/v8-update
121+
/tools/v8_gypfiles/* @nodejs/v8-update

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!--
22
Before submitting a pull request, please read
3-
https://github.com/nodejs/node/blob/master/CONTRIBUTING.md.
3+
https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md.
44
55
Commit message formatting guidelines:
6-
https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines
6+
https://github.com/nodejs/node/blob/HEAD/doc/guides/contributing/pull-requests.md#commit-message-guidelines
77
88
For code changes:
99
1. Include tests for any bug fixes or new features.

.github/label-pr-config.yml

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
## Order of entries in this map *does* matter for the resolved labels
2+
## earlier entries override later entries
3+
subSystemLabels:
4+
# src subsystems
5+
/^src\/async-wrap/: c++, async_wrap
6+
/^src\/(?:base64|node_buffer|string_)/: c++, buffer
7+
/^src\/cares/: c++, cares
8+
/^src\/(?:process_wrap|spawn_)/: c++, child_process
9+
/^src\/(?:node_)?crypto/: c++, crypto
10+
/^src\/(?:debug-|node_debug)/: c++, debugger
11+
/^src\/udp_/: c++, dgram
12+
/^src\/(?:fs_|node_file|node_stat_watcher)/: c++, fs
13+
/^src\/node_http_parser/: c++, http_parser
14+
/^src\/node_i18n/: c++, i18n-api
15+
/^src\/uv\./: c++, libuv
16+
/^src\/(?:connect(?:ion)?|pipe|tcp)_/: c++, net
17+
/^src\/node_os/: c++, os
18+
/^src\/(?:node_main|signal_)/: c++, process
19+
/^src\/timer_/: c++, timers
20+
/^src\/(?:CNNICHashWhitelist|node_root_certs|tls_)/: c++, tls
21+
/^src\/tty_/: c++, tty
22+
/^src\/node_url/: c++, whatwg-url
23+
/^src\/node_util/: c++, util
24+
/^src\/(?:node_v8|v8abbr)/: c++, v8 engine
25+
/^src\/node_contextify/: c++, vm
26+
/^src\/.*win32.*/: c++, windows
27+
/^src\/node_zlib/: c++, zlib
28+
/^src\/tracing/: c++, tracing
29+
/^src\/node_api/: c++, node-api
30+
/^src\/node_http2/: c++, http2
31+
/^src\/node_report/: c++, report
32+
/^src\/node_wasi/: c++, wasi
33+
/^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
36+
37+
# don't label python files as c++
38+
/^src\/.+\.py$/: python, needs-ci
39+
40+
# properly label changes to v8 inspector integration-related files
41+
/^src\/inspector_/: c++, inspector, needs-ci
42+
43+
# don't want to label it a c++ update when we're "only" bumping the Node.js version
44+
/^src\/(?!node_version\.h)/: c++
45+
# BUILDING.md should be marked as 'build' in addition to 'doc'
46+
/^BUILDING\.md$/: build, doc
47+
# meta is a very specific label for things that are policy and or meta-info related
48+
/^([A-Z]+$|CODE_OF_CONDUCT|ROADMAP|WORKING_GROUPS|GOVERNANCE|CHANGELOG|\.mail|\.git.+)/: meta
49+
# things that edit top-level .md files are always a doc change
50+
/^\w+\.md$/: doc
51+
# different variants of *Makefile and build files
52+
/^(tools\/)?(Makefile|BSDmakefile|create_android_makefiles|\.travis\.yml)$/: build, needs-ci
53+
/^tools\/(install\.py|genv8constants\.py|getnodeversion\.py|js2c\.py|utils\.py|configure\.d\/.*)$/: build, python, needs-ci
54+
/^vcbuild\.bat$/: build, windows, needs-ci
55+
/^(android-)?configure|node\.gyp|common\.gypi$/: build, needs-ci
56+
# more specific tools
57+
/^tools\/gyp/: tools, build, gyp, needs-ci, dont-land-on-v14.x, dont-land-on-v12.x
58+
/^tools\/doc\//: tools, doc
59+
/^tools\/icu\//: tools, i18n-api, icu, needs-ci
60+
/^tools\/(?:osx-pkg\.pmdoc|pkgsrc)\//: tools, macos, install
61+
/^tools\/(?:(?:mac)?osx-)/: tools, macos
62+
/^tools\/test-npm/: tools, test, npm
63+
/^tools\/test/: tools, test
64+
/^tools\/(?:certdata|mkssldef|mk-ca-bundle)/: tools, openssl, tls
65+
/^tools\/msvs\//: tools, windows, install, needs-ci
66+
/^tools\/[^/]+\.bat$/: tools, windows, needs-ci
67+
/^tools\/make-v8/: tools, v8 engine, needs-ci
68+
/^tools\/v8_gypfiles/: tools, v8 engine, needs-ci
69+
/^tools\/(code_cache|snapshot)/: needs-ci
70+
/^tools\/build-addons.js/: needs-ci
71+
# all other tool changes should be marked as such
72+
/^tools\//: tools
73+
/^\.eslint|\.remark|\.editorconfig/: tools
74+
75+
## Dependencies
76+
# libuv needs an explicit mapping, as the ordinary /deps/ mapping below would
77+
# end up as libuv changes labeled with "uv" (which is a non-existing label)
78+
/^deps\/uv\//: libuv
79+
/^deps\/v8\/tools\/gen-postmortem-metadata\.py/: v8 engine, python, post-mortem
80+
/^deps\/v8\//: v8 engine
81+
/^deps\/uvwasi\//: wasi
82+
/^deps\/npm\//: npm, fast-track, dont-land-on-v14.x, dont-land-on-v12.x
83+
/^deps\/nghttp2\/nghttp2\.gyp/: build, http2
84+
/^deps\/nghttp2\//: http2
85+
/^deps\/ngtcp2\//: quic, dont-land-on-v14.x, dont-land-on-v12.x
86+
/^deps\/nghttp3\//: quic, dont-land-on-v14.x, dont-land-on-v12.x
87+
/^deps\/([^/]+)/: $1
88+
89+
## JS subsystems
90+
# Oddities first
91+
/^lib\/(punycode|\w+\/freelist|sys\.js)/: ''
92+
/^lib\/constants\.js$/: lib / src
93+
/^lib\/_(debug_agent|debugger)\.js$/: debugger
94+
/^lib(\/\w+)?\/(_)?link(ed)?list/: timers
95+
/^lib\/\w+\/bootstrap_node/: lib / src
96+
/^lib\/\w+\/v8_prof_/: tools
97+
/^lib\/\w+\/socket_list/: net
98+
/^lib\/\w+\/streams$/: stream
99+
/^lib\/.*http2/: http2
100+
/^lib\/worker_threads.js$/: worker
101+
/^lib\/internal\/url\.js$/: whatwg-url
102+
/^lib\/internal\/modules\/esm/: esm
103+
/^lib\/internal\/quic\/*/: quic, dont-land-on-v14.x, dont-land-on-v12.x
104+
105+
# All other lib/ files map directly
106+
/^lib\/_(\w+)_\w+\.js?$/: $1 # e.g. _(stream)_wrap
107+
/^lib(\/internal)?\/(\w+)\.js?$/: $2 # other .js files
108+
/^lib\/internal\/(\w+)(?:\/|$)/: $1 # internal subfolders
109+
110+
exlusiveLabels:
111+
# more specific tests
112+
/^test\/addons\//: test, addons
113+
/^test\/debugger\//: test, debugger
114+
/^test\/doctool\//: test, doc, tools
115+
/^test\/timers\//: test, timers
116+
/^test\/pseudo-tty\//: test, tty
117+
/^test\/inspector\//: test, inspector
118+
/^test\/cctest\/test_inspector/: test, inspector
119+
/^test\/cctest\/test_url/: test, whatwg-url
120+
/^test\/addons-napi\//: test, node-api
121+
/^test\/async-hooks\//: test, async_hooks
122+
/^test\/report\//: test, report
123+
/^test\/fixtures\/es-module/: test, esm
124+
/^test\/es-module\//: test, esm
125+
126+
/^test\//: test
127+
128+
# specific map for webcrypto.md as it should be labeled 'crypto'
129+
/^doc\/api\/webcrypto.md$/: doc, crypto
130+
# specific map for modules.md as it should be labeled 'module' not 'modules'
131+
/^doc\/api\/modules.md$/: doc, module
132+
# node-api is treated separately since it is not a JS core module but is still
133+
# considered a subsystem of sorts
134+
/^doc\/api\/n-api.md$/: doc, node-api
135+
# quic
136+
/^doc\/api\/quic.md$/: doc, quic, dont-land-on-v14.x, dont-land-on-v12.x
137+
# add worker label to PRs that affect doc/api/worker_threads.md
138+
/^doc\/api\/worker_threads.md$/: doc, worker
139+
# automatically tag JS subsystem-specific API doc changes
140+
/^doc\/api\/(\w+)\.md$/: doc, $1
141+
# add deprecations label to PRs that affect doc/api/deprecations.md
142+
/^doc\/api\/deprecations.md$/: doc, deprecations
143+
/^doc\/changelogs\//: release
144+
145+
/^doc\//: doc
146+
147+
# more specific benchmarks
148+
/^benchmark\/buffers\//: benchmark, buffer
149+
/^benchmark\/(?:arrays|es)\//: benchmark, v8 engine
150+
/^benchmark\/_http/: benchmark, http
151+
/^benchmark\/(?:misc|fixtures)\//: benchmark
152+
/^benchmark\/streams\//: benchmark, stream
153+
/^benchmark\/([^/]+)\//: benchmark, $1
154+
155+
/^benchmark\//: benchmark
156+
157+
allJsSubSystems:
158+
- assert
159+
- async_hooks
160+
- buffer
161+
- child_process
162+
- cluster
163+
- console
164+
- crypto
165+
- debugger
166+
- dgram
167+
- dns
168+
- domain
169+
- events
170+
- esm
171+
- fs
172+
- http
173+
- https
174+
- http2
175+
- module
176+
- net
177+
- os
178+
- path
179+
- process
180+
- querystring
181+
- quic
182+
- readline
183+
- repl
184+
- report
185+
- stream
186+
- string_decoder
187+
- timers
188+
- tls
189+
- tty
190+
- url
191+
- util
192+
- v8
193+
- vm
194+
- wasi
195+
- worker
196+
- zlib

.github/workflows/auto-start-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
# Install dependencies
2323
- name: Install Node.js
24-
uses: actions/setup-node@v2-beta
24+
uses: actions/setup-node@v2
2525
with:
2626
node-version: ${{ env.NODE_VERSION }}
2727
- name: Install node-core-utils

.github/workflows/build-tarball.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- master
8+
- main
89
- v[0-9]+.x-staging
910
- v[0-9]+.x
1011

.github/workflows/build-windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- master
8+
- main
89
- canary
910
- v[0-9]+.x-staging
1011
- v[0-9]+.x

.github/workflows/comment-labeled.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Comment on issues and PRs when labelled
2+
on:
3+
issues:
4+
types: [labeled]
5+
pull_request_target:
6+
types: [labeled]
7+
8+
jobs:
9+
staleComment:
10+
if: github.repository == 'nodejs/node' && github.event.label.name == 'stalled'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Post stalled comment
14+
env:
15+
COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }}
16+
run: |
17+
curl -X POST $COMMENTS_URL \
18+
-H "Content-Type: application/json" \
19+
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
20+
--data '{ "body": "This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open." }'
21+
22+
fastTrack:
23+
if: github.repository == 'nodejs/node' && github.event_name == 'pull_request_target' && github.event.label.name == 'fast-track'
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Request Fast-Track
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "Fast-track has been requested by @${{ github.actor }}. Please 👍 to approve."

0 commit comments

Comments
 (0)