Skip to content

docs(readme): fix broken bundle badge, add docs/CI/types badges, group hook index - #8

Merged
devsaifmohamed merged 1 commit into
mainfrom
docs/npm-page-badges
Sep 2, 2026
Merged

devsaifmohamed merged 1 commit into
mainfrom
docs/npm-page-badges

Conversation

@devsaifmohamed

@devsaifmohamed devsaifmohamed commented Sep 2, 2026 •

Copy link
Copy Markdown
Owner

What

Enhances the npm/GitHub landing (README) — the page shown on npmjs.com and the repo home.

Badges

  • Removes the bundlephobia minzip badge — it renders "rate limited by upstream service" on the live npm page (every on-demand bundle-size provider — bundlephobia, bundlejs, packagephobia — is chronically rate-limited/timing out, so any of them will intermittently show broken).
  • Adds two always-green badges: CI build status (GitHub Actions ci.yml) and types: TypeScript (npm/types).
  • Adds a docs badge linking hookli.vercel.app/docs.
  • Cleaned the row to alternate the brand cyan/dark.

Hook index

  • The Available hooks list is now grouped by category — State (19) · Effects (16) · DOM (22) · Data (8) — with per-category counts, so visitors can skim 65 hooks instead of reading one flat list.
  • gen-readme.mjs generates the grouped index between HOOKS:START / HOOKS:END markers (mirrors category order/labels from apps/docs/lib/hooks-registry.ts), and fails loudly if a hook has an unknown category. Still manifest-driven — zero drift.

Notes

  • The npm page renders the README frozen at publish time, so the badge fix appears on npm only after the next publish (human-gated). The GitHub page updates on merge.
  • Gate green: bash ralph/check.sh — 65 test files, 196 tests, typecheck + tsup build pass.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated project and package README badges to highlight documentation, build status, and TypeScript support.
    • Reorganized the available hooks reference into State, Effects, DOM, and Data categories with per-category counts.
    • Expanded the documented hook index to include additional hooks such as countdown, map, media query, screen, clipboard, and script utilities.
    • Improved consistency and maintainability of the generated hook listings.

…p hook index

- Replace the chronically rate-limited bundlephobia badge (renders "rate
  limited by upstream service" on npm) with always-green npm/types + GitHub
  Actions CI-status badges; add a docs badge linking hookli.vercel.app.
- Group the Available-hooks index by category (State / Effects / DOM / Data)
  with per-category counts, so npm/GitHub visitors can skim 65 hooks.
- gen-readme.mjs emits the grouped index between HOOKS:START/END markers and
  fails loudly on a hook with an unknown category. Mirrors to the repo root.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AuT9BTjvgatPxvkXSPSo1i
@vercel

vercel Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hookli Ready Ready Preview Sep 2, 2026 9:04pm UTC

@ecc-tools

ecc-tools Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: a2720658-aeda-47a6-a6f4-0cb124e39b9e

📥 Commits

Reviewing files that changed from the base of the PR and between bd6541f and c942ae8.

📒 Files selected for processing (3)
  • README.md
  • packages/hookli/README.md
  • packages/hookli/scripts/gen-readme.mjs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The README files replace the Bundlephobia badge and flat hook list. They now use documentation and CI badges, generated markers, and categorized hook sections. The generator renders these sections, counts hooks, and validates categories and markers.

Changes

Generated Hook Index

Layer / File(s) Summary
Category-based README generation
packages/hookli/scripts/gen-readme.mjs
The generator groups hooks by ordered categories, renders category counts, and validates unknown categories and missing README markers.
Generated README hook indexes
README.md, packages/hookli/README.md
Both README files use documentation and CI badges and list hooks under State, Effects, DOM, and Data sections with generated markers.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c942a

This change updates documentation badges and groups the generated hook index without changing runtime behavior; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the README badge fixes and grouped hook index, which are the main changes in the pull request.
Description check ✅ Passed The description explains the purpose, lists the key badge and hook-index changes, documents the npm publishing limitation, and reports successful validation. It does not use the template's exact "## C…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the purpose, lists the key badge and hook-index changes, documents the npm publishing limitation, and reports successful validation. It does not use the template's exact "## Changes" and "## Checklist" headings, but it provides the required information overall.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/npm-page-badges

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devsaifmohamed
devsaifmohamed merged commit f2b3e8a into main Sep 2, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — c942ae82 Deployed Sep 2, 2026 by vercel[bot]
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