-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Packages: Update the publishing command for npm with next dist tag #29379
Conversation
Size Change: 0 B Total Size: 1.39 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Did you try combining --canary --dist-tag next
?
A question: Do we get anything from having the sha in the version? It looks like that makes the trailing number completely redundant because I'd never expect to have multiple versions from a single sha, i.e. we may have 2.14.4-next.645224df70.0
but never 2.14.4-next.645224df70.1
.
A concern: We'd like to have a nice sequence of "next" releases: 2.14.4-next.0
, 2.14.4-next.1
, etc. With the sha in the middle, it seems like we'll lost this sequencing and not really know the sequence of next builds. Humans can see it, but will semver understand that e.g. 2.14.4-next.abc.1
is newer than 2.14.4-next.fff.1
?
Yes, it would solve the issue with the dist tag, but not the bug that Lerna has as described in the description:
You can see the issue when comparing the version published with
vs with the new approach:
In fact, in the
The issue is that we are always synchronizing
Yes, we do, but if we use
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable given the issues we've encountered. Thanks for the explanations.
I'm happy to iterate if there is a simpler solution to use |
Description
I tried publishing to npm with the
next
dist tag earlier today as documented on WordPress Slack:https://wordpress.slack.com/archives/C5UNMSU4R/p1614334180022200
However, there were two issues discovered:
canary
dist tag rather thannext
--canary
in Lerna is buggy, it doesn’t take into account the most recen version inpackage.json
, so versions might be outdated when they change in the release branch, related Lerna issue: lerna publish --canary yields unpredicted version number lerna/lerna#2622The revised approach takes a bit different approach:
next
tag is used for publishing--canary
flag it runslerna version
with the dist id composed of the wordnext
and the "sha" of the latest commitExample versions published:
Online Semver checker seems to be mildly satisfied:
How has this been tested?
I executed:
./bin/commander.js npm-next
In theory, it should be possible to run this command again since it syncs
wp/next
withrelease/10.1
and adds two commits so there always is a new "sha" created. It's a bit impractical though as it will update over 40package.json
files that changed between releases, so it will trigger publishing for all those packages creating git tag for each of them.Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: