nuxt/nuxt (@nuxt/kit)
### [`v3.10.0`](https://togithub.com/nuxt/nuxt/releases/tag/v3.10.0)
[Compare Source](https://togithub.com/nuxt/nuxt/compare/v3.9.3...v3.10.0)
> 3.10.0 is the next minor/feature release.
#### 👀 Highlights
v3.10 comes quite close on the heels of v3.9, but it's packed with features and fixes. Here are a few highlights.
##### ✨ Experimental shared `asyncData` when prerendering
When prerendering routes, we can end up refetching the same data over and over again. In Nuxt 2 it was possible to create a 'payload' which could be fetched once and then accessed in every page (and this is of course possible to do manually in Nuxt 3 - see [this article](https://roe.dev/blog/shared-data-nuxt-generate)).
With [#24894](https://togithub.com/nuxt/nuxt/pull/24894), we are now able to do this automatically for you when prerendering. Your `useAsyncData` and `useFetch` calls will be deduplicated and cached between renders of your site.
```ts [nuxt.config.ts]
export defineNuxtConfig({
experimental: {
sharedPrerenderData: true
}
})
```
> \[!IMPORTANT]\
> It is particularly important to make sure that any unique key of your data is always resolvable to the same data. For example, if you are using `useAsyncData` to fetch data related to a particular page, you should provide a key that uniquely matches that data. (`useFetch` should do this automatically.)
👉 See [full documentation](https://nuxt.com/docs/guide/going-further/experimental-features#sharedprerenderdata).
##### 🆔 SSR-safe accessible unique ID creation
We now ship a `useId` composable for generating SSR-safe unique IDs ([#23368](https://togithub.com/nuxt/nuxt/pull/23368)). This allows creating more accessible interfaces in your app. For example:
```vue [components/MyForm.vue]
```
##### ✍️ Extending `app/router.options`
It's now possible for module authors to inject their own `router.options` files ([#24922](https://togithub.com/nuxt/nuxt/pull/24922)). The new `pages:routerOptions` hook allows module authors to do things like add custom `scrollBehavior` or add runtime augmenting of routes.
👉 See [full documentation](https://nuxt.com/docs/guide/going-further/custom-routing#router-options).
##### Client-side Node.js support
We now support (experimentally) polyfilling key Node.js built-ins ([#25028](https://togithub.com/nuxt/nuxt/pull/25028)), just as we already do via Nitro on the server when deploying to non-Node environments.
That means that, within your client-side code, you can import directly from Node built-ins (`node:` and node imports are supported). However, nothing is globally injected for you, to avoid increasing your bundle size unnecessarily. You can either import them where needed.
```ts
import { Buffer } from 'node:buffer'
import process from 'node:process'
```
Or provide your own polyfill, for example, inside a Nuxt plugin.
```ts
// ~/plugins/node.client.ts
import { Buffer } from 'node:buffer'
import process from 'node:process'
globalThis.Buffer = Buffer
globalThis.process = process
export default defineNuxtPlugin({})
```
This should make life easier for users who are working with libraries without proper browser support. However, because of the risk in increasing your bundle unnecessarily, we would strongly urge users **to choose other alternatives** if at all possible.
##### 🍪 Better cookie reactivity
We now allow you to opt-in to using the [CookieStore](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore). If browser support is present, this will then be used instead of a BroadcastChannel to update `useCookie` values reactively when the cookies are updated ([#25198](https://togithub.com/nuxt/nuxt/pull/25198)).
This also comes paired with a new composable, `refreshCookie` which allows manually refreshing cookie values, such as after performing a request. See [full documentation](https://nuxt.com/docs/api/utils/refresh-cookie).
##### 🏥 Detecting anti-patterns
In this release, we've also shipped a range of features to detect potential bugs and performance problems.
- We now will throw an error if `setInterval` is used on server ([#25259](https://togithub.com/nuxt/nuxt/pull/25259)).
- We warn (in development only) if data fetch composables are used wrongly ([#25071](https://togithub.com/nuxt/nuxt/pull/25071)), such as outside of a plugin or setup context.
- We warn (in development only) if you are not using `` but have the `vue-router` integration enabled ([#25490](https://togithub.com/nuxt/nuxt/pull/25490)). (`` should not be used on its own.)
##### 🧂 Granular view transitions support
It's now possible to control view transitions support on a per-page basis, using `definePageMeta` ([#25264](https://togithub.com/nuxt/nuxt/pull/25264)).
You need to have experimental view transitions support enabled first:
```ts
export default defineNuxtConfig({
experimental: {
viewTransition: true
},
app: {
// you can disable them globally if necessary (they are enabled by default)
viewTransition: false
}
})
```
And you can opt in/out granularly:
```vue
// ~/pages/index.vue
```
Finally, Nuxt will not apply View Transitions if the user's browser matches `prefers-reduced-motion: reduce` ([#22292](https://togithub.com/nuxt/nuxt/pull/22292)). You can set `viewTransition: 'always'`; it will then be up to you to respect the user's preference.
##### 🏗️ Build-time route metadata
It's now possible to access routing metadata defined in `definePageMeta` at build-time, allowing modules and hooks to modify and change these values ([#25210](https://togithub.com/nuxt/nuxt/pull/25210)).
```ts
export default defineNuxtConfig({
experimental: {
scanPageMeta: true
}
})
```
Please, experiment with this and let us know how it works for you. We hope to improve performance and enable this by default in a future release so modules like `@nuxtjs/i18n` and others can provide a deeper integration with routing options set in `definePageMeta`.
##### 📦 Bundler module resolution
With [#24837](https://togithub.com/nuxt/nuxt/pull/24837), we are now opting in to the TypeScript `bundler` resolution which should more closely resemble the actual way that we resolve subpath imports for modules in Nuxt projects.
'Bundler' module resolution is [recommended by Vue](https://togithub.com/vuejs/tsconfig/blob/mainz/tsconfig.json#L24-L26) and [by Vite](https://vitejs.dev/guide/performance.html#reduce-resolve-operations), but unfortunately there are still many packages that do not have the correct entries in their `package.json`.
As part of this, we opened 85 PRs across the ecosystem to test switching the default, and identified and fixed some issues.
If you need to switch off this behaviour, you can do so. However, please consider raising an issue (feel free to tag me in it) in the library or module's repo so it can be resolved at source.
```ts
export default defineNuxtConfig({
future: {
typescriptBundlerResolution: false
}
})
```
#### ✅ Upgrading
As usual, our recommendation for upgrading is to run:
```sh
nuxi upgrade --force
```
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](https://togithub.com/nuxt/nuxt/compare/v3.9.3...v3.10.0)
##### 🚀 Enhancements
- **nuxt:** `tryUseNuxtApp` composable ([#25031](https://togithub.com/nuxt/nuxt/pull/25031))
- **nuxt:** Add experimental sharedPrerenderData option ([#24894](https://togithub.com/nuxt/nuxt/pull/24894))
- **schema:** Default to `bundler` module resolution ([#24837](https://togithub.com/nuxt/nuxt/pull/24837))
- **nuxt:** Warn if data fetch composables are used wrongly ([#25071](https://togithub.com/nuxt/nuxt/pull/25071))
- **nuxt:** Add `pages:routerOptions` hook ([#24922](https://togithub.com/nuxt/nuxt/pull/24922))
- Experimental client-side Node.js compatibility ([#25028](https://togithub.com/nuxt/nuxt/pull/25028))
- **nuxt:** Throw error if `setInterval` is used on server ([#25259](https://togithub.com/nuxt/nuxt/pull/25259))
- **nuxt:** `refreshCookie` + experimental CookieStore support ([#25198](https://togithub.com/nuxt/nuxt/pull/25198))
- **nuxt:** Allow controlling view transitions in page meta ([#25264](https://togithub.com/nuxt/nuxt/pull/25264))
- **nuxt:** Slow down loading indicator when approaching 100% ([#25119](https://togithub.com/nuxt/nuxt/pull/25119))
- **nuxt:** Experimentally extract route metadata at build time ([#25210](https://togithub.com/nuxt/nuxt/pull/25210))
- **nuxt:** `useId` composable ([#23368](https://togithub.com/nuxt/nuxt/pull/23368))
##### 🔥 Performance
- **vite:** Avoid `endsWith` when checking for whitespace ([#24746](https://togithub.com/nuxt/nuxt/pull/24746))
##### 🩹 Fixes
- **nuxt:** Disable View Transitions if `prefers-reduced-motion` ([#22292](https://togithub.com/nuxt/nuxt/pull/22292))
- **nuxt:** Add declaration file with correct node16 imports ([#25266](https://togithub.com/nuxt/nuxt/pull/25266))
- **nuxt:** Allow omitting `fallback` in island response ([#25296](https://togithub.com/nuxt/nuxt/pull/25296))
- **schema:** Remove `defineModel` option as it is now stable ([#25306](https://togithub.com/nuxt/nuxt/pull/25306))
- **nuxt:** Overwrite island payload instead of merging ([#25299](https://togithub.com/nuxt/nuxt/pull/25299))
- **vite:** Pass `hidden` sourcemap values to vite ([#25329](https://togithub.com/nuxt/nuxt/pull/25329))
- **nuxt:** Use named import for lazy components ([#25286](https://togithub.com/nuxt/nuxt/pull/25286))
- **nuxt:** Deprecate boolean values for `dedupe` ([#25334](https://togithub.com/nuxt/nuxt/pull/25334))
- **nuxt:** Use default export for raw components ([#25282](https://togithub.com/nuxt/nuxt/pull/25282))
- **nuxt:** Handle plugin dependencies with mixed load state ([#25318](https://togithub.com/nuxt/nuxt/pull/25318))
- **nuxt:** Preserve `instance.attrs` in client-only components ([#25381](https://togithub.com/nuxt/nuxt/pull/25381))
- **nuxt:** Stop tracking suspense when error hydrating page ([#25389](https://togithub.com/nuxt/nuxt/pull/25389))
- **nuxt:** Add router.options files in definite order ([#25397](https://togithub.com/nuxt/nuxt/pull/25397))
- **nuxt:** Do not rerun synchronous `callOnce` callbacks ([#25431](https://togithub.com/nuxt/nuxt/pull/25431))
- **nuxt:** Remove dynamic `nuxt-client` within template code ([#25464](https://togithub.com/nuxt/nuxt/pull/25464))
- **nuxt:** Add runtime check to filter plugins in `dependsOn` ([#25409](https://togithub.com/nuxt/nuxt/pull/25409))
- **nuxt:** Improve global/payload error type with `NuxtError` ([#25398](https://togithub.com/nuxt/nuxt/pull/25398))
- **vite:** Extract styles for shared chunks ([#25455](https://togithub.com/nuxt/nuxt/pull/25455))
- **nuxt:** Avoid `vue-router` warning with routeRule redirect ([#25391](https://togithub.com/nuxt/nuxt/pull/25391))
- **nuxt:** Improve return type of `useRequestEvent` ([#25480](https://togithub.com/nuxt/nuxt/pull/25480))
- **nuxt:** Match nitro + nuxt `useRuntimeConfig` signatures ([#25440](https://togithub.com/nuxt/nuxt/pull/25440))
- **nuxt:** Prevent initial scroll jump when loading page ([#25483](https://togithub.com/nuxt/nuxt/pull/25483))
- **nuxt:** Prioritise later items in `pages:routerOptions` hook ([#25509](https://togithub.com/nuxt/nuxt/pull/25509))
##### 💅 Refactors
- **nuxt:** Remove `currentRoute` non-ref warning ([#25337](https://togithub.com/nuxt/nuxt/pull/25337))
##### 📖 Documentation
- Explain how to auto-install git layer deps ([#24250](https://togithub.com/nuxt/nuxt/pull/24250))
- Fix eslint link ([87641c867](https://togithub.com/nuxt/nuxt/commit/87641c867))
- Fix typo ([#25326](https://togithub.com/nuxt/nuxt/pull/25326))
- **nuxt:** Add `@since` annotations to exported composables ([#25086](https://togithub.com/nuxt/nuxt/pull/25086))
- Add emphasis to `useAsyncData` explanation ([#25392](https://togithub.com/nuxt/nuxt/pull/25392))
- Add separate docs page for `error.vue` ([#25320](https://togithub.com/nuxt/nuxt/pull/25320))
- Add explanation about layout usage in `error.vue` ([#25396](https://togithub.com/nuxt/nuxt/pull/25396))
- Use `.cjs` extension for `ecosystem.config` ([#25459](https://togithub.com/nuxt/nuxt/pull/25459))
- Add fuller explanation in `routeRules` example of swr/isr ([#25436](https://togithub.com/nuxt/nuxt/pull/25436))
- Warn that island client components don't support slots ([#25454](https://togithub.com/nuxt/nuxt/pull/25454))
- Updated addPluginTemplate example to add filename property ([#25468](https://togithub.com/nuxt/nuxt/pull/25468))
- Update link to vercel edge network overview ([e01fb7ac3](https://togithub.com/nuxt/nuxt/commit/e01fb7ac3))
- Remove unnecessary warning on `sharedPrerenderData` ([b0f50bec1](https://togithub.com/nuxt/nuxt/commit/b0f50bec1))
- Add more documentation for `pages:routerOptions` ([46b533671](https://togithub.com/nuxt/nuxt/commit/46b533671))
##### 🏡 Chore
- Fix typo in warning log ([#25265](https://togithub.com/nuxt/nuxt/pull/25265))
- **nuxt:** Warn if `NuxtPage` is not used when pages enabled ([#25490](https://togithub.com/nuxt/nuxt/pull/25490))
- Remove extra 'not' in warning message ([b96fe1ece](https://togithub.com/nuxt/nuxt/commit/b96fe1ece))
##### ✅ Tests
- **nuxt:** Add test for `data-island-uid` replacement ([#25346](https://togithub.com/nuxt/nuxt/pull/25346))
- Remove miswritten test ([#25347](https://togithub.com/nuxt/nuxt/pull/25347))
- Avoid explicit timeouts ([#25395](https://togithub.com/nuxt/nuxt/pull/25395))
##### 🤖 CI
- Only release from main repo ([#25354](https://togithub.com/nuxt/nuxt/pull/25354))
- Label pull request based on type in title ([#25404](https://togithub.com/nuxt/nuxt/pull/25404))
- Wrap PR base label in quotes ([#25432](https://togithub.com/nuxt/nuxt/pull/25432))
- Update extracting PR labels' names ([#25437](https://togithub.com/nuxt/nuxt/pull/25437))
- Skip adding PR labels if there are none to add ([#25475](https://togithub.com/nuxt/nuxt/pull/25475))
- Update changelog with github tags/handles of users ([60ab5deb0](https://togithub.com/nuxt/nuxt/commit/60ab5deb0))
- Import `$fetch` ([a1fb399eb](https://togithub.com/nuxt/nuxt/commit/a1fb399eb))
##### ❤️ Contributors
- Daniel Roe ([@danielroe](https://togithub.com/danielroe))
- Якин Никита ([@TakNePoidet](https://togithub.com/TakNePoidet))
- Nozomu Ikuta ([@NozomuIkuta](https://togithub.com/NozomuIkuta))
- Ivan Kalachikov ([@ivan-kalachikov](https://togithub.com/ivan-kalachikov))
- Horváth Bálint ([@horvbalint](https://togithub.com/horvbalint))
- kevin olson ([@acidjazz](https://togithub.com/acidjazz))
- Michael Brevard ([@GalacticHypernova](https://togithub.com/GalacticHypernova))
- Enkot ([@enkot](https://togithub.com/enkot))
- Damian Głowala ([@DamianGlowala](https://togithub.com/DamianGlowala))
- Mostafa Said ([@MooseSaeed](https://togithub.com/MooseSaeed))
- Julien Huang ([@huang-julien](https://togithub.com/huang-julien))
- TroyanOlga ([@TroyanOlga](https://togithub.com/TroyanOlga))
- Rivaland TAWOUAFO NGUTE ([@caporalCode](https://togithub.com/caporalCode))
- Becem ([@becem-gharbi](https://togithub.com/becem-gharbi))
- Shay ([@shayr1](https://togithub.com/shayr1))
- hitochan777 ([@hitochan777](https://togithub.com/hitochan777))
- Luke Nelson ([@luc122c](https://togithub.com/luc122c))
- Alexander Lichter ([@manniL](https://togithub.com/manniL))
- Sébastien Chopin ([@Atinux](https://togithub.com/Atinux))
- Hriteek Bista ([@hriteek](https://togithub.com/hriteek))
- Pooya Parsa ([@pi0](https://togithub.com/pi0))
- Dominic Marcelino ([@Dominic-Marcelino](https://togithub.com/Dominic-Marcelino))
- Luke Warlow ([@lukewarlow](https://togithub.com/lukewarlow))
- Danila Rodichkin ([@daniluk4000](https://togithub.com/daniluk4000))
nuxt/test-utils (@nuxt/test-utils)
### [`v3.11.0`](https://togithub.com/nuxt/test-utils/blob/HEAD/CHANGELOG.md#v3110)
[Compare Source](https://togithub.com/nuxt/test-utils/compare/v3.10.0...v3.11.0)
[compare changes](https://togithub.com/nuxt/test-utils/compare/v3.10.0...v3.11.0)
##### 🚀 Enhancements
- **vitest-environment:** Add support for in-source testing ([#651](https://togithub.com/nuxt/test-utils/pull/651))
##### 🩹 Fixes
- **runtime:** Reset modules after nuxt setup runs ([#726](https://togithub.com/nuxt/test-utils/pull/726))
##### ✅ Tests
- Add example of mocking `vue-router` ([e293cea1](https://togithub.com/nuxt/test-utils/commit/e293cea1))
- Add example of mocking nuxt `useRoute` ([fe465193](https://togithub.com/nuxt/test-utils/commit/fe465193))
##### ❤️ Contributors
- Daniel Roe ([@danielroe](http://github.com/danielroe))
PostHog/posthog-js (posthog-js)
### [`v1.104.2`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11042---2024-01-31)
[Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.104.1...v1.104.2)
- fix: no throwing when reading the body ([#984](https://togithub.com/PostHog/posthog-js/issues/984))
### [`v1.104.1`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11041---2024-01-31)
[Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.104.0...v1.104.1)
- chore: make rate limiter error less scary ([#983](https://togithub.com/PostHog/posthog-js/issues/983))
### [`v1.104.0`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11040---2024-01-31)
[Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.103.2...v1.104.0)
- feat: Fetch support ([#898](https://togithub.com/PostHog/posthog-js/issues/898))
- chore: Swap to main ([#979](https://togithub.com/PostHog/posthog-js/issues/979))
### [`v1.103.2`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11032---2024-01-31)
[Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.103.1...v1.103.2)
- fix: safer body processing ([#980](https://togithub.com/PostHog/posthog-js/issues/980))
### [`v1.103.1`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11031---2024-01-28)
[Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.103.0...v1.103.1)
- feat: safer rrweb events and regular full snapshots ([#973](https://togithub.com/PostHog/posthog-js/issues/973))
- chore: update rollup ([#974](https://togithub.com/PostHog/posthog-js/issues/974))
- chore: re-enable bundle checker now main and branches both use pnpm ([#972](https://togithub.com/PostHog/posthog-js/issues/972))
### [`v1.103.0`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11030---2024-01-26)
[Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.102.1...v1.103.0)
- feat: pnpm patch rrweb ([#971](https://togithub.com/PostHog/posthog-js/issues/971))
- chore: convert to pnpm ([#970](https://togithub.com/PostHog/posthog-js/issues/970))
### [`v1.102.1`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11021---2024-01-25)
[Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.102.0...v1.102.1)
- chore: add debug logging for session id/recording ([#969](https://togithub.com/PostHog/posthog-js/issues/969))
### [`v1.102.0`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11020---2024-01-24)
[Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.101.0...v1.102.0)
- feat: send custom event when network status changes ([#965](https://togithub.com/PostHog/posthog-js/issues/965))
- fix: integration test opting out ([#959](https://togithub.com/PostHog/posthog-js/issues/959))
### [`v1.101.0`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11010---2024-01-22)
[Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.100.0...v1.101.0)
- feat: canvas recording support ([#946](https://togithub.com/PostHog/posthog-js/issues/946))
- refactor(surveys): Use Preact instead of vanilla JS ([#963](https://togithub.com/PostHog/posthog-js/issues/963))
vitest-dev/vitest (vitest)
### [`v1.2.2`](https://togithub.com/vitest-dev/vitest/releases/tag/v1.2.2)
[Compare Source](https://togithub.com/vitest-dev/vitest/compare/v1.2.1...v1.2.2)
##### 🐞 Bug Fixes
- **coverage**:
- Remove `coverage/.tmp` files after run - by [@AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/5008](https://togithub.com/vitest-dev/vitest/issues/5008) [(d53b8)](https://togithub.com/vitest-dev/vitest/commit/d53b8580)
- Don't crash when re-run removes earlier run's reports - by [@AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/5022](https://togithub.com/vitest-dev/vitest/issues/5022) [(66898)](https://togithub.com/vitest-dev/vitest/commit/6689856f)
- **expect**:
- Improve `toThrow(asymmetricMatcher)` failure message - by [@hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/5000](https://togithub.com/vitest-dev/vitest/issues/5000) [(a199a)](https://togithub.com/vitest-dev/vitest/commit/a199ac2d)
- **forks**:
- Set correct `VITEST_POOL_ID` - by [@AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/5002](https://togithub.com/vitest-dev/vitest/issues/5002) [(7d0a4)](https://togithub.com/vitest-dev/vitest/commit/7d0a4692)
- **threads**:
- Mention common work-around for the logged error - by [@AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/5024](https://togithub.com/vitest-dev/vitest/issues/5024) [(915d6)](https://togithub.com/vitest-dev/vitest/commit/915d6c43)
- **typecheck**:
- Fix `ignoreSourceErrors` in run mode - by [@hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/5044](https://togithub.com/vitest-dev/vitest/issues/5044) [(6dae3)](https://togithub.com/vitest-dev/vitest/commit/6dae3feb)
- **vite-node**:
- Provide import.meta.filename and dirname - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/5011](https://togithub.com/vitest-dev/vitest/issues/5011) [(73148)](https://togithub.com/vitest-dev/vitest/commit/73148575)
- **vitest**:
- Expose getHooks & setHooks - by [@adriencaccia](https://togithub.com/adriencaccia) in [https://github.com/vitest-dev/vitest/issues/5032](https://togithub.com/vitest-dev/vitest/issues/5032) [(73448)](https://togithub.com/vitest-dev/vitest/commit/73448706)
- Test deep dependencies change detection - by [@blake-newman](https://togithub.com/blake-newman) in [https://github.com/vitest-dev/vitest/issues/4934](https://togithub.com/vitest-dev/vitest/issues/4934) [(9c7c0)](https://togithub.com/vitest-dev/vitest/commit/9c7c0fc9)
- Throw an error if vi.mock is exported - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/5034](https://togithub.com/vitest-dev/vitest/issues/5034) [(253df)](https://togithub.com/vitest-dev/vitest/commit/253df1cc)
- Allow `useFakeTimers` to fake `requestIdleCallback` on non browser - by [@hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/5028](https://togithub.com/vitest-dev/vitest/issues/5028) [(a9a48)](https://togithub.com/vitest-dev/vitest/commit/a9a486f2)
- Support older NodeJS with async `import.meta.resolve` - by [@AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/5045](https://togithub.com/vitest-dev/vitest/issues/5045) [(cf564)](https://togithub.com/vitest-dev/vitest/commit/cf5641a9)
- Don't throw an error if mocked file was already imported - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/5050](https://togithub.com/vitest-dev/vitest/issues/5050) [(fff1a)](https://togithub.com/vitest-dev/vitest/commit/fff1a270)
##### [View changes on GitHub](https://togithub.com/vitest-dev/vitest/compare/v1.2.1...v1.2.2)
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
^3.9.3
->^3.10.0
^3.9.3
->^3.10.0
^3.10.0
->^3.11.0
^20.11.5
->^20.11.14
^3.9.3
->^3.10.0
^1.100.0
->^1.104.2
^1.2.1
->^1.2.2
Release Notes
nuxt/nuxt (@nuxt/kit)
### [`v3.10.0`](https://togithub.com/nuxt/nuxt/releases/tag/v3.10.0) [Compare Source](https://togithub.com/nuxt/nuxt/compare/v3.9.3...v3.10.0) > 3.10.0 is the next minor/feature release. #### 👀 Highlights v3.10 comes quite close on the heels of v3.9, but it's packed with features and fixes. Here are a few highlights. ##### ✨ Experimental shared `asyncData` when prerendering When prerendering routes, we can end up refetching the same data over and over again. In Nuxt 2 it was possible to create a 'payload' which could be fetched once and then accessed in every page (and this is of course possible to do manually in Nuxt 3 - see [this article](https://roe.dev/blog/shared-data-nuxt-generate)). With [#24894](https://togithub.com/nuxt/nuxt/pull/24894), we are now able to do this automatically for you when prerendering. Your `useAsyncData` and `useFetch` calls will be deduplicated and cached between renders of your site. ```ts [nuxt.config.ts] export defineNuxtConfig({ experimental: { sharedPrerenderData: true } }) ``` > \[!IMPORTANT]\ > It is particularly important to make sure that any unique key of your data is always resolvable to the same data. For example, if you are using `useAsyncData` to fetch data related to a particular page, you should provide a key that uniquely matches that data. (`useFetch` should do this automatically.) 👉 See [full documentation](https://nuxt.com/docs/guide/going-further/experimental-features#sharedprerenderdata). ##### 🆔 SSR-safe accessible unique ID creation We now ship a `useId` composable for generating SSR-safe unique IDs ([#23368](https://togithub.com/nuxt/nuxt/pull/23368)). This allows creating more accessible interfaces in your app. For example: ```vue [components/MyForm.vue] ``` ##### ✍️ Extending `app/router.options` It's now possible for module authors to inject their own `router.options` files ([#24922](https://togithub.com/nuxt/nuxt/pull/24922)). The new `pages:routerOptions` hook allows module authors to do things like add custom `scrollBehavior` or add runtime augmenting of routes. 👉 See [full documentation](https://nuxt.com/docs/guide/going-further/custom-routing#router-options). ##### Client-side Node.js support We now support (experimentally) polyfilling key Node.js built-ins ([#25028](https://togithub.com/nuxt/nuxt/pull/25028)), just as we already do via Nitro on the server when deploying to non-Node environments. That means that, within your client-side code, you can import directly from Node built-ins (`node:` and node imports are supported). However, nothing is globally injected for you, to avoid increasing your bundle size unnecessarily. You can either import them where needed. ```ts import { Buffer } from 'node:buffer' import process from 'node:process' ``` Or provide your own polyfill, for example, inside a Nuxt plugin. ```ts // ~/plugins/node.client.ts import { Buffer } from 'node:buffer' import process from 'node:process' globalThis.Buffer = Buffer globalThis.process = process export default defineNuxtPlugin({}) ``` This should make life easier for users who are working with libraries without proper browser support. However, because of the risk in increasing your bundle unnecessarily, we would strongly urge users **to choose other alternatives** if at all possible. ##### 🍪 Better cookie reactivity We now allow you to opt-in to using the [CookieStore](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore). If browser support is present, this will then be used instead of a BroadcastChannel to update `useCookie` values reactively when the cookies are updated ([#25198](https://togithub.com/nuxt/nuxt/pull/25198)). This also comes paired with a new composable, `refreshCookie` which allows manually refreshing cookie values, such as after performing a request. See [full documentation](https://nuxt.com/docs/api/utils/refresh-cookie). ##### 🏥 Detecting anti-patterns In this release, we've also shipped a range of features to detect potential bugs and performance problems. - We now will throw an error if `setInterval` is used on server ([#25259](https://togithub.com/nuxt/nuxt/pull/25259)). - We warn (in development only) if data fetch composables are used wrongly ([#25071](https://togithub.com/nuxt/nuxt/pull/25071)), such as outside of a plugin or setup context. - We warn (in development only) if you are not using `nuxt/test-utils (@nuxt/test-utils)
### [`v3.11.0`](https://togithub.com/nuxt/test-utils/blob/HEAD/CHANGELOG.md#v3110) [Compare Source](https://togithub.com/nuxt/test-utils/compare/v3.10.0...v3.11.0) [compare changes](https://togithub.com/nuxt/test-utils/compare/v3.10.0...v3.11.0) ##### 🚀 Enhancements - **vitest-environment:** Add support for in-source testing ([#651](https://togithub.com/nuxt/test-utils/pull/651)) ##### 🩹 Fixes - **runtime:** Reset modules after nuxt setup runs ([#726](https://togithub.com/nuxt/test-utils/pull/726)) ##### ✅ Tests - Add example of mocking `vue-router` ([e293cea1](https://togithub.com/nuxt/test-utils/commit/e293cea1)) - Add example of mocking nuxt `useRoute` ([fe465193](https://togithub.com/nuxt/test-utils/commit/fe465193)) ##### ❤️ Contributors - Daniel Roe ([@danielroe](http://github.com/danielroe))PostHog/posthog-js (posthog-js)
### [`v1.104.2`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11042---2024-01-31) [Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.104.1...v1.104.2) - fix: no throwing when reading the body ([#984](https://togithub.com/PostHog/posthog-js/issues/984)) ### [`v1.104.1`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11041---2024-01-31) [Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.104.0...v1.104.1) - chore: make rate limiter error less scary ([#983](https://togithub.com/PostHog/posthog-js/issues/983)) ### [`v1.104.0`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11040---2024-01-31) [Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.103.2...v1.104.0) - feat: Fetch support ([#898](https://togithub.com/PostHog/posthog-js/issues/898)) - chore: Swap to main ([#979](https://togithub.com/PostHog/posthog-js/issues/979)) ### [`v1.103.2`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11032---2024-01-31) [Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.103.1...v1.103.2) - fix: safer body processing ([#980](https://togithub.com/PostHog/posthog-js/issues/980)) ### [`v1.103.1`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11031---2024-01-28) [Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.103.0...v1.103.1) - feat: safer rrweb events and regular full snapshots ([#973](https://togithub.com/PostHog/posthog-js/issues/973)) - chore: update rollup ([#974](https://togithub.com/PostHog/posthog-js/issues/974)) - chore: re-enable bundle checker now main and branches both use pnpm ([#972](https://togithub.com/PostHog/posthog-js/issues/972)) ### [`v1.103.0`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11030---2024-01-26) [Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.102.1...v1.103.0) - feat: pnpm patch rrweb ([#971](https://togithub.com/PostHog/posthog-js/issues/971)) - chore: convert to pnpm ([#970](https://togithub.com/PostHog/posthog-js/issues/970)) ### [`v1.102.1`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11021---2024-01-25) [Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.102.0...v1.102.1) - chore: add debug logging for session id/recording ([#969](https://togithub.com/PostHog/posthog-js/issues/969)) ### [`v1.102.0`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11020---2024-01-24) [Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.101.0...v1.102.0) - feat: send custom event when network status changes ([#965](https://togithub.com/PostHog/posthog-js/issues/965)) - fix: integration test opting out ([#959](https://togithub.com/PostHog/posthog-js/issues/959)) ### [`v1.101.0`](https://togithub.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md#11010---2024-01-22) [Compare Source](https://togithub.com/PostHog/posthog-js/compare/v1.100.0...v1.101.0) - feat: canvas recording support ([#946](https://togithub.com/PostHog/posthog-js/issues/946)) - refactor(surveys): Use Preact instead of vanilla JS ([#963](https://togithub.com/PostHog/posthog-js/issues/963))vitest-dev/vitest (vitest)
### [`v1.2.2`](https://togithub.com/vitest-dev/vitest/releases/tag/v1.2.2) [Compare Source](https://togithub.com/vitest-dev/vitest/compare/v1.2.1...v1.2.2) ##### 🐞 Bug Fixes - **coverage**: - Remove `coverage/.tmp` files after run - by [@AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/5008](https://togithub.com/vitest-dev/vitest/issues/5008) [(d53b8)](https://togithub.com/vitest-dev/vitest/commit/d53b8580) - Don't crash when re-run removes earlier run's reports - by [@AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/5022](https://togithub.com/vitest-dev/vitest/issues/5022) [(66898)](https://togithub.com/vitest-dev/vitest/commit/6689856f) - **expect**: - Improve `toThrow(asymmetricMatcher)` failure message - by [@hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/5000](https://togithub.com/vitest-dev/vitest/issues/5000) [(a199a)](https://togithub.com/vitest-dev/vitest/commit/a199ac2d) - **forks**: - Set correct `VITEST_POOL_ID` - by [@AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/5002](https://togithub.com/vitest-dev/vitest/issues/5002) [(7d0a4)](https://togithub.com/vitest-dev/vitest/commit/7d0a4692) - **threads**: - Mention common work-around for the logged error - by [@AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/5024](https://togithub.com/vitest-dev/vitest/issues/5024) [(915d6)](https://togithub.com/vitest-dev/vitest/commit/915d6c43) - **typecheck**: - Fix `ignoreSourceErrors` in run mode - by [@hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/5044](https://togithub.com/vitest-dev/vitest/issues/5044) [(6dae3)](https://togithub.com/vitest-dev/vitest/commit/6dae3feb) - **vite-node**: - Provide import.meta.filename and dirname - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/5011](https://togithub.com/vitest-dev/vitest/issues/5011) [(73148)](https://togithub.com/vitest-dev/vitest/commit/73148575) - **vitest**: - Expose getHooks & setHooks - by [@adriencaccia](https://togithub.com/adriencaccia) in [https://github.com/vitest-dev/vitest/issues/5032](https://togithub.com/vitest-dev/vitest/issues/5032) [(73448)](https://togithub.com/vitest-dev/vitest/commit/73448706) - Test deep dependencies change detection - by [@blake-newman](https://togithub.com/blake-newman) in [https://github.com/vitest-dev/vitest/issues/4934](https://togithub.com/vitest-dev/vitest/issues/4934) [(9c7c0)](https://togithub.com/vitest-dev/vitest/commit/9c7c0fc9) - Throw an error if vi.mock is exported - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/5034](https://togithub.com/vitest-dev/vitest/issues/5034) [(253df)](https://togithub.com/vitest-dev/vitest/commit/253df1cc) - Allow `useFakeTimers` to fake `requestIdleCallback` on non browser - by [@hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/5028](https://togithub.com/vitest-dev/vitest/issues/5028) [(a9a48)](https://togithub.com/vitest-dev/vitest/commit/a9a486f2) - Support older NodeJS with async `import.meta.resolve` - by [@AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/5045](https://togithub.com/vitest-dev/vitest/issues/5045) [(cf564)](https://togithub.com/vitest-dev/vitest/commit/cf5641a9) - Don't throw an error if mocked file was already imported - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/5050](https://togithub.com/vitest-dev/vitest/issues/5050) [(fff1a)](https://togithub.com/vitest-dev/vitest/commit/fff1a270) ##### [View changes on GitHub](https://togithub.com/vitest-dev/vitest/compare/v1.2.1...v1.2.2)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate. View repository job log here.