Skip to content

fix(release): a package not on npm yet is skipped by the publish step, not attempted - #7391

Closed
miguel-heygen wants to merge 1 commit into
mainfrom
fix/publish-skips-private-packages
Closed

miguel-heygen wants to merge 1 commit into
mainfrom
fix/publish-skips-private-packages

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

The release workflow no longer tries to publish a package that is not on npm yet, so a release stops ending red for that reason.

  • packages/share/package.json gets "private": true. @hyperframes/share has never been published, and its first publish is a separate decision.
  • publish.yml's publish_pkg reads each package's own private flag first: a private package prints ⏭️ <name> is private (not published to npm yet) — skipping and is never attempted. Every other package publishes exactly as before.
  • One owner for "is this package published": the package's own private flag, which verify-packed-manifests and package-subpaths already honor. Publishing share later is removing that one line.

Why

The v0.9.21 release published every package, but the run ended red: @hyperframes/[email protected] failed with npm error code ENEEDAUTH because the package does not exist on npm. Nothing in the repo depends on it: no other package.json lists @hyperframes/share, no other package's source imports it, and no docs or skills install it (git grep on main).

Size

A lone fix nothing else can carry: it has to merge before the 0.9.22 release PR, and no other open PR touches the release workflow.

Not in this PR

  • share's size budget stays in scripts/package-size-budgets.json; only packed packages are measured, so it applies again the day share is published.

Test plan

  • New case in scripts/publish-workflow.test.mjs runs the real Publish packages step with stand-in npm and pnpm over fixture packages, share marked private: share is never viewed or published, the skip notice is printed, @hyperframes/core and the CLI still publish, and the step exits 0.
  • fails without the fix: with main's publish.yml, the case fails because the step runs pnpm --filter @hyperframes/share publish.
  • scripts/publish-workflow.test.mjs: 7 passed, 3 runs in a row.
  • bun run check:package-subpaths exit 0 (14 public workspaces); bun run format:check exit 0.

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve at 889647cf.

  • Fails without the fix — verified. With main's publish.yml swapped in, the new case in scripts/publish-workflow.test.mjs fails because the step runs pnpm --filter @hyperframes/share publish …. With the PR's workflow, all 7 cases pass.
  • Nothing else breaks from share going private. No other workspace depends on or imports @hyperframes/share. verify-packed-manifests skips private workspaces before it packs them, and size budgets are only checked for packed packages, so the leftover share budget entry does nothing. set-version still bumps share, so its version keeps up and publishing it later only means removing the flag. check-workspace-contracts and package-subpaths both pass (14 public workspaces).
  • Failure modes are safe. If is_private can't find the package, or the manifest won't parse, it exits 1, so the package is treated as public and publishes exactly as it does today. if is_private is also safe under bash -e.

Non-blocking nit: is_private scans packages/* once per package, about 15 small node runs. That's fine at this size.

@miguel-heygen

Copy link
Copy Markdown
Collaborator Author

Closing: share should be published like every other hyperframes package, not marked private. The publish failure gets fixed on the npm side instead.

@heygengenesis heygengenesis Bot mentioned this pull request Nov 8, 2026
3 of 5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant