-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
p2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)
Description
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:
| await (await import('@antfu/install-pkg')).installPackage(dependency, { dev: true }) |
Reproduction
- Create any vitest project using a specific, non-latest version
- Run vitest --browser
- Get prompted, see the installed version being different than the Vitest CLI
Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
p2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)