Skip to content

fix: vendor README badges so they render on npm (1.0.4) - #10

Merged
donkasun merged 2 commits into
mainfrom
fix/vendor-readme-badges
Jul 23, 2026
Merged

fix: vendor README badges so they render on npm (1.0.4)#10
donkasun merged 2 commits into
mainfrom
fix/vendor-readme-badges

Conversation

@donkasun

Copy link
Copy Markdown
Owner

Problem

All five README badges rendered broken on npmjs.com while working fine on GitHub.

Cause: GitHub proxies README images through camo.githubusercontent.com, but npm routes absolute image URLs through its own hex-path image proxy, which returns 403 for img.shields.io. The shields.io URLs themselves are fine (verified 200 directly) — the failure is at npm's proxy.

Relative image paths behave differently: npm rewrites them to raw.githubusercontent.com, and those load correctly — as the existing assets/screenshots/*.png in this README already demonstrate.

Changes

  • Vendored the three static tech badges into assets/badges/ and referenced them relatively. Self-contained SVGs with logos inlined, ~9 KB total.
  • Dropped the npm version and downloads badges rather than vendoring them: they would freeze at publish time and go stale, and npmjs.com already shows both in its sidebar.
  • Bumped to 1.0.4.

Verification

Badge rendering on npm can only be confirmed after publish, since relative paths resolve against the default branch. GitHub rendering is verifiable on this branch now.

🤖 Generated with Claude Code

donkasun and others added 2 commits July 23, 2026 16:48
npm's README image proxy returns 403 for img.shields.io URLs, so all
five badges rendered broken on npmjs.com while working on GitHub.
Relative image paths are rewritten by npm to GitHub raw URLs and load
fine (as the existing assets/screenshots do), so vendor the three
static tech badges into assets/badges and reference them relatively.

The npm version and download badges are dropped rather than vendored:
they would freeze at publish time, and npmjs.com already shows both
in its sidebar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@donkasun
donkasun merged commit 881178d into main Jul 23, 2026
5 of 6 checks passed
@donkasun
donkasun deleted the fix/vendor-readme-badges branch July 23, 2026 11:28
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