Update workflows and documentation for pnpm exec usage#33194
Conversation
There was a problem hiding this comment.
Pull request overview
Updates repository automation and documentation to prefer pnpm exec over pnpx when invoking nx, aligning CI and local guidance with pnpm’s recommended execution pattern.
Changes:
- Replaced
pnpx nx ...withpnpm exec nx ...in multiple GitHub Actions workflows. - Updated monorepo build script (
tools/scripts/build-all.ts) to usepnpm exec nx .... - Updated demos tooling and repository documentation to reflect the new invocation style.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/scripts/build-all.ts | Switches Nx invocations in the build-all script from pnpx to pnpm exec. |
| apps/demos/package.json | Updates demos lint script to use pnpm exec nx .... |
| .github/workflows/wrapper_tests.yml | Updates wrapper CI steps to call Nx via pnpm exec. |
| .github/workflows/themebuilder_tests.yml | Updates themebuilder build/test steps to call Nx via pnpm exec. |
| .github/workflows/testcafe_tests.yml | Updates DevExtreme build steps for TestCafe workflow to pnpm exec nx .... |
| .github/workflows/styles.yml | Updates SCSS test command to pnpm exec nx .... |
| .github/workflows/run-testcafe-on-gh-pages.yml | Updates TestCafe invocation to pnpm exec nx .... |
| .github/workflows/renovation.yml | Updates Jest Nx target invocation to pnpm exec nx .... |
| .github/workflows/qunit_tests.yml | Updates SystemJS build target invocation to pnpm exec nx .... |
| .github/workflows/playgrounds_tests.yml | Updates playground build/pack/compile Nx invocations to pnpm exec nx .... |
| .github/workflows/lint.yml | Updates Nx-based lint workflow steps to pnpm exec nx .... |
| .github/workflows/demos_visual_tests.yml | Updates demos build/lint/test Nx invocations to pnpm exec nx .... |
| .github/workflows/demos_unit_tests.yml | Updates demos unit test Nx invocation to pnpm exec nx .... |
| .github/workflows/default_workflow.yml | Updates default workflow nx run-many call to pnpm exec nx .... |
| .github/copilot-instructions.md | Updates documented commands from pnpx nx ... to pnpm exec nx .... |
Comments suppressed due to low confidence (1)
.github/workflows/demos_visual_tests.yml:253
- This step runs
pnpm exec nx prepare-bundlesfromapps/demos, but that workspace package does not includenxin its dependencies. Consider usingpnpm -w exec nx ...(or running Nx from the repo root) so thenxbinary is resolved reliably.
- name: Prepare bundles
working-directory: apps/demos
run: pnpm exec nx prepare-bundles
- name: Demos - Run tsc
working-directory: apps/demos
run: pnpm exec tsc --noEmit
| "lint-demos": "eslint ./Demos", | ||
| "lint-css": "stylelint **/*.{css,vue}", | ||
| "lint-non-demos": "pnpx nx run-many -t lint-js lint-css lint-html -p devextreme-demos", | ||
| "lint-non-demos": "pnpm exec nx run-many -t lint-js lint-css lint-html -p devextreme-demos", |
There was a problem hiding this comment.
apps/demos does not list nx as a dependency/devDependency, so pnpm exec nx ... may fail when this script is run from that workspace package. To ensure the nx binary resolves from the workspace root (where it is declared), consider switching this to pnpm -w exec nx ... (or moving the Nx invocation to a root-level script).
| "lint-non-demos": "pnpm exec nx run-many -t lint-js lint-css lint-html -p devextreme-demos", | |
| "lint-non-demos": "pnpm -w exec nx run-many -t lint-js lint-css lint-html -p devextreme-demos", |
| # DISABLE_DEMO_TEST_SETTINGS: comparison-options # Uncomment to ignore the `comparison-options` field | ||
| CI_ENV: true # The `ignore` field in the visualtestrc.json should be disabled when running test locally | ||
| run: pnpx nx test-testcafe | ||
| run: pnpm exec nx test-testcafe |
There was a problem hiding this comment.
This step runs pnpm exec nx ... from devextreme/apps/demos, but that workspace package does not declare nx as a dependency. Consider using pnpm -w exec nx ... (or running the command from the repo root) so the nx binary is guaranteed to be available.
| run: pnpm exec nx test-testcafe | |
| run: pnpm -w exec nx test-testcafe |
| - name: Run unit tests | ||
| working-directory: apps/demos | ||
| run: pnpx nx test | ||
| run: pnpm exec nx test |
There was a problem hiding this comment.
This job runs pnpm exec nx test from apps/demos, but devextreme-demos does not declare nx as a dependency. To avoid CI failures, run Nx from the workspace root (e.g. pnpm -w exec nx test devextreme-demos) or remove the working-directory and execute from repo root.
| - name: Run lint on all demos | ||
| if: needs.determine-framework-tests-scope.outputs.framework-tests-scope == 'all' | ||
| working-directory: apps/demos | ||
| env: | ||
| DEBUG: 'eslint:cli-engine,stylelint:standalone' | ||
| NODE_OPTIONS: --max-old-space-size=8192 | ||
| run: pnpx nx lint | ||
| run: pnpm exec nx lint |
There was a problem hiding this comment.
pnpm exec nx lint is executed with working-directory: apps/demos, but apps/demos does not declare nx. To ensure Nx is available in CI, run it from the workspace root (e.g. pnpm -w exec nx lint devextreme-demos) or execute the step from repo root.
| # DISABLE_DEMO_TEST_SETTINGS: comparison-options # Uncomment to ignore the `comparison-options` field | ||
| CI_ENV: true # The `ignore` field in the visualtestrc.json should be disabled when running test locally | ||
| run: pnpx nx test-testcafe | ||
| run: pnpm exec nx test-testcafe |
There was a problem hiding this comment.
This TestCafe step runs pnpm exec nx test-testcafe from apps/demos, but that workspace package does not list nx as a dependency. Consider switching to pnpm -w exec nx ... (or running from workspace root) to avoid command-not-found failures.
| run: pnpm exec nx test-testcafe | |
| run: pnpm -w exec nx test-testcafe |
| - name: Build | ||
| working-directory: ./packages/devextreme | ||
| shell: bash | ||
| env: | ||
| DEVEXTREME_TEST_CI: "true" | ||
| run: pnpx nx build:systemjs | ||
| run: pnpm exec nx build:systemjs |
There was a problem hiding this comment.
This step runs pnpm exec nx build:systemjs from packages/devextreme, but that package doesn’t declare nx as a dependency. To avoid CI breakage, run Nx from the workspace root (e.g. pnpm -w exec nx build:systemjs) or remove the working-directory for this Nx call.
| - name: Build | ||
| working-directory: ./packages/devextreme | ||
| run: pnpx nx build | ||
| run: pnpm exec nx build | ||
|
|
There was a problem hiding this comment.
This step runs pnpm exec nx build from packages/devextreme, but that package doesn’t declare nx. Consider running Nx from the workspace root (pnpm -w exec nx build ...) or executing from repo root to ensure the nx binary is found.
| - name: Build | ||
| working-directory: ./packages/devextreme-${{ matrix.ARGS.platform }} | ||
| run: pnpx nx pack | ||
| run: pnpm exec nx pack |
There was a problem hiding this comment.
This step runs pnpm exec nx pack from packages/devextreme-${{ matrix.ARGS.platform }}, but those packages don’t declare nx as a dependency. Use pnpm -w exec nx pack ... (or run from repo root) so Nx resolution is consistent.
| run: pnpm exec nx pack | |
| run: pnpm -w exec nx pack |
| - name: Check sources compilation | ||
| working-directory: ./apps/${{ matrix.ARGS.platform }} | ||
| run: pnpx nx build | ||
| run: pnpm exec nx build |
There was a problem hiding this comment.
This step runs pnpm exec nx build from apps/${{ matrix.ARGS.platform }}, but the playground apps don’t declare nx as a dependency. Consider executing Nx from the workspace root (pnpm -w exec nx build ...) or running from repo root.
| run: pnpm exec nx build | |
| run: pnpm -w exec nx build |
| ```bash | ||
| # From e2e/testcafe-devextreme | ||
| pnpx nx run testcafe-devextreme:test | ||
| pnpm exec nx run testcafe-devextreme:test |
There was a problem hiding this comment.
The instructions say to run this from e2e/testcafe-devextreme, but that workspace package doesn’t declare nx as a dependency. To avoid “command not found”, either update the text to run the command from the repo root, or use pnpm -w exec nx ... explicitly.
| pnpm exec nx run testcafe-devextreme:test | |
| pnpm -w exec nx run testcafe-devextreme:test |
Cherry-pick of #33186