Skip to content

fix(react): use pnpm publish for workspace dependency resolution (SD-1908)#2024

Merged
harbournick merged 1 commit intomainfrom
tadeu/sd-1908-superdoc-devreact-latest-has-invalid-dependency-spec
Feb 13, 2026
Merged

fix(react): use pnpm publish for workspace dependency resolution (SD-1908)#2024
harbournick merged 1 commit intomainfrom
tadeu/sd-1908-superdoc-devreact-latest-has-invalid-dependency-spec

Conversation

@tupizz
Copy link
Contributor

@tupizz tupizz commented Feb 13, 2026

Summary

  • Switches @superdoc-dev/react release from @semantic-release/npm to semantic-release-pnpm + custom publish script
  • @semantic-release/npm runs npm publish which does not resolve pnpm workspace:* references — this caused v1.0.0-canary.2 to ship with "superdoc": "workspace:*", breaking npm install for consumers
  • Follows the same pattern as the superdoc package: semantic-release-pnpm for version bumping (npmPublish: false) + scripts/publish-react.cjs calling pnpm publish directly
  • Also avoids the --userconfig flag incompatibility between semantic-release-pnpm and pnpm v10

Note: The @latest dist-tag has already been fixed via CI to point to 1.0.0-rc.2.

Closes SD-1908

Test plan

  • Merge and verify next react release publishes successfully with resolved dependency versions

Copilot AI review requested due to automatic review settings February 13, 2026 18:38
@linear
Copy link

linear bot commented Feb 13, 2026

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/npm with semantic-release-pnpm (npmPublish: false) to handle version bumping
  • Added custom scripts/publish-react.cjs that calls pnpm publish directly to resolve workspace dependencies
  • Follows the same pattern as scripts/publish-superdoc.cjs to 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.

@superdoc-bot
Copy link

superdoc-bot bot commented Feb 13, 2026

🎉 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.
@tupizz tupizz force-pushed the tadeu/sd-1908-superdoc-devreact-latest-has-invalid-dependency-spec branch from 4691db0 to 9b75c47 Compare February 13, 2026 18:46
Copy link
Collaborator

@harbournick harbournick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harbournick harbournick merged commit d09d0f3 into main Feb 13, 2026
3 checks passed
@harbournick harbournick deleted the tadeu/sd-1908-superdoc-devreact-latest-has-invalid-dependency-spec branch February 13, 2026 18:50
@superdoc-bot
Copy link

superdoc-bot bot commented Feb 13, 2026

🎉 This PR is included in @superdoc-dev/react v1.0.0-next.6

The release is available on GitHub release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants