Skip to content

Commit

Permalink
Merge branch 'nodejs:master' into async
Browse files Browse the repository at this point in the history
  • Loading branch information
meekdenzo authored May 28, 2022
2 parents f4d96d6 + 0818b52 commit 2c2c0fe
Show file tree
Hide file tree
Showing 8,062 changed files with 342,826 additions and 571,462 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 @@ -7,4 +7,5 @@ tools/icu
tools/lint-md/lint-md.mjs
benchmark/tmp
doc/**/*.js
!doc/api_assets/*.js
!.eslintrc.js
57 changes: 29 additions & 28 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Module._findPath = (request, paths, isMain) => {

module.exports = {
root: true,
env: {
es2022: true,
},
extends: ['eslint:recommended', 'plugin:jsdoc/recommended'],
plugins: ['jsdoc', 'markdown', 'node-core'],
parser: '@babel/eslint-parser',
Expand Down Expand Up @@ -163,7 +166,7 @@ module.exports = {
'keyword-spacing': 'error',
'linebreak-style': ['error', 'unix'],
'max-len': ['error', {
code: 80,
code: 120,
ignorePattern: '^// Flags:',
ignoreRegExpLiterals: true,
ignoreTemplateLiterals: true,
Expand All @@ -186,7 +189,6 @@ module.exports = {
'no-proto': 'error',
'no-redeclare': ['error', { 'builtinGlobals': false }],
'no-restricted-modules': ['error', 'sys'],
/* eslint-disable max-len */
'no-restricted-properties': [
'error',
{
Expand Down Expand Up @@ -239,7 +241,6 @@ module.exports = {
message: 'Use Number.isNaN() instead of the global isNaN() function.',
},
],
/* eslint-enable max-len */
'no-return-await': 'error',
'no-self-compare': 'error',
'no-tabs': 'error',
Expand All @@ -259,6 +260,7 @@ module.exports = {
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-useless-return': 'error',
'no-var': 'error',
'no-void': 'error',
'no-whitespace-before-property': 'error',
'object-curly-newline': 'error',
Expand Down Expand Up @@ -297,10 +299,7 @@ module.exports = {
'valid-typeof': ['error', { requireStringLiterals: true }],

// ESLint recommended rules that we disable
'no-cond-assign': 'off',
'no-empty': 'off',
'no-inner-declarations': 'off',
'no-prototype-builtins': 'off',

// JSDoc recommended rules that we disable
'jsdoc/require-jsdoc': 'off',
Expand All @@ -319,27 +318,29 @@ module.exports = {
'node-core/no-duplicate-requires': 'error',
},
globals: {
AbortController: 'readable',
AbortSignal: 'readable',
Atomics: 'readable',
BigInt: 'readable',
BigInt64Array: 'readable',
BigUint64Array: 'readable',
Blob: 'readable',
DOMException: 'readable',
Event: 'readable',
EventTarget: 'readable',
MessageChannel: 'readable',
BroadcastChannel: 'readable',
MessageEvent: 'readable',
MessagePort: 'readable',
TextEncoder: 'readable',
TextDecoder: 'readable',
queueMicrotask: 'readable',
globalThis: 'readable',
btoa: 'readable',
atob: 'readable',
performance: 'readable',
structuredClone: 'readable',
ByteLengthQueuingStrategy: 'readable',
CompressionStream: 'readable',
CountQueuingStrategy: 'readable',
Crypto: 'readable',
CryptoKey: 'readable',
DecompressionStream: 'readable',
fetch: 'readable',
FormData: 'readable',
ReadableStream: 'readable',
ReadableStreamDefaultReader: 'readable',
ReadableStreamBYOBReader: 'readable',
ReadableStreamBYOBRequest: 'readable',
ReadableByteStreamController: 'readable',
ReadableStreamDefaultController: 'readable',
Response: 'readable',
TextDecoderStream: 'readable',
TextEncoderStream: 'readable',
TransformStream: 'readable',
TransformStreamDefaultController: 'readable',
ShadowRealm: 'readable',
SubtleCrypto: 'readable',
WritableStream: 'readable',
WritableStreamDefaultWriter: 'readable',
WritableStreamDefaultController: 'readable',
},
};
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@

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

# V8
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "\U0001F41B Bug report"
name: 🐛 Bug report
description: Create a report to help us improve
body:
- type: markdown
Expand Down
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/2-feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: "\U0001F680 Feature request"
name: 🚀 Feature request
description: Suggest an idea for this project
labels: ["feature request"]
labels: [feature request]
body:
- type: markdown
attributes:
value: |
Thank you for suggesting an idea to make Node.js better.
Please fill in as much of the following form as you're able.
For more information on how the project manages feature
requests, see [Feature request management](https://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md).
- type: textarea
attributes:
label: What is the problem this feature will solve?
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/3-api-ref-docs-problem.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "\U0001F4D7 Open an issue regarding the Node.js API reference docs"
name: 📗 Open an issue regarding the Node.js API reference docs
description: Let us know about any problematic API reference documents
labels: ["doc"]
labels: [doc]
body:
- type: markdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/4-report-a-flaky-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Report a flaky test
description: Report a flaky test in our CI
labels: ["flaky-test"]
labels: [flaky-test]
body:
- type: markdown
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/label-pr-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ subSystemLabels:
/^tools\/make-v8/: tools, v8 engine, needs-ci
/^tools\/v8_gypfiles/: tools, v8 engine, needs-ci
/^tools\/(code_cache|snapshot)/: needs-ci
/^tools\/build-addons.js/: needs-ci
/^tools\/build-addons.mjs/: needs-ci
# all other tool changes should be marked as such
/^tools\//: tools
/^\.eslint|\.remark|\.editorconfig/: tools
Expand All @@ -85,7 +85,7 @@ subSystemLabels:
/^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\/([^/]+)/: $1
/^deps\/([^/]+)/: dependencies, $1

## JS subsystems
# Oddities first
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/authors.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: "authors update"
name: Authors update
on:
schedule:
# Run once a week at 00:05 AM UTC on Sunday.
- cron: '5 0 * * 0'
- cron: 5 0 * * 0

workflow_dispatch:

Expand All @@ -11,11 +11,11 @@ jobs:
if: github.repository == 'nodejs/node'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: '0' # This is required to actually get all the authors
persist-credentials: false
- run: "tools/update-authors.js" # Run the AUTHORS tool
- run: tools/update-authors.mjs # Run the AUTHORS tool
- uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
Expand All @@ -24,8 +24,8 @@ jobs:
body: >
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.js`.
branch: "actions/authors-update" # Custom branch *just* for this Action.
commit-message: "meta: update AUTHORS"
`authors.yml` GitHub Action, which runs `tools/update-authors.mjs`.
branch: actions/authors-update # Custom branch *just* for this Action.
commit-message: 'meta: update AUTHORS'
labels: meta
title: "meta: update AUTHORS"
title: 'meta: update AUTHORS'
20 changes: 11 additions & 9 deletions .github/workflows/auto-start-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ on:
# optimistic, it can take longer to run.
# To understand why `schedule` is used instead of other events, refer to
# ./doc/contributing/commit-queue.md
- cron: "*/5 * * * *"
- cron: '*/5 * * * *'

concurrency: ${{ github.workflow }}

env:
NODE_VERSION: lts/*

jobs:
get_prs_for_ci:
get-prs-for-ci:
if: github.repository == 'nodejs/node'
runs-on: ubuntu-latest
outputs:
Expand All @@ -29,20 +31,20 @@ jobs:
--limit 100
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
startCI:
needs: get_prs_for_ci
if: needs.get_prs_for_ci.outputs.numbers != ''
start-ci:
needs: get-prs-for-ci
if: needs.get-prs-for-ci.outputs.numbers != ''
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false

# Install dependencies
- name: Install Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install node-core-utils
run: npm install -g node-core-utils

Expand All @@ -55,6 +57,6 @@ jobs:
ncu-config set repo "$(echo ${{ github.repository }} | cut -d/ -f2)"
- name: Start the CI
run: ./tools/actions/start-ci.sh ${{ needs.get_prs_for_ci.outputs.numbers }}
run: ./tools/actions/start-ci.sh ${{ needs.get-prs-for-ci.outputs.numbers }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 17 additions & 16 deletions .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '.mailmap'
- .mailmap
- '**.md'
- 'AUTHORS'
- 'doc/**'
- AUTHORS
- doc/**
- .github/**
- '!.github/workflows/build-tarball.yml'
push:
Expand All @@ -17,28 +17,31 @@ on:
- v[0-9]+.x-staging
- v[0-9]+.x
paths-ignore:
- '.mailmap'
- .mailmap
- '**.md'
- 'AUTHORS'
- 'doc/**'
- AUTHORS
- doc/**
- .github/**
- '!.github/workflows/build-tarball.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
PYTHON_VERSION: '3.10'
FLAKY_TESTS: dontcare

jobs:
build-tarball:
if: github.event.pull_request.draft == false
env:
PYTHON_VERSION: '3.10'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
Expand All @@ -52,27 +55,25 @@ jobs:
mkdir tarballs
mv *.tar.gz tarballs
- name: Upload tarball artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: tarballs
path: tarballs
test-tarball-linux:
env:
PYTHON_VERSION: '3.10'
needs: build-tarball
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Download tarball
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: tarballs
path: tarballs
Expand Down
Loading

0 comments on commit 2c2c0fe

Please sign in to comment.