Skip to content

Commit

Permalink
Merge branch 'nodejs:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
buzzlightyear726 authored Feb 19, 2023
2 parents 1246bd6 + 225c578 commit e0c7fb1
Show file tree
Hide file tree
Showing 4,003 changed files with 191,460 additions and 117,891 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 .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ module.exports = {
// 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',
Expand Down
42 changes: 29 additions & 13 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 @@ -113,10 +119,20 @@
/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
5 changes: 4 additions & 1 deletion .github/workflows/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,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@dc1726cbf4dd3ce766af4ec29cfb660e0125e8ee
- 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 @@ -30,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
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
if: github.event.pull_request.draft == false
strategy:
matrix:
windows: [windows-2019]
windows: [windows-2019, windows-2022]
fail-fast: false
runs-on: ${{ matrix.windows }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close-stale-feature-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
if: github.repository == 'nodejs/node'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
- uses: actions/stale@v7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 180
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close-stalled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: github.repository == 'nodejs/node'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
- uses: actions/stale@v7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-close: 30
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/coverage-linux-without-intl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Coverage Linux (without intl)

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '**.md'
- benchmark/**
- deps/**
- doc/**
- .github/**
- '!.github/workflows/coverage-linux-without-intl.yml'
push:
branches:
- main
paths-ignore:
- '**.md'
- benchmark/**
- deps/**
- doc/**
- .github/**
- '!.github/workflows/coverage-linux-without-intl.yml'

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

env:
PYTHON_VERSION: '3.11'
FLAKY_TESTS: keep_retrying

permissions:
contents: read

jobs:
coverage-linux-without-intl:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Install gcovr
run: pip install gcovr==4.2
- name: Build
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
# The cause is most likely coverage's use of the inspector.
- name: Test
run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j2 V=1 TEST_CI_ARGS="-p dots --measure-flakiness 9" || exit 0
- name: Report JS
run: npx c8 report --check-coverage
env:
NODE_OPTIONS: --max-old-space-size=8192
- name: Report C++
run: cd out && gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r Release/obj.target --xml -o ../coverage/coverage-cxx.xml --root=$(cd ../ && pwd)
# Clean temporary output from gcov and c8, so that it's not uploaded:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out
- name: Upload
uses: codecov/codecov-action@v3
with:
directory: ./coverage
2 changes: 1 addition & 1 deletion .github/workflows/coverage-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ permissions:
jobs:
coverage-windows:
if: github.event.pull_request.draft == false
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
Expand Down
114 changes: 114 additions & 0 deletions .github/workflows/daily-wpt-fyi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# This workflow runs every night and tests various releases of Node.js
# (latest nightly, current, and two latest LTS release lines) against the
# `epochs/daily` branch of WPT.

name: Daily WPT report

on:
workflow_dispatch:
inputs:
node-versions:
description: Node.js versions (as supported by actions/setup-node) to test as JSON array
required: false
default: '["current", "lts/*", "lts/-1"]'
schedule:
# This is 20 minutes after `epochs/daily` branch is triggered to be created
# in WPT repo.
# https://github.com/web-platform-tests/wpt/blob/master/.github/workflows/epochs.yml
- cron: 30 0 * * *

env:
PYTHON_VERSION: '3.11'

permissions:
contents: read

jobs:
report:
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
strategy:
matrix:
node-version: ${{ fromJSON(github.event.inputs.node-versions || '["latest-nightly", "current", "lts/*", "lts/-1"]') }}
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo

# install a version and checkout
- name: Get latest nightly
if: matrix.node-version == 'latest-nightly'
run: echo "NIGHTLY=$(curl -s https://nodejs.org/download/nightly/index.json | jq -r '.[0].version')" >> $GITHUB_ENV
- name: Install Node.js
id: setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NIGHTLY || matrix.node-version }}
- name: Get nightly ref
if: contains(matrix.node-version, 'nightly')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
SHORT_SHA=$(node -p 'process.version.split(/-nightly\d{8}/)[1]')
echo "NIGHTLY_REF=$(gh api /repos/nodejs/node/commits/$SHORT_SHA --jq '.sha')" >> $GITHUB_ENV
- name: Checkout ${{ steps.setup-node.outputs.node-version }}
uses: actions/checkout@v3
with:
persist-credentials: false
ref: ${{ env.NIGHTLY_REF || steps.setup-node.outputs.node-version }}
- name: Set env.NODE
run: echo "NODE=$(which node)" >> $GITHUB_ENV
- name: Set env.WPT_DAILY_REF
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "WPT_DAILY_REF=$(gh api /repos/web-platform-tests/wpt/branches/epochs/daily --jq '.commit.sha')" >> $GITHUB_ENV

# replace checked out WPT with the synchronized branch
- name: Remove stale WPT
run: rm -rf wpt
working-directory: test/fixtures
- name: Checkout epochs/daily WPT
uses: actions/checkout@v3
with:
repository: web-platform-tests/wpt
persist-credentials: false
path: test/fixtures/wpt
clean: false
ref: ${{ env.WPT_DAILY_REF }}
- name: Set env.WPT_REVISION
run: echo "WPT_REVISION=$(git rev-parse HEAD)" >> $GITHUB_ENV
working-directory: test/fixtures/wpt

- name: Run WPT and generate report
run: make test-wpt-report || true
- name: Clone report for upload
run: |
if [ -e out/wpt/wptreport.json ]; then
cd out/wpt
cp wptreport.json wptreport-${{ steps.setup-node.outputs.node-version }}.json
fi
- name: Upload GitHub Actions artifact
uses: actions/upload-artifact@v3
with:
path: out/wpt/wptreport-*.json
name: WPT Reports
if-no-files-found: warn
- name: Upload WPT Report to wpt.fyi API
env:
WPT_FYI_ENDPOINT: ${{ vars.WPT_FYI_ENDPOINT }}
WPT_FYI_USERNAME: ${{ vars.WPT_FYI_USERNAME }}
WPT_FYI_PASSWORD: ${{ secrets.WPT_FYI_PASSWORD }}
run: |
if [ -e out/wpt/wptreport.json ]; then
cd out/wpt
gzip wptreport.json
curl \
-u "$WPT_FYI_USERNAME:$WPT_FYI_PASSWORD" \
-F "result_file=@wptreport.json.gz" \
-F "labels=master" \
$WPT_FYI_ENDPOINT
fi
2 changes: 1 addition & 1 deletion .github/workflows/find-inactive-collaborators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: tools/find-inactive-collaborators.mjs

- name: Open pull request
uses: gr2m/create-or-update-pull-request-action@dc1726cbf4dd3ce766af4ec29cfb660e0125e8ee
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 Down
2 changes: 1 addition & 1 deletion .github/workflows/find-inactive-tsc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: tools/find-inactive-tsc.mjs >> $GITHUB_ENV

- name: Open pull request
uses: gr2m/create-or-update-pull-request-action@dc1726cbf4dd3ce766af4ec29cfb660e0125e8ee
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 Down
2 changes: 1 addition & 1 deletion .github/workflows/license-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
persist-credentials: false
- run: ./tools/license-builder.sh # Run the license builder tool
- uses: gr2m/create-or-update-pull-request-action@dc1726cbf4dd3ce766af4ec29cfb660e0125e8ee
- 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 Down
2 changes: 1 addition & 1 deletion .github/workflows/timezone-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: echo "${{ env.new_version }}" > test/fixtures/tz-version.txt

- name: Open Pull Request
uses: gr2m/create-or-update-pull-request-action@dc1726cbf4dd3ce766af4ec29cfb660e0125e8ee # Create a PR or update the Action's existing PR
uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5 # Create a PR or update the Action's existing PR
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
with:
Expand Down
Loading

0 comments on commit e0c7fb1

Please sign in to comment.