unstale

npm / pinia

pinia

What changed in pinia 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

2 breaking1 deprecations2 new APIs and options4 tooling13 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

pinia 422 changes

Breaking changes 2

  • Pinia 4 is ESM only, a technically breaking change for projects using other module formats.

    4.0.0release notes

  • Pinia upgrades to devtools-api v8, which must now be installed alongside pinia.

    4.0.0release notes

Deprecations 1

New APIs and options 2

Tooling 4

  • Errors and dev warnings are refactored with Nostics to make detected problems easier to fix.

    4.0.0release notes

  • Pinia adds a diagnostic for wrong values in plugins.

    4.0.0release notes

  • Settable getters (computed) can now be edited in devtools.

    4.0.0release notes

  • storeToRefs emits a diagnostic for invalid properties.

    4.0.0release notes

Fixes and other changes 13

  • HMR preserves runtime state of empty placeholder objects.

    4.1.0release notes

  • Shallow refs patched via object syntax now trigger updates.

    4.1.0release notes

  • Testing now notifies shallow refs on initial state.

    4.1.0release notes

  • Nuxt resolves default storesDirs against each layer.

    4.1.0release notes

  • Pinia declares compatibility with Nuxt 5.

    4.0.3release notes

  • During SSR hydration, reactive Set and Map state is replaced instead of unioned.

    4.0.3release notes

  • Types avoid treating a name ending in .vue as reserved.

    4.0.3release notes

  • The production devtools flag is guarded in the distributed output.

    4.0.3release notes

  • Re-add the missing types export so consumers can resolve Pinia's type definitions.

    4.0.1release notes

  • HMR now preserves runtime-added properties of setup store refs.

    4.0.0release notes

  • shouldHydrate now respects the skipHydrate marker on non-plain objects.

    4.0.0release notes

  • storeToRefs gracefully skips nullish values.

    4.0.0release notes

  • Subscribing the same callback twice no longer creates a duplicate watcher.

    4.0.0release notes