chore(deps): remove unused node-addon-api, node-gyp, hookform/resolvers - #4660
Merged
Conversation
Grepped imports/requires across source, tests, config, scripts, Dockerfiles, and workflows to confirm zero real usage of each before removal; the only repo hits were an unrelated detection-regex string literal (review-enrichment's native-build analyzer) and the useForm() call in the UI form component, which has no resolver option wired up. Fixes #4621
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | e143cde | Commit Preview URL Branch Preview URL |
Jul 10 2026, 10:23 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4660 +/- ##
=======================================
Coverage 94.12% 94.12%
=======================================
Files 434 434
Lines 38496 38496
Branches 14038 14038
=======================================
Hits 36233 36233
Misses 1604 1604
Partials 659 659 🚀 New features to boost your workflow:
|
This was referenced Jul 10, 2026
Closed
JSONbored
added a commit
that referenced
this pull request
Jul 10, 2026
…ld fallback (#4673) PR #4660 (#4621) removed these as "unused" based on a source-grep that found zero import statements -- but sharp's own install script falls back to building its native binding from source via node-gyp when no matching prebuilt binary is available for the current platform/arch/Node version, and that build-from-source path explicitly requires node-addon-api. A source grep can't see this: npm's own postinstall/build machinery pulls these in, not application code. Confirmed as a live, reproducible regression: `npm ci` on a clean checkout of current main fails outright with "sharp: Please add node-addon-api to your dependencies" on this platform (macOS arm64, Node 26). CI apparently didn't catch it because its runner has a matching prebuilt sharp binary available, so the source-build fallback never triggers there -- but any local dev setup (or self-hoster) on a platform without one does hit it. @hookform/resolvers's removal (also part of #4660/#4621) is unaffected and stays removed -- unrelated to this failure mode. Fixes #4672
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
audit's dead-code pass:
node-addon-apiandnode-gyp(rootdevDependencies) and@hookform/resolvers(apps/gittensory-uidependencies).src/,test/,review-enrichment/,scripts/,apps/**, all threeDockerfiles, and.github/workflows/**. Nobinding.gypexists anywhere in the repo. The only repo hits fornode-addon-api/node-gypare an unrelated detection-regex string literal inreview-enrichment/src/analyzers/native-build.ts(used to flag other people's PRs that add anative-build dependency — not evidence this repo uses either package itself).
react-hook-formis genuinely used (
apps/gittensory-ui/src/components/ui/form.tsx), but there is nouseForm()call anywhere in either UI app that wires up a
resolver, and@hookform/resolvershas zeroother hits.
npm installto regeneratepackage-lock.json(single workspace lockfile; there is noseparate lockfile under
apps/gittensory-ui) — 12 packages removed, 0 vulnerabilities.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
src/**lines changed (onlypackage.json/package-lock.json/apps/gittensory-ui/package.json), so there is no Codecov patch-coverage obligation and no new logic to test.test:coverage/test:workerswere not run standalone sincetypecheck+ui:build+ui:lint+ a fullnpm cialready exercise every workspace's dependency graph without either removed package;build:mcp/test:mcp-packweren't run because neither package was a dependency of@jsonbored/gittensory-mcp.Safety
ui:openapi:checkconfirms the spec is unchanged.)UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
Not applicable — no visible UI change; this PR only removes unused dependency entries from
package.json/package-lock.json.Notes