chore: migrate from yarn/mocha to npm/vitest#101
Merged
Conversation
Resolves all 22 yarn audit vulnerabilities by replacing the mocha + nyc + chai + ts-node toolchain with vitest, and switches the package manager from yarn to npm. - Replace mocha/nyc/chai/ts-node with vitest + @vitest/coverage-v8 - Drop test/helpers/init.js and test/tsconfig.json (mocha-only) - Replace yarn.lock with package-lock.json; convert resolutions to overrides - Update CI and release workflows to use npm - Override uuid to ^11.1.1 to clear remaining node-notifier advisory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves all 22
yarn auditvulnerabilities by replacing the mocha + nyc + chai + ts-node test toolchain with vitest, and switches the package manager from yarn to npm. 21 of the 22 advisories were transitive deps of the old test toolchain (brace-expansion,serialize-javascript,diff); the last one (node-notifier > uuid@8.3.2) is cleared with a singleuuid: ^11.1.1override.Test framework migration
mocha,nyc,chai,ts-node,@types/mocha,@types/chai,eslint-plugin-mochawithvitest+@vitest/coverage-v8describe/itfromvitesttest/helpers/init.jsandtest/tsconfig.json(mocha-specific)mochaconfig block frompackage.jsonand themocha/no-mocha-arrowsrule from eslint configPackage manager migration
yarn.lockwithpackage-lock.jsonand un-ignore it in.gitignoreresolutions→overridesinpackage.jsoncache: npm/npm ci/npm test/npm run lintpackage-manager: npmAlso includes in-flight changes from the
update-release-configs.ymlworkflow that were already present in the working tree (formatting independabot.yml, expandedchangelog-sectionsin release-please configs).Type of Change
Testing
Steps:
npm ci && npm test && npm audit— all green, 0 vulnerabilities.Related Issues
GitHub issue: N/A
GUS work item: N/A