Skip to content

Commit 1bcdb51

Browse files
authored
Merge branch 'master' into unflag-tla-repl
2 parents 03225c5 + a8a8638 commit 1bcdb51

File tree

18,694 files changed

+1207592
-912256
lines changed

Some content is hidden

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

18,694 files changed

+1207592
-912256
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ indent_size = 2
77
indent_style = space
88
insert_final_newline = true
99
trim_trailing_whitespace = true
10+
quote_type = single
1011

1112
[vcbuild.bat]
1213
end_of_line = crlf

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
node_modules
2-
lib/internal/v8_prof_polyfill.js
32
lib/punycode.js
43
test/addons/??_*
54
test/fixtures

.eslintrc.js

Lines changed: 84 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@ const ModuleFindPath = Module._findPath;
1616
const hacks = [
1717
'eslint-plugin-node-core',
1818
'eslint-plugin-markdown',
19-
'babel-eslint',
19+
'@babel/eslint-parser',
20+
'@babel/plugin-syntax-class-properties',
21+
'@babel/plugin-syntax-top-level-await',
2022
];
2123
Module._findPath = (request, paths, isMain) => {
2224
const r = ModuleFindPath(request, paths, isMain);
2325
if (!r && hacks.includes(request)) {
2426
try {
2527
return require.resolve(`./tools/node_modules/${request}`);
26-
// Keep the variable in place to ensure that ESLint started by older Node.js
27-
// versions work as expected.
28-
// eslint-disable-next-line no-unused-vars
29-
} catch (e) {
28+
} catch {
3029
return require.resolve(
3130
`./tools/node_modules/eslint/node_modules/${request}`);
3231
}
@@ -37,13 +36,20 @@ Module._findPath = (request, paths, isMain) => {
3736
module.exports = {
3837
root: true,
3938
plugins: ['markdown', 'node-core'],
40-
parser: 'babel-eslint',
41-
parserOptions: { sourceType: 'script' },
39+
parser: '@babel/eslint-parser',
40+
parserOptions: {
41+
babelOptions: {
42+
plugins: [
43+
Module._findPath('@babel/plugin-syntax-class-properties'),
44+
Module._findPath('@babel/plugin-syntax-top-level-await'),
45+
],
46+
},
47+
requireConfigFile: false,
48+
sourceType: 'script',
49+
},
4250
overrides: [
4351
{
4452
files: [
45-
'doc/api/esm.md',
46-
'doc/api/modules.md',
4753
'test/es-module/test-esm-type-flag.js',
4854
'test/es-module/test-esm-type-flag-alias.js',
4955
'*.mjs',
@@ -53,9 +59,55 @@ module.exports = {
5359
},
5460
{
5561
files: ['**/*.md'],
56-
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+
},
5770
rules: { strict: 'off' },
5871
},
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+
name: 'Buffer',
103+
message: 'Import Buffer instead of using the global'
104+
},
105+
{
106+
name: 'process',
107+
message: 'Import process instead of using the global'
108+
},
109+
] },
110+
},
59111
],
60112
rules: {
61113
// ESLint built-in rules
@@ -80,7 +132,13 @@ module.exports = {
80132
ignorePattern: '.*',
81133
},
82134
}],
83-
'comma-dangle': ['error', 'only-multiline'],
135+
'comma-dangle': ['error', {
136+
arrays: 'always-multiline',
137+
exports: 'only-multiline',
138+
functions: 'only-multiline',
139+
imports: 'only-multiline',
140+
objects: 'only-multiline',
141+
}],
84142
'comma-spacing': 'error',
85143
'comma-style': 'error',
86144
'computed-property-spacing': 'error',
@@ -111,6 +169,7 @@ module.exports = {
111169
code: 80,
112170
ignorePattern: '^// Flags:',
113171
ignoreRegExpLiterals: true,
172+
ignoreTemplateLiterals: true,
114173
ignoreUrls: true,
115174
tabWidth: 2,
116175
}],
@@ -148,6 +207,7 @@ module.exports = {
148207
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0, maxBOF: 0 }],
149208
'no-new-require': 'error',
150209
'no-new-symbol': 'error',
210+
'no-nonoctal-decimal-escape': 'error',
151211
'no-obj-calls': 'error',
152212
'no-octal': 'error',
153213
'no-path-concat': 'error',
@@ -224,6 +284,8 @@ module.exports = {
224284
'no-unreachable': 'error',
225285
'no-unsafe-finally': 'error',
226286
'no-unsafe-negation': 'error',
287+
'no-unsafe-optional-chaining': 'error',
288+
'no-unused-expressions': ['error', { allowShortCircuit: true }],
227289
'no-unused-labels': 'error',
228290
'no-unused-vars': ['error', { args: 'none', caughtErrors: 'all' }],
229291
'no-use-before-define': ['error', {
@@ -241,6 +303,7 @@ module.exports = {
241303
'no-void': 'error',
242304
'no-whitespace-before-property': 'error',
243305
'no-with': 'error',
306+
'object-curly-newline': 'error',
244307
'object-curly-spacing': ['error', 'always'],
245308
'one-var': ['error', { initialized: 'never' }],
246309
'one-var-declaration-per-line': 'error',
@@ -273,21 +336,30 @@ module.exports = {
273336
'template-curly-spacing': 'error',
274337
'unicode-bom': 'error',
275338
'use-isnan': 'error',
276-
'valid-typeof': 'error',
339+
'valid-typeof': ['error', { requireStringLiterals: true }],
277340

278341
// Custom rules from eslint-plugin-node-core
279342
'node-core/no-unescaped-regexp-dot': 'error',
280343
'node-core/no-duplicate-requires': 'error',
281344
},
282345
globals: {
283346
AbortController: 'readable',
347+
AbortSignal: 'readable',
284348
Atomics: 'readable',
285349
BigInt: 'readable',
286350
BigInt64Array: 'readable',
287351
BigUint64Array: 'readable',
352+
Event: 'readable',
353+
EventTarget: 'readable',
354+
MessageChannel: 'readable',
355+
MessageEvent: 'readable',
356+
MessagePort: 'readable',
288357
TextEncoder: 'readable',
289358
TextDecoder: 'readable',
290359
queueMicrotask: 'readable',
291360
globalThis: 'readable',
361+
btoa: 'readable',
362+
atob: 'readable',
363+
performance: 'readable',
292364
},
293365
};

.github/CODEOWNERS

Lines changed: 57 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,30 @@
55
# 3. PRs touching any code with a codeowner must be signed off by at least one
66
# person on the code owner team.
77

8+
# tsc & commcomm
9+
810
/.github/CODEOWNERS @nodejs/tsc
11+
/GOVERNANCE.md @nodejs/tsc
12+
/onboarding.md @nodejs/tsc
13+
/CODE_OF_CONDUCT.md @nodejs/tsc @nodejs/community-committee
14+
/CONTRIBUTING.md @nodejs/tsc @nodejs/community-committee
15+
/LICENSE @nodejs/tsc @nodejs/community-committee
16+
/doc/guides/contributing/code-of-conduct.md @nodejs/tsc @nodejs/community-committee
17+
# TODO(mmarchini): the bot doens't have a notion of precedence, that might
18+
# change when move the codeowners code to an Action, at which point we can
19+
# uncomment the line below
20+
# /doc/guides/contributing/*.md @nodejs/tsc
21+
/doc/guides/contributing/issues.md @nodejs/tsc
22+
/doc/guides/contributing/pull-requests.md @nodejs/tsc
23+
/doc/guides/collaborator-guide.md @nodejs/tsc
24+
/doc/guides/offboarding.md @nodejs/tsc
25+
26+
# streams
27+
28+
/lib/_stream* @nodejs/streams
29+
/lib/stream.js @nodejs/streams
30+
/lib/stream/* @nodejs/streams
31+
/lib/internal/streams/* @nodejs/streams
932

1033
# net
1134

@@ -15,13 +38,13 @@
1538
/doc/api/net.md @nodejs/net
1639
/lib/dgram.js @nodejs/net
1740
/lib/dns.js @nodejs/net
18-
/lib/net.js @nodejs/net @nodejs/quic
41+
/lib/net.js @nodejs/net
1942
/lib/internal/dgram.js @nodejs/net
2043
/lib/internal/dns/* @nodejs/net
2144
/lib/internal/net.js @nodejs/net
2245
/lib/internal/socket_list.js @nodejs/net
2346
/lib/internal/js_stream_socket.js @nodejs/net
24-
/src/cares_wrap.h @nodejs/net
47+
/src/cares_wrap.cc @nodejs/net
2548
/src/connect_wrap.* @nodejs/net
2649
/src/connection_wrap.* @nodejs/net
2750
/src/node_sockaddr* @nodejs/net
@@ -35,41 +58,33 @@
3558
/lib/crypto.js @nodejs/crypto
3659
/lib/tls.js @nodejs/crypto @nodejs/net
3760
/src/node_crypto* @nodejs/crypto
38-
/src/node_crypto_common* @nodejs/crypto @nodejs/quic
61+
/src/crypto/* @nodejs/crypto
3962

4063
# http
4164

4265
/deps/llhttp/* @nodejs/http @nodejs/net
4366
/doc/api/http.md @nodejs/http @nodejs/net
44-
/doc/api/http2.md @nodejs/http @nodejs/net
4567
/lib/_http_* @nodejs/http @nodejs/net
4668
/lib/http.js @nodejs/http @nodejs/net
4769
/lib/https.js @nodejs/crypto @nodejs/net @nodejs/http
48-
/src/node_http_common* @nodejs/http @nodejs/http2 @nodejs/quic @nodejs/net
70+
/src/node_http_common* @nodejs/http @nodejs/http2 @nodejs/net
4971
/src/node_http_parser.cc @nodejs/http @nodejs/net
5072

5173
# http2
5274

5375
/deps/nghttp2/* @nodejs/http2 @nodejs/net
54-
/doc/api/http2.md @nodejs/http2 @nodejs/net
76+
/doc/api/http2.md @nodejs/http2 @nodejs/http @nodejs/net
5577
/lib/http2.js @nodejs/http2 @nodejs/net
5678
/lib/internal/http2/* @nodejs/http2 @nodejs/net
5779
/src/node_http2* @nodejs/http2 @nodejs/net
5880
/src/node_mem* @nodejs/http2
5981

60-
# quic
61-
62-
/deps/ngtcp2/ @nodejs/quic
63-
/deps/nghttp3/ @nodejs/quic
64-
/doc/api/quic.md @nodejs/quic
65-
/lib/internal/quic/ @nodejs/quic
66-
/src/node_bob* @nodejs/quic
67-
/src/quic/ @nodejs/quic
68-
6982
# modules
7083

7184
/doc/api/modules.md @nodejs/modules
7285
/doc/api/esm.md @nodejs/modules
86+
/doc/api/module.md @nodejs/modules
87+
/doc/api/packages.md @nodejs/modules
7388
/lib/module.js @nodejs/modules
7489
/lib/internal/modules/* @nodejs/modules
7590
/lib/internal/bootstrap/loaders.js @nodejs/modules
@@ -81,3 +96,30 @@
8196
/src/js_native_api* @nodejs/n-api
8297
/doc/guides/adding-new-napi-api.md @nodejs/n-api
8398
/doc/api/n-api.md @nodejs/n-api
99+
100+
# WASI
101+
/deps/uvwasi/ @nodejs/wasi
102+
/doc/api/wasi.md @nodejs/wasi
103+
/lib/wasi.js @nodejs/wasi
104+
/src/node_wasi* @nodejs/wasi
105+
/test/wasi/ @nodejs/wasi
106+
/test/fixtures/wasi/ @nodejs/wasi
107+
108+
# Startup
109+
110+
/benchmark/misc/startup.js @nodejs/startup
111+
/src/node.cc @nodejs/startup
112+
/src/node_code_cache_stub.cc @nodejs/startup
113+
/src/node_native_module* @nodejs/startup
114+
/lib/internal/bootstrap/* @nodejs/startup
115+
/tools/code_cache/* @nodejs/startup
116+
/tools/snapshot/* @nodejs/startup
117+
118+
# V8
119+
/deps/v8/* @nodejs/v8-update
120+
/tools/v8_gypfiles/* @nodejs/v8-update
121+
122+
# Actions
123+
124+
/.github/workflows/* @nodejs/actions
125+
/tools/actions/* @nodejs/actions

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

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)