Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[chore] Use pnpm exec for installed deps, pnpm dlx for one-time packages
- Use 'pnpm exec' for dependencies that are installed (playwright, tsx, lint-staged, nx)
- Use 'pnpm dlx' for packages that are run once without installation (wrangler, openapi-typescript, only-allow)
- Update MCP config to use 'pnpm dlx' instead of 'pnpx -y'
  • Loading branch information
snomiao committed Sep 26, 2025
commit cfde2f4d97e1e7d939eb1b7ab22304f5d07a0037
6 changes: 3 additions & 3 deletions .github/workflows/i18n-custom-nodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ jobs:
wait-for-it --service 127.0.0.1:8188 -t 600
working-directory: ComfyUI
- name: Install Playwright Browsers
run: pnpx playwright install chromium --with-deps
run: pnpm exec playwright install chromium --with-deps
working-directory: ComfyUI_frontend
- name: Start dev server
# Run electron dev server as it is a superset of the web dev server
# We do want electron specific UIs to be translated.
run: pnpm dev:electron &
working-directory: ComfyUI_frontend
- name: Capture base i18n
run: pnpx tsx scripts/diff-i18n capture
run: pnpm exec tsx scripts/diff-i18n capture
working-directory: ComfyUI_frontend
- name: Update en.json
run: pnpm collect-i18n
Expand All @@ -100,7 +100,7 @@ jobs:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
working-directory: ComfyUI_frontend
- name: Diff base vs updated i18n
run: pnpx tsx scripts/diff-i18n diff
run: pnpm exec tsx scripts/diff-i18n diff
working-directory: ComfyUI_frontend
- name: Update i18n in custom node repository
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/i18n-node-defs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: Comfy-Org/ComfyUI_frontend_setup_action@v3
- name: Install Playwright Browsers
run: pnpx playwright install chromium --with-deps
run: pnpm exec playwright install chromium --with-deps
working-directory: ComfyUI_frontend
- name: Start dev server
# Run electron dev server as it is a superset of the web dev server
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/i18n.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
restore-keys: |
playwright-browsers-${{ runner.os }}-
- name: Install Playwright Browsers
run: pnpx playwright install chromium --with-deps
run: pnpm exec playwright install chromium --with-deps
working-directory: ComfyUI_frontend
- name: Start dev server
# Run electron dev server as it is a superset of the web dev server
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-playwright-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
RETRY_COUNT=$((RETRY_COUNT + 1))
echo "Deployment attempt $RETRY_COUNT of $MAX_RETRIES..."

if pnpx wrangler pages deploy playwright-report --project-name=${{ steps.project-name.outputs.name }} --branch=${{ steps.project-name.outputs.branch }}; then
if pnpm dlx wrangler pages deploy playwright-report --project-name=${{ steps.project-name.outputs.name }} --branch=${{ steps.project-name.outputs.branch }}; then
SUCCESS=true
echo "Deployment successful on attempt $RETRY_COUNT"
else
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-browser-exp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
restore-keys: |
playwright-browsers-${{ runner.os }}-
- name: Install Playwright Browsers
run: pnpx playwright install chromium --with-deps
run: pnpm exec playwright install chromium --with-deps
working-directory: ComfyUI_frontend
- name: Run Playwright tests and update snapshots
id: playwright-tests
run: pnpx playwright test --update-snapshots
run: pnpm exec playwright test --update-snapshots
continue-on-error: true
working-directory: ComfyUI_frontend
- uses: actions/upload-artifact@v4
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ jobs:
working-directory: ComfyUI

- name: Install Playwright Browsers
run: pnpx playwright install chromium --with-deps
run: pnpm exec playwright install chromium --with-deps
working-directory: ComfyUI_frontend

- name: Run Playwright tests (Shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
id: playwright
run: pnpx playwright test --project=chromium --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --reporter=blob
run: pnpm exec playwright test --project=chromium --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --reporter=blob
working-directory: ComfyUI_frontend
env:
PLAYWRIGHT_BLOB_OUTPUT_DIR: ../blob-report
Expand Down Expand Up @@ -189,12 +189,12 @@ jobs:
working-directory: ComfyUI

- name: Install Playwright Browsers
run: pnpx playwright install chromium --with-deps
run: pnpm exec playwright install chromium --with-deps
working-directory: ComfyUI_frontend

- name: Run Playwright tests (${{ matrix.browser }})
id: playwright
run: pnpx playwright test --project=${{ matrix.browser }} --reporter=html
run: pnpm exec playwright test --project=${{ matrix.browser }} --reporter=html
working-directory: ComfyUI_frontend

- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -240,7 +240,7 @@ jobs:
merge-multiple: true

- name: Merge into HTML Report
run: pnpx playwright merge-reports --reporter html ./all-blob-reports
run: pnpm exec playwright merge-reports --reporter html ./all-blob-reports
working-directory: ComfyUI_frontend

- name: Upload HTML report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-manager-types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Generate Manager API types
run: |
echo "Generating TypeScript types from ComfyUI-Manager@${{ steps.manager-info.outputs.commit }}..."
pnpx openapi-typescript ./ComfyUI-Manager/openapi.yaml --output ./src/types/generatedManagerTypes.ts
pnpm dlx openapi-typescript ./ComfyUI-Manager/openapi.yaml --output ./src/types/generatedManagerTypes.ts

- name: Validate generated types
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-registry-types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Generate API types
run: |
echo "Generating TypeScript types from comfy-api@${{ steps.api-info.outputs.commit }}..."
pnpx openapi-typescript ./comfy-api/openapi.yml --output ./src/types/comfyRegistryTypes.ts
pnpm dlx openapi-typescript ./comfy-api/openapi.yml --output ./src/types/comfyRegistryTypes.ts

- name: Validate generated types
run: |
Expand Down
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

pnpx lint-staged
pnpx tsx scripts/check-unused-i18n-keys.ts
pnpm exec lint-staged
pnpm exec tsx scripts/check-unused-i18n-keys.ts
8 changes: 4 additions & 4 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"mcpServers": {
"playwright": {
"command": "pnpx",
"args": ["-y", "@executeautomation/playwright-mcp-server"]
"command": "pnpm",
"args": ["dlx", "@executeautomation/playwright-mcp-server"]
},
"context7": {
"command": "pnpx",
"args": ["-y", "@upstash/context7-mcp"]
"command": "pnpm",
"args": ["dlx", "@upstash/context7-mcp"]
}
}
}
10 changes: 5 additions & 5 deletions browser_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ _ComfyUI_devtools adds additional API endpoints and nodes to ComfyUI for browser
Ensure you have Node.js v20 or v22 installed. Then, set up the Chromium test driver:

```bash
pnpx playwright install chromium --with-deps
pnpm exec playwright install chromium --with-deps
```

### Environment Configuration
Expand Down Expand Up @@ -76,7 +76,7 @@ For tests that specifically need to test release functionality, see the example
**Always use UI mode for development:**

```bash
pnpx playwright test --ui
pnpm exec playwright test --ui
```

UI mode features:
Expand All @@ -92,8 +92,8 @@ UI mode features:
For CI or headless testing:

```bash
pnpx playwright test # Run all tests
pnpx playwright test widget.spec.ts # Run specific test file
pnpm exec playwright test # Run all tests
pnpm exec playwright test widget.spec.ts # Run specific test file
```

### Local Development Config
Expand Down Expand Up @@ -389,7 +389,7 @@ export default defineConfig({
Option 2 - Generate local baselines for comparison:

```bash
pnpx playwright test --update-snapshots
pnpm exec playwright test --update-snapshots
```

### Creating New Screenshot Baselines
Expand Down
2 changes: 1 addition & 1 deletion docs/extensions/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pnpm build

For faster iteration during development, use watch mode:
```bash
pnpx vite build --watch
pnpm exec vite build --watch
```

Note: Watch mode provides faster rebuilds than full builds, but still no hot reload
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"format:check": "prettier --check './**/*.{js,ts,tsx,vue,mts}' --cache",
"format:no-cache": "prettier --write './**/*.{js,ts,tsx,vue,mts}'",
"format:check:no-cache": "prettier --check './**/*.{js,ts,tsx,vue,mts}'",
"test:browser": "pnpx nx e2e",
"test:browser": "pnpm exec nx e2e",
"test:unit": "nx run test tests-ui/tests",
"test:component": "nx run test src/components/",
"test:litegraph": "vitest run --config vitest.litegraph.config.ts",
"preinstall": "pnpx only-allow pnpm",
"preinstall": "pnpm dlx only-allow pnpm",
"prepare": "husky || true && git config blame.ignoreRevsFile .git-blame-ignore-revs || true",
"preview": "nx preview",
"lint": "eslint src --cache",
Expand All @@ -32,7 +32,7 @@
"knip": "knip --cache",
"knip:no-cache": "knip",
"locale": "lobe-i18n locale",
"collect-i18n": "pnpx playwright test --config=playwright.i18n.config.ts",
"collect-i18n": "pnpm exec playwright test --config=playwright.i18n.config.ts",
"json-schema": "tsx scripts/generate-json-schema.ts",
"storybook": "nx storybook -p 6006",
"build-storybook": "storybook build"
Expand Down