Skip to content

fix: make npm publish gate survive registry CDN lag - #13

Merged
miniLV merged 2 commits into
masterfrom
fix/npm-publish-registry-ready
Oct 14, 2026
Merged

miniLV merged 2 commits into
masterfrom
fix/npm-publish-registry-ready

Conversation

@miniLV

@miniLV miniLV commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Problem

publish npm for v0.0.19 failed even though npm publish succeeded (+ [email protected]). Post-publish verifyRegistry polled npm view for 120s requiring dist-tags.latest === version, while the CDN kept serving latest=0.0.18 / version details missing. Same pattern as v0.0.17. The package did land on npm ~2 minutes later.

Fix

  • Treat exact version packument visibility as ready (do not require dist-tags.latest; smoke already pins @version)
  • Poll cache-busted registry JSON for up to 10 minutes with linear backoff
  • If the version is already on npm, skip republish and continue verify/smoke (idempotent re-run)

Note

A follow-up workflow change (workflow_dispatch + overlay gate scripts from default branch + 45m job timeout) could not be pushed with the current OAuth token (missing workflow scope). Scripts-only fix is enough for future tags that include this commit.

Test

npm run test:scripts -- scripts/release-npm-lib.test.mjs — 9 passed.

v0.0.19's npm publish succeeded, but verifyRegistry required
dist-tags.latest within 120s via npm view and failed while the
CDN still served 0.0.18 — the same pattern as v0.0.17.

- Treat exact version packument visibility as ready (latest may lag)
- Poll cache-busted registry JSON for up to 10 minutes with backoff
- Skip republish when the version is already on npm (idempotent re-run)
@miniLV
miniLV merged commit 4235b45 into master Oct 14, 2026
4 checks passed
@miniLV
miniLV deleted the fix/npm-publish-registry-ready branch October 14, 2026 06:32
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