You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(onboard): load DevTools v3, v4 and nightly releases - #1122
@nuxt/devtools-onboard (which Nuxt 5 nightly now depends on and pushes into _modules) could only hand off to @nuxt/devtools v4:
Its optional peer @nuxt/devtools@^4.0.0-beta.4 makes npm fail with ERESOLVE when the project has @nuxt/devtools v3 (for example a Nuxt 4 app that lists the onboard, or a Nuxt 5 app that kept v3), or a nightly whose version is a prerelease of a newer major.minor.patch (for example 4.0.1-<date>.<sha>).
A nightly installed under its real name, @nuxt/devtools-nightly, was never looked up, so the install button showed instead.
setup()
devtools disabled, or listed in modules -> return
- resolve @nuxt/devtools -> installModule+ resolve @nuxt/devtools-nightly -> installModule+ resolve @nuxt/devtools (v3, v4, alias) -> installModule
not dev -> return
inject install button (installs @nuxt/devtools@^<own version>)
The peer range is now *. npm only accepts a prerelease from another major.minor.patch when the range is * (dep-valid.js short-circuits it), so an explicit ^3.0.0 || ^4.0.0-0 would still reject future nightlies. The install button derives its spec from the onboard's own version, so it still installs the matching v4.
@nuxt/devtools-nightly wins when both names are installed: it is only there by deliberate opt-in, while @nuxt/devtools can arrive with another dependency.
The nightly build is unchanged: bump-nightly.ts still rewrites the peer to npm:@nuxt/devtools-nightly@<version>, which the install spec reads.
Evidence
npm install --package-lock-only with the onboard next to:
Real @nuxt/devtools-nightly releases could not be used: the latest ones depend on -kit-nightly / -assets-nightly versions that are missing from the registry.
Unit test loads @nuxt/devtools-nightly installed under its own name, over @nuxt/devtools (stand-in packages in the fixture's node_modules):
Before: fails, expected '@nuxt/devtools' to be '@nuxt/devtools-nightly'
After: passes
Verification
pnpm test:unit: 21 files, 120 tests pass.
pnpm eslint packages/devtools-onboard: clean.
tsc --noEmit --skipLibCheck -p packages/devtools-onboard: no errors in src/ or test/. pnpm typecheck reports one error in packages/devtools/client/pages/modules/custom-[name].vue, which this PR does not touch.
pnpm install: lockfile unchanged.
Not verified: a full nuxt dev boot of Nuxt 5 with DevTools v3 through the onboard. The onboard only resolves and installs the module; whether v3 itself runs on Nuxt 5 is outside this change.
Merge Danger
Door: two-way. Restoring the peer range and the single lookup reverts it.
Blast Radius: install resolution. Package managers no longer warn or fail for any @nuxt/devtools version next to the onboard, including majors that cannot run on the installed Nuxt. Projects with both @nuxt/devtools and @nuxt/devtools-nightly installed now load the nightly.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 61452155-cadd-45b5-b057-b0a5a8e55750
📥 Commits
Reviewing files that changed from the base of the PR and between 10f9ee8 and 2303f81.
📒 Files selected for processing (4)
packages/devtools-onboard/README.md
packages/devtools-onboard/package.json
packages/devtools-onboard/src/module.ts
packages/devtools-onboard/test/module.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
The onboarding module now checks for @nuxt/devtools-nightly before @nuxt/devtools and installs the first package that resolves. The peer dependency accepts any version. The README describes supported DevTools versions and package forms. A test verifies that nightly loads when both packages are installed.
No actionable merge-blocking issue was established; the nightly alias remains resolvable by the onboard.
Pre-merge checks · 4 · 1
Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (2 skipped: 2…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks (4 passed)
Check name
Status
Explanation
Description check
The description clearly explains the peer dependency and DevTools lookup changes, test evidence, verification results, and known limitations.
Title check
The title clearly and concisely identifies the fix for loading DevTools v3, v4, and nightly releases, which matches the main changeset.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (2 skipped: 2 unsupported.)
Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@nuxt/devtools-onboard(which Nuxt 5 nightly now depends on and pushes into_modules) could only hand off to@nuxt/devtoolsv4:@nuxt/devtools@^4.0.0-beta.4makes npm fail withERESOLVEwhen the project has@nuxt/devtoolsv3 (for example a Nuxt 4 app that lists the onboard, or a Nuxt 5 app that kept v3), or a nightly whose version is a prerelease of a newermajor.minor.patch(for example4.0.1-<date>.<sha>).@nuxt/devtools-nightly, was never looked up, so the install button showed instead.*. npm only accepts a prerelease from anothermajor.minor.patchwhen the range is*(dep-valid.jsshort-circuits it), so an explicit^3.0.0 || ^4.0.0-0would still reject future nightlies. The install button derives its spec from the onboard's own version, so it still installs the matching v4.@nuxt/devtools-nightlywins when both names are installed: it is only there by deliberate opt-in, while@nuxt/devtoolscan arrive with another dependency.bump-nightly.tsstill rewrites the peer tonpm:@nuxt/devtools-nightly@<version>, which the install spec reads.Evidence
npm install --package-lock-onlywith the onboard next to:4.0.0-beta.4@nuxt/devtools@^3.2.0(3.4.2)ERESOLVE, peerOptional@nuxt/devtools@"^4.0.0-beta.4"@nuxt/devtools@4.0.1-29860000.abcdef0(nightly-style version)ERESOLVEReal
@nuxt/devtools-nightlyreleases could not be used: the latest ones depend on-kit-nightly/-assets-nightlyversions that are missing from the registry.Unit test
loads @nuxt/devtools-nightly installed under its own name, over @nuxt/devtools(stand-in packages in the fixture'snode_modules):expected '@nuxt/devtools' to be '@nuxt/devtools-nightly'Verification
pnpm test:unit: 21 files, 120 tests pass.pnpm eslint packages/devtools-onboard: clean.tsc --noEmit --skipLibCheck -p packages/devtools-onboard: no errors insrc/ortest/.pnpm typecheckreports one error inpackages/devtools/client/pages/modules/custom-[name].vue, which this PR does not touch.pnpm install: lockfile unchanged.nuxt devboot of Nuxt 5 with DevTools v3 through the onboard. The onboard only resolves and installs the module; whether v3 itself runs on Nuxt 5 is outside this change.Merge Danger
Door: two-way. Restoring the peer range and the single lookup reverts it.
Blast Radius: install resolution. Package managers no longer warn or fail for any
@nuxt/devtoolsversion next to the onboard, including majors that cannot run on the installed Nuxt. Projects with both@nuxt/devtoolsand@nuxt/devtools-nightlyinstalled now load the nightly.Created with the help of an agent.