Do you want to request a feature or report a bug?
bug
What is the current behavior?
yarn check fails when version is prefixed with a 'v'.
If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/jeffrey-xiao/yarn-check-error-repro
yarn
yarn check
What is the expected behavior?
Should not error.
Please mention your node.js, yarn and operating system version.
[email protected]
[email protected]
[email protected]
This doesn't seem to be an issue with [email protected] though.
There is a package that sanitizes version.
Feel free to send a PR to use it in the check.js command.
We investigated a bit with @Timpetricola and found the following:
pkg.version would contain a "v" but not after apparentlyI'm not familiar at all witht he codebase but maybe using semver.satisfies instead of !== would fix it ?
cheers
Thanks, @Intrepidd and @TimPetricola.
I see the strict check pkg.version !== packageJson.version was there before but maybe something else moved.
I would suggest calling semver.clean on the version from package.json.
Would you guys send a PR please?
Most helpful comment
We investigated a bit with @Timpetricola and found the following:
pkg.versionwould contain a "v" but not after apparentlyI'm not familiar at all witht he codebase but maybe using
semver.satisfiesinstead of!==would fix it ?cheers