feat(packaging): add Homebrew formula and Scoop manifest for react-debugger CLI#67
feat(packaging): add Homebrew formula and Scoop manifest for react-debugger CLI#67Kunall7890 wants to merge 3 commits into
Conversation
…izer, ai-client) - Add snapshot-builder.test.ts (24 tests): buildSnapshot, hashSnapshot, snapshotToPromptText - Add token-optimizer.test.ts (21 tests): rate limiting, cache TTL/eviction, subscription validation - Add ai-client.test.ts (15 tests): happy path, error codes, markdown fence stripping, cache dedup - Widen vitest.config.ts coverage include to src/services/** and src/utils/** - Install @vitest/coverage-v8 dev dependency Closes hoainho#33
- Formula/react-debugger.rb wraps @nhonh/react-debugger@2.1.2 npm tarball - bucket/react-debugger.json installs via npm with a .cmd shim for Windows - Both invoke the CLI correctly after install Closes hoainho#13
There was a problem hiding this comment.
Code Review
This pull request introduces a Homebrew formula and a Scoop manifest for the react-debugger tool, adds comprehensive unit tests for the AI client, snapshot builder, and token optimizer services, and enhances accessibility in the Panel component with WAI-ARIA tab navigation. The feedback suggests using the Scoop $version variable instead of a hardcoded version in the installer script, utilizing the absolute path to the Homebrew-managed Node binary in the shell wrapper, and removing aria-live="polite" from the main tab panel to avoid overwhelming screen reader users with constant background updates.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| }, | ||
| "installer": { | ||
| "script": [ | ||
| "npm install --global @nhonh/react-debugger@2.1.2 --prefix \"$dir\" --ignore-scripts 2>&1 | Out-Null", |
There was a problem hiding this comment.
Hardcoding the version 2.1.2 in the npm install command will prevent the package from upgrading correctly when the manifest version is updated (either manually or via checkver/autoupdate). Use the Scoop $version variable instead to ensure the correct version is always installed.
| "npm install --global @nhonh/react-debugger@2.1.2 --prefix \"$dir\" --ignore-scripts 2>&1 | Out-Null", | |
| "npm install --global @nhonh/react-debugger@$version --prefix \"$dir\" --ignore-scripts 2>&1 | Out-Null", |
| (bin/"react-debugger").write <<~SH | ||
| #!/bin/sh | ||
| exec node "#{libexec}/bin/cli.js" "$@" | ||
| SH |
There was a problem hiding this comment.
Using a bare node command in the shell wrapper relies on whatever node binary happens to be in the user's PATH at runtime. Since this formula explicitly declares depends_on "node", it is safer and more robust to use the absolute path to the Homebrew-managed Node binary.
(bin/"react-debugger").write <<~SH
#!/bin/sh
exec "#{Formula["node"].opt_bin}/node" "#{libexec}/bin/cli.js" "$@"
SH| role="tabpanel" | ||
| id={`panel-${activeTab}`} | ||
| aria-labelledby={`tab-${activeTab}`} | ||
| aria-live="polite" |
There was a problem hiding this comment.
Using aria-live="polite" on the main tab panel container of a highly dynamic debugger/profiler will cause screen readers to constantly announce background updates (such as render counts, timeline events, and memory stats) every time they poll or update. This creates a very noisy and disruptive experience for screen reader users. It is recommended to remove aria-live="polite" from the main container and only use live regions for specific, critical user-triggered notifications if necessary.
Linked issue
Closes #13
Type of change
What changed
Added OS-level packaging for the
@nhonh/react-debuggerCLI:Formula/react-debugger.rb— Homebrew formula for macOS, pulls the npm tarball directly from the registry, installs intolibexec, and writes a shell wrapper intobin/bucket/react-debugger.json— Scoop manifest for Windows, installs vianpm install --globaland writes a.cmdshimTesting notes
$ brew install --formula ./Formula/react-debugger.rb
$ react-debugger --version
2.1.2
$ react-debugger --help
...
$ scoop install bucket/react-debugger.json
$ react-debugger --version
2.1.2
Claim confirmation
I'll take thison the issue before starting workChecklist
npm run test:runpasses locallynpm run buildsucceeds locally## [Unreleased]Additional notes
For
brew install hoainho/tap/react-debuggerto work exactly as described in the issue, the maintainer needs to create a separate GitHub repo calledhomebrew-tapunder thehoainhoorg and placeFormula/react-debugger.rbthere. Same for Scoop — a repo calledscoop-bucket. The files in this PR are ready to be moved there. I've kept them in the main repo for review first.