Repository navigation
fix(nitro): report the Nitro version a project actually runs - #1680
Conversation
CLI benchmark
Full report
|
| Setting | Value |
|---|---|
| Baseline | ref:caa2ec18d90a2ba4973d9fd515f9c9438c3fa496 (v4.1.0-alpha.0) |
| Head | local packages/nuxt-cli at 1f04b37 (v4.1.0-alpha.0) |
| Node | v24.22.3 |
| OS | Linux 7.0.0 (kernel 7.0.0-1019-azure) |
| CPU | AMD EPYC 7763 64-Core Processor x 4 |
| Memory | 15.6 GB |
| Load average at start | 1.89, 0.57, 0.20 |
| Run started | 2026-11-16T14:14:04.106Z |
Cold CLI startup
Median of 15 interleaved runs per command, one warmup discarded.
| Command | baseline v4.1.0-alpha.0 median | head v4.1.0-alpha.0 median | Delta | baseline v4.1.0-alpha.0 min / p95 | head v4.1.0-alpha.0 min / p95 |
|---|---|---|---|---|---|
nuxt --version |
68 ms | 69 ms | +0.5% | 64 ms / 71 ms | 65 ms / 71 ms |
nuxt --version (first output byte) |
64 ms | 64 ms | +0.7% | 59 ms / 66 ms | 60 ms / 66 ms |
nuxt --help |
145 ms | 147 ms | +0.8% | 143 ms / 149 ms | 142 ms / 150 ms |
nuxt --help (first output byte) |
139 ms | 140 ms | +0.2% | 137 ms / 143 ms | 137 ms / 143 ms |
nuxt dev --help |
108 ms | 110 ms | +1.2% | 105 ms / 112 ms | 106 ms / 112 ms |
nuxt dev --help (first output byte) |
103 ms | 104 ms | +0.8% | 100 ms / 106 ms | 100 ms / 107 ms |
nuxt <unknown-command> (no-op) |
157 ms | 157 ms | +0.2% | 151 ms / 163 ms | 151 ms / 164 ms |
nuxt <unknown-command> (no-op) (first output byte) |
150 ms | 150 ms | -0.2% | 145 ms / 156 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 (native addons excluded). Built-ins loaded after bootstrap are counted separately, including the internal modules they load.
| Command | baseline v4.1.0-alpha.0 modules | head v4.1.0-alpha.0 modules | Delta | baseline v4.1.0-alpha.0 source bytes | head v4.1.0-alpha.0 source bytes | Delta | baseline v4.1.0-alpha.0 built-ins | head v4.1.0-alpha.0 built-ins | Delta |
|---|---|---|---|---|---|---|---|---|---|
nuxt --version |
35 | 35 | 0.0% | 301.2 kB | 301.2 kB | 0.0% | 29 | 29 | 0.0% |
nuxt --help |
136 | 137 | +0.7% | 866.4 kB | 870.1 kB | +0.4% | 93 | 93 | 0.0% |
nuxt dev --help |
65 | 65 | 0.0% | 464.1 kB | 464.1 kB | 0.0% | 90 | 90 | 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.1.0-alpha.0 | head v4.1.0-alpha.0 | Delta |
|---|---|---|---|
Direct dependencies of @nuxt/cli |
23 | 23 | 0.0% |
| Packages in the installed tree (unique name@version) | 38 | 38 | 0.0% |
| Unique package names | 38 | 38 | 0.0% |
| Package directories on disk (cross-check) | 32 | 32 | 0.0% |
Installed node_modules on disk |
2.56 MB | 2.56 MB | +0.1% |
| Installed files | 442 | 443 | +0.2% |
| Install wall time (warm npm cache, median of 3) | 1.44 s | 1.45 s | +0.7% |
| Published tarball (packed) | 247.8 kB | 248.9 kB | +0.5% |
| Published tarball (unpacked) | 802.0 kB | 805.7 kB | +0.5% |
| Files in tarball | 104 | 105 | +1.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.
Merging this PR will not alter performance2 warnings
Comparing |
commit: |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
🔗 Linked issue
📚 Description
projects using Nuxt 4.7 will soon be able to build their server with Nitro v3 by depending on
nitro, but the CLI still would report the Nitro 2 it installs by default:so instead we report the package matching
nuxt.options._nitroMajorif it exists, or an explicit user install if nuxt v4.7 is detected, and if not fall back to the previous behaviour