[Snyk] Upgrade nuxt from 3.13.0 to 3.13.1 #1
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.
Snyk has created this PR to upgrade nuxt from 3.13.0 to 3.13.1.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 1 version ahead of your current version.
The recommended version was released on 22 days ago.
Issues fixed by the recommended upgrade:
SNYK-JS-VITE-8023174
SNYK-JS-VITE-8022916
Release notes
Package name: nuxt
👀 Highlights
Although this is a patch release, there are two features I'd love to draw your attention to.
useId
now uses a built-in Vue composable for stable ids between server + client! #28285experimental.buildCache
feature now allows for quicker app rebuilds #28726As always, feedback is appreciated 🙏 ❤️
✅ Upgrading
As usual, our recommendation for upgrading is to run:
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
👉 Changelog
compare changes
🔥 Performance
ServerPlaceholder
for ssr client components (#28563)🩹 Fixes
serverDir
relative to root (#28700)MiddlewareKey
(#28676)NuxtLink
(#28738)NuxtOptions
as well as config (#28747)CookieStore
events (#28760)appConfig
with non-iterable objects (#28773)isNuxtError
type inference (#28814)💅 Refactors
useId
(#28285)📖 Documentation
query
returned value fromuseRoute()
(#28743)--frozen-lockfile
when installing dependencies (#28794)🏡 Chore
tinyexec
internally (#28684)tinyglobby
internally (#28686)✅ Tests
❤️ Contributors
👀 Highlights
I'm pretty excited about this release - we've ported some features we had planned for Nuxt v4 back to v3, as well as a raft of bug fixes and performance improvements - as usual.
Here are a few of things I'm most excited about.
🏘️ Route Groups
We now support naming directories with parentheses/brackets to organise your routes without affecting the path.
For example:
This will produce
/
,/about
and/contact
pages in your app. Themarketing
group is ignored for purposes of your URL structure.Read more in the original PR.
🏝️ Islands and Head Metadata
It's now possible for server component islands to manipulate the head, such as by adding SEO metadata when rendering.
Read more in #27987.
🪝 Custom Prefetch Triggers
We now support custom prefetch triggers for
NuxtLink
(#27846).For example:
It's also possible to enable/disable these globally for your app and override them per link.
For example:
🗺️ Better Server Source Maps
When running with
node --enable-source-maps
, you may have noticed that the source maps for the Vue files in your server build pointed to the Vite build output (something like.nuxt/dist/server/_nuxt/index-O15BBwZ3.js
).Now, even after your Nitro build, your server source maps will reference your original source files (#28521).
Note that one of the easiest ways of improving your build performance is to turn off source maps if you aren't using them, which you can do easily in your
nuxt.config
:🎁 New Features for Module Authors
In the run-up to Nuxt v4, we're working on adding some key functionality for module authors, including a new
isNuxtMajorVersion
utility where required (#27579) and better inferred typing for merged module options using the newdefineNuxtModule().with()
method (#27520).✨ Improved Dev Warnings
We no longer warn when using data fetching composables in middleware (#28604) and we warn when user components' names begin with Lazy (#27838).
🚨 Vue TypeScript Changes
For a while, in the Vue ecosystem, we've been augmenting
@ vue/runtime-core
to add custom properties and more tovue
. However, this inadvertently breaks the types for projects that augmentvue
- which is now the officially recommended in the docs way to augment these interfaces (for example, ComponentCustomProperties, GlobalComponents and so on).This means all libraries must update their code (or it will break the types of libraries that augment
vue
instead).We've updated our types in Nuxt along these lines but you may experience issues with the latest
vue-router
when used with libraries which haven't yet done so.Please create an issue with a reproduction - I'll happily help create a PR to resolve in the upstream library in question. Or you may be able to work around the issue by creating a
declarations.d.ts
in the root of your project with the following code (credit):ComponentCustomOptions as _ComponentCustomOptions,
ComponentCustomProperties as _ComponentCustomProperties,
} from 'vue';
declare module '@ vue/runtime-core' {
interface ComponentCustomProperties extends _ComponentCustomProperties {}
interface ComponentCustomOptions extends _ComponentCustomOptions {}
}
✅ Upgrading
As usual, our recommendation for upgrading is to run:
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
👉 Changelog
compare changes
🚀 Enhancements
routes
function inrouter.options
(#27644)isNuxtMajorVersion
compatibility util (#27579).with
for better module options types (#27520)Lazy
(#27838)usePreviewMode
(#28371)prepend
option toaddRouteMiddleware
(#28496)__NUXT__
when using multi-app (#27263)🔥 Performance
decode
function only for named cookie (#28215)getCachedData
(#28472)🩹 Fixes
definePageMeta
in client-only pages (#28246)dist/runtime/
in tsconfig includes (#28237)assetsDir
(59f0099f4)serverDir
(#28249)vite-plugin-vue
(#28307)scroll-padding-top: auto
in scrollBehavior (#28320)runtimeConfig.public
is reactive on client (#28443)nuxt/scripts
(#28449)@ vue/runtime-core
and@ vue/runtime-dom
(#28446)baseURL
for public assets in dev (#28482)useFetch
(#28517)vue
, not sub-packages (#28542)route.meta
(#28441)validate
method (#28612)prefetchOn
prop (#28630)📖 Documentation
vue
lang to sample code (#28247)splitSetCookieString
fromcookie-es
(29f95ae0d)headers.getSetCookie
(45c6df9a4)bunx
->bun x
(#28277)@ see
blocks (#28270)mountSuspended
(#28463)options
type in custom useFetch recipe (#28389)🏡 Chore
✅ Tests
pageTransition
in client-only page (#27839)SharedComponent
in server head (510f3e28f)🤖 CI
❤️ Contributors
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: