Skip to content

Commit 6dc2f00

Browse files
authored
Merge branch 'nodejs:main' into patch-1
2 parents 98a32a5 + 1dd8a0b commit 6dc2f00

File tree

137 files changed

+7602
-5243
lines changed

Some content is hidden

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

137 files changed

+7602
-5243
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ updates:
99
commit-message:
1010
prefix: meta
1111
cooldown:
12-
default-days: 3
12+
default-days: 7
1313
open-pull-requests-limit: 10
1414

1515
- package-ecosystem: npm
@@ -22,7 +22,7 @@ updates:
2222
commit-message:
2323
prefix: meta
2424
cooldown:
25-
default-days: 3
25+
default-days: 7
2626
groups:
2727
lint:
2828
patterns:

.github/workflows/auto-merge.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Auto-merge PRs
2+
3+
on:
4+
schedule:
5+
- cron: '*/15 * * * *'
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}
10+
cancel-in-progress: false
11+
12+
permissions: {}
13+
14+
jobs:
15+
auto-merge:
16+
name: Auto-merge
17+
if: github.repository == 'nodejs/nodejs.org'
18+
runs-on: ubuntu-latest
19+
permissions:
20+
# Required to approve and merge pull requests
21+
pull-requests: write
22+
# Required to merge pull requests via merge queue
23+
contents: write
24+
25+
steps:
26+
- name: Harden Runner
27+
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
28+
with:
29+
egress-policy: audit
30+
31+
- uses: nodejs/web-team/actions/auto-merge-prs@b087df186d25f8792fb85cc7794f68718726b8ee
32+
with:
33+
merge-method: queue

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ permissions:
2525
contents: read
2626
actions: read
2727

28-
env:
29-
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--cache-dir
30-
TURBO_ARGS: --cache-dir=.turbo/cache
28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.ref }}
30+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3131

3232
jobs:
3333
build:
@@ -61,7 +61,7 @@ jobs:
6161

6262
- name: Build Next.js
6363
# We want a ISR build on CI to ensure that regular Next.js builds work as expected.
64-
run: node_modules/.bin/turbo build ${{ env.TURBO_ARGS }}
64+
run: node_modules/.bin/turbo build --cache-dir=.turbo/cache
6565
env:
6666
# We want to ensure we have enough RAM allocated to the Node.js process
6767
# this should be a last resort in case by any chances the build memory gets too high
@@ -70,15 +70,15 @@ jobs:
7070
# See https://github.com/vercel/next.js/pull/81318
7171
TURBOPACK_STATS: ${{ matrix.os == 'ubuntu-latest' }}
7272

73-
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
73+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
7474
if: matrix.os == 'ubuntu-latest'
7575
with:
7676
name: webpack-stats
7777
path: apps/site/.next/server/webpack-stats.json
7878

7979
- name: Build Next.js (Static Export)
8080
# We want to generate a static build, as it is a requirement of our website.
81-
run: node_modules/.bin/turbo deploy ${{ env.TURBO_ARGS }}
81+
run: node_modules/.bin/turbo deploy --cache-dir=.turbo/cache
8282
env:
8383
# We want to ensure we have enough RAM allocated to the Node.js process
8484
# this should be a last resort in case by any chances the build memory gets too high

.github/workflows/bundle-compare.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,33 @@ on:
88
permissions:
99
contents: read
1010
actions: read
11-
# To create the comment
12-
pull-requests: write
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.workflow_run.id }}
14+
cancel-in-progress: true
1315

1416
jobs:
1517
compare:
1618
name: Compare Bundle Stats
1719
runs-on: ubuntu-latest
20+
permissions:
21+
# Required to comment on pull requests
22+
pull-requests: write
1823
if: github.event.workflow_run.event == 'pull_request'
1924

2025
steps:
2126
- name: Harden Runner
22-
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
27+
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
2328
with:
2429
egress-policy: audit
2530

2631
- name: Git Checkout
2732
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
with:
34+
persist-credentials: false
2835

2936
- name: Download Stats (HEAD)
30-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
37+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
3138
with:
3239
name: webpack-stats
3340
path: head-stats
@@ -44,7 +51,7 @@ jobs:
4451
echo "run_id=$ID" >> $GITHUB_OUTPUT
4552
4653
- name: Download Stats (BASE)
47-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
54+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
4855
with:
4956
name: webpack-stats
5057
path: base-stats

.github/workflows/chromatic.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ defaults:
2929
# This ensures that the working directory is the root of the repository
3030
working-directory: ./
3131

32+
concurrency:
33+
group: ${{ github.workflow }}-${{ github.ref }}
34+
cancel-in-progress: ${{ github.event_name != 'push' }}
35+
3236
permissions:
3337
contents: read
3438
actions: read
@@ -62,7 +66,7 @@ jobs:
6266
- name: Start Visual Regression Tests (Chromatic)
6367
# This assigns the Environment Deployment for Storybook
6468
id: chromatic-deploy
65-
uses: chromaui/action@07791f8243f4cb2698bf4d00426baf4b2d1cb7e0 # v13.3.5
69+
uses: chromaui/action@5ec258af08deb3e8c36653bd618cb7fe52090031 # v15.2.0
6670
with:
6771
workingDir: packages/ui-components
6872
buildScriptName: storybook:build

.github/workflows/create-release-post.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,21 @@ defaults:
1919
# This ensures that the working directory is the root of the repository
2020
working-directory: ./
2121

22-
permissions:
23-
contents: write
24-
pull-requests: write
22+
permissions: {}
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ inputs.version }}
26+
cancel-in-progress: false
2527

2628
jobs:
2729
create-post:
30+
name: Create Release Blog Post
2831
runs-on: ubuntu-latest
32+
permissions:
33+
# Required to push the release branch
34+
contents: write
35+
# Required to create the pull request
36+
pull-requests: write
2937

3038
steps:
3139
- uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f

.github/workflows/lighthouse.yml

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,57 +23,43 @@ defaults:
2323
permissions:
2424
contents: read
2525
actions: read
26-
# This permission is required by `thollander/actions-comment-pull-request`
27-
pull-requests: write
26+
27+
concurrency:
28+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
29+
cancel-in-progress: true
2830

2931
jobs:
30-
get-vercel-preview:
32+
lighthouse-ci:
3133
# We want to skip our lighthouse analysis on Dependabot PRs
3234
if: |
3335
startsWith(github.event.pull_request.head.ref, 'dependabot/') == false &&
3436
github.event.label.name == 'github_actions:pull-request'
35-
name: Get Vercel Preview
37+
name: Lighthouse Report
3638
runs-on: ubuntu-latest
37-
outputs:
38-
deployment_found: ${{ steps.set_outputs.outputs.deployment_found }}
39-
url: ${{ steps.set_outputs.outputs.url }}
39+
permissions:
40+
# Required by `thollander/actions-comment-pull-request`
41+
pull-requests: write
42+
4043
steps:
44+
- name: Harden Runner
45+
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
46+
with:
47+
egress-policy: audit
48+
4149
- name: Capture Vercel Preview
42-
id: check_deployment
50+
id: deployment
4351
uses: patrickedqvist/wait-for-vercel-preview@d7982701e6fcd3ae073bff929e408e004404d38d # v1.3.3
4452
with:
4553
token: ${{ secrets.GITHUB_TOKEN }}
4654
max_timeout: 300 # timeout after 5 minutes
4755
check_interval: 10 # check every 10 seconds
48-
continue-on-error: true
49-
- name: Set Outputs
50-
if: always()
51-
id: set_outputs
52-
run: |
53-
if [[ -z "${{ steps.check_deployment.outputs.url }}" ]]; then
54-
echo "deployment_found=false" >> $GITHUB_OUTPUT
55-
else
56-
echo "deployment_found=true" >> $GITHUB_OUTPUT
57-
echo "url=${{ steps.check_deployment.outputs.url }}" >> $GITHUB_OUTPUT
58-
fi
59-
60-
lighthouse-ci:
61-
needs: get-vercel-preview
62-
if: needs.get-vercel-preview.outputs.deployment_found == 'true'
63-
name: Lighthouse Report
64-
runs-on: ubuntu-latest
65-
66-
steps:
67-
- name: Harden Runner
68-
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
69-
with:
70-
egress-policy: audit
7156

7257
- name: Git Checkout
7358
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7459
with:
7560
# Provides the Pull Request commit SHA or the GitHub merge group ref
7661
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}
62+
persist-credentials: false
7763

7864
- name: Add Comment to PR
7965
# Signal that a lighthouse run is about to start
@@ -93,12 +79,12 @@ jobs:
9379
configPath: './.lighthouserc.json'
9480
# These URLS capture critical pages / site functionality.
9581
urls: |
96-
${{ needs.get-vercel-preview.outputs.url }}/en
97-
${{ needs.get-vercel-preview.outputs.url }}/en/about
98-
${{ needs.get-vercel-preview.outputs.url }}/en/about/previous-releases
99-
${{ needs.get-vercel-preview.outputs.url }}/en/download
100-
${{ needs.get-vercel-preview.outputs.url }}/en/download/archive/current
101-
${{ needs.get-vercel-preview.outputs.url }}/en/blog
82+
${{ steps.deployment.outputs.url }}/en
83+
${{ steps.deployment.outputs.url }}/en/about
84+
${{ steps.deployment.outputs.url }}/en/about/previous-releases
85+
${{ steps.deployment.outputs.url }}/en/download
86+
${{ steps.deployment.outputs.url }}/en/download/archive/current
87+
${{ steps.deployment.outputs.url }}/en/blog
10288
uploadArtifacts: true # save results as a action artifacts
10389
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
10490

@@ -111,7 +97,7 @@ jobs:
11197
# see https://github.com/actions/github-script#use-env-as-input
11298
LIGHTHOUSE_RESULT: ${{ steps.lighthouse_audit.outputs.manifest }}
11399
LIGHTHOUSE_LINKS: ${{ steps.lighthouse_audit.outputs.links }}
114-
VERCEL_PREVIEW_URL: ${{ needs.get-vercel-preview.outputs.url }}
100+
VERCEL_PREVIEW_URL: ${{ steps.deployment.outputs.url }}
115101
with:
116102
# Run as a separate file so we do not have to inline all of our formatting logic.
117103
# See https://github.com/actions/github-script#run-a-separate-file for more info.

.github/workflows/lint-and-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ permissions:
3333
contents: read
3434
actions: read
3535

36-
env:
37-
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--cache-dir
38-
TURBO_ARGS: --cache-dir=.turbo/cache
36+
concurrency:
37+
group: ${{ github.workflow }}-${{ github.ref }}
38+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3939

4040
jobs:
4141
lint:
@@ -73,7 +73,7 @@ jobs:
7373
if: |
7474
(github.event_name == 'push' || github.event_name == 'merge_group') ||
7575
(github.event_name == 'pull_request' && github.event.pull_request.head.ref != 'chore/crowdin')
76-
run: node_modules/.bin/turbo lint lint:types prettier ${{ env.TURBO_ARGS }}
76+
run: node_modules/.bin/turbo lint lint:types prettier --cache-dir=.turbo/cache
7777

7878
- name: Save Lint Cache
7979
# We only want to save caches on `push` events or `pull_request_target` events
@@ -108,7 +108,7 @@ jobs:
108108
- name: Run Unit Tests
109109
# We want to run Unit Tests in every circumstance, including Crowdin PRs and Dependabot PRs to ensure
110110
# that changes to dependencies or translations don't break the Unit Tests
111-
run: node --run test:ci -- ${{ env.TURBO_ARGS }}
111+
run: node --run test:ci -- --cache-dir=.turbo/cache
112112

113113
- name: Upload test coverage to Codecov
114114
if: ${{ !cancelled() && github.event_name != 'merge_group' }}

.github/workflows/notify-on-push.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ name: Notify on Push
77
permissions:
88
contents: read
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.sha }}
12+
cancel-in-progress: false
13+
1014
jobs:
1115
notify_on_push:
1216
name: Notify on any direct push to `main`

.github/workflows/playwright-cloudflare-open-next.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
- name: Upload Playwright test results
6161
if: always()
62-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
62+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
6363
with:
6464
name: playwright-report
6565
path: apps/site/playwright-report/

0 commit comments

Comments
 (0)