npm / pinia
pinia
What changed in pinia 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
8 breaking2 deprecations3 new APIs and options1 behavior and defaults5 tooling13 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpinia 422 changes
Breaking changes 2
Pinia 4 is ESM only, a technically breaking change for projects using other module formats.
Pinia upgrades to devtools-api v8, which must now be installed alongside pinia.
Deprecations 1
Warns when disposing a replaced store.
New APIs and options 2
Adds getStores() to retrieve stores.
piniaSymbol is now exported for use by developers.
Tooling 4
Errors and dev warnings are refactored with Nostics to make detected problems easier to fix.
Pinia adds a diagnostic for wrong values in plugins.
Settable getters (computed) can now be edited in devtools.
storeToRefs emits a diagnostic for invalid properties.
Fixes and other changes 13
HMR preserves runtime state of empty placeholder objects.
Shallow refs patched via object syntax now trigger updates.
Testing now notifies shallow refs on initial state.
Nuxt resolves default storesDirs against each layer.
Pinia declares compatibility with Nuxt 5.
During SSR hydration, reactive Set and Map state is replaced instead of unioned.
Types avoid treating a name ending in .vue as reserved.
The production devtools flag is guarded in the distributed output.
Re-add the missing types export so consumers can resolve Pinia's type definitions.
HMR now preserves runtime-added properties of setup store refs.
shouldHydrate now respects the skipHydrate marker on non-plain objects.
storeToRefs gracefully skips nullish values.
Subscribing the same callback twice no longer creates a duplicate watcher.
pinia 310 changes
Breaking changes 6
Pinia now uses the native TypeScript Awaited type introduced in TS 4.5.
The defineStore({ id: 'id' }) form has been removed; pass the store ID as defineStore('id') instead.
The deprecated type alias was removed in favor of PiniaPlugin.
TypeScript 5 or newer is required.
Pinia v3 supports only Vue 3; Vue 2 users can keep using v2.
Vue Devtools is no longer included in the iife version and must be included manually, depending on your workflow.
Deprecations 1
The signature accepting an object with an id property is deprecated; use the id parameter instead.
New APIs and options 1
The Nuxt module has been updated to support Nuxt 3; Nuxt 2 and Nuxt bridge users can keep using the old Pinia version.
Behavior and default changes 1
Pinia is published as a type: module package while continuing to provide CJS distribution files.
Tooling 1
The devtools API has been upgraded to v7.