Skip to content

chore: run vitest without looking npx up on PATH - #333

Merged
kurkle merged 1 commit into
mainfrom
chore/fixtures-no-npx
Nov 21, 2026
Merged

kurkle merged 1 commit into
mainfrom
chore/fixtures-no-npx

Conversation

@kurkle

@kurkle kurkle commented Nov 21, 2026

Copy link
Copy Markdown
Owner

SonarCloud flags spawnSync('npx', ...) in scripts/update-fixtures.mjs (rule S4036), because the command is looked up through PATH.

This runs vitest's own CLI file (vitest.mjs, resolved from the installed vitest package) with the current Node binary (process.execPath) instead. The config file and the arguments passed to vitest are unchanged, and extra CLI arguments are still forwarded.

Checked by running npm run fixtures:update (exit code 0, all fixture tests pass, no fixture images change) and by running the script with PATH=/usr/bin:/bin, where npx is not found (exit code 0).

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying chartjs-plugin-gradient with  Cloudflare Pages  Cloudflare Pages

Latest commit: c86cf57
Status: ✅  Deploy successful!
Preview URL: https://e2084483.chartjs-plugin-gradient.pages.dev
Branch Preview URL: https://chore-fixtures-no-npx.chartjs-plugin-gradient.pages.dev

View logs

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 12.7 kB

ℹ️ View Unchanged
Filename Size
dist/chartjs-plugin-gradient.cjs 3.63 kB
dist/chartjs-plugin-gradient.esm.js 3.47 kB
dist/chartjs-plugin-gradient.js 3.63 kB
dist/chartjs-plugin-gradient.min.js 2.02 kB

compressed-size-action

@kurkle
kurkle merged commit 9ce6edd into main Nov 21, 2026
6 checks passed
@kurkle
kurkle deleted the chore/fixtures-no-npx branch November 21, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant