Skip to content

test: assert Nitro major version rather than hardcoded patch - #1720

Merged
danielroe merged 1 commit into
mainfrom
fix-nitro-version-assert
Nov 29, 2026
Merged

danielroe merged 1 commit into
mainfrom
fix-nitro-version-assert

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

📚 Description

what was that previous test even

@danielroe
danielroe enabled auto-merge November 29, 2026 22:54
@pkg-pr-new

pkg-pr-new Bot commented Nov 29, 2026

Copy link
Copy Markdown
  • nuxt-cli-playground

    npm i https://pkg.pr.new/create-nuxt@1720
    
    npm i https://pkg.pr.new/nuxi@1720
    
    npm i https://pkg.pr.new/@nuxt/cli@1720
    

commit: 942f373

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The _nitroMajor: 2 test now checks that serverBuilder starts with nitro@2. and nitroVersion starts with 2.. It no longer requires the exact version 2.13.6.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: Minimal · up to 942f3

This is a test-only change that stops a hardcoded Nitro patch version from breaking the test. It does not affect runtime behavior and carries no identified merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states that the test now asserts the Nitro major version instead of a hardcoded patch version. The raw summary confirms the change: the info-run.spec.ts test checks that serverBuilder and ni…
Description check Passed The description is minimal. It contains an unfilled linked-issue template placeholder and a single line, 'what was that previous test even', which does not describe the change. It is loosely related t…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states that the test now asserts the Nitro major version instead of a hardcoded patch version. The raw summary confirms the change: the info-run.spec.ts test checks that serverBuilder and nitroVersion begin with 'nitro@2.' and '2.' rather than the exact version 2.13.6. The title matches the main change.

Full details: Description check

Explanation

The description is minimal. It contains an unfilled linked-issue template placeholder and a single line, 'what was that previous test even', which does not describe the change. It is loosely related to the change, since it refers to the previous test, so it is not off-topic.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9d73752f-e164-41de-8c79-b9c1f9dcf0ea
Commits

Reviewing files that changed from the base of the PR and between f4a454d and 942f373.

Files selected for processing: 1

  • packages/nuxt-cli/test/unit/commands/info-run.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

CLI benchmark

@nuxt/cli v4.1.1 (baseline) vs v4.1.1 (this PR)

Metric baseline v4.1.1 head v4.1.1 Delta
nuxt --version wall time (median) 72 ms 72 ms -0.8%
nuxt --help wall time (median) 159 ms 159 ms -0.1%
nuxt dev --help wall time (median) 118 ms 119 ms +0.7%
nuxt --version modules loaded 35 35 0.0%
nuxt --version built-ins loaded 29 29 0.0%
nuxt --help modules loaded 138 138 0.0%
nuxt --help built-ins loaded 93 93 0.0%
nuxt dev --help modules loaded 68 68 0.0%
nuxt dev --help built-ins loaded 90 90 0.0%
Installed node_modules 2.66 MB 2.66 MB -0.0%
Published tarball (packed) 265.5 kB 265.5 kB 0.0%
Full report

@nuxt/cli v4.1.1 (baseline) vs v4.1.1 (head)

Setting Value
Baseline ref:f4a454d3fa1034910e3706e56f06f087e927eadf (v4.1.1)
Head local packages/nuxt-cli at c57433c (v4.1.1)
Node v24.22.3
OS Linux 7.0.0 (kernel 7.0.0-1020-azure)
CPU AMD EPYC 7763 64-Core Processor x 4
Memory 15.6 GB
Load average at start 1.59, 0.51, 0.18
Run started 2026-11-29T22:55:18.592Z

Cold CLI startup

Median of 15 interleaved runs per command, one warmup discarded.

Command baseline v4.1.1 median head v4.1.1 median Delta baseline v4.1.1 min / p95 head v4.1.1 min / p95
nuxt --version 72 ms 72 ms -0.8% 70 ms / 76 ms 69 ms / 74 ms
nuxt --version (first output byte) 67 ms 67 ms -0.6% 65 ms / 71 ms 64 ms / 69 ms
nuxt --help 159 ms 159 ms -0.1% 153 ms / 162 ms 154 ms / 162 ms
nuxt --help (first output byte) 152 ms 152 ms -0.1% 146 ms / 156 ms 147 ms / 155 ms
nuxt dev --help 118 ms 119 ms +0.7% 114 ms / 121 ms 115 ms / 121 ms
nuxt dev --help (first output byte) 112 ms 112 ms +0.7% 108 ms / 114 ms 109 ms / 115 ms
nuxt <unknown-command> (no-op) 170 ms 169 ms -0.4% 164 ms / 174 ms 165 ms / 172 ms
nuxt <unknown-command> (no-op) (first output byte) 162 ms 162 ms -0.3% 157 ms / 166 ms 157 ms / 165 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.1 modules head v4.1.1 modules Delta baseline v4.1.1 source bytes head v4.1.1 source bytes Delta baseline v4.1.1 built-ins head v4.1.1 built-ins Delta
nuxt --version 35 35 0.0% 312.3 kB 312.3 kB 0.0% 29 29 0.0%
nuxt --help 138 138 0.0% 899.0 kB 899.0 kB 0.0% 93 93 0.0%
nuxt dev --help 68 68 0.0% 478.8 kB 478.8 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.1 head v4.1.1 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.66 MB 2.66 MB -0.0%
Installed files 446 446 0.0%
Install wall time (warm npm cache, median of 3) 1.53 s 1.53 s -0.1%
Published tarball (packed) 265.5 kB 265.5 kB 0.0%
Published tarball (unpacked) 859.1 kB 859.1 kB 0.0%
Files in tarball 108 108 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.

@danielroe
danielroe added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit 9fed859 Nov 29, 2026
24 of 25 checks passed
@danielroe
danielroe deleted the fix-nitro-version-assert branch November 29, 2026 23:05
@github-actions github-actions Bot mentioned this pull request Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant