Skip to content

fix: publish through npx npm@11 with an explicit dist-tag - #53

Merged
xiaoyijun merged 1 commit into
masterfrom
xiaoyijun-fix-publish-prerelease-tag
Aug 31, 2026
Merged

xiaoyijun merged 1 commit into
masterfrom
xiaoyijun-fix-publish-prerelease-tag

Conversation

@xiaoyijun

Copy link
Copy Markdown
Contributor

Root cause of the failed tag publish

The v1.0.0-beta.1 run died on a client-side guard new in npm 11:

npm error You must specify a tag using --tag when publishing a prerelease version.

Moving the publish job to Node 24 (#52) gave the delegated npm CLI its OIDC capability (npm ≥ 11.5.1) — and along with it npm 11's prerelease protection, which refuses to publish a -beta version without an explicit --tag. Reproduced locally with npx npm@11 publish --dry-run; adding --tag latest makes the same dry-run pass cleanly. OIDC itself was not the failure point.

Changes

  • Publish via npx --yes npm@11 publish --tag latest --provenance, mirroring the working logto-io/cli-auth setup: the npx pin removes the dependency on the Node-bundled npm (so the job returns to Node 22, in line with the rest of CI), and the explicit --tag latest satisfies npm 11's prerelease guard while implementing this package's deliberate publish-betas-to-latest policy.
  • Normalize repository.url to git+https://… — the form npm 11 auto-corrects (with a warning) at publish time.

Verified: npx npm@11 publish --dry-run --tag latest completes cleanly from packages/mcp-auth (also confirming the root devEngines guard does not block delegated npm publishes).

After merge: re-point v1.0.0-beta.1 at the merge commit and push it to trigger the publish.

🤖 Generated with Claude Code

The tag-triggered publish failed on npm 11's new prerelease guard:
"You must specify a tag using --tag when publishing a prerelease
version." Publish via `npx npm@11` with an explicit `--tag latest`
(the beta deliberately lands on `latest`), mirroring the working
logto-io/cli-auth setup: the npx pin also removes the dependency on
the Node-bundled npm version, so the publish job goes back to Node 22
in line with the rest of CI. Also normalize `repository.url` to the
`git+https` form npm 11 auto-corrects at publish time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@xiaoyijun
xiaoyijun requested a review from a team August 31, 2026 08:32
@xiaoyijun
xiaoyijun merged commit 8e1b349 into master Aug 31, 2026
5 checks passed
@xiaoyijun
xiaoyijun deleted the xiaoyijun-fix-publish-prerelease-tag branch August 31, 2026 08:51
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.

3 participants