Skip to content

Commit 1ccf19c

Browse files
authored
chore: updated commands, use plain node (#7850)
* chore: updated commands, use plain node * fix: turbo-args * fix: use node --run for test:ci * fix: fixed final checks * meta: updated codeowners * fix: playwright open-next command * chore: code review changes
1 parent 313e163 commit 1ccf19c

33 files changed

+161
-160
lines changed

.github/CODEOWNERS

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44
# Infrastructure
55
.github @nodejs/web-infra
66
.husky @nodejs/web-infra
7+
codecov.yml @nodejs/web-infra
8+
9+
# Dependencies
10+
pnpm-workspace.yaml @nodejs/nodejs-website @nodejs/web-infra
11+
pnpm-lock.yaml @nodejs/web-infra
712

813
# Framework
914
apps/site/next.config.mjs @nodejs/web-infra
1015
apps/site/next.dynamic.mjs @nodejs/web-infra
11-
12-
# Node.js Release Blog Posts
13-
apps/site/pages/en/blog/release @nodejs/releasers
14-
apps/site/pages/en/blog/announcements @nodejs/releasers
16+
apps/site/middleware.ts @nodejs/web-infra
17+
apps/site/navigation.mjs @nodejs/web-infra
18+
apps/site/playwright.config.ts @nodejs/web-infra
1519

1620
# Package Ecosystem
1721
package.json @nodejs/nodejs-website
@@ -21,6 +25,19 @@ turbo.json @nodejs/nodejs-website @nodejs/web-infra
2125
crowdin.yml @nodejs/web-infra
2226
apps/site/redirects.json @nodejs/web-infra
2327
apps/site/site.json @nodejs/web-infra
28+
apps/site/wrangler.jsonc @nodejs/web-infra
29+
apps/site/open-next.config.ts @nodejs/web-infra
30+
apps/site/redirects.json @nodejs/web-infra
31+
32+
# Critical Documents
33+
LICENSE @nodejs/tsc
34+
GOVERNANCE.md @nodejs/tsc
35+
CONTRIBUTING.md @nodejs/nodejs-website @nodejs/web-infra
36+
docs @nodejs/nodejs-website @nodejs/web-infra
37+
38+
# Node.js Release Blog Posts
39+
apps/site/pages/en/blog/release @nodejs/releasers
40+
apps/site/pages/en/blog/announcements @nodejs/releasers
2441

2542
# Specific content
2643
apps/site/pages/en/learn/getting-started/security-best-practices.md @nodejs/security-wg

.github/workflows/build.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ permissions:
3030
env:
3131
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--cache-dir
3232
TURBO_ARGS: --cache-dir=.turbo/cache
33-
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--force
34-
TURBO_FORCE: true
3533

3634
jobs:
3735
build:
@@ -80,8 +78,6 @@ jobs:
8078

8179
- name: Set up pnpm
8280
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
83-
with:
84-
cache: true
8581

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

9793
- name: Build Next.js (ISR)
9894
# We want a ISR build on CI to ensure that regular Next.js builds work as expected.
99-
run: pnpm exec turbo build ${{ env.TURBO_ARGS }}
95+
run: node_modules/.bin/turbo build ${{ env.TURBO_ARGS }}
10096
env:
10197
# We want to ensure we have enough RAM allocated to the Node.js process
10298
# this should be a last resort in case by any chances the build memory gets too high
@@ -109,7 +105,7 @@ jobs:
109105
# We only run full static builds within Pull Requests. This step is also used to export
110106
# static output in all languages, and it only works on `push` events.
111107
if: github.event_name == 'push'
112-
run: pnpm exec turbo deploy ${{ env.TURBO_ARGS }}
108+
run: node_modules/.bin/turbo deploy ${{ env.TURBO_ARGS }}
113109
env:
114110
# We want to ensure we have enough RAM allocated to the Node.js process
115111
# this should be a last resort in case by any chances the build memory gets too high
@@ -128,7 +124,7 @@ jobs:
128124
if: |
129125
(github.event_name == 'pull_request_target' &&
130126
github.event.pull_request.head.ref != 'chore/crowdin')
131-
run: pnpm exec turbo deploy ${{ env.TURBO_ARGS }}
127+
run: node_modules/.bin/turbo deploy ${{ env.TURBO_ARGS }}
132128
env:
133129
# We want to ensure we have enough RAM allocated to the Node.js process
134130
# this should be a last resort in case by any chances the build memory gets too high
@@ -149,4 +145,4 @@ jobs:
149145
ORAMA_SECRET_KEY: ${{ github.event_name == 'push' && secrets.ORAMA_PRODUCTION_SECRET_KEY || secrets.ORAMA_SECRET_KEY }}
150146
if: matrix.os == 'ubuntu-latest' && github.event_name != 'merge_group'
151147
working-directory: apps/site
152-
run: pnpm sync-orama
148+
run: node --run sync-orama

.github/workflows/chromatic.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ jobs:
6969

7070
- name: Set up pnpm
7171
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
72-
with:
73-
cache: true
7472

7573
- name: Set up Node.js
7674
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ permissions:
3333
actions: read
3434

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

3939
jobs:
4040
lint:
@@ -70,8 +70,6 @@ jobs:
7070
7171
- name: Set up pnpm
7272
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
73-
with:
74-
cache: true
7573

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

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

128126
- name: Set up pnpm
129127
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
130-
with:
131-
cache: true
132128

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

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

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ jobs:
4040

4141
- name: Set up pnpm
4242
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
43-
with:
44-
cache: true
4543

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

6159
- name: Cache Playwright browsers
6260
id: playwright-cache
@@ -67,11 +65,11 @@ jobs:
6765

6866
- name: Install Playwright Browsers
6967
working-directory: apps/site
70-
run: pnpm exec playwright install --with-deps
68+
run: node_modules/.bin/playwright install --with-deps
7169

7270
- name: Run Playwright tests
7371
working-directory: apps/site
74-
run: pnpm playwright
72+
run: node --run playwright
7573
env:
7674
PLAYWRIGHT_RUN_CLOUDFLARE_PREVIEW: true
7775
PLAYWRIGHT_BASE_URL: http://127.0.0.1:8787

.github/workflows/playwright.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ jobs:
6666

6767
- name: Set up pnpm
6868
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
69-
with:
70-
cache: true
7169

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

8785
- name: Cache Playwright browsers
8886
id: playwright-cache
@@ -93,11 +91,11 @@ jobs:
9391

9492
- name: Install Playwright Browsers
9593
working-directory: apps/site
96-
run: pnpm exec playwright install --with-deps
94+
run: node_modules/.bin/playwright install --with-deps
9795

9896
- name: Run Playwright tests
9997
working-directory: apps/site
100-
run: pnpm playwright
98+
run: node --run playwright
10199
env:
102100
PLAYWRIGHT_BASE_URL: ${{ needs.get-vercel-preview.outputs.url }}
103101

.github/workflows/publish-packages.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ jobs:
105105

106106
- name: Set up pnpm
107107
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
108-
with:
109-
cache: true
110108

111109
- name: Setup Node.js
112110
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0

.github/workflows/translations-sync.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ jobs:
9494
9595
- name: Set up pnpm
9696
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
97-
with:
98-
cache: true
9997

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

110108
- name: Run ESLint
111109
working-directory: apps/site
112-
run: pnpm lint:md --fix
110+
run: node --run lint:md -- --fix
113111

114112
- name: Run Prettier
115-
run: pnpm prettier:fix
113+
run: node --run prettier:fix
116114

117115
- name: Push Changes back to Pull Request
118116
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0

.gitignore

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ npm-debug.log
99
package-lock.json
1010

1111
# Next.js Build Output
12-
.next
13-
build
12+
apps/site/.next
13+
apps/site/build
14+
apps/site/public/blog-data.json
1415

1516
# Test Runner
1617
junit.xml
@@ -35,14 +36,10 @@ cache
3536
tsconfig.tsbuildinfo
3637
dist/
3738

38-
# Ignore the blog-data json that we generate during dev and build
39-
apps/site/public/blog-data.json
40-
4139
# Cloudflare Build Output
4240
apps/site/.open-next
4341
apps/site/.wrangler
4442

45-
4643
## Playwright
4744
test-results
4845
playwright-report

.husky/pre-commit

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# lint and format staged files
2-
pnpm exec lint-staged
2+
3+
node --run lint:staged
34

45
# verify typescript fully
5-
pnpm check-types
6+
7+
node --run lint:types

.lintstagedrc.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
{
2-
"**/*.{js,mjs,ts,tsx,md,mdx}": [
3-
"turbo run lint:lint-staged --",
4-
"prettier --check --write"
5-
],
6-
"**/*.css": ["stylelint --allow-empty-input", "prettier --write"],
7-
"**/*.{json,yml}": ["prettier --check --write"]
2+
"**/*.{js,mjs,ts,tsx,md,mdx,json.yml}": ["prettier --check --write"]
83
}

.prettierignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ package-lock.json
1111
.next
1212
build
1313

14-
# Next.js Generated Files
15-
public/static/documents
16-
1714
# Test Runner
1815
junit.xml
1916
lcov.info
@@ -39,6 +36,9 @@ tsconfig.tsbuildinfo
3936
# Metadata Files
4037
CODEOWNERS
4138

39+
# Public Folders
40+
apps/site/public
41+
4242
# Prettier's Handlebar parser is limited and chokes on some syntax features
4343
# https://github.com/prettier/prettier/issues/11834
4444
scripts/release-post/template.hbs

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ cd nodejs.org
8484
pnpm install --frozen-lockfile
8585

8686
# Start development server
87-
pnpm dev
87+
node --run dev
8888
```
8989

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

100100
```bash
101101
# Format and lint code
102-
pnpm format
102+
node --run format
103103

104104
# Run tests
105-
pnpm test
105+
node --run test
106106

107107
# Test build
108-
pnpm build
108+
node --run build
109109
```
110110

111111
### 4. Submit Your Contribution

apps/site/.lintstagedrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"**/*.{js,mjs,ts,tsx,md,mdx}": ["prettier --check --write", "eslint --fix"],
3+
"**/*.css": ["stylelint --allow-empty-input", "prettier --write"],
4+
"**/*.{json,yml}": ["prettier --check --write"]
5+
}

apps/site/eslint.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { FlatCompat } from '@eslint/eslintrc';
2-
import importX from 'eslint-plugin-import-x';
2+
import { flatConfigs } from 'eslint-plugin-import-x';
33
import * as mdx from 'eslint-plugin-mdx';
44
import react from 'eslint-plugin-react';
55
import tseslint from 'typescript-eslint';
@@ -20,12 +20,12 @@ const compatConfig = compat.config({
2020

2121
export default tseslint.config(
2222
...baseConfig,
23-
{ ignores: ['pages/en/blog/**/*.{md,mdx}/**'] },
23+
{ ignores: ['pages/en/blog/**/*.{md,mdx}/**', 'public'] },
2424
{
2525
extends: [
2626
react.configs.flat['jsx-runtime'],
2727
...tseslint.configs.recommended,
28-
importX.flatConfigs.typescript,
28+
flatConfigs.typescript,
2929
...compatConfig,
3030
],
3131
files: ['**/*.{js,md,mdx,mjs,ts,tsx}'],

0 commit comments

Comments
 (0)