Skip to content

Surface npm registry errors instead of the no-store guard - #20

Merged
fengmk2 merged 3 commits into
mainfrom
revert-no-store-protection
Jun 29, 2026
Merged

Surface npm registry errors instead of the no-store guard#20
fengmk2 merged 3 commits into
mainfrom
revert-no-store-protection

Conversation

@fengmk2

@fengmk2 fengmk2 commented Jun 29, 2026

Copy link
Copy Markdown
Member

Two related changes:

  1. Revert the no-store-on-missing-time guard (Don't cache a packument that's missing npm time #19), it was more protection than warranted.
  2. Instead, when the npm packument/time fetch returns a non-200 other than 404, the bridge throws npm's status + raw body rather than synthesizing a packument that drops the package's real versions (and could be cached). 404 (not on npm) still synthesizes a preview-only packument.

Net: on an npm upstream failure the bridge errors out (client retries) instead of serving/caching a degraded packument. Reproducing test added; 57 pass.

fengmk2 added 2 commits June 29, 2026 23:49
When the npm packument or time fetch returns a non-200 other than 404, throw
npm's status + raw body instead of synthesizing a misleading packument (which
drops the package's real versions and could be cached). 404 (not on npm) still
synthesizes a preview-only packument. This supersedes the no-store guard
(reverted above): on upstream failure the bridge errors out rather than serving
a degraded packument.
@fengmk2 fengmk2 changed the title Revert the no-store packument protection Surface npm registry errors instead of the no-store guard Jun 29, 2026
@fengmk2
fengmk2 merged commit 594cc25 into main Jun 29, 2026
3 checks passed
@fengmk2
fengmk2 deleted the revert-no-store-protection branch June 29, 2026 16:14
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