Skip to content

Commit 4ad50c6

Browse files
Merge pull request #1038 from nodejs/main
Create a new pull request by comparing changes across two branches
2 parents 2866fb3 + b736028 commit 4ad50c6

File tree

2,056 files changed

+129923
-89424
lines changed

Some content is hidden

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

2,056 files changed

+129923
-89424
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/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ updates:
88
interval: monthly
99
commit-message:
1010
prefix: meta
11-
open-pull-requests-limit: 10
11+
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
1212

1313
- package-ecosystem: npm
1414
directory: /tools/eslint
1515
schedule:
1616
interval: monthly
1717
commit-message:
1818
prefix: tools
19-
open-pull-requests-limit: 10
19+
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
2020
groups:
2121
eslint:
2222
applies-to: version-updates
@@ -29,7 +29,7 @@ updates:
2929
interval: monthly
3030
commit-message:
3131
prefix: tools
32-
open-pull-requests-limit: 10
32+
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
3333
groups:
3434
lint-md:
3535
applies-to: version-updates

.github/label-pr-config.yml

Lines changed: 2 additions & 0 deletions
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

.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: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# This action requires the following secrets to be set on the repository:
2+
# GH_USER_TOKEN: GitHub user token, to be used by ncu and to push changes
3+
4+
name: Create Release Proposal
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
release-line:
10+
required: true
11+
type: number
12+
description: 'The release line (without dots or prefix). e.g: 22'
13+
release-date:
14+
required: true
15+
type: string
16+
description: The release date in YYYY-MM-DD format
17+
18+
concurrency: ${{ github.workflow }}
19+
20+
env:
21+
NODE_VERSION: lts/*
22+
23+
permissions:
24+
contents: write
25+
pull-requests: write
26+
27+
jobs:
28+
releasePrepare:
29+
env:
30+
STAGING_BRANCH: v${{ inputs.release-line }}.x-staging
31+
RELEASE_BRANCH: v${{ inputs.release-line }}.x
32+
RELEASE_DATE: ${{ inputs.release-date }}
33+
RELEASE_LINE: ${{ inputs.release-line }}
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
with:
38+
ref: ${{ env.STAGING_BRANCH }}
39+
persist-credentials: false
40+
41+
# Install dependencies
42+
- name: Install Node.js
43+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
44+
with:
45+
node-version: ${{ env.NODE_VERSION }}
46+
47+
- name: Install @node-core/utils
48+
run: npm install -g @node-core/utils
49+
50+
- name: Configure @node-core/utils
51+
run: |
52+
ncu-config set branch "${RELEASE_BRANCH}"
53+
ncu-config set upstream origin
54+
ncu-config set username "$GITHUB_ACTOR"
55+
ncu-config set token "$GH_TOKEN"
56+
ncu-config set repo "$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)"
57+
ncu-config set owner "${GITHUB_REPOSITORY_OWNER}"
58+
env:
59+
GH_TOKEN: ${{ github.token }}
60+
61+
- name: Set up ghauth config (Ubuntu)
62+
run: |
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 }}
67+
68+
- name: Setup git author
69+
run: |
70+
git config --local user.email "[email protected]"
71+
git config --local user.name "Node.js GitHub Bot"
72+
73+
- 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.
75+
run: |
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}"
79+
env:
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 }}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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
60+
- name: Check for placeholders in documentation
61+
run: |
62+
! grep "REPLACEME" doc/api/*.md
Lines changed: 48 additions & 0 deletions
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

Lines changed: 2 additions & 2 deletions
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

0 commit comments

Comments
 (0)