diff --git a/.eslintrc.js b/.eslintrc.js index 8279dfc9c4ab41..d9185356d15b06 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -43,6 +43,7 @@ module.exports = { { files: [ 'doc/api/esm.md', + 'doc/api/module.md', 'doc/api/modules.md', 'test/es-module/test-esm-type-flag.js', 'test/es-module/test-esm-type-flag-alias.js', diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 247b5c17b54805..0f5587af43be5d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,7 +5,24 @@ # 3. PRs touching any code with a codeowner must be signed off by at least one # person on the code owner team. +# tsc & commcomm + /.github/CODEOWNERS @nodejs/tsc +/GOVERNANCE.md @nodejs/tsc +/onboarding.md @nodejs/tsc +/CODE_OF_CONDUCT.md @nodejs/tsc @nodejs/community-committee +/CONTRIBUTING.md @nodejs/tsc @nodejs/community-committee +/LICENSE @nodejs/tsc @nodejs/community-committee +/doc/guides/contributing/code-of-conduct.md @nodejs/tsc @nodejs/community-committee +# TODO(mmarchini): the bot doens't have a notion of precedence, that might +# change when move the codeowners code to an Action, at which point we can +# uncomment the line below +# /doc/guides/contributing/*.md @nodejs/tsc +/doc/guides/contributing/issues.md @nodejs/tsc +/doc/guides/contributing/pull-requests.md @nodejs/tsc +/doc/guides/collaborator-guide.md @nodejs/tsc +/doc/guides/offboarding.md @nodejs/tsc +/doc/guides/onboarding-extras.md @nodejs/tsc # net @@ -21,7 +38,7 @@ /lib/internal/net.js @nodejs/net /lib/internal/socket_list.js @nodejs/net /lib/internal/js_stream_socket.js @nodejs/net -/src/cares_wrap.h @nodejs/net +/src/cares_wrap.cc @nodejs/net /src/connect_wrap.* @nodejs/net /src/connection_wrap.* @nodejs/net /src/node_sockaddr* @nodejs/net @@ -41,7 +58,6 @@ /deps/llhttp/* @nodejs/http @nodejs/net /doc/api/http.md @nodejs/http @nodejs/net -/doc/api/http2.md @nodejs/http @nodejs/net /lib/_http_* @nodejs/http @nodejs/net /lib/http.js @nodejs/http @nodejs/net /lib/https.js @nodejs/crypto @nodejs/net @nodejs/http @@ -51,7 +67,7 @@ # http2 /deps/nghttp2/* @nodejs/http2 @nodejs/net -/doc/api/http2.md @nodejs/http2 @nodejs/net +/doc/api/http2.md @nodejs/http2 @nodejs/http @nodejs/net /lib/http2.js @nodejs/http2 @nodejs/net /lib/internal/http2/* @nodejs/http2 @nodejs/net /src/node_http2* @nodejs/http2 @nodejs/net diff --git a/.github/workflows/auto-start-ci.yml b/.github/workflows/auto-start-ci.yml index 0bc9e7c1c65fc2..cb9318ab4ade9f 100644 --- a/.github/workflows/auto-start-ci.yml +++ b/.github/workflows/auto-start-ci.yml @@ -3,12 +3,10 @@ name: Auto Start CI on: schedule: - # `schedule` event is used instead of `pull_request` because when a - # `pull_requesst` event is triggered on a PR from a fork, GITHUB_TOKEN will - # be read-only, and the Action won't have access to any other repository - # secrets, which it needs to access Jenkins API. Runs every five minutes - # (fastest the scheduler can run). Five minutes is optimistic, it can take - # longer to run. + # Runs every five minutes (fastest the scheduler can run). Five minutes is + # optimistic, it can take longer to run. + # To understand why `schedule` is used instead of other events, refer to + # ./doc/guides/commit-queue.md - cron: "*/5 * * * *" jobs: diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml new file mode 100644 index 00000000000000..9db520d5c35a59 --- /dev/null +++ b/.github/workflows/commit-queue.yml @@ -0,0 +1,81 @@ +--- +# This action requires the following secrets to be set on the repository: +# GH_USER_NAME: GitHub user whose Jenkins and GitHub token are defined below +# GH_USER_TOKEN: GitHub user token, to be used by ncu and to push changes +# JENKINS_TOKEN: Jenkins token, to be used to check CI status + +name: Commit Queue + +on: + # `schedule` event is used instead of `pull_request` because when a + # `pull_request` event is triggered on a PR from a fork, GITHUB_TOKEN will + # be read-only, and the Action won't have access to any other repository + # secrets, which it needs to access Jenkins API. + schedule: + - cron: "*/5 * * * *" + +jobs: + commitQueue: + if: github.repository == 'nodejs/node' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + # A personal token is required because pushing with GITHUB_TOKEN will + # prevent commits from running CI after they land on master. It needs + # to be set here because `checkout` configures GitHub authentication + # for push as well. + token: ${{ secrets.GH_USER_TOKEN }} + + # Install dependencies + - name: Install Node.js + uses: actions/setup-node@v2-beta + with: + node-version: '12' + - name: Install dependencies + run: | + sudo apt-get install jq -y + # TODO(mmarchini): install from npm after next ncu release is out + npm install -g 'https://github.com/mmarchini/node-core-utils#commit-queue-branch' + # npm install -g node-core-utils + + - name: Set variables + run: | + echo "::set-env name=REPOSITORY::$(echo ${{ github.repository }} | cut -d/ -f2)" + echo "::set-env name=OWNER::${{ github.repository_owner }}" + + - name: Get Pull Requests + uses: octokit/graphql-action@v2.x + id: get_mergable_pull_requests + with: + query: | + query release($owner:String!,$repo:String!, $base_ref:String!) { + repository(owner:$owner, name:$repo) { + pullRequests(baseRefName: $base_ref, labels: ["commit-queue"], states: OPEN, last: 100) { + nodes { + number + } + } + } + } + owner: ${{ env.OWNER }} + repo: ${{ env.REPOSITORY }} + # Commit queue is only enabled for the default branch on the repository + # TODO(mmarchini): get the default branch programmatically instead of + # assuming `master` + base_ref: "master" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Configure node-core-utils + run: | + ncu-config set branch master + ncu-config set upstream origin + ncu-config set username "${{ secrets.GH_USER_NAME }}" + ncu-config set token "${{ secrets.GH_USER_TOKEN }}" + ncu-config set jenkins_token "${{ secrets.JENKINS_TOKEN }}" + ncu-config set repo "${{ env.REPOSITORY }}" + ncu-config set owner "${{ env.OWNER }}" + + - name: Start the commit queue + run: ./tools/actions/commit-queue.sh ${{ env.OWNER }} ${{ env.REPOSITORY }} ${{ secrets.GITHUB_TOKEN }} $(echo '${{ steps.get_mergable_pull_requests.outputs.data }}' | jq '.repository.pullRequests.nodes | map(.number) | .[]') diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 2a9a722e9c0bfc..3cd4def9f986bc 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -77,3 +77,11 @@ jobs: run: | make lint-py-build || true NODE=$(which node) make lint-py + + lint-codeowners: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: mszostok/codeowners-validator@v0.4.0 + with: + checks: "files,duppatterns" diff --git a/.github/workflows/misc.yml b/.github/workflows/misc.yml index 403a47614f8005..df33822770523b 100644 --- a/.github/workflows/misc.yml +++ b/.github/workflows/misc.yml @@ -28,3 +28,5 @@ jobs: with: name: docs path: out/doc + - name: Check links + run: node tools/doc/checkLinks.js . diff --git a/.gitignore b/.gitignore index 5b07ec4a8e3cdc..75039956cb18b1 100644 --- a/.gitignore +++ b/.gitignore @@ -130,6 +130,9 @@ _UpgradeReport_Files/ # Ignore dependencies fetched by deps/v8/tools/node/fetch_deps.py /deps/.cipd +# === Rules for Windows vcbuild.bat === +/temp-vcbuild + # === Global Rules === # Keep last to avoid being excluded *.pyc diff --git a/BUILDING.md b/BUILDING.md index 9c8b868e6323d5..45e7f7dda3e6b5 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -110,7 +110,7 @@ platforms. This is true regardless of entries in the table below. | Windows | x64, x86 (WoW64) | >= Windows 8.1/2012 R2 | Tier 1 | [4](#fn4),[5](#fn5) | | Windows | x86 (native) | >= Windows 8.1/2012 R2 | Tier 1 (running) / Experimental (compiling) [6](#fn6) | | | Windows | x64, x86 | Windows Server 2012 (not R2) | Experimental | | -| Windows | arm64 | >= Windows 10 | Experimental | | +| Windows | arm64 | >= Windows 10 | Tier 2 (compiling) / Experimental (running) | | | macOS | x64 | >= 10.11 | Tier 1 | | | SmartOS | x64 | >= 18 | Tier 2 | | | AIX | ppc64be >=power7 | >= 7.2 TL02 | Tier 2 | | @@ -237,7 +237,7 @@ test with Python 3. * GNU Make 3.81 or newer * Python (see note above) * Python 2.7 - * Python 3.5, 3.6, 3.7, and 3.8. + * Python 3.5, 3.6, 3.7, and 3.8 Installation via Linux package manager can be achieved with: @@ -256,7 +256,7 @@ Python 3 users may also need to install `python3-distutils`. * Xcode Command Line Tools >= 10 for macOS * Python (see note above) * Python 2.7 - * Python 3.5, 3.6, 3.7, and 3.8. + * Python 3.5, 3.6, 3.7, and 3.8 macOS users can install the `Xcode Command Line Tools` by running `xcode-select --install`. Alternatively, if you already have the full Xcode @@ -531,7 +531,7 @@ to run it again before invoking `make -j4`. [Visual Studio 2017 or 2019](https://visualstudio.microsoft.com/downloads/) or the "Visual C++ build tools" workload from the [Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019), - with the default optional components. + with the default optional components * Basic Unix tools required for some tests, [Git for Windows](https://git-scm.com/download/win) includes Git Bash and tools which can be included in the global `PATH`. @@ -545,12 +545,11 @@ Optional requirements to build the MSI installer package: * The [WiX Toolset v3.11](https://wixtoolset.org/releases/) and the [Wix Toolset Visual Studio 2017 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension) or the [Wix Toolset Visual Studio 2019 Extension](https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2019Extension). +* The [WiX Toolset v3.14](https://wixtoolset.org/releases/) if + building for Windows 10 on ARM (ARM64) Optional requirements for compiling for Windows 10 on ARM (ARM64): -* ARM64 Windows build machine - * Due to a GYP limitation, this is required to run compiled code - generation tools (like V8's builtins and mksnapshot tools) * Visual Studio 15.9.0 or newer * Visual Studio optional components * Visual C++ compilers and libraries for ARM64 @@ -565,7 +564,7 @@ This script will install the following [Chocolatey](https://chocolatey.org/) packages: * [Git for Windows](https://chocolatey.org/packages/git) with the `git` and - Unix tools added to the `PATH`. + Unix tools added to the `PATH` * [Python 3.x](https://chocolatey.org/packages/python) and [legacy Python](https://chocolatey.org/packages/python2) * [Visual Studio 2019 Build Tools](https://chocolatey.org/packages/visualstudio2019buildtools) diff --git a/CHANGELOG.md b/CHANGELOG.md index 446edd44508f3e..d6ce61803d1f25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,8 @@ release.