fix(ci): use bun pm pack to resolve workspace:^ deps on publish#36
Open
47PADO47 wants to merge 4 commits into
Open
fix(ci): use bun pm pack to resolve workspace:^ deps on publish#3647PADO47 wants to merge 4 commits into
47PADO47 wants to merge 4 commits into
Conversation
changeset publish uses npm pack internally which ships workspace:^ references as-is, causing install failures for consumers. bun pm pack resolves them to actual semver versions before creating the tarball. - Add scripts/publish.sh: replaces changeset publish with a loop that runs bun pm pack per-package then npm publish <tarball> - Call changeset tag at the end to create git tags (was done by changeset publish) - Update GitHub Packages step in release.yml with the same bun pm pack pattern - Update publish-packages script to call the new script
🦋 Changeset detectedLatest commit: cf2fb1d The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@padosoft/react 1.0.0 and @padosoft/logger 1.4.0 were published with workspace:^ dep references due to the npm pack bug. These changesets trigger new versions (1.1.0 / 1.4.1) that will be published cleanly once the bun pm pack CI fix is in place.
There was a problem hiding this comment.
Pull request overview
This PR updates the release/publish flow to avoid publishing tarballs whose package.json still contains workspace:^ dependency specifiers by packing with bun pm pack and publishing the resulting .tgz artifacts.
Changes:
- Add
scripts/publish.shto pack each workspace package withbun pm pack, thennpm publishthe produced tarball and runchangeset tag. - Update the root
publish-packagesscript to use the new publish script (instead ofchangeset publish). - Update the GitHub Packages publish step in
release.ymlto publish tarballs produced bybun pm pack.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| scripts/publish.sh | New publish script that packs via Bun (resolving workspace:^) before publishing to npm. |
| package.json | Switch publish-packages script to use scripts/publish.sh. |
| .github/workflows/release.yml | Publish to GitHub Packages via Bun-packed tarballs instead of publishing directories. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Problem
changeset publishcallsnpm packinternally, which shipsworkspace:^dependency references as-is in the tarball'spackage.json. Consumers then get install failures like:Affected packages:
@padosoft/react,@padosoft/logger,@padosoft/cli,@padosoft/openapi-client,@padosoft/utilities,@padosoft/zod-to-openapi-client.Fix
Replace
changeset publishwith a customscripts/publish.shthat:packages/*/bun pm packinside each package directory — this resolvesworkspace:^to real semver before creating the tarballnpm publish <file>.tgzchangeset tagto create git tags (previously done bychangeset publish)The GitHub Packages publishing step in
release.ymlis fixed with the same pattern.Test plan
npm view @padosoft/react dependenciesshows real semver (e.g.^1.3.2) notworkspace:^🤖 Generated with Claude Code