chore(publish): Publish NPM packages in order of dependency tree#8579
Merged
chore(publish): Publish NPM packages in order of dependency tree#8579
Conversation
npm craft target into one target per package6582b93 to
d130d7b
Compare
Lms24
commented
Jul 18, 2023
|
|
||
| # CDN Bundle Target | ||
| - name: gcs | ||
| id: "browser-cdn-bundles" |
Member
Author
There was a problem hiding this comment.
Decided to also give this an id, as it's not apparent that this target uploads the CDN bundles
mydea
approved these changes
Jul 19, 2023
Member
mydea
left a comment
There was a problem hiding this comment.
Amazing! Great work, this will hopefully help prevent problems in the future 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Following up on #inc-456, this PR splits the previously universal
npmtarget that took care of publishing all packages at once into multiple targets (one for each package).This will ensure that packages are published in the correct order of their sentry dependency tree (e.g. core -> browser -> react, etc..) Furthermore, this theoretically also lets us disable the release of individual packages (which we might want to do if a package was already released).
In addition, this PR now moves NPM targets before other targets, so that no GH releases are created if the actual publishing of artifacts failed previously.
The drawback of this solution is that we have to manually add a new target for new packages we added. Therefore, this PR also adjusts our new package release checklist to do this before cutting the first release. Given that we had failing releases in the past because of incorrectly configured new packages, this might actually be beneficial.
With this change, craft is configured to process the following targets in the given order:
We might want to further group targets to packages (and split up registry targets while at it) but I think for now, we try this publishing approach and avoid creating another ~25 additional targets.
I tested this new config locally with a local craft installation and
--dry-runand it seems to pick up the correct packages for each target (and it'll error if a package was not found).