-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(release)!: releasePublish always returns status code per project #28224
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 latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit ef25d35. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 4 targets
Sent with 💌 from NxCloud. |
loadDotEnvFiles: process.env.NX_LOAD_DOT_ENV_FILES !== 'false', | ||
} | ||
); | ||
if (status !== 0) { |
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.
This never actually did anything after the throw was added at some point
loadDotEnvFiles: process.env.NX_LOAD_DOT_ENV_FILES !== 'false', | ||
} | ||
); | ||
if (status !== 0) { |
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.
This never actually did anything after the throw was added at some point
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. |
BREAKING CHANGE
In v19 of nx, the programmatic usage of
await releasePublish({ ... })
would throw in the case that any project failed to publish. It would return the number0
(to represent the overall exit code) in the case that all projects were successfully published.Now, in v20, the programmatic usage of
await releasePublish({ ... })
will always return aPublishProjectsResult
object, which is a mapping of project names to an object of{ code: number }
for each project. This allows consumers to make informed decisions about which projects failed to publish and decide how to handle it in their release scripts.For example, where there are projects called "pkg-a" and "pkg-b" and "pkg-a" is successfully published and "pkg-b" fails: