Skip to content

Commit 49f373c

Browse files
authored
[chore] Replace npx with pnpx across the codebase (#5329)
## Summary - Migrated all `npx` commands to `pnpx` to align with the pnpm ecosystem - Updated all occurrences across the codebase for consistency ## Changes - **Package.json scripts**: Updated test:browser, preinstall, and collect-i18n scripts - **GitHub Actions workflows**: Updated all workflow files that use npx (test-ui, i18n, update-manager-types, etc.) - **Documentation**: Updated browser_tests/README.md and docs/extensions/development.md - **Husky pre-commit hook**: Updated lint-staged and tsx commands - **MCP configuration**: Updated .mcp.json to use pnpx ## Test Plan - [ ] CI tests pass - [ ] Local development commands work with pnpx - [ ] GitHub Actions workflows execute successfully 🤖 Generated with Claude Code ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5329-chore-Replace-npx-with-pnpx-across-the-codebase-2646d73d36508127bd43d14b8364aeb1) by [Unito](https://www.unito.io)
1 parent 9678a87 commit 49f373c

File tree

11 files changed

+24
-24
lines changed

11 files changed

+24
-24
lines changed

.github/workflows/i18n-custom-nodes.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ jobs:
7878
wait-for-it --service 127.0.0.1:8188 -t 600
7979
working-directory: ComfyUI
8080
- name: Install Playwright Browsers
81-
run: npx playwright install chromium --with-deps
81+
run: pnpm exec playwright install chromium --with-deps
8282
working-directory: ComfyUI_frontend
8383
- name: Start dev server
8484
# Run electron dev server as it is a superset of the web dev server
8585
# We do want electron specific UIs to be translated.
8686
run: pnpm dev:electron &
8787
working-directory: ComfyUI_frontend
8888
- name: Capture base i18n
89-
run: npx tsx scripts/diff-i18n capture
89+
run: pnpm exec tsx scripts/diff-i18n capture
9090
working-directory: ComfyUI_frontend
9191
- name: Update en.json
9292
run: pnpm collect-i18n
@@ -99,7 +99,7 @@ jobs:
9999
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
100100
working-directory: ComfyUI_frontend
101101
- name: Diff base vs updated i18n
102-
run: npx tsx scripts/diff-i18n diff
102+
run: pnpm exec tsx scripts/diff-i18n diff
103103
working-directory: ComfyUI_frontend
104104
- name: Update i18n in custom node repository
105105
run: |

.github/workflows/i18n-node-defs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: Comfy-Org/ComfyUI_frontend_setup_action@v3
1717
- name: Install Playwright Browsers
18-
run: npx playwright install chromium --with-deps
18+
run: pnpm exec playwright install chromium --with-deps
1919
working-directory: ComfyUI_frontend
2020
- name: Start dev server
2121
# Run electron dev server as it is a superset of the web dev server

.github/workflows/i18n.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
restore-keys: |
3434
playwright-browsers-${{ runner.os }}-
3535
- name: Install Playwright Browsers
36-
run: npx playwright install chromium --with-deps
36+
run: pnpm exec playwright install chromium --with-deps
3737
working-directory: ComfyUI_frontend
3838
- name: Start dev server
3939
# Run electron dev server as it is a superset of the web dev server

.github/workflows/test-browser-exp.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
restore-keys: |
2020
playwright-browsers-${{ runner.os }}-
2121
- name: Install Playwright Browsers
22-
run: npx playwright install chromium --with-deps
22+
run: pnpm exec playwright install chromium --with-deps
2323
working-directory: ComfyUI_frontend
2424
- name: Run Playwright tests and update snapshots
2525
id: playwright-tests
26-
run: npx playwright test --update-snapshots
26+
run: pnpm exec playwright test --update-snapshots
2727
continue-on-error: true
2828
working-directory: ComfyUI_frontend
2929
- uses: actions/upload-artifact@v4

.github/workflows/test-ui.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148

149149
- name: Run Playwright tests (Shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
150150
id: playwright
151-
run: npx playwright test --project=chromium --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --reporter=blob
151+
run: pnpm exec playwright test --project=chromium --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --reporter=blob
152152
working-directory: ComfyUI_frontend
153153
env:
154154
PLAYWRIGHT_BLOB_OUTPUT_DIR: ../blob-report
@@ -230,7 +230,7 @@ jobs:
230230
run: |
231231
# Run tests with both HTML and JSON reporters
232232
PLAYWRIGHT_JSON_OUTPUT_NAME=playwright-report/report.json \
233-
npx playwright test --project=${{ matrix.browser }} \
233+
pnpm exec playwright test --project=${{ matrix.browser }} \
234234
--reporter=list \
235235
--reporter=html \
236236
--reporter=json
@@ -281,10 +281,10 @@ jobs:
281281
- name: Merge into HTML Report
282282
run: |
283283
# Generate HTML report
284-
npx playwright merge-reports --reporter=html ./all-blob-reports
284+
pnpm exec playwright merge-reports --reporter=html ./all-blob-reports
285285
# Generate JSON report separately with explicit output path
286286
PLAYWRIGHT_JSON_OUTPUT_NAME=playwright-report/report.json \
287-
npx playwright merge-reports --reporter=json ./all-blob-reports
287+
pnpm exec playwright merge-reports --reporter=json ./all-blob-reports
288288
working-directory: ComfyUI_frontend
289289

290290
- name: Upload HTML report

.github/workflows/update-manager-types.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
- name: Generate Manager API types
6969
run: |
7070
echo "Generating TypeScript types from ComfyUI-Manager@${{ steps.manager-info.outputs.commit }}..."
71-
npx openapi-typescript ./ComfyUI-Manager/openapi.yaml --output ./src/types/generatedManagerTypes.ts
71+
pnpm dlx openapi-typescript ./ComfyUI-Manager/openapi.yaml --output ./src/types/generatedManagerTypes.ts
7272
7373
- name: Validate generated types
7474
run: |

.github/workflows/update-registry-types.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
- name: Generate API types
6969
run: |
7070
echo "Generating TypeScript types from comfy-api@${{ steps.api-info.outputs.commit }}..."
71-
npx openapi-typescript ./comfy-api/openapi.yml --output ./src/types/comfyRegistryTypes.ts
71+
pnpm dlx openapi-typescript ./comfy-api/openapi.yml --output ./src/types/comfyRegistryTypes.ts
7272
7373
- name: Validate generated types
7474
run: |

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env bash
22

33
pnpm exec lint-staged
4-
pnpm exec tsx scripts/check-unused-i18n-keys.ts
4+
pnpm exec tsx scripts/check-unused-i18n-keys.ts

browser_tests/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ cp -r tools/devtools/* /path/to/your/ComfyUI/custom_nodes/ComfyUI_devtools/
2929
Ensure you have Node.js v20 or v22 installed. Then, set up the Chromium test driver:
3030

3131
```bash
32-
npx playwright install chromium --with-deps
32+
pnpm exec playwright install chromium --with-deps
3333
```
3434

3535
### Environment Configuration
@@ -73,7 +73,7 @@ For tests that specifically need to test release functionality, see the example
7373
**Always use UI mode for development:**
7474

7575
```bash
76-
npx playwright test --ui
76+
pnpm exec playwright test --ui
7777
```
7878

7979
UI mode features:
@@ -89,8 +89,8 @@ UI mode features:
8989
For CI or headless testing:
9090

9191
```bash
92-
npx playwright test # Run all tests
93-
npx playwright test widget.spec.ts # Run specific test file
92+
pnpm exec playwright test # Run all tests
93+
pnpm exec playwright test widget.spec.ts # Run specific test file
9494
```
9595

9696
### Local Development Config
@@ -386,7 +386,7 @@ export default defineConfig({
386386
Option 2 - Generate local baselines for comparison:
387387

388388
```bash
389-
npx playwright test --update-snapshots
389+
pnpm exec playwright test --update-snapshots
390390
```
391391

392392
### Creating New Screenshot Baselines

docs/extensions/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pnpm build
110110

111111
For faster iteration during development, use watch mode:
112112
```bash
113-
npx vite build --watch
113+
pnpm exec vite build --watch
114114
```
115115

116116
Note: Watch mode provides faster rebuilds than full builds, but still no hot reload

0 commit comments

Comments
 (0)