chore(publish): Publish NPM packages in order of dependency tree #8579
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
npm
target 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-run
and it seems to pick up the correct packages for each target (and it'll error if a package was not found).