Skip to content

chore: updated commands, use plain node #7850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 14, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
# Infrastructure
.github @nodejs/web-infra
.husky @nodejs/web-infra
codecov.yml @nodejs/web-infra

# Dependencies
pnpm-workspace.yaml @nodejs/nodejs-website @nodejs/web-infra
pnpm-lock.yaml @nodejs/nodejs-website @nodejs/web-infra

# Framework
apps/site/next.config.mjs @nodejs/web-infra
apps/site/next.dynamic.mjs @nodejs/web-infra

# Node.js Release Blog Posts
apps/site/pages/en/blog/release @nodejs/releasers
apps/site/pages/en/blog/announcements @nodejs/releasers
apps/site/middleware.ts @nodejs/web-infra
apps/site/navigation.mjs @nodejs/web-infra
apps/site/playwright.config.ts @nodejs/web-infra

# Package Ecosystem
package.json @nodejs/nodejs-website
Expand All @@ -21,6 +25,20 @@ turbo.json @nodejs/nodejs-website @nodejs/web-infra
crowdin.yml @nodejs/web-infra
apps/site/redirects.json @nodejs/web-infra
apps/site/site.json @nodejs/web-infra
apps/site/wrangler.jsonc @nodejs/web-infra
apps/site/open-next.config.ts @nodejs/web-infra
apps/site/redirects.json @nodejs/web-infra

# Critical Documents
LICENSE @nodejs/tsc @ovflowd @bmuenzenmeyer
GOVERNANCE.md @nodejs/tsc @ovflowd @bmuenzenmeyer
CONTRIBUTING.md @nodejs/tsc @ovflowd @bmuenzenmeyer
CONTRIBUTING.md @nodejs/nodejs-website @nodejs/web-infra
docs @nodejs/nodejs-website @nodejs/web-infra

# Node.js Release Blog Posts
apps/site/pages/en/blog/release @nodejs/releasers
apps/site/pages/en/blog/announcements @nodejs/releasers

# Specific content
apps/site/pages/en/learn/getting-started/security-best-practices.md @nodejs/security-wg
Expand Down
28 changes: 12 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
push:
branches:
- main
pull_request_target:
pull_request:
branches:
- main
types:
Expand All @@ -30,15 +30,13 @@ permissions:
env:
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--cache-dir
TURBO_ARGS: --cache-dir=.turbo/cache
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--force
TURBO_FORCE: true

jobs:
build:
# This Job should run either on non-`pull_request_target` events,
# or `pull_request_target` event with a `labeled` action with a label named `github_actions:pull-request`
# This Job should run either on non-`pull_request` events,
# or `pull_request` event with a `labeled` action with a label named `github_actions:pull-request`
# since we want to run Website Builds on all these occasions. As this allows us to be certain the that builds are passing
if: github.event_name != 'pull_request_target' || github.event.label.name == 'github_actions:pull-request'
if: github.event_name != 'pull_request' || github.event.label.name == 'github_actions:pull-request'

name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -64,7 +62,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Provides the Pull Request commit SHA or the GitHub merge group ref
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
# We only need to fetch the last commit from the head_ref
# since we're not using the `--filter` operation from turborepo
# We don't use the `--filter` as we always want to force builds regardless of having changes or not
Expand All @@ -80,8 +78,6 @@ jobs:

- name: Set up pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
cache: true

- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
Expand All @@ -96,7 +92,7 @@ jobs:

- name: Build Next.js (ISR)
# We want a ISR build on CI to ensure that regular Next.js builds work as expected.
run: pnpm exec turbo build ${{ env.TURBO_ARGS }}
run: node_modules/.bin/turbo build ${{ env.TURBO_ARGS }}
env:
# We want to ensure we have enough RAM allocated to the Node.js process
# this should be a last resort in case by any chances the build memory gets too high
Expand All @@ -109,7 +105,7 @@ jobs:
# We only run full static builds within Pull Requests. This step is also used to export
# static output in all languages, and it only works on `push` events.
if: github.event_name == 'push'
run: pnpm exec turbo deploy ${{ env.TURBO_ARGS }}
run: node_modules/.bin/turbo deploy ${{ env.TURBO_ARGS }}
env:
# We want to ensure we have enough RAM allocated to the Node.js process
# this should be a last resort in case by any chances the build memory gets too high
Expand All @@ -126,27 +122,27 @@ jobs:
# in order to reduce source wastages and build times.
# Note that we skip full static builds on Crowdin-based Pull Requests as these PRs should only contain translation changes
if: |
(github.event_name == 'pull_request_target' &&
(github.event_name == 'pull_request' &&
github.event.pull_request.head.ref != 'chore/crowdin')
run: pnpm exec turbo deploy ${{ env.TURBO_ARGS }}
run: node_modules/.bin/turbo deploy ${{ env.TURBO_ARGS }}
env:
# We want to ensure we have enough RAM allocated to the Node.js process
# this should be a last resort in case by any chances the build memory gets too high
# but in general this should never happen
NODE_OPTIONS: '--max_old_space_size=4096'
# Used for API requests that require GitHub API scopes
NEXT_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
# We want to ensure that static exports for all locales do not occur on `pull_request_target` events
# We want to ensure that static exports for all locales do not occur on `pull_request` events
NEXT_PUBLIC_STATIC_EXPORT_LOCALE: false

- name: Sync Orama Cloud
# We only want to sync the Orama Cloud production indexes on `push` events.
# We also want to sync the Orama Cloud preview (deployment) indexes on `pull_request_target` events (or manual triggers).
# We also want to sync the Orama Cloud preview (deployment) indexes on `pull_request` events (or manual triggers).
# We also want to ensure that the sync only happens on the `ubuntu-latest` runner to avoid duplicate syncs
# or Windows-based path issues.
env:
ORAMA_INDEX_ID: ${{ github.event_name == 'push' && secrets.ORAMA_PRODUCTION_INDEX_ID || secrets.ORAMA_INDEX_ID }}
ORAMA_SECRET_KEY: ${{ github.event_name == 'push' && secrets.ORAMA_PRODUCTION_SECRET_KEY || secrets.ORAMA_SECRET_KEY }}
if: matrix.os == 'ubuntu-latest' && github.event_name != 'merge_group'
working-directory: apps/site
run: pnpm sync-orama
run: node --run sync-orama
8 changes: 3 additions & 5 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
paths:
- packages/ui-components/**
- .github/workflows/chromatic.yml
pull_request_target:
pull_request:
branches:
- main
paths:
Expand All @@ -38,7 +38,7 @@ jobs:
# We only need to run Storybook Builds and Storybook Visual Regression Tests within Pull Requests that actually
# introduce changes to the Storybook. Hence, we skip running these on Crowdin PRs and Dependabot PRs
if: |
github.event_name != 'pull_request_target' ||
github.event_name != 'pull_request' ||
(
github.event.label.name == 'github_actions:pull-request' &&
github.actor != 'dependabot[bot]' &&
Expand All @@ -62,15 +62,13 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Provides the Pull Request commit SHA or the GitHub merge group ref
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
# The Chromatic (@chromaui/action) Action requires a full history of the current branch in order to be able to compare
# previous changes and previous commits and determine which Storybooks should be tested against and what should be built
fetch-depth: 0

- name: Set up pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
cache: true

- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/lint-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ permissions:
actions: read

env:
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--force
TURBO_FORCE: true
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--cache-dir
TURBO_ARGS: --cache-dir=.turbo/cache

jobs:
lint:
Expand Down Expand Up @@ -70,8 +70,6 @@ jobs:

- name: Set up pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
cache: true

- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
Expand All @@ -90,7 +88,7 @@ jobs:
if: |
(github.event_name == 'push' || github.event_name == 'merge_group') ||
(github.event_name == 'pull_request' && github.event.pull_request.head.ref != 'chore/crowdin')
run: pnpm exec turbo lint check-types prettier
run: node_modules/.bin/turbo lint lint:types prettier ${{ env.TURBO_ARGS }}

- name: Save Lint Cache
# We only want to save caches on `push` events or `pull_request_target` events
Expand Down Expand Up @@ -127,8 +125,6 @@ jobs:

- name: Set up pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
cache: true

- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
Expand All @@ -143,7 +139,7 @@ jobs:
- name: Run Unit Tests
# We want to run Unit Tests in every circumstance, including Crowdin PRs and Dependabot PRs to ensure
# that changes to dependencies or translations don't break the Unit Tests
run: pnpm test:ci
run: node --run test:ci -- ${{ env.TURBO_ARGS }}

- name: Upload test coverage to Codecov
if: ${{ !cancelled() && github.event_name != 'merge_group' }}
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/playwright-cloudflare-open-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ jobs:

- name: Set up pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
cache: true

- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
Expand All @@ -56,7 +54,7 @@ jobs:
- name: Get Playwright version
id: playwright-version
working-directory: apps/site
run: echo "version=$(pnpm exec playwright --version | awk '{print $2}')" >> $GITHUB_OUTPUT
run: echo "version=$(node_modules/.bin/playwright --version | awk '{print $2}')" >> $GITHUB_OUTPUT

- name: Cache Playwright browsers
id: playwright-cache
Expand All @@ -67,11 +65,11 @@ jobs:

- name: Install Playwright Browsers
working-directory: apps/site
run: pnpm exec playwright install --with-deps
run: node_modules/.bin/playwright install --with-deps

- name: Run Playwright tests
working-directory: apps/site
run: pnpm playwright
run: node --run playwright
env:
PLAYWRIGHT_RUN_CLOUDFLARE_PREVIEW: true
PLAYWRIGHT_BASE_URL: http://127.0.0.1:8787
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ jobs:

- name: Set up pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
cache: true

- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
Expand All @@ -82,7 +80,7 @@ jobs:
- name: Get Playwright version
id: playwright-version
working-directory: apps/site
run: echo "version=$(pnpm exec playwright --version | awk '{print $2}')" >> $GITHUB_OUTPUT
run: echo "version=$(node_modules/.bin/playwright --version | awk '{print $2}')" >> $GITHUB_OUTPUT

- name: Cache Playwright browsers
id: playwright-cache
Expand All @@ -93,11 +91,11 @@ jobs:

- name: Install Playwright Browsers
working-directory: apps/site
run: pnpm exec playwright install --with-deps
run: node_modules/.bin/playwright install --with-deps

- name: Run Playwright tests
working-directory: apps/site
run: pnpm playwright
run: node --run playwright
env:
PLAYWRIGHT_BASE_URL: ${{ needs.get-vercel-preview.outputs.url }}

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ jobs:

- name: Set up pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
cache: true

- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/translations-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ jobs:

- name: Set up pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
cache: true

- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
Expand All @@ -109,10 +107,10 @@ jobs:

- name: Run ESLint
working-directory: apps/site
run: pnpm lint:md --fix
run: node --run lint:md -- --fix

- name: Run Prettier
run: pnpm prettier:fix
run: node --run prettier:fix

- name: Push Changes back to Pull Request
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0
Expand Down
9 changes: 3 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ npm-debug.log
package-lock.json

# Next.js Build Output
.next
build
apps/site/.next
apps/site/build
apps/site/public/blog-data.json

# Test Runner
junit.xml
Expand All @@ -35,14 +36,10 @@ cache
tsconfig.tsbuildinfo
dist/

# Ignore the blog-data json that we generate during dev and build
apps/site/public/blog-data.json

# Cloudflare Build Output
apps/site/.open-next
apps/site/.wrangler


## Playwright
test-results
playwright-report
6 changes: 4 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# lint and format staged files
pnpm exec lint-staged

node --run lint:staged

# verify typescript fully
pnpm check-types

node --run lint:types
7 changes: 1 addition & 6 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"**/*.{js,mjs,ts,tsx,md,mdx}": [
"turbo run lint:lint-staged --",
"prettier --check --write"
],
"**/*.css": ["stylelint --allow-empty-input", "prettier --write"],
"**/*.{json,yml}": ["prettier --check --write"]
"**/*.{js,mjs,ts,tsx,md,mdx,json.yml}": ["prettier --check --write"]
}
6 changes: 3 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ package-lock.json
.next
build

# Next.js Generated Files
public/static/documents

# Test Runner
junit.xml
lcov.info
Expand All @@ -39,6 +36,9 @@ tsconfig.tsbuildinfo
# Metadata Files
CODEOWNERS

# Public Folders
apps/site/public

# Prettier's Handlebar parser is limited and chokes on some syntax features
# https://github.com/prettier/prettier/issues/11834
scripts/release-post/template.hbs
Loading
Loading