yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.42k stars 2.72k forks source link

Unable to set a custom non-semver version number #8567

Open binarykitchen opened 3 years ago

binarykitchen commented 3 years ago

Hello folks

Tried here to set version in package.json in a non-semver format (our company has a very different versioning).

All my attempts have failed so far and yarn always complains that it must be in x.y.z format. Even the hidden config looseSemver doesn't have an impact.

Here an example

$ yarn version --no-git-tag-version --new-version 'I am a non-semver version number'
yarn version v1.22.4
error Invalid version supplied.
info Visit https://yarnpkg.com/en/docs/cli/version for documentation about this command.

Would be great to allow this. Versioning format cannot be always semver, there are companies out there using a totally different verisoning.

netogildo commented 3 years ago

I have the same problem, I need to set a different versioning