fix: fix canary release versions, use 0.0.0 scheme #5295
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Another attempt to fix the canary release naming convention to avoid
^2.0.0-beta.0a668366c2
picking up another version in lockfile after install.The commit hash should rather not be used as a semver pre-release identifier because commit hashes won't be ordered properly in semver order. Adding the commit hash after the
+
is not used to determine precedence of the canary releases.Also we can't use
2.0.0
prefix because non pre-release versions are picked up in priority over pre-release versions, so user might end-up with a stable release instead of a canary in the future. Switching to0.0.0
makes sure that an user that really wants a canary will get a canary (assuming we'll never publish0.0.0
). React/RN also use0.0.0
https://semver.org/
Relevant spec paragraphs:
Useful for testing: https://semver.npmjs.com/