# What changed in pinia

> 22 changes in pinia 4 from its official release notes, upgrade guides and advisories: 2 breaking, 1 deprecations, 2 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/pinia/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## pinia 4

### Breaking changes

- Pinia 4 is ESM only, a technically breaking change for projects using other module formats. (4.0.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.0)
- Pinia upgrades to devtools-api v8, which must now be installed alongside pinia. (4.0.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.0)

### Deprecations

- Warns when disposing a replaced store. (4.1.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.1.0)

### New APIs and options

- Adds getStores() to retrieve stores. (4.1.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.1.0)
- piniaSymbol is now exported for use by developers. (4.0.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.0)

### Tooling

- Errors and dev warnings are refactored with Nostics to make detected problems easier to fix. (4.0.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.0)
- Pinia adds a diagnostic for wrong values in plugins. (4.0.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.0)
- Settable getters (computed) can now be edited in devtools. (4.0.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.0)
- storeToRefs emits a diagnostic for invalid properties. (4.0.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.0)

### Fixes and other changes

- HMR preserves runtime state of empty placeholder objects. (4.1.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.1.0)
- Shallow refs patched via object syntax now trigger updates. (4.1.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.1.0)
- Testing now notifies shallow refs on initial state. (4.1.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.1.0)
- Nuxt resolves default storesDirs against each layer. (4.1.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.1.0)
- Pinia declares compatibility with Nuxt 5. (4.0.3) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.3)
- During SSR hydration, reactive Set and Map state is replaced instead of unioned. (4.0.3) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.3)
- Types avoid treating a name ending in .vue as reserved. (4.0.3) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.3)
- The production devtools flag is guarded in the distributed output. (4.0.3) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.3)
- Re-add the missing types export so consumers can resolve Pinia's type definitions. (4.0.1) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.1)
- HMR now preserves runtime-added properties of setup store refs. (4.0.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.0)
- shouldHydrate now respects the skipHydrate marker on non-plain objects. (4.0.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.0)
- storeToRefs gracefully skips nullish values. (4.0.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.0)
- Subscribing the same callback twice no longer creates a duplicate watcher. (4.0.0) — [release notes](https://github.com/vuejs/pinia/releases/tag/v4.0.0)
