Repository navigation
chore(deps): update peerdependency @nuxt/cli to v4 - #804
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
commit: |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
^3.37.0→^4.0.1Release Notes
nuxt/cli (@nuxt/cli)
v4.0.1Compare Source
👉 Changelog
compare changes
🩹 Fixes
BROWSERwithout a display server (#1609)BroadcastChannelthrows (#1600)💅 Refactors
c1e0e9ee)✅ Tests
upm(#1597)eec52f07)🎉 New Contributors
❤️ Contributors
v4.0.0Compare Source
👀 Highlights
Nuxt CLI v4 is a performance, feature and DX-focused release.
It ships alongside Nuxt 4.6, and alongside resolving almost all of the open issues, we've focused on the
nuxt devexperience: how quickly it starts, the information it shows you, and what happens when something goes wrong.It's also a lot smaller. 😁
There's quite a bit to cover (more than 200 commits since v3.37), so here are just some of the things that we're particularly excited about! 🎉
🐞 Better dev-time errors with
my-badDev-time errors are now rendered with
my-bad, which replacesyouch(#1518).When a page fails to render, you get your own page's error state along with a small overlay in the corner. Expanding it shows the source-mapped code frame in your file, the call stack (with framework frames folded away by default), the Vue component trace, the request and environment, and the server logs that led up to the error.
There's a Copy error button with a few formats, including a prompt you can hand straight to an agent:
The CLI now also hosts a single live error channel, mounted at
devServer.errorChannel(default/__nuxt_dev__/error). Because it lives in the CLI rather than inside Nuxt, it survives restarts of the process serving your app, and it can report errors that happen before Nuxt is up at all. So if yournuxt.confighas a syntax error, or a module can't be loaded, you get a proper error page in the browser, which reloads by itself once you've fixed it:Each error is rendered once, rather than at several levels (Vite plugin, Nuxt error handler, h3). The terminal gets the same treatment, with a code frame and folded dependency frames:
Watch a config syntax error recover automatically
The error channel is only served in full to loopback peers. If you expose your dev server to the network, remote peers get a scoped view without request details or error history (#1547, #1552, #1554).
🖥️ An interactive terminal UI for
nuxt devI am very excited about this one. In an interactive terminal,
nuxt devnow renders a panel pinned to the bottom of the screen with your URLs, live startup progress, the current status and a row of shortcuts, while logs fold away above it (#1463).Everything is a single keypress away:
r/shift-royil/enpcx?qEvery request the dev server forwards is now tagged with an id, so logs and errors are attributed to the request that caused them, and you can drill into a request from the
nview to see what it logged (2d9f1a8, #1557, #1558, #1474).Select a request and press
enterto open its timeline: middleware, plugins, hooks, data fetching, rendering and outgoing requests, followed by Vite compilation timings and the request's logs (#1582). The detail available depends on your Nuxt and Nitro versions. Inside a view,ycopies the selected row andshift-ycopies the filtered contents (#1537).Screen.Recording.2026-09-27.at.16.58.56.mov
When something inside the dev server needs your input (for example,
useScript()offering to install@nuxt/scripts), the panel steps aside and lets you answer it (#1488):This also adds three primitives for modules that want to play nicely with the new UI:
withTerminal()to borrow the terminal,startTask()for a spinner on the status line, andnotify()for a notice that lands in the log history. (To use this, make sure your module has@nuxt/kitv4.6 as a dependency...)We've also tried to make the dev server surface more information about what it's doing:
81a5de1).nuxt.configchange it lists the keys that actually changed (#1402, #1403). Saves that change nothing no longer restart the server at all (#1435).nuxt build, which reports its phases and where the time went (#1490).⚡️ Faster startup, smaller install
As mentioned above, we've spent a lot of time on the size and startup time of the CLI and have cleared away a lot of unnecessary, old and deprecated dependencies.
@nuxt/clihas gone from 70 packages to 31 and from 13.1 MB to 3.5 MB installed, and the globalnuxipackage from 6.0 MB to 0.8 MB. We've swapped out a number of dependencies for Node built-ins or smaller alternatives (picocolorsfornode:utilstyleText,semverforverkit,fuse.jsforfuzzysort,magicastforoxc,ofetchfor nativefetch,source-map-jsfor Node'sSourceMap), stopped bundlingjiti, and kept registry lookups and the update check off the startup path (#1379, #1409, #1413, #1416, #1425, #1430, #1443).@nuxt/cliinstall size@nuxt/clidependenciesnuxiinstall sizenuxt --helpnuxi --help(global)nuxt dev: first paintnuxt dev: port boundnuxt dev: first page servednuxt dev: memory at rest (Linux)A few of the changes behind this:
88de5da,11226da).SO_REUSEPORTand hands it to the new process, rather than dropping connections while it comes back up (#1404).NUXT_DEV_FORK_POOL_SIZE), and only start warming it once you change a file (1897968,9a10f71).🤖 Friendlier to agents (and to people with too many terminals)
A running dev server now records itself in a lock file in
.nuxt/. That means a secondnuxt devfor the same project reports the server that is already running rather than racing it for a port, and can take it over when that makes sense (#1414):nuxt devwhile another non-interactive server is running, it takes over (loudly).nuxt devrefuses and tells the agent where your server is.--takeoverto force it.The lock file also powers two new commands that talk to the running server without you needing to know the port (#1417, #1432):
nuxt curl /api/hello nuxt curl /api/users -X POST -d '{"name":"daniel"}' nuxt task list nuxt task run db:migrate --payload.force=truenuxt curlpretty-prints and highlights responses in a terminal, and exits with22on HTTP errors, just likecurl --fail. Whennuxt devruns non-interactively, it suggests usingnuxt curl(#1464).nuxt previewalso records its running process and supports--takeoverto replace an existing preview server (#1572).nuxt info(82fe2d6),nuxt module searchandnuxt task listall gain--jsonoutput (da95c8b).📚
nuxt docsYou can now search the Nuxt documentation from your terminal (
f2dbd8c):nuxt docs "server routes"It searches the docs for the Nuxt version your project actually depends on, and opens the best match in your browser (or lets you pick, if there are several).
✨ Lots of smaller things
Typos: mistype a command or a flag and we'll suggest the one you meant, and offer to rerun it (
b841b87,07e7981,36119fe).Layers:
nuxt addcan now add layers, and detects module subpaths, sonuxt add vue-sonneraddsvue-sonner/nuxt(#1399).pnpm catalogs:
nuxt upgradeandnuxt infounderstand pnpm catalogs (#1397).Module search shows descriptions and highlights matches (
e621b9c).Update nudges: the CLI lets you know when a newer Nuxt release is available (#1393, #1406). Set
NUXT_IGNORE_UPDATE_CHECK=1to turn this off.Dev server:
--strictPort,--open.urlfor a custom path,BROWSERsupport,r/u/qr/copyshortcuts in plain mode, a hint about--hostinside Docker or WSL, a warning when the server is reachable from the network, and StackBlitz and portless URL detection (b6ee3b9,f693d33,c1c6687,bf72c89,29558d5,40ab1f6,62a030f,a0eace5).Network failures suggest a proxy-aware retry command (#1387), and first-run failures are explained before Nuxt even loads (#1444).
Builds without a server runtime:
analyze,build,devandpreviewno longer assume Nitro is present, which makes the CLI more resilient to different Nitro versions and pure Vite SPA builds (#1505, #1509).Security hardening:
cloudflareddownloads are pinned and checksum-verified, internal dev endpoints reject unknownHostheaders,GITHUB_TOKENis only sent to GitHub, and templates can't be written outside your project (3ad862d,14c268e,2a1e5b0,29e69b9).The CLI docs now live in this repository (#1465), alongside a terminal capture harness that produces the recordings you see above (#1461).
✅ Upgrading
@nuxt/cliis a dependency ofnuxt, and your project runs whichever versionnuxtdepends on. The way to get v4 is to upgrade to Nuxt 4.6, which depends on it:If you'd like to try CLI v4 before upgrading Nuxt, you can override the version
nuxtdepends on. With pnpm, inpnpm-workspace.yaml:With npm (or bun), in
package.json:{ "overrides": { "@nuxt/cli": "^4.0.0" } }With yarn, use
resolutionsinstead ofoverrides. Then reinstall, and check withnpx nuxt --version.If you're getting CLI v4 by upgrading to Nuxt 4.6, check that your Node.js version meets Nuxt 4.6's requirement (Node.js v22.21+, v24.11+ or v26+). No other migration is needed for a supported Nuxt 4 setup. 🎉
This is a major release only because it drops support for some older setups. The compatibility changes below also matter if you override
@nuxt/clion an older version of Nuxt, or use a globalnuxiwith older projects:4360712,e4aae262). Projects on an older Node version need to upgrade before using CLI v4.@nuxt/bridgeare no longer supported, as Nuxt 2 has been EOL for some time now (#1410).nuxionly hands off to a project@nuxt/cliof v3.26 or later (#1410). Every Nuxt 4 release (and Nuxt 3.18+) depends on a compatible version, so this only affects projects with an older lockfile, which will run the globalnuxi's own commands instead.nuxt inithas moved out of@nuxt/cli. We consider it an edge case to use an already-installed Nuxt to create another one, so instead just usenpm create nuxt@latest(ornpx nuxi init). This saves around 220 KB in every Nuxt project (#1420).There are also a couple of other changes you'll notice, though they shouldn't need any action:
nuxt devshows the interactive UI by default in an interactive terminal. Scripts and CI are unaffected, and--no-tuiorNUXT_TUI=plainrestores the previous output.my-badinstead ofyouch(#1518).👉 Changelog
compare changes
🚀 Enhancements
🔥 Performance
🩹 Fixes
💅 Refactors
📖 Documentation
🏡 Chore
✅ Tests
Configuration
📅 Schedule: (UTC)
* 0-3 * * 1)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.