chore(webapp): remove unused dependencies and add a knip check#4239
chore(webapp): remove unused dependencies and add a knip check#4239ericallam wants to merge 1 commit into
Conversation
Removes 25 unused production dependencies from the webapp (plus 4 orphaned @types packages and two dead files whose only importers were those packages, SimpleSelect.tsx and ulid.server.ts). Adds knip as a dev dependency with a knip:deps script and a knip.json config so unused dependencies can be found the same way from now on. knip catches deps reachable only through otherwise-dead code, which a plain grep cannot. non.geist is ignored: it is a font imported for its side effects via tailwind.css.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
💤 Files with no reviewable changes (3)
📜 Recent review details⏰ Context from checks skipped due to timeout. (41)
🧰 Additional context used📓 Path-based instructions (1)**/package.json📄 CodeRabbit inference engine (AGENTS.md)
Files:
🔇 Additional comments (2)
WalkthroughAdded Knip configuration, a dependency-analysis npm script, and Knip as a development dependency. Removed unused dependencies and type packages from the webapp manifest, including UI, runtime, utility, authentication, identifier, and worker-related packages. Removed the 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
Closing in favor of folding these dependency removals into #4236, where the code that makes them unused is removed. Keeping it to one PR. |
Summary
Removes 25 unused production dependencies from the webapp (plus 4 orphaned
@types/*packages and two dead files whose only importers were those packages), and adds aknip:depsscript so unused dependencies can be found systematically from now on.Details
The removed packages are leftovers that nothing in the webapp imports. They were found with
knip, added here as a dev dependency with aknip:depsscript (knip --production --dependencies) and aknip.jsonconfig. knip's production analysis is workspace-aware and catches dependencies reachable only through otherwise-dead code, which a plain grep can't: both removed deps' only importer files,SimpleSelect.tsxandulid.server.ts, were themselves unused.non.geistis ignored in the config: it's a font imported for its side effects viatailwind.css, invisible to knip.socket.io-clientalso reports as unused for the webapp but is handled in a separate PR.