Bump nuxt from 3.8.0 to 4.2.0
Bumps nuxt from 3.8.0 to 4.2.0.
Release notes
Sourced from nuxt's releases.
v4.2.0
4.2.0 is the next minor release.
👀 Highlights
We're excited to announce Nuxt 4.2, bringing new capabilities for better TypeScript DX, enhanced error handling, and improved control over data fetching! 🎉
🎯 Abort Control for Data Fetching
You can now pass an
AbortControllersignal directly touseAsyncDataanduseFetch, giving you fine-grained control over request cancellation (#32531).<script setup lang="ts"> const controller = new AbortController()const { data, error } = await useAsyncData('users', () => $fetch('/api/users', { signal: controller.signal }))
// Cancel the request manually when needed function cancelRequest() { controller.abort() } </script>
This is particularly useful when you need to abort requests based on user actions or component lifecycle events. The abort signal can also be passed to
refresh()andexecute()methods:const { data, refresh } = await useAsyncData('posts', fetchPosts)// Abort an ongoing refresh const abortController = new AbortController() refresh({ signal: abortController.signal })
// Later... abortController.abort()
🎨 Better Error Pages in Development
When an error occurs during development, Nuxt will now display both your custom error page and a detailed technical error overlay (#33359). This gives you the best of both worlds – you can see what your users will experience while also having immediate access to stack traces and debugging information.
The technical overlay appears as a toggleable panel that doesn't interfere with your custom error page, making it easier to debug issues while maintaining a realistic preview of your error handling.
🔮 Opt-in Vite Environment API
For those wanting to experiment with cutting-edge features, you can now opt into the Vite Environment API (#33492).
... (truncated)
Commits
2f7957av4.2.07db30a6fix(vite): unsetoptimizeDeps.includefor server environment (#33550)451c817fix(nuxt): handle arrays in app config correctly during HMR (#33555)ddebec5chore(deps): update all non-major dependencies (main) (#33469)56a257afix(nuxt): addNuxtTimerelative timerelativeStyleprop (#33557)b51cb30refactor(nuxt): useRouteLocationNormalizedLoadedGenericinternallyc2e1998fix(nuxt): addNuxtTimerelative timenumericprop (#33552)ba0dfebchore(deps): update dependency vite to v7.1.11 [security] (main) (#33531)b7ed1d3chore: remove code comment (#33515)934dc00fix(nuxt): support component auto-imports as arguments ofh()(#33509)- Additional commits viewable in compare view
Maintainer changes
This version was pushed to npm by [GitHub Actions](https://www.npmjs.com/~GitHub Actions), a new releaser for nuxt since your current version.
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.