Conversation
Add upm to the offered package managers, keeping only those that `package-manager-detector` has commands for. upm is offered once the detector supports it, instead of passing validation and crashing on install. `runInstall` and `runDedupe` now return a failure result for an agent the detector does not know, rather than throwing from `resolveCommand`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit: |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe package manager list now includes preferred names only when Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to No merge-blocking issue is established; the change is ready for normal checks. Architecture SummaryArchitecture risk: 🟡 Medium · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
Reliability and maintainability
🚥 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 |
CLI benchmark
Full report
|
| Setting | Value |
|---|---|
| Baseline | ref:eabcb017c3cc1346b1e9743cd14221391635c248 (v4.0.0-alpha.1) |
| Head | local packages/nuxt-cli at d4e9dbc (v4.0.0-alpha.1) |
| Node | v24.21.0 |
| OS | Linux 6.17.0 (kernel 6.17.0-1022-azure) |
| CPU | AMD EPYC 7763 64-Core Processor x 4 |
| Memory | 15.6 GB |
| Load average at start | 0.85, 0.27, 0.09 |
| Run started | 2026-09-29T15:34:15.830Z |
Cold CLI startup
Median of 15 interleaved runs per command, one warmup discarded.
| Command | baseline v4.0.0-alpha.1 median | head v4.0.0-alpha.1 median | Delta | baseline v4.0.0-alpha.1 min / p95 | head v4.0.0-alpha.1 min / p95 |
|---|---|---|---|---|---|
nuxt --version |
91 ms | 88 ms | -3.1% | 87 ms / 96 ms | 85 ms / 94 ms |
nuxt --version (first output byte) |
85 ms | 83 ms | -1.9% | 81 ms / 89 ms | 80 ms / 88 ms |
nuxt --help |
149 ms | 149 ms | -0.5% | 140 ms / 155 ms | 143 ms / 153 ms |
nuxt --help (first output byte) |
144 ms | 143 ms | -0.2% | 134 ms / 149 ms | 137 ms / 147 ms |
nuxt dev --help |
104 ms | 104 ms | -0.1% | 99 ms / 113 ms | 100 ms / 107 ms |
nuxt dev --help (first output byte) |
99 ms | 98 ms | -1.0% | 94 ms / 108 ms | 95 ms / 102 ms |
nuxt <unknown-command> (no-op) |
157 ms | 159 ms | +1.7% | 150 ms / 161 ms | 150 ms / 164 ms |
nuxt <unknown-command> (no-op) (first output byte) |
151 ms | 153 ms | +1.3% | 144 ms / 155 ms | 144 ms / 158 ms |
Module load cost
Counted with a module.registerHooks load hook, compile cache disabled. Counts every JS module actually evaluated on that code path (built-ins excluded, native addons excluded).
| Command | baseline v4.0.0-alpha.1 modules | head v4.0.0-alpha.1 modules | Delta | baseline v4.0.0-alpha.1 source bytes | head v4.0.0-alpha.1 source bytes | Delta |
|---|---|---|---|---|---|---|
nuxt --version |
37 | 37 | 0.0% | 297.6 kB | 297.6 kB | 0.0% |
nuxt --help |
145 | 145 | 0.0% | 957.7 kB | 958.4 kB | +0.1% |
nuxt dev --help |
63 | 63 | 0.0% | 455.1 kB | 455.1 kB | 0.0% |
Install footprint and published tarball
Each version installed on its own into an empty project with nothing but @nuxt/cli as a dependency, so the tree is exactly the CLI and its transitive dependencies. npm cache is warm and the registry is only consulted for metadata, so install wall time is indicative, not a network benchmark.
| Metric | baseline v4.0.0-alpha.1 | head v4.0.0-alpha.1 | Delta |
|---|---|---|---|
Direct dependencies of @nuxt/cli |
23 | 23 | 0.0% |
| Packages in the installed tree (unique name@version) | 39 | 39 | 0.0% |
| Unique package names | 39 | 39 | 0.0% |
| Package directories on disk (cross-check) | 32 | 32 | 0.0% |
Installed node_modules on disk |
2.43 MB | 2.43 MB | +0.0% |
| Installed files | 434 | 434 | 0.0% |
| Install wall time (warm npm cache, median of 3) | 1.30 s | 1.29 s | -0.4% |
| Published tarball (packed) | 241.1 kB | 241.3 kB | +0.1% |
| Published tarball (unpacked) | 781.6 kB | 782.3 kB | +0.1% |
| Files in tarball | 99 | 99 | 0.0% |
Interleaved runs on a shared runner: trust the deltas, not the absolute timings. The dev, restart and build suites run locally via pnpm bench:cli.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1583 +/- ##
=======================================
Coverage ? 83.17%
=======================================
Files ? 174
Lines ? 11442
Branches ? 3288
=======================================
Hits ? 9517
Misses ? 1625
Partials ? 300 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
thank you 🙏 but we'll wait for support in package-manager-detector rather than reimplementing here also, can i remind you that we have a policy that pr descriptions and comments should be written by a person and not an llm? ❤️ |
|
I see. Ok. Thanks @danielroe |
🔗 Linked issue
antfu-collective/package-manager-detector#80
📚 Description
This PR prepares support for upm as a package manager. The CLI's detection and install commands come from
package-manager-detector, and upm support there is still in review in the linked PR. So this PR does two things that are safe to merge now.1. Only offer package managers the detector can run.
upmis added to the list, which is then filtered down to the agentspackage-manager-detectorhas commands for. With the current 1.8.0, upm is filtered out, so nothing changes for users: no new--packageManagervalue, and help and docs stay the same. Once the detector ships upm, it shows up innuxt init,nuxt module addand--packageManagerwithout further code changes.2. Fail cleanly on an unknown package manager.
resolveCommandthrows (not returnsnull) for an agent the detector doesn't know, andgetInstallCommandused!on its result.runInstallandrunDedupenow check the agent first and return a failure result (Installing dependencies is not supported for …), the same wayrunDedupealready reported an unsupporteddedupe.Tests:
packageManagerNamesresolvesinstall,addanduninstall, so the list can't drift from the detector.runInstallandrunDedupereport an unknown agent as a failure.upm.lockandgetLockFiles('upm'). These are skipped until the detector supports upm.I also ran the suite against a local build of the detector PR. The upm tests pass, and the only other changes are that
pnpm docs:generateand thehelp.spec.tssnapshots gainupm. Those, plus the version bump, will be the follow-up once the detector is released.Checked locally:
tsc --noEmit,eslint,pnpm test:docsand all 1905 non-e2e tests pass.🤖 Generated with Claude Code