Skip to content

Commit 56c1b7c

Browse files
authored
Merge branch 'main' into chore/deprecate-fs-existSync-never-throw
2 parents 2cedeac + 91c6b8a commit 56c1b7c

File tree

1,219 files changed

+93617
-65953
lines changed

Some content is hidden

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

1,219 files changed

+93617
-65953
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
# Actions
144144

145145
/.github/workflows/* @nodejs/actions
146+
/.github/workflows/create-release-proposal.yml @nodejs/releasers
146147
/tools/actions/* @nodejs/actions
147148

148149
# Test runner

.github/label-pr-config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ exlusiveLabels:
125125
/^test\/es-module\//: test, esm
126126
/^test\/fixtures\/wpt\/streams\//: test, web streams
127127
/^test\/fixtures\/typescript/: test, strip-types
128+
/^test\/module-hooks\//: test, module, loaders
129+
/^test\/fixtures/module-hooks\//: test, module, loaders
128130

129131
/^test\//: test
130132

+17-21
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# This action requires the following secrets to be set on the repository:
2-
# GH_USER_NAME: GitHub user whose Jenkins and GitHub token are defined below
32
# GH_USER_TOKEN: GitHub user token, to be used by ncu and to push changes
4-
# JENKINS_TOKEN: Jenkins token, to be used to check CI status
53

64
name: Create Release Proposal
75

@@ -11,12 +9,10 @@ on:
119
release-line:
1210
required: true
1311
type: number
14-
default: 23
1512
description: 'The release line (without dots or prefix). e.g: 22'
1613
release-date:
1714
required: true
1815
type: string
19-
default: YYYY-MM-DD
2016
description: The release date in YYYY-MM-DD format
2117

2218
concurrency: ${{ github.workflow }}
@@ -26,6 +22,7 @@ env:
2622

2723
permissions:
2824
contents: write
25+
pull-requests: write
2926

3027
jobs:
3128
releasePrepare:
@@ -36,16 +33,14 @@ jobs:
3633
RELEASE_LINE: ${{ inputs.release-line }}
3734
runs-on: ubuntu-latest
3835
steps:
39-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
36+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4037
with:
4138
ref: ${{ env.STAGING_BRANCH }}
42-
# Needs the whole git history for ncu to work
43-
# See https://github.com/nodejs/node-core-utils/pull/486
44-
fetch-depth: 0
39+
persist-credentials: false
4540

4641
# Install dependencies
4742
- name: Install Node.js
48-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
43+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
4944
with:
5045
node-version: ${{ env.NODE_VERSION }}
5146

@@ -56,31 +51,32 @@ jobs:
5651
run: |
5752
ncu-config set branch "${RELEASE_BRANCH}"
5853
ncu-config set upstream origin
59-
ncu-config set username "$USERNAME"
54+
ncu-config set username "$GITHUB_ACTOR"
6055
ncu-config set token "$GH_TOKEN"
61-
ncu-config set jenkins_token "$JENKINS_TOKEN"
6256
ncu-config set repo "$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)"
6357
ncu-config set owner "${GITHUB_REPOSITORY_OWNER}"
6458
env:
65-
USERNAME: ${{ secrets.JENKINS_USER }}
66-
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
67-
JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }}
59+
GH_TOKEN: ${{ github.token }}
6860

6961
- name: Set up ghauth config (Ubuntu)
7062
run: |
71-
mkdir -p ~/.config/changelog-maker/
72-
echo '{
73-
"user": "'$(ncu-config get username)'",
74-
"token": "'$(ncu-config get token)'"
75-
}' > ~/.config/changelog-maker/config.json
63+
mkdir -p "${XDG_CONFIG_HOME:-~/.config}/changelog-maker"
64+
echo '{}' | jq '{user: env.GITHUB_ACTOR, token: env.TOKEN}' > "${XDG_CONFIG_HOME:-~/.config}/changelog-maker/config.json"
65+
env:
66+
TOKEN: ${{ github.token }}
7667

7768
- name: Setup git author
7869
run: |
7970
git config --local user.email "[email protected]"
8071
git config --local user.name "Node.js GitHub Bot"
8172
8273
- name: Start git node release prepare
74+
# The curl command is to make sure we run the version of the script corresponding to the current workflow.
8375
run: |
84-
./tools/actions/create-release.sh "${RELEASE_DATE}" "${RELEASE_LINE}"
76+
git update-index --assume-unchanged tools/actions/create-release.sh
77+
curl -fsSLo tools/actions/create-release.sh https://github.com/${GITHUB_REPOSITORY}/raw/${GITHUB_SHA}/tools/actions/create-release.sh
78+
./tools/actions/create-release.sh "${RELEASE_DATE}" "${RELEASE_LINE}" "${GITHUB_ACTOR}"
8579
env:
86-
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
80+
GH_TOKEN: ${{ github.token }}
81+
# We want the bot to push the push the release commit so CI runs on it.
82+
BOT_TOKEN: ${{ secrets.GH_USER_TOKEN }}

.github/workflows/lint-release-proposal.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
PR_HEAD="$(gh pr view "$PR_URL" --json headRefOid -q .headRefOid)"
4444
echo "Head of $PR_URL: $PR_HEAD"
4545
echo "Current commit: $GITHUB_SHA"
46-
[[ "$PR_HEAD" == "$GITHUB_SHA" ]]
46+
[ "$PR_HEAD" = "$GITHUB_SHA" ]
4747
env:
4848
GH_TOKEN: ${{ github.token }}
4949
- name: Validate CHANGELOG
@@ -53,7 +53,10 @@ jobs:
5353
echo "Expected CHANGELOG section title: $EXPECTED_CHANGELOG_TITLE_INTRO"
5454
CHANGELOG_TITLE="$(grep "$EXPECTED_CHANGELOG_TITLE_INTRO" "doc/changelogs/CHANGELOG_V${COMMIT_SUBJECT:20:2}.md")"
5555
echo "Actual: $CHANGELOG_TITLE"
56-
[[ "${CHANGELOG_TITLE%@*}@" == "$EXPECTED_CHANGELOG_TITLE_INTRO" ]]
56+
[ "${CHANGELOG_TITLE%%@*}@" = "$EXPECTED_CHANGELOG_TITLE_INTRO" ]
5757
- name: Verify NODE_VERSION_IS_RELEASE bit is correctly set
5858
run: |
5959
grep -q '^#define NODE_VERSION_IS_RELEASE 1$' src/node_version.h
60+
- name: Check for placeholders in documentation
61+
run: |
62+
! grep "REPLACEME" doc/api/*.md

.github/workflows/major-release.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Major Release
2+
3+
on:
4+
schedule:
5+
- cron: 0 0 15 2,8 * # runs at midnight UTC every 15 February and 15 August
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
create-issue:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
steps:
16+
- name: Check for release schedule
17+
id: check-date
18+
run: |
19+
# Get the current month and day
20+
MONTH=$(date +'%m')
21+
DAY=$(date +'%d')
22+
# We'll create the reminder issue two months prior the release
23+
if [[ "$MONTH" == "02" || "$MONTH" == "08" ]] && [[ "$DAY" == "15" ]]; then
24+
echo "create_issue=true" >> "$GITHUB_ENV"
25+
fi
26+
- name: Retrieve next major release info from nodejs/Release
27+
if: env.create_issue == 'true'
28+
run: |
29+
curl -L https://github.com/nodejs/Release/raw/HEAD/schedule.json | \
30+
jq -r 'to_entries | map(select(.value.start | strptime("%Y-%m-%d") | mktime > now)) | first | "VERSION=" + .key + "\nRELEASE_DATE=" + .value.start' >> "$GITHUB_ENV"
31+
- name: Compute max date for landing semver-major PRs
32+
if: env.create_issue == 'true'
33+
run: |
34+
echo "PR_MAX_DATE=$(date -d "$RELEASE_DATE -1 month" +%Y-%m-%d)" >> "$GITHUB_ENV"
35+
- name: Create release announcement issue
36+
if: env.create_issue == 'true'
37+
run: |
38+
gh issue create --repo "${GITHUB_REPOSITORY}" \
39+
--title "Upcoming Node.js Major Release ($VERSION)" \
40+
--body-file -<<EOF
41+
A reminder that the next Node.js **SemVer Major release** is scheduled for **${RELEASE_DATE}**.
42+
All commits that were landed until **${PR_MAX_DATE}** (one month prior to the release) will be included in the next semver major release. Please ensure that any necessary preparations are made in advance.
43+
For more details on the release process, consult the [Node.js Release Working Group repository](https://github.com/nodejs/release).
44+
45+
cc: @nodejs/collaborators
46+
EOF
47+
env:
48+
GH_TOKEN: ${{ github.token }}

.github/workflows/scorecard.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
steps:
3535
- name: Harden Runner
36-
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
36+
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
3737
with:
3838
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
3939

@@ -73,6 +73,6 @@ jobs:
7373

7474
# Upload the results to GitHub's code scanning dashboard.
7575
- name: Upload to code-scanning
76-
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
76+
uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
7777
with:
7878
sarif_file: results.sarif

.github/workflows/test-macos.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ permissions:
3838
jobs:
3939
test-macOS:
4040
if: github.event.pull_request.draft == false
41-
runs-on: macos-14
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
macos-version: [macos-13, macos-14]
45+
runs-on: ${{ matrix.macos-version }}
4246
env:
4347
CC: sccache gcc
4448
CXX: sccache g++

.github/workflows/tools.yml

+10-13
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727
- gyp-next
2828
- histogram
2929
- icu
30-
# - libuv
30+
- libuv
3131
- llhttp
3232
- minimatch
3333
- nbytes
@@ -51,7 +51,7 @@ permissions:
5151

5252
jobs:
5353
tools-deps-update:
54-
if: github.repository == 'nodejs/node'
54+
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
5555
runs-on: ubuntu-latest
5656
strategy:
5757
fail-fast: false # Prevent other jobs from aborting if one fails
@@ -175,17 +175,14 @@ jobs:
175175
cat temp-output
176176
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
177177
rm temp-output
178-
# libuv update was disabled because of Feb 14, 2024 security release
179-
# modified the bundled version of libuv, we cannot automatically update
180-
# libuv without potentially undoing those changes.
181-
# - id: libuv
182-
# subsystem: deps
183-
# label: dependencies
184-
# run: |
185-
# ./tools/dep_updaters/update-libuv.sh > temp-output
186-
# cat temp-output
187-
# tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
188-
# rm temp-output
178+
- id: libuv
179+
subsystem: deps
180+
label: dependencies
181+
run: |
182+
./tools/dep_updaters/update-libuv.sh > temp-output
183+
cat temp-output
184+
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
185+
rm temp-output
189186
- id: llhttp
190187
subsystem: deps
191188
label: dependencies

.github/workflows/update-wpt.yml

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: WPT update
2+
3+
on:
4+
schedule:
5+
# Run once a week at 12:00 AM UTC on Sunday.
6+
- cron: 0 0 * * *
7+
workflow_dispatch:
8+
inputs:
9+
subsystems:
10+
description: Subsystem to run the update for
11+
required: false
12+
default: '["url", "WebCryptoAPI"]'
13+
14+
permissions:
15+
contents: read
16+
17+
env:
18+
NODE_VERSION: lts/*
19+
20+
jobs:
21+
wpt-subsystem-update:
22+
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
23+
runs-on: ubuntu-latest
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
subsystem: ${{ fromJSON(github.event.inputs.subsystems || '["url", "WebCryptoAPI"]') }}
28+
29+
steps:
30+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
with:
32+
persist-credentials: false
33+
34+
- name: Install Node.js
35+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
36+
with:
37+
node-version: ${{ env.NODE_VERSION }}
38+
39+
- name: Install @node-core/utils
40+
run: npm install -g @node-core/utils
41+
42+
- name: Setup @node-core/utils
43+
run: |
44+
ncu-config set username "$USERNAME"
45+
ncu-config set token "$GH_TOKEN"
46+
ncu-config set owner "${GITHUB_REPOSITORY_OWNER}"
47+
ncu-config set repo "$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)"
48+
env:
49+
USERNAME: ${{ secrets.JENKINS_USER }}
50+
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
51+
52+
- name: Update WPT for subsystem ${{ matrix.subsystem }}
53+
run: |
54+
git node wpt "$SUBSYSTEM"
55+
env:
56+
SUBSYSTEM: ${{ matrix.subsystem }}
57+
58+
- name: Retrieve new version commit
59+
run: |
60+
new_version="$(
61+
node -p 'require("./test/fixtures/wpt/versions.json")[process.argv[1]].commit' "$SUBSYSTEM"
62+
)"
63+
{
64+
echo "long_version=$new_version"
65+
echo "short_version=${new_version:0:10}"
66+
} >> "$GITHUB_ENV"
67+
env:
68+
SUBSYSTEM: ${{ matrix.subsystem }}
69+
70+
- name: Open or update PR for the subsystem update
71+
uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5
72+
with:
73+
branch: actions/update-wpt-${{ matrix.subsystem }}
74+
author: Node.js GitHub Bot <[email protected]>
75+
title: 'test: update WPT for ${{ matrix.subsystem }} to ${{ env.short_version }}'
76+
commit-message: 'test: update WPT for ${{ matrix.subsystem }} to ${{ env.short_version }}'
77+
labels: test
78+
update-pull-request-title-and-body: true
79+
body: >
80+
This is an automated update of the WPT for ${{ matrix.subsystem }} to
81+
https://github.com/web-platform-tests/wpt/commit/${{ env.long_version }}.
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}

BUILDING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ Binaries at <https://nodejs.org/download/release/> are produced on:
162162
| Binary package | Platform and Toolchain |
163163
| ----------------------- | ------------------------------------------------------------------------------------------------------------- |
164164
| aix-ppc64 | AIX 7.2 TL04 on PPC64BE with GCC 12[^5] |
165-
| darwin-x64 | macOS 11, Xcode 13 with -mmacosx-version-min=11.0 |
166-
| darwin-arm64 (and .pkg) | macOS 11 (arm64), Xcode 13 with -mmacosx-version-min=11.0 |
165+
| darwin-x64 | macOS 13, Xcode 16 with -mmacosx-version-min=11.0 |
166+
| darwin-arm64 (and .pkg) | macOS 13 (arm64), Xcode 14 with -mmacosx-version-min=11.0 |
167167
| linux-arm64 | RHEL 8 with gcc-toolset-12[^6] |
168168
| linux-armv7l | Cross-compiled on RHEL 9 x64 with a [custom GCC toolchain](https://github.com/rvagg/rpi-newer-crosstools)[^7] |
169169
| linux-ppc64le | RHEL 8 with gcc-toolset-12[^6] |
@@ -683,7 +683,7 @@ easily. These files will install the following
683683
To install Node.js prerequisites from Powershell Terminal:
684684

685685
```powershell
686-
winget configure .\configuration.dsc.yaml
686+
winget configure .\configurations\configuration.dsc.yaml
687687
```
688688

689689
Alternatively, you can use [Dev Home](https://learn.microsoft.com/en-us/windows/dev-home/)

CHANGELOG.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,16 @@ release.
3939
</tr>
4040
<tr>
4141
<td valign="top">
42-
<b><a href="doc/changelogs/CHANGELOG_V23.md#23.3.0">23.3.0</a></b><br/>
42+
<b><a href="doc/changelogs/CHANGELOG_V23.md#23.5.0">23.5.0</a></b><br/>
43+
<a href="doc/changelogs/CHANGELOG_V23.md#23.4.0">23.4.0</a><br/>
44+
<a href="doc/changelogs/CHANGELOG_V23.md#23.3.0">23.3.0</a><br/>
4345
<a href="doc/changelogs/CHANGELOG_V23.md#23.2.0">23.2.0</a><br/>
4446
<a href="doc/changelogs/CHANGELOG_V23.md#23.1.0">23.1.0</a><br/>
4547
<a href="doc/changelogs/CHANGELOG_V23.md#23.0.0">23.0.0</a><br/>
4648
</td>
4749
<td valign="top">
48-
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.11.0">22.11.0</a></b><br/>
50+
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.12.0">22.12.0</a></b><br/>
51+
<a href="doc/changelogs/CHANGELOG_V22.md#22.11.0">22.11.0</a><br/>
4952
<a href="doc/changelogs/CHANGELOG_V22.md#22.10.0">22.10.0</a><br/>
5053
<a href="doc/changelogs/CHANGELOG_V22.md#22.9.0">22.9.0</a><br/>
5154
<a href="doc/changelogs/CHANGELOG_V22.md#22.8.0">22.8.0</a><br/>

0 commit comments

Comments
 (0)