Skip to content

fix: update stale .js usage comments and husky cli.js fallback path (#1975) - #2187

Merged
carlos-alm merged 1 commit into
mainfrom
fix/issue-1975
Jul 30, 2026
Merged

fix: update stale .js usage comments and husky cli.js fallback path (#1975)#2187
carlos-alm merged 1 commit into
mainfrom
fix/issue-1975

Conversation

@carlos-alm

Copy link
Copy Markdown
Contributor

Summary

  • 5 `scripts/*.ts` files (benchmark, build-wasm, embedding-benchmark, query-benchmark, incremental-benchmark) still had `Usage: node scripts/X.js` header comments from before they were renamed to `.ts`. Updated each to the actual current invocation (`node --experimental-strip-types --import ./scripts/ts-resolve-loader.js scripts/X.ts`, or `node scripts/node-ts.js scripts/build-wasm.ts` for build-wasm specifically, matching its own npm script).
  • `.husky/pre-commit` and `.husky/commit-msg` both fell back to `node src/cli.js` when the global `codegraph` binary isn't on PATH — `src/cli.js` hasn't existed since the source moved to `src/cli.ts` (compiled to `dist/cli.js`). The `|| true` swallowed the failure silently, so on any machine without a global `codegraph` install, the pre-commit graph rebuild and commit-msg impact summary silently never ran. Pointed both fallbacks at `dist/cli.js`.

Verification

  • Comment-only + shell-hook-only change; nothing in `src/`/`tests/` (biome's lint scope) touched.
  • `npm run lint` — clean.
  • Manually confirmed `node dist/cli.js build ` runs correctly (the exact fallback invocation).

Closes #1975

…1975)

Five scripts/*.ts benchmark/build files still had `Usage: node
scripts/X.js` header comments from before they were renamed to .ts
(now run via node --experimental-strip-types --import
./scripts/ts-resolve-loader.js, or node scripts/node-ts.js for
build-wasm.ts specifically). Updated each to the actual current
invocation.

.husky/pre-commit and .husky/commit-msg both fell back to `node
src/cli.js` when the global codegraph binary isn't on PATH -- src/cli.js
hasn't existed since the source moved to src/cli.ts (compiled to
dist/cli.js). The `|| true` swallowed the failure silently, so on any
machine without a global codegraph install the pre-commit graph
rebuild and commit-msg impact summary silently never ran. Point both
fallbacks at dist/cli.js instead.

Closes #1975

docs check acknowledged: comment/hook-only fix, no README/CLAUDE.md/ROADMAP surface change
@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Updates stale developer-facing invocations and restores local CLI fallbacks in Git hooks.

  • Points pre-commit and commit-msg fallbacks to the compiled dist/cli.js entry point.
  • Corrects usage comments across five TypeScript scripts to show valid launch commands.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The hook fallbacks now target the package's compiled CLI entry point, which is produced during the same prepare lifecycle that installs Husky, and each revised script command is valid for the repository's supported Node versions.

Important Files Changed

Filename Overview
.husky/pre-commit Replaces the nonexistent source JavaScript fallback with the package's compiled CLI entry point.
.husky/commit-msg Uses the compiled CLI when generating staged impact summaries without a global binary.
scripts/benchmark.ts Updates the usage comment to match the repository's benchmark command.
scripts/build-wasm.ts Updates the usage comment to use the existing TypeScript launcher.
scripts/embedding-benchmark.ts Documents a valid direct TypeScript invocation with the resolution loader.
scripts/incremental-benchmark.ts Documents a valid direct TypeScript invocation with the resolution loader.
scripts/query-benchmark.ts Documents a valid direct TypeScript invocation with the resolution loader.

Reviews (1): Last reviewed commit: "fix: update stale .js usage comments and..." | Re-trigger Greptile

@carlos-alm
carlos-alm merged commit f409af5 into main Jul 30, 2026
27 checks passed
@carlos-alm
carlos-alm deleted the fix/issue-1975 branch July 30, 2026 09:18
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stale .js usage comments in scripts/*.ts and husky hooks reference removed src/cli.js

1 participant