Skip to content

Commit f9c605c

Browse files
authored
Merge branch 'nodejs:main' into 55723
2 parents 62a5334 + 3fb2ea8 commit f9c605c

File tree

802 files changed

+18583
-25169
lines changed

Some content is hidden

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

802 files changed

+18583
-25169
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
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/workflows/coverage-linux-without-intl.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ jobs:
7979
- name: Clean tmp
8080
run: rm -rf coverage/tmp && rm -rf out
8181
- name: Upload
82-
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
82+
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
8383
with:
8484
directory: ./coverage
85-
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/coverage-linux.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ jobs:
7979
- name: Clean tmp
8080
run: rm -rf coverage/tmp && rm -rf out
8181
- name: Upload
82-
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
82+
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
8383
with:
8484
directory: ./coverage
85-
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/coverage-windows.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ jobs:
7171
- name: Clean tmp
7272
run: npx rimraf ./coverage/tmp
7373
- name: Upload
74-
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
74+
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
7575
with:
7676
directory: ./coverage
77-
token: ${{ secrets.CODECOV_TOKEN }}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# 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
3+
# 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
5+
6+
name: Create Release Proposal
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
release-line:
12+
required: true
13+
type: number
14+
description: 'The release line (without dots or prefix). e.g: 22'
15+
release-date:
16+
required: true
17+
type: string
18+
description: The release date in YYYY-MM-DD format
19+
20+
concurrency: ${{ github.workflow }}
21+
22+
env:
23+
NODE_VERSION: lts/*
24+
25+
permissions:
26+
contents: write
27+
28+
jobs:
29+
releasePrepare:
30+
env:
31+
STAGING_BRANCH: v${{ inputs.release-line }}.x-staging
32+
RELEASE_BRANCH: v${{ inputs.release-line }}.x
33+
RELEASE_DATE: ${{ inputs.release-date }}
34+
RELEASE_LINE: ${{ inputs.release-line }}
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
38+
with:
39+
ref: ${{ env.STAGING_BRANCH }}
40+
# Needs the whole git history for ncu to work
41+
# See https://github.com/nodejs/node-core-utils/pull/486
42+
fetch-depth: 0
43+
44+
# Install dependencies
45+
- name: Install Node.js
46+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
47+
with:
48+
node-version: ${{ env.NODE_VERSION }}
49+
50+
- name: Install @node-core/utils
51+
run: npm install -g @node-core/utils
52+
53+
- name: Configure @node-core/utils
54+
run: |
55+
ncu-config set branch "${RELEASE_BRANCH}"
56+
ncu-config set upstream origin
57+
ncu-config set username "$USERNAME"
58+
ncu-config set token "$GH_TOKEN"
59+
ncu-config set jenkins_token "$JENKINS_TOKEN"
60+
ncu-config set repo "$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)"
61+
ncu-config set owner "${GITHUB_REPOSITORY_OWNER}"
62+
env:
63+
USERNAME: ${{ secrets.JENKINS_USER }}
64+
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
65+
JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }}
66+
67+
- name: Set up ghauth config (Ubuntu)
68+
run: |
69+
mkdir -p ~/.config/changelog-maker/
70+
echo '{
71+
"user": "'$(ncu-config get username)'",
72+
"token": "'$(ncu-config get token)'"
73+
}' > ~/.config/changelog-maker/config.json
74+
75+
- name: Setup git author
76+
run: |
77+
git config --local user.email "[email protected]"
78+
git config --local user.name "Node.js GitHub Bot"
79+
80+
- name: Start git node release prepare
81+
run: |
82+
./tools/actions/create-release.sh "${RELEASE_DATE}" "${RELEASE_LINE}"
83+
env:
84+
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Linters (release proposals)
2+
3+
on:
4+
push:
5+
branches:
6+
- v[0-9]+.[0-9]+.[0-9]+-proposal
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
env:
13+
PYTHON_VERSION: '3.12'
14+
NODE_VERSION: lts/*
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
lint-release-commit:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+
with:
25+
persist-credentials: false
26+
- name: Lint release commit title format
27+
run: |
28+
EXPECTED_TITLE='^[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}, Version [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ (\(Current|'.+' \(LTS)\)$'
29+
echo "Expected commit title format: $EXPECTED_TITLE"
30+
COMMIT_SUBJECT="$(git --no-pager log -1 --format=%s)"
31+
echo "Actual: $ACTUAL"
32+
echo "$COMMIT_SUBJECT" | grep -q -E "$EXPECTED_TITLE"
33+
echo "COMMIT_SUBJECT=$COMMIT_SUBJECT" >> "$GITHUB_ENV"
34+
- name: Lint release commit message trailers
35+
run: |
36+
EXPECTED_TRAILER="^PR-URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/[[:digit:]]+\$"
37+
echo "Expected trailer format: $EXPECTED_TRAILER"
38+
ACTUAL="$(git --no-pager log -1 --format=%b | git interpret-trailers --parse --no-divider)"
39+
echo "Actual: $ACTUAL"
40+
echo "$ACTUAL" | grep -E -q "$EXPECTED_TRAILER"
41+
42+
PR_URL="${ACTUAL:8}"
43+
PR_HEAD="$(gh pr view "$PR_URL" --json headRefOid -q .headRefOid)"
44+
echo "Head of $PR_URL: $PR_HEAD"
45+
echo "Current commit: $GITHUB_SHA"
46+
[[ "$PR_HEAD" == "$GITHUB_SHA" ]]
47+
env:
48+
GH_TOKEN: ${{ github.token }}
49+
- name: Validate CHANGELOG
50+
id: releaser-info
51+
run: |
52+
EXPECTED_CHANGELOG_TITLE_INTRO="## $COMMIT_SUBJECT, @"
53+
echo "Expected CHANGELOG section title: $EXPECTED_CHANGELOG_TITLE_INTRO"
54+
CHANGELOG_TITLE="$(grep "$EXPECTED_CHANGELOG_TITLE_INTRO" "doc/changelogs/CHANGELOG_V${COMMIT_SUBJECT:20:2}.md")"
55+
echo "Actual: $CHANGELOG_TITLE"
56+
[[ "${CHANGELOG_TITLE%@*}@" == "$EXPECTED_CHANGELOG_TITLE_INTRO" ]]
57+
- name: Verify NODE_VERSION_IS_RELEASE bit is correctly set
58+
run: |
59+
grep -q '^#define NODE_VERSION_IS_RELEASE 1$' src/node_version.h

.github/workflows/tools.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

.github/workflows/update-wpt.yml

Lines changed: 83 additions & 0 deletions
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@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
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 }}

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ release.
3838
<th title="LTS Until 2025-04"><a href="doc/changelogs/CHANGELOG_V18.md">18</a> (LTS)</th>
3939
</tr>
4040
<tr>
41-
<b><a href="doc/changelogs/CHANGELOG_V23.md#23.2.0">23.2.0</a></b><br/>
41+
<td valign="top">
42+
<b><a href="doc/changelogs/CHANGELOG_V23.md#23.3.0">23.3.0</a></b><br/>
43+
<a href="doc/changelogs/CHANGELOG_V23.md#23.2.0">23.2.0</a><br/>
4244
<a href="doc/changelogs/CHANGELOG_V23.md#23.1.0">23.1.0</a><br/>
4345
<a href="doc/changelogs/CHANGELOG_V23.md#23.0.0">23.0.0</a><br/>
4446
</td>
@@ -59,7 +61,8 @@ release.
5961
<a href="doc/changelogs/CHANGELOG_V22.md#22.0.0">22.0.0</a><br/>
6062
</td>
6163
<td valign="top">
62-
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.18.0">20.18.0</a></b><br/>
64+
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.18.1">20.18.1</a></b><br/>
65+
<a href="doc/changelogs/CHANGELOG_V20.md#20.18.0">20.18.0</a><br/>
6366
<a href="doc/changelogs/CHANGELOG_V20.md#20.17.0">20.17.0</a><br/>
6467
<a href="doc/changelogs/CHANGELOG_V20.md#20.16.0">20.16.0</a><br/>
6568
<a href="doc/changelogs/CHANGELOG_V20.md#20.15.1">20.15.1</a><br/>

Makefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,11 @@ ifeq ($(OSTYPE),os400)
375375
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
376376
endif
377377

378-
node_use_openssl = $(call available-node,"-p" \
379-
"process.versions.openssl != undefined")
378+
node_use_openssl_and_icu = $(call available-node,"-p" \
379+
"process.versions.openssl != undefined && process.versions.icu != undefined")
380380
test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
381-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
382-
echo "Skipping .docbuildstamp (no crypto)"; \
381+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
382+
echo "Skipping .docbuildstamp (no crypto and/or no ICU)"; \
383383
else \
384384
$(RM) -r test/addons/??_*/; \
385385
[ -x $(NODE) ] && $(NODE) $< || node $< ; \
@@ -535,7 +535,7 @@ NATIVE_SUITES ?= addons js-native-api node-api
535535
# CI_* variables should be kept synchronized with the ones in vcbuild.bat
536536
CI_NATIVE_SUITES ?= $(NATIVE_SUITES) benchmark
537537
CI_JS_SUITES ?= $(JS_SUITES) pummel
538-
ifeq ($(node_use_openssl), false)
538+
ifeq ($(node_use_openssl_and_icu), false)
539539
CI_DOC := doctool
540540
else
541541
CI_DOC =
@@ -632,8 +632,8 @@ test-hash-seed: all ## Verifu that the hash seed used by V8 for hashing is rando
632632

633633
.PHONY: test-doc
634634
test-doc: doc-only lint-md ## Build, lint, and verify the docs.
635-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
636-
echo "Skipping test-doc (no crypto)"; \
635+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
636+
echo "Skipping test-doc (no crypto and/or no ICU)"; \
637637
else \
638638
$(PYTHON) tools/test.py $(PARALLEL_ARGS) doctool; \
639639
fi
@@ -749,17 +749,17 @@ apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json))
749749
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
750750

751751
tools/doc/node_modules: tools/doc/package.json
752-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
753-
echo "Skipping tools/doc/node_modules (no crypto)"; \
752+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
753+
echo "Skipping tools/doc/node_modules (no crypto and/or no ICU)"; \
754754
else \
755755
cd tools/doc && $(call available-node,$(run-npm-ci)) \
756756
fi
757757

758758
.PHONY: doc-only
759759
doc-only: tools/doc/node_modules \
760760
$(apidoc_dirs) $(apiassets) ## Build the docs with the local or the global Node.js binary.
761-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
762-
echo "Skipping doc-only (no crypto)"; \
761+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
762+
echo "Skipping doc-only (no crypto and/or no ICU)"; \
763763
else \
764764
$(MAKE) out/doc/api/all.html out/doc/api/all.json out/doc/api/stability; \
765765
fi
@@ -1382,8 +1382,8 @@ lint-js-fix: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint and fix the
13821382
# Note that on the CI `lint-js-ci` is run instead.
13831383
lint-js-doc: LINT_JS_TARGETS=doc
13841384
lint-js lint-js-doc: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint the JavaScript code with eslint./eslint/bin/eslint.js
1385-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
1386-
echo "Skipping $@ (no crypto)"; \
1385+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
1386+
echo "Skipping $@ (no crypto and/or no ICU)"; \
13871387
else \
13881388
echo "Running JS linter..."; \
13891389
$(call available-node,$(run-lint-js)) \

0 commit comments

Comments
 (0)