Skip to content

feat(packaging): add Homebrew formula and Scoop manifest for react-debugger CLI#67

Open
Kunall7890 wants to merge 3 commits into
hoainho:mainfrom
Kunall7890:feat/os-packaging-homebrew-scoop
Open

feat(packaging): add Homebrew formula and Scoop manifest for react-debugger CLI#67
Kunall7890 wants to merge 3 commits into
hoainho:mainfrom
Kunall7890:feat/os-packaging-homebrew-scoop

Conversation

@Kunall7890

Copy link
Copy Markdown
Contributor

Linked issue

Closes #13

Type of change

  • Feature (non-breaking change that adds functionality)

What changed

Added OS-level packaging for the @nhonh/react-debugger CLI:

  • Formula/react-debugger.rb — Homebrew formula for macOS, pulls the npm tarball directly from the registry, installs into libexec, and writes a shell wrapper into bin/
  • bucket/react-debugger.json — Scoop manifest for Windows, installs via npm install --global and writes a .cmd shim

Testing 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 starred the repo ⭐
  • I commented I'll take this on the issue before starting work

Checklist

  • npm run test:run passes locally
  • npm run build succeeds locally
  • CHANGELOG.md entry added under ## [Unreleased]
  • PR title follows Conventional Commits
  • No new runtime dependencies added

Additional notes

For brew install hoainho/tap/react-debugger to work exactly as described in the issue, the maintainer needs to create a separate GitHub repo called homebrew-tap under the hoainho org and place Formula/react-debugger.rb there. Same for Scoop — a repo called scoop-bucket. The files in this PR are ready to be moved there. I've kept them in the main repo for review first.

…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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
"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",

Comment thread Formula/react-debugger.rb
Comment on lines +14 to +17
(bin/"react-debugger").write <<~SH
#!/bin/sh
exec node "#{libexec}/bin/cli.js" "$@"
SH

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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

Comment thread src/panel/Panel.tsx
role="tabpanel"
id={`panel-${activeTab}`}
aria-labelledby={`tab-${activeTab}`}
aria-live="polite"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

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.

[Help wanted] Add OS-level packaging (Homebrew formula + scoop manifest) for @nhonh/react-debugger

1 participant