Skip to content

The bundlephobia badge in readme is not working #67

Closed

Description

@Alex1990
No description provided.

Activity

  1. github-actions commented on Sep 18, 2026

    @github-actions
    Contributor

    Loop triage — bug / ready-for-agent (confidence: high)

    Reproduced: the badge renders an error, not a size.

    • https://img.shields.io/bundlephobia/minzip/tiny-oss returns HTTP 200, but the SVG body is <title>bundlephobia: rate limited by upstream service</title> — an error badge, not a number.
    • shields.io proxies Bundlephobia's /api/size, and that upstream API is returning 429 Too Many Requests for every package we tested (tiny-oss, react, lodash), so this is a service-wide outage, not a problem with this package or its badge markup.
    • It is long-standing, not transient: Bundlephobia's tracker carries open 429 reports from 2019 (pastelsky/bundlephobia#160), 2024 (#886) and 2025 (#955).
    • The badge line exists identically in both files — README.md:7 and README_zh-CN.md:7 — and nowhere else in the repo.

    Why #54's check missed it: the badge row was added after verifying each URL by HTTP status only, and shields.io answers 200 even for an error badge. The failure is in the SVG body, so it can only be caught by inspecting the rendered <title>.

    Proposed fix (docs-only; no source, dependency or workflow change): replace the Bundlephobia badge with the official shields.io bundlejs service, which is up and reports the same min+gzip figure for this package.

    • [![bundle size](https://img.shields.io/bundlejs/size/tiny-oss)](https://bundlejs.com/?q=tiny-oss) → verified to render minified size (gzip): 7.9 kB.
    • Apply to both README.md and README_zh-CN.md for parity; commit type docs per AGENTS.md.
    • bundlejs also accepts ?exports=<name> (e.g. ?exports=put → 7.4 kB) if you would rather surface the tree-shaken figure. Removing the badge entirely is the alternative if a third-party size service is not wanted.

    Labelling ready-for-agent; the loop will implement the fix as a docs PR.

  2. added
    ready-for-humanRequires a human: implementation, merge of a loop PR, or a release call
    and removed
    ready-for-agentFully specified, an AFK agent may handle it unattended
    on Sep 18, 2026
  3. github-actions commented on Sep 18, 2026

    @github-actions
    Contributor

    Loop feature — fix ready for review ✅

    The badge was broken the way triage described, and this run reproduced it before fixing: https://img.shields.io/bundlephobia/minzip/tiny-oss answers HTTP 200 but its SVG title is bundlephobia: rate limited by upstream service — upstream bundlephobia.com/api/size returns HTTP 429 service-wide.

    Change (docs-only, 2 insertions / 2 deletions, both READMEs in parity):

    -[![bundle size](https://img.shields.io/bundlephobia/minzip/tiny-oss)](https://bundlephobia.com/package/tiny-oss)
    +[![bundle size](https://img.shields.io/bundlejs/size/tiny-oss)](https://bundlejs.com/?q=tiny-oss)
    • New badge renders a real figure: <title>minified size (gzip): 7.9 kB</title> (HTTP 200).
    • New link target https://bundlejs.com/?q=tiny-oss returns HTTP 200.
    • Repo-wide search after the change: no bundlephobia reference left.

    Verification — pnpm lint 0 errors; pnpm fmt:check clean; pnpm build and pnpm check:types exit 0; Azure and TOS signature oracles pass; browser suite 24 files / 255 passed / 26 skipped. No source, signer, dependency or .github/workflows/** change.

    Root cause of the earlier miss: #54 validated URLs by HTTP status, and shields.io returns 200 even for an error badge. This fix was checked by inspecting the rendered SVG title.

    The PR closes this issue; the independent pr-review stage re-checks the diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-humanRequires a human: implementation, merge of a loop PR, or a release call

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions