perf(devtools): trim @nuxt/devtools runtime dependencies - #1066
Conversation
…e deps Consolidate on devframe's built-in utilities instead of shipping overlapping standalone dependencies: - serve static assets via devframe/utils/serve-static - hash local-options / asset keys via devframe/utils/hash (byte-identical to the previous ohash output, so existing cached keys keep resolving) - open files in the editor via devframe/utils/launch-editor - run the analyze-build git helper via node:child_process - ws was declared but never imported devtools-kit keeps tinyexec (its documented subprocess API) and the module-starter playground keeps sirv (legacy-API demo).
Deploying nuxt-devtools with
|
| Latest commit: |
cf43d05
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://be5958df.nuxt-devtools.pages.dev |
| Branch Preview URL: | https://chore-reduce-runtime-deps.nuxt-devtools.pages.dev |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change removes unused workspace and package dependencies. DevTools now uses Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR reduces runtime dependencies while preserving the reported build and test behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
…vDeps - birpc was declared but only referenced in a comment (devtools-kit keeps it for its public BirpcGroup type). - structured-clone-es is only used by the pre-bundled client (StateEditor.vue), so it belongs in devDependencies alongside the other client-only libs rather than the module's runtime dependencies.
Summary
Reduces the runtime dependency surface and install footprint of
@nuxt/devtoolsby consolidating onto devframe's built-in utilities and pruning deps that are unused or client-only.Dropped from the runtime tree (consolidated onto devframe / node built-ins)
sirv→devframe/utils/serve-static'sserveStaticNodeMiddleware, an explicit drop-in for the analyze-dir and production client static middleware.ohash→devframe/utils/hash(which bundles the same ohash internally). Output is byte-identical, so existing cached local-options keys keep resolving.launch-editor→devframe/utils/launch-editor'slaunchEditor(samefile:line:columntarget + optional editor override).tinyexec→node:child_processexecFilefor the small analyze-buildgithelper.ws→ removed; declared but never imported.birpc→ removed; only referenced in a comment (unused).devframeis promoted to a direct dependency (already present transitively via@vitejs/devtools*), so the net top-level runtime dep count drops. The unused roottinyexec/@types/wsdevDependencies are removed too, and orphaned catalog entries are pruned.Moved to devDependencies (client-only, pre-bundled)
structured-clone-es— used only byStateEditor.vue(with{ lossy: true }, which nativestructuredClonecan't replicate), so it belongs alongside the other client-only libs indevDependencies, not the module's runtime deps.Out of scope (intentionally kept)
devtools-kitkeepstinyexec(its documented public subprocess API) andbirpc(its publicBirpcGrouptype).module-starterplayground keepssirv(legacy module-author API demo).Verification
pnpm lint✅pnpm typecheck✅pnpm test:unit✅ (67 passed)pnpm -C packages/devtools build:module✅ (devframe utils correctly externalized indist)pnpm knipno longer flags any of the removed deps ✅This PR was created with the help of an agent.