Skip to content

fix(release): preserve beta publish terminal - #88

Merged
jumski merged 1 commit into
mainfrom
npm-publish-auth
Oct 21, 2026
Merged

jumski merged 1 commit into
mainfrom
npm-publish-auth

Conversation

@jumski

@jumski jumski commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

 local beta publisher
-  Bun Shell: stdin is a terminal, stdout/stderr are pipes
+  Bun.spawn: inherit stdin/stdout/stderr
   Changesets publish --no-git-tag -> npm publish
   nonzero exit -> existing registry-state probe

Preserve the terminal boundary so npm can offer browser authorization when the registry returns a web challenge, or prompt for an OTP otherwise. Document the explicit npm_config_browser="$PLANNOTATOR_BROWSER" override for agent-sandbox, including host/forwarded-browser routing. Keep account 2FA, confirmation guards, registry checks, cleanup, and stable OIDC releases unchanged.

No changeset: local release tooling, tests, and documentation only; no shipped plugin behavior or package API changes.

Evidence

  • Before: the new real-PTY regression fails with {"stdin":true,"stdout":false,"stderr":false} using the original Bun Shell invocation.
    After: the same fixture passes with all three TTY flags true, --no-git-tag forwarded, and the browser override preserved.
  • Nonzero child exit rejects into the existing publish-failure handling.
  • bun run lint, bun run typecheck, bun run test (204 passed), bun run verify:pack, and git diff --check pass. Both new tests also pass on CI's Bun 1.3.11.
  • Manual sandbox smoke: the patched launcher and installed npm web-challenge handler opened official npm documentation through the host-browser bridge; the human confirmed the tab opened. Challenge completion was simulated. No npm login, credential creation, registry write, or publication occurred. Live npm authorization remains untested.

Merge Danger

Door: two-way

Revert this commit to restore the previous publisher invocation. This PR does not publish a package or change authentication policy.

Blast Radius: local-release

Only the local beta publisher's terminal handling changes. Interactive authorization still depends on the challenge offered by npm and on an available browser bridge.

Bun Shell piped publisher output, so npm rejected EOTP before it could
offer browser authorization or an OTP prompt. Spawn the existing
Changesets command with inherited stdio and retain nonzero exit handling
so the registry-state probe still runs after publish failures.

Cover terminal inheritance with a real-PTY regression and document the
explicit npm browser override for sandboxed local releases. Keep account
2FA, stable OIDC publishing, and beta confirmation guards unchanged.
@jumski jumski added the no-changeset Skip changeset requirement for non-user-visible changes label Oct 21, 2026
@jumski
jumski merged commit 2b9efca into main Oct 21, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changeset Skip changeset requirement for non-user-visible changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant