NewYour coding agent can read the release notes before it upgrades.Set up the MCP server โ
npm
Testing module for Pinia
Latest stable
2.0.2
Last release 1 months ago
14 Oct 2026
Release timing varies
gaps range from 2 weeks to 9 months
Nearly every release is documented
notes for 28 of 31 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
32 releases ยท first in 2021
Drag across the ruler to compare, or tap a release to open it.
Add getStores() - by @Anoesj in https://github.com/vuejs/pinia/issues/3194 (52fc9)
getStores() - by @Anoesj in https://github.com/vuejs/pinia/issues/3194 <samp>(52fc9)</samp>Your coding agent can read these notes before it upgrades. Set up the MCP server โ
Re-add missing types exports field - by @rijkvanzanten in https://github.com/vuejs/pinia/issues/3154 (fb217)
This release correctly removes the deprecated APIs as advertised in v2. The documentation contains a list of all the deprecations compared to v0.x.
๐ ๐ ๐
All deprecated API have been removed.
hydrate() option for stores defined with the
options api no longers passes the whole store instance. Instead, it
passes the storeState so it can be directly modified. This is because
it was currently necessary to hydrate the store by setting properties
onto store.$state. This change makes it impossible to make the mistake
anymore. defineStore('main', {
state: () => ({
customRef: useLocalStorage('key', 0)
}),
- hydrate(store) {
- store.$state.customRef = useLocalStorage('key', 0)
+ hydrate(storeState) {
+ storeState.customRef = useLocalStorage('key', 0)
}
})
Readme update
Fix missing types.
If you are using Vue 2, make sure your @vue/composition-api version is at least 1.1.0, which is currently under the npm dist tag next, which means it has to be installed with npm install @vue/composition-api@next.
This version supports Vue 2! Here is an example using Vue 2 and Vite for an optimal DX. Note this version requires Vue Devtools 6, and more specifically, they don't work with the current @vue/devtools-api (6.0.0-beta.15) because they require this unreleased fix. To get all the goodness pinia has to offer for Vue 2, you will need to clone vuejs/devtools, run yarn && yarn run build and then load an unpacked extension on a Chromium browser (after activating the developer mode in the extension panel). If you are using Vue 3, you can still use the Vue Devtools 6 regularly.
Posted https://github.com/vuejs/pinia/issues/592 to help people installing or upgrading Pinia.
Upgrade devtools-api to v8 - by @posva (25572)
No code changes in this release.
Nothing published for this version
Nothing published for this version
Nothing published for this version
The testing package has been stable for a long time so it was time to have a v1!
No code changes in this release.
No code changes in this release.
No code changes in this release.
No code changes in this release.
No code changes in this release.
No code changes in this release.
No code changes in this release.
No code changes in this release.
### Bug Fixes - types: use declare module vue
### Bug Fixes - types: use declare module vue
- Force vue-demi version
No code changes in this release.
feat: access the state and getters through this
this (#190) (7bb7733)There is no longer a state property on the store, you need to directly access any property
store.state.counter
// becomes
store.counter
getters no longer receive parameters, directly call this.myState to read state and other getters:
getters: {
doubleCount: state => state.counter * 2
// becomes
doubleCounte() {
return this.counter * 2
}
}
More at #190
support "types" condition in "exports" field
No changes in this release
No changes in this release
- refactor changes
- doc generation changes
testing: allow overriding plugin computed properties
testing: enable initialState witohut app
Automatically vitest globals handling
No code updates in this release
No code updates in this release
can set an initialState for tests
fix: make pinia work with nuxt Composition API plugin
fix: avoid nuxtContext in spa mode
After taking a deeper look at what is necessary for SSR, a few things had to change:
After taking a deeper look at what is necessary for SSR, a few things had to change:
createStore and they are called as methods of the store (e.g. store.reset())createStore now takes an object instead of positional arguments// before
export const useMainStore = createStore(
// id
'main',
// state
() => ({ counter: 0 }),
// getters
{
doubleCount: state => state.counter * 2,
}
)
export function reset() {
const store = useMainStore()
store.state.counter = 0
}
// now
export const useMainStore = createStore({
id: 'main',
state: () => ({ counter: 0 }),
getters: {
doubleCount: state => state.counter * 2,
},
actions: {
reset() {
this.state.counter = 0
},
},
})
fix: loose TS type for StateTree
fix: global vueCompositionApi name
Small refactor with no effective changes.
Small refactor with no effective changes.
### Features - testing: add testing package
One column per quarter.