fix(react): use pnpm publish for workspace dependency resolution (SD-1908)#2024
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical publishing issue in the @superdoc-dev/react package by switching from @semantic-release/npm to semantic-release-pnpm with a custom publish script. The previous setup caused v1.0.0-canary.2 to ship with unresolved workspace:* dependencies, breaking consumer installations. The solution follows the established pattern used by the superdoc package.
Changes:
- Replaced
@semantic-release/npmwithsemantic-release-pnpm(npmPublish: false) to handle version bumping - Added custom
scripts/publish-react.cjsthat callspnpm publishdirectly to resolve workspace dependencies - Follows the same pattern as
scripts/publish-superdoc.cjsto ensure consistent release processes
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/publish-react.cjs | New custom publish script that calls pnpm publish to properly resolve workspace dependencies |
| packages/react/.releaserc.cjs | Updated semantic-release config to use semantic-release-pnpm + custom publish script instead of @semantic-release/npm |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🎉 This PR is included in @superdoc-dev/react v1.0.0-test.1 The release is available on GitHub release |
…1908) The react package was using @semantic-release/npm which runs `npm publish` and does not resolve pnpm workspace:* references. This caused version 1.0.0-canary.2 to be published with "superdoc": "workspace:*" as a dependency, breaking npm installs for consumers. Switch to semantic-release-pnpm (for version bumping, npmPublish: false) + a custom publish script that calls `pnpm publish` directly, matching the pattern used by the superdoc package. This avoids the --userconfig incompatibility with pnpm v10 while ensuring workspace:* references are resolved on publish.
4691db0 to
9b75c47
Compare
|
🎉 This PR is included in @superdoc-dev/react v1.0.0-next.6 The release is available on GitHub release |
Summary
@superdoc-dev/reactrelease from@semantic-release/npmtosemantic-release-pnpm+ custom publish script@semantic-release/npmrunsnpm publishwhich does not resolve pnpmworkspace:*references — this caused v1.0.0-canary.2 to ship with"superdoc": "workspace:*", breakingnpm installfor consumerssuperdocpackage:semantic-release-pnpmfor version bumping (npmPublish: false) +scripts/publish-react.cjscallingpnpm publishdirectly--userconfigflag incompatibility betweensemantic-release-pnpmand pnpm v10Note: The
@latestdist-tag has already been fixed via CI to point to1.0.0-rc.2.Closes SD-1908
Test plan