Skip to content

Commit fccada1

Browse files
committed
Merge branch 'main' of github.com:nodejs/nodejs.org into github_sponsors
2 parents 6da91ff + 69cc705 commit fccada1

File tree

367 files changed

+34300
-20035
lines changed

Some content is hidden

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

367 files changed

+34300
-20035
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,10 @@ SECURITY.md @nodejs/security-wg
4141
apps/site/pages/en/blog/release @nodejs/releasers
4242
apps/site/pages/en/blog/announcements @nodejs/releasers
4343

44-
# The following users DO NOT have write access, and their review is requested
45-
# via a GitHub action.
46-
apps/site/pages/en/learn/diagnostics @nodejs/diagnostics
47-
48-
apps/site/pages/en/learn/getting-started/security-best-practices.md @nodejs/security-wg
49-
50-
apps/site/pages/en/learn/manipulating-files @nodejs/fs
51-
52-
apps/site/pages/en/learn/test-runner @nodejs/test_runner
53-
54-
apps/site/pages/en/learn/typescript @nodejs/typescript
55-
44+
# Marketing
5645
apps/site/pages/en/about/partners.mdx @nodejs/marketing
5746
apps/site/pages/en/about/branding.mdx @nodejs/marketing
5847

59-
apps/site/pages/en/learn/getting-started/userland-migrations.md @nodejs/userland-migrations
48+
# The following users DO NOT have write access, and their review is requested
49+
# via a GitHub action.
6050
apps/site/pages/en/blog/migrations @nodejs/userland-migrations

.github/ISSUE_TEMPLATE/03-article-issue.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ updates:
55
schedule:
66
interval: monthly
77
labels:
8+
- 'dependencies'
9+
- 'github_actions'
810
- 'github_actions:pull-request'
11+
- 'auto-merge'
912
commit-message:
1013
prefix: meta
1114
cooldown:
12-
default-days: 3
15+
default-days: 7
1316
open-pull-requests-limit: 10
1417

1518
- package-ecosystem: npm
@@ -18,11 +21,14 @@ updates:
1821
schedule:
1922
interval: monthly
2023
labels:
24+
- 'dependencies'
25+
- 'javascript'
2126
- 'github_actions:pull-request'
27+
- 'auto-merge'
2228
commit-message:
2329
prefix: meta
2430
cooldown:
25-
default-days: 3
31+
default-days: 7
2632
groups:
2733
lint:
2834
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@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.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: 7 additions & 7 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:
@@ -53,15 +53,15 @@ jobs:
5353
shell: cmd
5454
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
5555

56-
- uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
56+
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
5757
with:
5858
path: ${{ github.workspace }}/apps/site/.next/cache
5959
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
6060
restore-keys: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
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: 13 additions & 6 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@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
27+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
2328
with:
2429
egress-policy: audit
2530

2631
- name: Git Checkout
27-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
32+
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@4c20b95e9d3209ecfdf9cd6aace6bbde71ba1694 # v13.3.4
69+
uses: chromaui/action@f191a0224b10e1a38b2091cefb7b7a2337009116 # v16.0.0
6670
with:
6771
workingDir: packages/ui-components
6872
buildScriptName: storybook:build

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
pull_request:
77
# The branches below must be a subset of the branches above
88
branches: ['main']
9+
types: [opened, synchronize, reopened, ready_for_review]
910
schedule:
1011
- cron: '0 0 * * 1'
1112

.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: 27 additions & 41 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
36-
runs-on: ubuntu-latest
37-
outputs:
38-
deployment_found: ${{ steps.set_outputs.outputs.deployment_found }}
39-
url: ${{ steps.set_outputs.outputs.url }}
40-
steps:
41-
- name: Capture Vercel Preview
42-
id: check_deployment
43-
uses: patrickedqvist/wait-for-vercel-preview@06c79330064b0e6ef7a2574603b62d3c98789125 # v1.3.2
44-
with:
45-
token: ${{ secrets.GITHUB_TOKEN }}
46-
max_timeout: 300 # timeout after 5 minutes
47-
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'
6337
name: Lighthouse Report
6438
runs-on: ubuntu-latest
39+
permissions:
40+
# Required by `thollander/actions-comment-pull-request`
41+
pull-requests: write
6542

6643
steps:
6744
- name: Harden Runner
68-
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
45+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
6946
with:
7047
egress-policy: audit
7148

49+
- name: Capture Vercel Preview
50+
id: deployment
51+
uses: patrickedqvist/wait-for-vercel-preview@d7982701e6fcd3ae073bff929e408e004404d38d # v1.3.3
52+
with:
53+
token: ${{ secrets.GITHUB_TOKEN }}
54+
max_timeout: 300 # timeout after 5 minutes
55+
check_interval: 10 # check every 10 seconds
56+
7257
- name: Git Checkout
73-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
58+
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
@@ -87,18 +73,18 @@ jobs:
8773
- name: Audit Preview URL with Lighthouse
8874
# Conduct the lighthouse audit
8975
id: lighthouse_audit
90-
uses: treosh/lighthouse-ci-action@fcd65974f7c4c2bf0ee9d09b84d2489183c29726 # v12.6.1
76+
uses: treosh/lighthouse-ci-action@3e7e23fb74242897f95c0ba9cabad3d0227b9b18 # v12.6.2
9177
with:
9278
# Defines the settings and assertions to audit
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.

0 commit comments

Comments
 (0)