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 all 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
25 changes: 21 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/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,19 @@ 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
GOVERNANCE.md @nodejs/tsc
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
12 changes: 4 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ 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:
Expand Down Expand Up @@ -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 @@ -128,7 +124,7 @@ jobs:
if: |
(github.event_name == 'pull_request_target' &&
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
Expand All @@ -149,4 +145,4 @@ jobs:
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
2 changes: 0 additions & 2 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,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 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
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ cd nodejs.org
pnpm install --frozen-lockfile

# Start development server
pnpm dev
node --run dev
```

For detailed setup instructions, see [Getting Started](./docs/getting-started.md).
Expand All @@ -99,13 +99,13 @@ For detailed setup instructions, see [Getting Started](./docs/getting-started.md

```bash
# Format and lint code
pnpm format
node --run format

# Run tests
pnpm test
node --run test

# Test build
pnpm build
node --run build
```

### 4. Submit Your Contribution
Expand Down
5 changes: 5 additions & 0 deletions apps/site/.lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"**/*.{js,mjs,ts,tsx,md,mdx}": ["prettier --check --write", "eslint --fix"],
"**/*.css": ["stylelint --allow-empty-input", "prettier --write"],
"**/*.{json,yml}": ["prettier --check --write"]
}
6 changes: 3 additions & 3 deletions apps/site/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FlatCompat } from '@eslint/eslintrc';
import importX from 'eslint-plugin-import-x';
import { flatConfigs } from 'eslint-plugin-import-x';
import * as mdx from 'eslint-plugin-mdx';
import react from 'eslint-plugin-react';
import tseslint from 'typescript-eslint';
Expand All @@ -20,12 +20,12 @@ const compatConfig = compat.config({

export default tseslint.config(
...baseConfig,
{ ignores: ['pages/en/blog/**/*.{md,mdx}/**'] },
{ ignores: ['pages/en/blog/**/*.{md,mdx}/**', 'public'] },
{
extends: [
react.configs.flat['jsx-runtime'],
...tseslint.configs.recommended,
importX.flatConfigs.typescript,
flatConfigs.typescript,
...compatConfig,
],
files: ['**/*.{js,md,mdx,mjs,ts,tsx}'],
Expand Down
Loading
Loading