Skip to content

chore: upgrade vitest to 5.1.2 to clear dev dependency advisories - #364

Open
philippedev101 wants to merge 1 commit into
bytecodealliance:mainfrom
philippedev101:chore/upgrade-vitest
Open

philippedev101 wants to merge 1 commit into
bytecodealliance:mainfrom
philippedev101:chore/upgrade-vitest

Conversation

@philippedev101

Copy link
Copy Markdown

This upgrades vitest from ^3.2.4 to ^5.1.2 and updates package-lock.json, clearing all 9 npm audit vulnerabilities (2 critical, 6 high, 1 moderate) in the dev dependency tree (vitest, tinypool, @vitest/mocker, vite, rollup, postcss, picomatch, nanoid, and source-map-js). Contributors get a clean npm audit with a smaller dev dependency graph.

Upgrading to Vitest 5 also surfaced one ESM resolution issue in test/util.js: join('./test/output', 'wasi-test') strips the leading ./, leaving import('test/output/wasi-test/wasi/component.js'), which Vitest 5 rejects as an unresolved bare package specifier. Converting that path with pathToFileURL(resolve(wasiDir, 'component.js')).href resolves the module cleanly under Vitest 5 and avoids Windows bare-path import issues as well.

Verified with npm audit (0 vulnerabilities) and npm run test:release (7 test files, 79 passed, 1 skipped).

Upgrade devDependencies.vitest from ^3.2.4 to ^5.1.2 and regenerate package-lock.json, clearing all 9 npm audit vulnerabilities (2 critical, 6 high, 1 moderate) across vitest, tinypool, @vitest/mocker, vite, rollup, postcss, picomatch, nanoid, and source-map-js.

Convert the dynamic import path in test/util.js setupComponent() to a file:// URL via pathToFileURL(resolve(...)).href. Path joining './test/output' stripped the leading './', leaving a bare relative specifier that Vitest 5's ESM resolver rejects as an unresolved package name.
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