chore: bug reports to include @vitest/* packages versions#2725
chore: bug reports to include @vitest/* packages versions#2725sheremet-va merged 1 commit intovitest-dev:mainfrom
@vitest/* packages versions#2725Conversation
|
The checklist could also include following: - label: Check that the versions of `vitest` and other `@vitest/*` packages are identical
required: trueAny thoughts? |
Maybe instead we should change |
|
Yes, Should the |
I think only coverage packages depend on Vitest. Others can be used without Vitest at all (except for UI maybe). |
|
I think the peer dependencies should be set as following, using {
"name": "vitest",
"version": "0.27.2",
"peerDependencies": {
"@vitest/coverage-c8": "0.27.2",
"@vitest/coverage-istanbul": "0.27.2"
},
"peerDependenciesMeta": {
"@vitest/coverage-c8": {
"optional": true
},
"@vitest/coverage-istanbul": {
"optional": true
}
}
}{
"name": "@vitest/coverage-c8", "//": "Same for @vitest/coverage-istanbul package",
"version": "0.27.2",
"dependencies": {
"//": "No vitest here. This package should only be used in a project that has vitest as dependency. Do not bring it with this package."
},
"peerDependencies": {
"vitest": "0.27.2"
},
"peerDependenciesMeta": {
"vitest": {
"optional": false, "//": "Default value so can be omitted"
}
}
}Currently the $ npm i -D -E vitest@0.26.0
$ npm i -D -E @vitest/coverage-istanbul@0.27.2
$ npm ls vitest
repro@1.0.0 /Users/x/y/repro
├─┬ @vitest/coverage-istanbul@0.27.2
│ └── vitest@0.27.2
└── vitest@0.26.0
# Check from file system as well:
$ grep version node_modules/vitest/package.json
"version": "0.26.0",
$ grep version node_modules/@vitest/coverage-istanbul/package.json
"version": "0.27.2",
$ grep version node_modules/@vitest/coverage-istanbul/node_modules/vitest/package.json
"version": "0.27.2", |
I don't think versions should be hardcoded, |
Yes exactly, this is what the
Using
If the |
|
@AriPerkkio feel free to open PR with the versions then. I don't think we need to mention the same versions in an issue form, since it's not usually a requirement 🤔 |
Include
@vitest/*packages inenvinfo. Helps narrowing down issues like #2716 where users have different versions ofvitestand other@vitest/*packages running.