chore(deps): update nuxt framework to ^3.17.0 (v3) #4003
+2,046
−330
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.
This PR contains the following updates:
^3.16.2
->^3.17.0
^3.16.2
->^3.17.0
^3.16.2
->^3.17.0
Release Notes
nuxt/nuxt (@nuxt/kit)
v3.17.0
Compare Source
👀 Highlights
This release brings a major reworking of the async data layer, a new built-in component, better warnings, and performance improvements!
📊 Data Fetching Improvements
A major reorganization of Nuxt's data fetching layer brings significant improvements to
useAsyncData
anduseFetch
.Although we have aimed to maintain backward compatibility and put breaking changes behind the
experimental.granularCachedData
flag (disabled by default), we recommend testing your application thoroughly after upgrading. You can also disableexperimental.purgeCachedData
to revert to the previous behavior if you are relying on cached data being available indefinitely after components usinguseAsyncData
are unmounted.👉 Read the the original PR for full details (#31373), but here are a few highlights.
Consistent Data Across Components
All calls to
useAsyncData
oruseFetch
with the same key now share the underlying refs, ensuring consistency across your application:This solves various issues where components could have inconsistent data states.
Reactive Keys
You can now use computed refs, plain refs, or getter functions as keys:
Optimized Data Refetching
Multiple components watching the same data source will now trigger only a single data fetch when dependencies change:
🎭 Built-In Nuxt Components
<NuxtTime>
- A new component for safe time displayWe've added a new
<NuxtTime>
component for SSR-safe time display, which resolves hydration mismatches when working with dates (#31876):The component accepts multiple time formats and gracefully handles both client and server rendering.
Enhanced
<NuxtErrorBoundary>
The
<NuxtErrorBoundary>
component has been converted to a Single File Component and now exposeserror
andclearError
from the component - as well as in the error slot types, giving you greater ability to handle errors in your templates and viauseTemplateRef
(#31847):🔗 Router Improvements
<NuxtLink>
now accepts atrailingSlash
prop, giving you more control over URL formatting (#31820):🔄 Loading Indicator Customization
You can now customize the loading indicator with new props directly on the component (#31532):
hideDelay
: Controls how long to wait before hiding the loading barresetDelay
: Controls how long to wait before resetting loading indicator state📚 Documentation as a Package
The Nuxt documentation is now available as an npm package! You can install
@nuxt/docs
to access the raw markdown and YAML content used to build the documentation website (#31353).💻 Developer Experience Improvements
We've added several warnings to help catch common mistakes:
runtimeConfig.app
namespace #31774definePageMeta
is used more than once in a file #31634🔌 Enhanced Module Development
Module authors will be happy to know:
experimental.enforceModuleCompatibility
allows Nuxt to throw an error when a module is loaded that isn't compatible with it (#31657). It will be enabled by default in Nuxt v4.addComponentExports
#27155🔥 Performance Improvements
Several performance improvements have been made:
tinyglobby
for faster file globbing #31668.data
directory from type-checking for faster builds #31738purgeCachedData
check #31785✅ Upgrading
Our recommendation for upgrading is to run:
This refreshes your lockfile and pulls in all the latest dependencies that Nuxt relies on, especially from the unjs ecosystem.
👉 Changelog
compare changes
🚀 Enhancements
hideDelay
andresetDelay
props for loading indicator (#31532)@nuxt/docs
(#31353)loadNuxtConfig
to nitro (#31680)runtimeConfig.app
namespace (#31774)middleware
when scanning page metadata (#30708)addComponentExports
(#27155)<NuxtErrorBoundary>
to SFC + exposeerror
/clearError
(#31847)<NuxtTime>
component for ssr-safe time display (#31876)trailingSlash
prop to<NuxtLink>
(#31820)🔥 Performance
tinyglobby
(#31668).data
directory from type-checking (#31738)purgeCachedData
check to improve tree-shaking (#31785)oxc-parser
manual wasm fallback logic (#31484)🩹 Fixes
modulesDir
paths are added tofs.allow
(#31540)/_nuxt/
(#31646)useLazyAsyncData
(#31676)error.url
(#31679)app:rendered
is called (#31686)fallback
attribute when stripping<DevOnly>
(c1d735c27)noScripts
(c9572e953)compatibilityDate
(#31725)statusMessage
when rendering html error (#31761)definePageMeta
is used more than once (#31634)error.data
before renderingerror.vue
(#31571)useAsyncData
in console log (#31801)NuxtErrorBoundary
error (#31791)preserveModules
(#31839)pending
withstatus
value for v4 (#25864)nuxt/app
in generated middleware and layouts declarations (#31808)withoutBase
(f956407bb)vue
in vite-node dev server (f3882e004)tsconfig.json
(#31882)useNuxtData
(#31893)useFetch
watch sources (#31903)modulesDir
to store build cache files (#31907)💅 Refactors
shallowRef
for primitives as well (#31662)_replaceAppConfig
when applying hmr (#31786)ConfigSchema
(#31894)📖 Documentation
app.vue
(#31645)templateParams
to seo docs (#31583)useHydration
(#31712)callOnce
returning value (#31747)vs.
consistently (#31760)addServerHandler
example (#31769)📦 Build
vue-sfc-transformer
to process sfcs (#31691)🏡 Chore
✅ Tests
<NuxtErrorBoundary>
(4df92c45f)pendingWhenIdle
(08f2224c8)🤖 CI
❤️ Contributors
Configuration
📅 Schedule: Branch creation - Every minute ( * * * * * ) (UTC), Automerge - At any time (no schedule defined).
🚦 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.