Skip to content

Commit

Permalink
Merge branch 'main' into do-not-crash-with-disabled-shared-array-buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
BridgeAR authored Feb 17, 2023
2 parents d7846e4 + 7796692 commit 9c2ceb6
Show file tree
Hide file tree
Showing 13,919 changed files with 1,438,467 additions and 1,426,875 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ test/message/esm_display_syntax_error.mjs
tools/icu
tools/lint-md/lint-md.mjs
benchmark/tmp
benchmark/fixtures
doc/**/*.js
!doc/api_assets/*.js
!.eslintrc.js
39 changes: 20 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ module.exports = {
files: ['**/*.md/*.cjs', '**/*.md/*.js'],
parserOptions: {
sourceType: 'script',
ecmaFeatures: { impliedStrict: true }
ecmaFeatures: { impliedStrict: true },
},
rules: { strict: 'off' },
},
Expand Down Expand Up @@ -103,11 +103,11 @@ module.exports = {
},
{
name: 'Buffer',
message: 'Import Buffer instead of using the global'
message: 'Import Buffer instead of using the global',
},
{
name: 'process',
message: 'Import process instead of using the global'
message: 'Import process instead of using the global',
},
] },
},
Expand All @@ -117,31 +117,24 @@ module.exports = {
// https://eslint.org/docs/rules/
'accessor-pairs': 'error',
'array-callback-return': 'error',
'arrow-parens': ['error', 'always'],
'arrow-spacing': ['error', { before: true, after: true }],
'arrow-parens': 'error',
'arrow-spacing': 'error',
'block-scoped-var': 'error',
'block-spacing': 'error',
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'capitalized-comments': ['error', 'always', {
line: {
// Ignore all lines that have less characters than 20 and all lines that
// start with something that looks like a variable name or code.
// eslint-disable-next-line max-len
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].* ',
ignorePattern: '.{0,20}$|[a-z]+ ?[0-9A-Z_.(/=:[#-]|std|http|ssh|ftp',
ignoreInlineComments: true,
ignoreConsecutiveComments: true,
},
block: {
ignorePattern: '.*',
},
}],
'comma-dangle': ['error', {
arrays: 'always-multiline',
exports: 'only-multiline',
functions: 'only-multiline',
imports: 'only-multiline',
objects: 'only-multiline',
}],
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': 'error',
'comma-style': 'error',
'computed-property-spacing': 'error',
Expand All @@ -162,9 +155,9 @@ module.exports = {
ObjectExpression: 'first',
SwitchCase: 1,
}],
'key-spacing': ['error', { mode: 'strict' }],
'key-spacing': 'error',
'keyword-spacing': 'error',
'linebreak-style': ['error', 'unix'],
'linebreak-style': 'error',
'max-len': ['error', {
code: 120,
ignorePattern: '^// Flags:',
Expand All @@ -178,7 +171,7 @@ module.exports = {
'no-constant-condition': ['error', { checkLoops: false }],
'no-constructor-return': 'error',
'no-duplicate-imports': 'error',
'no-else-return': ['error', { allowElseIf: true }],
'no-else-return': 'error',
'no-extra-parens': ['error', 'functions'],
'no-lonely-if': 'error',
'no-mixed-requires': 'error',
Expand Down Expand Up @@ -240,6 +233,12 @@ module.exports = {
selector: "CallExpression[callee.name='isNaN']",
message: 'Use Number.isNaN() instead of the global isNaN() function.',
},
{
// TODO(@panva): move this to no-restricted-properties
// when https://github.com/eslint/eslint/issues/16412 is fixed
selector: "Identifier[name='webcrypto']",
message: 'Use `globalThis.crypto`.',
},
],
'no-return-await': 'error',
'no-self-compare': 'error',
Expand Down Expand Up @@ -285,7 +284,7 @@ module.exports = {
named: 'never',
asyncArrow: 'always',
}],
'space-in-parens': ['error', 'never'],
'space-in-parens': 'error',
'space-infix-ops': 'error',
'space-unary-ops': 'error',
'spaced-comment': ['error', 'always', {
Expand All @@ -311,16 +310,18 @@ module.exports = {
'jsdoc/require-param': 'off',
'jsdoc/check-tag-names': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/require-property-description': 'off',

// Custom rules from eslint-plugin-node-core
'node-core/no-unescaped-regexp-dot': 'error',
'node-core/no-duplicate-requires': 'error',
'node-core/prefer-proto': 'error',
},
globals: {
ByteLengthQueuingStrategy: 'readable',
CompressionStream: 'readable',
CountQueuingStrategy: 'readable',
CustomEvent: 'readable',
crypto: 'readable',
Crypto: 'readable',
CryptoKey: 'readable',
DecompressionStream: 'readable',
Expand Down
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
test/fixtures/* -text
vcbuild.bat text eol=crlf
deps/npm/bin/npm text eol=lf
deps/npm/bin/npx text eol=lf
deps/corepack/shims/corepack text eol=lf
tools/msvs/find_python.cmd text eol=crlf
45 changes: 31 additions & 14 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Node.js Project Codeowners

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

# tsc

Expand Down Expand Up @@ -71,16 +74,18 @@
/src/node_http2* @nodejs/http2 @nodejs/net
/src/node_mem* @nodejs/http2

# modules
# modules, including loaders

/doc/api/modules.md @nodejs/modules
/doc/api/esm.md @nodejs/modules
/doc/api/module.md @nodejs/modules
/doc/api/packages.md @nodejs/modules
/lib/module.js @nodejs/modules
/lib/internal/modules/* @nodejs/modules
/lib/internal/bootstrap/loaders.js @nodejs/modules
/src/module_wrap* @nodejs/modules @nodejs/vm
/doc/api/esm.md @nodejs/modules @nodejs/loaders
/doc/api/module.md @nodejs/modules @nodejs/loaders
/doc/api/modules.md @nodejs/modules @nodejs/loaders
/doc/api/packages.md @nodejs/modules @nodejs/loaders
/lib/internal/bootstrap/loaders.js @nodejs/modules @nodejs/loaders
/lib/internal/modules/* @nodejs/modules @nodejs/loaders
/lib/internal/process/esm_loader.js @nodejs/modules @nodejs/loaders
/lib/internal/process/execution.js @nodejs/modules @nodejs/loaders
/lib/module.js @nodejs/modules @nodejs/loaders
/src/module_wrap* @nodejs/modules @nodejs/loaders @nodejs/vm

# Node-API

Expand All @@ -96,6 +101,7 @@
/tools/gyp/**/* @nodejs/gyp

# WASI

/deps/uvwasi/ @nodejs/wasi
/doc/api/wasi.md @nodejs/wasi
/lib/wasi.js @nodejs/wasi
Expand All @@ -107,15 +113,26 @@

/benchmark/misc/startup.js @nodejs/startup
/src/node.cc @nodejs/startup
/src/node_native_module* @nodejs/startup
/src/node_builtins* @nodejs/startup
/src/node_snapshot* @nodejs/startup
/lib/internal/bootstrap/* @nodejs/startup
/tools/snapshot/* @nodejs/startup

# V8

/deps/v8/* @nodejs/v8-update
/tools/v8_gypfiles/* @nodejs/v8-update

# Actions

/.github/workflows/* @nodejs/actions
/tools/actions/* @nodejs/actions

# Test runner

/test/message/test_runner_* @nodejs/test_runner
/test/parallel/test-runner-* @nodejs/test_runner
/doc/api/test.md @nodejs/test_runner
/lib/test.js @nodejs/test_runner
/lib/internal/main/test_runner.js @nodejs/test_runner
/lib/internal/test_runner/* @nodejs/test_runner
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ body:
label: Platform
description: |
UNIX: output of `uname -a`
Windows: output of `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` in PowerShell console
Windows: output of `"$([Environment]::OSVersion.VersionString) $(('x86', 'x64')[[Environment]::Is64BitOperatingSystem])"` in PowerShell console
- type: input
attributes:
label: Subsystem
Expand Down
17 changes: 15 additions & 2 deletions .github/ISSUE_TEMPLATE/4-report-a-flaky-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,24 @@ body:
placeholder: e.g. `test-fs-stat-bigint`
validations:
required: true
- type: input
- type: dropdown
attributes:
label: Platform
description: The platform the test is flaky on.
placeholder: e.g. `macos` or `linux`
multiple: true
options:
- AIX
- FreeBSD
- Linux ARM64
- Linux ARMv7
- Linux PPC64LE
- Linux s390x
- Linux x64
- macOS ARM64
- macOS x64
- SmartOS
- Windows
- Other
- type: textarea
attributes:
label: Console output
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
blank_issues_enabled: false
blank_issues_enabled: true
contact_links:
- name: ⁉️ Need help with Node.js?
url: https://github.com/nodejs/help
Expand Down
27 changes: 17 additions & 10 deletions .github/label-pr-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ subSystemLabels:
/^src\/tty_/: c++, tty
/^src\/node_url/: c++, whatwg-url
/^src\/node_util/: c++, util
/^src\/(?:node_v8|v8abbr)/: c++, v8 engine
/^src\/node_v8/: c++, v8 engine
/^src\/node_contextify/: c++, vm
/^src\/.*win32.*/: c++, windows
/^src\/node_zlib/: c++, zlib
/^src\/tracing/: c++, tracing
/^src\/node_api/: c++, node-api
/^src\/(?:node_api|js_native_api)/: c++, node-api
/^src\/node_http2/: c++, http2
/^src\/node_report/: c++, report
/^src\/node_wasi/: c++, wasi
/^src\/node_worker/: c++, worker
/^src\/quic\/*/: c++, quic, dont-land-on-v14.x, dont-land-on-v12.x
/^src\/node_bob*/: c++, quic, dont-land-on-v14.x, dont-land-on-v12.x
/^src\/quic\/*/: c++, quic, dont-land-on-v14.x
/^src\/node_bob*/: c++, quic, dont-land-on-v14.x

# don't label python files as c++
/^src\/.+\.py$/: python, needs-ci
Expand All @@ -54,7 +54,7 @@ subSystemLabels:
/^vcbuild\.bat$/: build, windows, needs-ci
/^(android-)?configure|node\.gyp|common\.gypi$/: build, needs-ci
# more specific tools
/^tools\/gyp/: tools, build, gyp, needs-ci, dont-land-on-v14.x, dont-land-on-v12.x
/^tools\/gyp/: tools, build, gyp, needs-ci, dont-land-on-v14.x
/^tools\/doc\//: tools, doc
/^tools\/icu\//: tools, i18n-api, icu, needs-ci
/^tools\/(?:osx-pkg\.pmdoc|pkgsrc)\//: tools, macos, install
Expand All @@ -80,11 +80,11 @@ subSystemLabels:
/^deps\/v8\/tools\/gen-postmortem-metadata\.py/: v8 engine, python, post-mortem
/^deps\/v8\//: v8 engine
/^deps\/uvwasi\//: wasi
/^deps\/npm\//: npm, fast-track, dont-land-on-v14.x, dont-land-on-v12.x
/^deps\/npm\//: npm, fast-track, dont-land-on-v14.x
/^deps\/nghttp2\/nghttp2\.gyp/: build, http2
/^deps\/nghttp2\//: http2
/^deps\/ngtcp2\//: quic, dont-land-on-v14.x, dont-land-on-v12.x
/^deps\/nghttp3\//: quic, dont-land-on-v14.x, dont-land-on-v12.x
/^deps\/ngtcp2\//: quic, dont-land-on-v14.x
/^deps\/nghttp3\//: quic, dont-land-on-v14.x
/^deps\/([^/]+)/: dependencies, $1

## JS subsystems
Expand All @@ -99,8 +99,11 @@ subSystemLabels:
/^lib\/\w+\/streams$/: stream
/^lib\/.*http2/: http2
/^lib\/worker_threads.js$/: worker
/^lib\/test.js$/: test_runner, dont-land-on-v14.x
/^lib\/internal\/url\.js$/: whatwg-url
/^lib\/internal\/modules\/esm/: esm
/^lib\/internal\/webstreams/: web streams
/^lib\/internal\/test_runner/: test_runner, dont-land-on-v14.x

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

/^test\//: test

Expand All @@ -133,9 +138,11 @@ exlusiveLabels:
# considered a subsystem of sorts
/^doc\/api\/n-api.md$/: doc, node-api
# quic
/^doc\/api\/quic.md$/: doc, quic, dont-land-on-v14.x, dont-land-on-v12.x
/^doc\/api\/quic.md$/: doc, quic, dont-land-on-v14.x
# Add worker label to PRs that affect doc/api/worker_threads.md
/^doc\/api\/worker_threads.md$/: doc, worker
# test runner documentation
/^doc\/api\/test.md$/: doc, test_runner, dont-land-on-v14.x
# Automatically tag JS subsystem-specific API doc changes
/^doc\/api\/(\w+)\.md$/: doc, $1
# Add deprecations label to PRs that affect doc/api/deprecations.md
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:

workflow_dispatch:

permissions:
contents: read

jobs:
authors_update:
if: github.repository == 'nodejs/node'
Expand All @@ -16,7 +19,7 @@ jobs:
fetch-depth: '0' # This is required to actually get all the authors
persist-credentials: false
- run: tools/update-authors.mjs # Run the AUTHORS tool
- uses: gr2m/create-or-update-pull-request-action@6720400cad8e74d7adc64640e4e6ea6748b83d8f
- uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5
# Creates a PR or update the Action's existing PR, or
# no-op if the base branch is already up-to-date.
env:
Expand All @@ -27,6 +30,9 @@ jobs:
Here are some new additions to the AUTHORS file.
This is an automatically generated PR by the
`authors.yml` GitHub Action, which runs `tools/update-authors.mjs`.
Check the output of
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
for possible duplicates.
branch: actions/authors-update # Custom branch *just* for this Action.
commit-message: 'meta: update AUTHORS'
labels: meta
Expand Down
Loading

0 comments on commit 9c2ceb6

Please sign in to comment.