-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix(core): nx migrate should accept tags other than latest and next for community packages #15673
fix(core): nx migrate should accept tags other than latest and next for community packages #15673
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
// This doesn't seem like a valid version, lets check if its a tag on the registry. | ||
if (!coerce(version)) | ||
return normalizeVersion( | ||
execSync(`npm view ${pkg}@version version`).toString().trim() |
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.
Use packageRegistryView
☁️ Nx Cloud ReportCI is running/has finished running commands for commit bf66b65. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
bbe134e
to
f59b668
Compare
…or community packages
f59b668
to
a5c9e93
Compare
1f8106a
to
fb3528f
Compare
Great stuff. @AgentEnder the version used was 6.0.0-A.3 because of a split taking care only of part[0] and part[1] |
76aed37
to
8d7ec36
Compare
8d7ec36
to
bf66b65
Compare
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
nx migrate mypackage@alpha
fails, resolves the version as 0.0.0 since the tag is not normalized properly.Expected Behavior
nx migrate mypackage@alpha
fails, resolves the version as 0.0.0 since the tag is not normalized properly.Alt solutions:
Instead of resolving on the registry ahead of time, we could feasibly just inline a list of accepted tags. This wouldn't fix the issue in the general case, but realistically a list of
['prev', 'previous', 'next', 'latest', 'beta', 'alpha', 'rc', 'dev']
would likely hit most use cases.Related Issue(s)
Fixes #15633