-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Publishing next packages: remove commit hash from version #74589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: 0 B Total Size: 3.05 MB ℹ️ View Unchanged
|
Currently the
nextpackages are published with a version string like:There is the
--preidstring that saysnext.06ee73755, it includes the git commit SHA, and there is the.0suffix which is a prerelease version auto-incremented by Lerna.The problem with this is that it's not clear which of two adjacent
nextreleases has higher precedence. Is it7.37.1-next.06ee73755.0or7.37.1-next.ba3aee3a2.0? The semver rules say that the two hash strings are to be compared as strings, in lexicographic order. That means that the06ee73755version is considered older thanba3aee3a2because'0' < 'b'. But it fact they were published in the opposite order! Upgrades in consumerpackage.jsonfiles will be unreliable, as we noticed in Automattic/jetpack#46397 (comment)This patch changes the versioning to:
The part that matters for comparisons is the
.0suffix which is auto-incremented by Lerna on each release. And the SHA commit is only after the+sign.