You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running tests with specific flags which the project is not ready for, e.g. --ui or --browser, the CLI detects the need to install such dependencies:
However, the dependencies don't follow the version of the CLI. In my project, I'm using vitest: 2.0.0-beta.9 and when prompted to install @vitest/browser, I end up getting latest (1.6.0). This causes further issues as the packages won't play nicely if they differ in versions, especially major versions.
It would be nice if the code which installs dependencies, if such dependencies are vitest ones e.g. @vitest/browser or @vitest/ui, that they use the same version of the installed Vitest CLI:
This is also an issue with code coverage packages. As we (intentionally) require all Vitest packages to be on same version, it's not guaranteed that vitest@1.2.0 and @vitest/<package>@1.5.0 work together. When auto-installing prompted coverage packages while running older versions of Vitest, you may end up in a situation where newer version @vitest/coverage-* is installed.
Describe the bug
When running tests with specific flags which the project is not ready for, e.g. --ui or --browser, the CLI detects the need to install such dependencies:
However, the dependencies don't follow the version of the CLI. In my project, I'm using
vitest: 2.0.0-beta.9
and when prompted to install@vitest/browser
, I end up getting latest (1.6.0). This causes further issues as the packages won't play nicely if they differ in versions, especially major versions.It would be nice if the code which installs dependencies, if such dependencies are vitest ones e.g.
@vitest/browser
or@vitest/ui
, that they use the same version of the installed Vitest CLI:vitest/packages/vitest/src/node/packageInstaller.ts
Line 43 in 52d545b
Reproduction
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: