[Snyk] Upgrade nuxt from 3.12.4 to 3.13.0 #54
Merged
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.12.4 to 3.13.0.
ℹ️ 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 23 days ago.
Release notes
Package name: nuxt
👀 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
👉 Changelog
compare changes
🔥 Performance
resolveId
in layers (#27971)🩹 Fixes
noScripts
(#27972)/
as fallback if page can't be identified (e6109b226)html-validate
(#28024)unhead
key for ad-hoc module options (#28088)getNuxtVersion
returnsstring
(#28125)scroll-padding-top
in scrollBehavior (#28083)useAsyncData
returns undefined (#28154)getCachedData
null response (d10cea11b)app/
assrcDir
if it doesn't exist (#28176)serverDir
within layers using v4 compat (#28177)getCachedData
to return undefined (#28187)addEventListener
to register cookie store listener (#28193)set-cookie
headers (#28211)💅 Refactors
postcss
module loading (#27946)_registeredComponents
from ssrContext (#27819)errx
to handle dev log traces (#28027)📖 Documentation
nuxtApp.runWithContext
(#28000)pending
variable from data fetching docs (#28011)layers/
directory (#28128)✅ Tests
typeCheck
test in minimal build (#28166)🤖 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: