@pinia/colada
1.4.9 · 30 Oct 2026MIT207.8k / weekRepositoryHomepagenpmAtom feed
83 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 1.x · latest line
1.4.9
30 Oct 2026devtools: Copy values as JSON
Abort in-flight queries with data on unmount
nuxt: Preserve query cache for SSR head
1.4.8
8 Oct 2026Preserve replacement entries during stale GC
define-query: Keep defined query state per app
1.4.7
2 Oct 2026Warn when removing active query entries
Avoid cancelling a non-ensured entry
Move every defineQuery consumer to the new entry when its key changes
Features
Warn when removing active query entries
Bug Fixes
Avoid cancelling a non-ensured entry
Move every defineQuery consumer to the new entry when its key changes
Edge case leak with defineQuery
Differentiate same-component tracking of defined queries
1.4.6
23 Sep 2026Discard gced old entries with defineQuery
Skip onError for cancelled fetches in query hooks plugin
auto-refetch: Skip refetch when staleTime is not finite
1.4.5
16 Sep 2026Use devframe's in-page channel
Mcp integration
Better autoscroll for colllapsables
Features
Use devframe's in-page channel
Mcp integration
Better autoscroll for colllapsables
Signal new data and errors
Sticky titles
Sticky keys in json viewer
Support production devtools
Prepare for mcp support
Avoid reload
Upgrade to devframe 1
devtools: Add standalone Vite hub plugin
devtools: Restore local development fixtures
devtools: Theme fixture playground
devtools: Serialize URL values
devtools: Serialize URL search params
devtools: Display Blob metadata
devtools: Display File metadata
devtools: Preserve error causes
devtools: Preserve aggregate errors
devtools: Display boxed numbers
devtools: Display boxed strings
devtools: Preserve null-prototype objects
devtools: Display repeated references
devtools: Display circular references
devtools: Refine value syntax colors
devtools: Expand rich value details
devtools: Colorize boxed values
devtools: Refine callable value displays
devtools: Colorize function parentheses
devtools: Italicize function symbol
devtools: Vendor regex colorizer
devtools: Colorize regular expressions
devtools: Expand repeated references
devtools: Handle missing colada instance
devtools-devframe: Pinia colada devtools for Vite DevTools on devframe
nuxt: Register colada in nuxt devtools
playground: Follow system color scheme
Bug Fixes
Colors
Missing emit
Promise state display in devtools
Restore shared state values consistently
Avoid NaN in circle progress
Avoid infinite recursion on circular objects
Stale serialization + hydration
Vertical layout
devtools: Show simulated loading immediately when asyncStatus writes are deferred
devtools: Synchronize panel lifecycle
devtools: Restore package build
devtools: Keep router file watching defaults
devtools: Resolve standalone hub icon
devtools: Embed devframe icon
devtools: Stringify fixture BigInts
devtools: Isolate shared cache payloads
devtools: Restore serialized display values
devtools: Preserve dates in fixture output
devtools: Sync queries started before bridge
devtools: Sync mutations started before bridge
devtools: Display negative zero
devtools: Display invalid dates
devtools: Render circular fixture data
devtools: Preserve custom values after edits
devtools: Retain native values after edits
devtools: Trigger query updates after edits
devtools: Replace edited data root
devtools: Edit map and set values
devtools: Preserve details panel scroll position
devtools: Reject duplicate set replacements
devtools: Preserve depth when restoring object properties
nuxt: Register colada devtools in vite
playground: Default color scheme to dark
playground: Apply system color scheme explicitly
types: Make querystore.get return a more lax entry
1.4.4
2 Sep 2026Update variables on initial mutation
1.4.3
31 Aug 2026Compat nuxt 5
persistence: Preserve date
types: Avoid types pollution
1.4.2
15 Jul 2026Keep asyncStatus loading when canceled request settles after refetch
1.4.1
15 Jul 2026Support pinia 4
1.4.0
14 Jul 2026Drag button devtools
Subtle rotation animation in devtools button
Nostics migration
Features
Drag button devtools
Subtle rotation animation in devtools button
Nostics migration
Add dev reporter
Upgrade types
OnError handlers for writnig and reading
Use nostics for better errors
cache-persister: Allow custom cache serialization
Bug Fixes
Prod removal of devtools
devtools: Normalize component resolver path on Windows
devtools: Lazily initialize devtools info of entries
1.3.1
20 May 2026Reset when if a retry is canceled
infinite-query: Store nextPageIndicator on entry.ext instead of closure
1.3.0
8 May 2026Add PiniaColadaSSRNoGc plugin
1.2.1
28 Apr 2026cache-persister: Await captured promise on async restore
hmr: Avoid cancelling in-flight requests on remount
hmr: Key __hmr snapshots by __hmrId
Bug Fixes
cache-persister: Await captured promise on async restore
hmr: Avoid cancelling in-flight requests on remount
hmr: Key __hmr snapshots by __hmrId
infinite-query: Respect global query options
retry: Prevent retryMap key collisions for structurally distinct keys
retry: Clear scheduled retry on cancel
1.2.0
17 Apr 2026Add
entrytoUseMutationGlobalContextAdd
defineMutationOptionsfor type-safe reusable mutation optionsAdd tagged key type to
defineMutationOptions
Features
Add
entrytoUseMutationGlobalContextAdd
defineMutationOptionsfor type-safe reusable mutation optionsAdd tagged key type to
defineMutationOptionsWarn when defineMutation is called outside a scope
infinite: Add
defineInfiniteQueryOptionsand getter support foruseInfiniteQueryinfinite-query: Add
setInfiniteQueryDatato safely set infinite query data
Bug Fixes
Avoid aborting settled queries during garbage collection
Missing global type of context in onMutate
Resolve type errors in defineMutationOptions tests
Avoid undefined in mutation key to fix type error with custom ErrorDefault
Also guard previousPageParam in the check
Use proper cast for readonly ext in test
Align defineMutation lifecycle with defineQuery
cache-persister: Guard localStorage.clear() for Node 25+
infinite-query: Guard computePageParams against missing ext refs
Performance
Smaller bundle
1.1.0
31 Mar 2026Add
metasupport to mutationsdelay: Add mutation support
Update entry options on ensure early return
1.0.0
6 Mar 2026- Breaking
Remove deprecated two-parameter overloads from
useQueryanduseQueryState tanstack-compat: Make augmented type properties optional
tanstack-compat: Emit .d.ts to .tsc-types instead of src
Pinia Colada v1 is here!
After 2 years of iterating, Pinia Colada has matured into a light (queries at just <2.5kb), performant and Vue native solution for async state management. It's the only lib with an official integration for Vue Router Data Loaders and has been integrated into OpenAPI generators like HeyApi and oRPC.
Breaking Changes
- Breaking
Remove deprecated two-parameter overloads from
useQueryanduseQueryState
Bug Fixes
tanstack-compat: Make augmented type properties optional
tanstack-compat: Emit .d.ts to .tsc-types instead of src
- 0.21.x
0.21.7
2 Mar 2026infinite: Detach $onAction listener to survive component unmount
0.21.6
26 Feb 2026Use debug instead of log
devtools: Surface retry plugin info in devtools plugins panel
Clamp devtools height to minimum when reading from localStorage
Features
Use debug instead of log
devtools: Surface retry plugin info in devtools plugins panel
Bug Fixes
Clamp devtools height to minimum when reading from localStorage
infinite: Ensure page params are attached to entries
infinite: Allow initial null page
Performance
Use shallowRef
0.21.5
22 Feb 2026- Deprecated
The two-parameter form of
useQuery(setup, () => params)anduseQueryState(setup, () => params)is deprecated. Use a single function parameter instead:- useQuery(useContactList, () => ({ search: search.value })) + useQuery(() => useContactList({ search: search.value }))A codemod is available to automate this migration. Commit your changes first, then run:
pnpm --package=@ast-grep/cli dlx ast-grep scan -r node_modules/@pinia/colada/codemods/rules/migration-0-21-to-1-0.yaml -i src
See Migration Codemods for details.
Improve hover titel
Pass previousEntry in placeholderData
Features
Improve hover titel
Pass previousEntry in placeholderData
devtools: Distinguish prefetched queries in DevTools panel
retry: Track retry state with retryCount and isRetrying
retry: Add retryError and suppress error state during retries
Bug Fixes
Missing type in extension
ssr: Prevent memory leak
types: Restore UseQueryOptions variance for placeholderData callback
Deprecations
- Deprecated
The two-parameter form of
useQuery(setup, () => params)anduseQueryState(setup, () => params)is deprecated. Use a single function parameter instead:- useQuery(useContactList, () => ({ search: search.value })) + useQuery(() => useContactList({ search: search.value }))A codemod is available to automate this migration. Commit your changes first, then run:
pnpm --package=@ast-grep/cli dlx ast-grep scan -r node_modules/@pinia/colada/codemods/rules/migration-0-21-to-1-0.yaml -i src
See Migration Codemods for details.
0.21.4
9 Feb 2026Plugin support for mutations
0.21.3
6 Feb 2026Add more auto imports
Skip refetchOnWindowFocus and refetchOnReconnect for inactive defined queries
infinite-query: Compute hasNextPage correctly on cache hit
0.21.2
20 Jan 2026Respect enabled option during retry delays
Correct GC time display for prefetched queries
Distinguish refetch and invalidate behavior in devtools
Bug Fixes
Respect enabled option during retry delays
Correct GC time display for prefetched queries
Distinguish refetch and invalidate behavior in devtools
Handle mutations created before devtools
query: Gc prefetched queries
0.21.1
9 Jan 2026Make ext readonly
Avoid extra tick
Only persist success
Features
Make ext readonly
Bug Fixes
Avoid extra tick
Only persist success
Serialize the key hash too
infinite: Regen pageParam on key change
0.21.0
6 Jan 2026- Breaking
Remove @vue/devtools-api dependencies
- Breaking
Remove CJS support
Add number of queries/mutations to tabs
Breaking Changes
- Breaking
Remove @vue/devtools-api dependencies
- Breaking
Remove CJS support
Features
Add number of queries/mutations to tabs
Expose internal utility types
Implement cache persister plugin
- 0.20.x
0.20.0
23 Dec 2025- Breaking
Remove devtools from production builds
- Breaking
The
mergeoption has been removed anddatacontains an object withpagesandpageParamsarrays that can be flattened. - Breaking
initialPagehas now been replaced withinitialPageParam
Breaking Changes
- Breaking
Remove devtools from production builds
This release completely changed how
useInfiniteQuery()works, the parameters and returned values:- Breaking
The
mergeoption has been removed anddatacontains an object withpagesandpageParamsarrays that can be flattened. - Breaking
initialPagehas now been replaced withinitialPageParam - Breaking
loadMorehas been renamedloadNextPage - Breaking
getNextPageParamis now a required option - Breaking
Invalidating now works just as with regular queries, which means that you probably want to set
stalevalue higher (or disable it) to avoid refetching multiple pages when an infinite query is invalidated. Also, you might want to setrefetchOn*options tofalse. - Breaking
It's now possible to have bi-directional navigation
- Breaking
There is now
hasNextPageandhasPreviousPage
Any feedback on the feature and improvements is welcome!
Here is a complete example of what it looks in action:
<script setup lang="ts"> import { useInfiniteQuery } from '@pinia/colada' import { onWatcherCleanup, useTemplateRef, watch } from 'vue' const { state: factsPages, loadNextPage, asyncStatus, isDelaying, hasNextPage, } = useInfiniteQuery({ key: ['feed'], query: async ({ pageParam }) => factsApi.get<CatFacts>({ query: { page: pageParam, limit: 10 } }), initialPageParam: 1, getNextPageParam(lastPage) { return lastPage.next_page_url } // plugins retry: 0, delay: 0, }) // we only need an array const facts = computed(() => factPages.value.data?.pages.flat()) const loadMoreEl = useTemplateRef('load-more') watch(loadMoreEl, (el) => { if (el) { const observer = new IntersectionObserver( (entries) => { if (entries[0]?.isIntersecting) { loadNextPage() } }, { rootMargin: '300px', threshold: [0], }, ) observer.observe(el) onWatcherCleanup(() => { observer.disconnect() }) } }) </script> <template> <div> <button :disabled="asyncStatus === 'loading' || isDelaying" @click="loadMore()"> Load more (or scroll down) </button> <template v-if="facts?.length"> <p>We have loaded {{ facts.length }} facts</p> <details> <summary>Show raw</summary> <pre>{{ facts }}</pre> </details> <blockquote v-for="fact in facts"> {{ fact }} </blockquote> <p v-if="hasNextPage" ref="load-more">Loading more...</p> </template> </div> </template>Features
Json-viewer for data, options, vars
Wip
Wip
Wip infinite query
NextPage works
ThrowOnError in infiniteQuery
infinite: Add cancelRefetch
infinite: MaxPages
Bug Fixes
Use own local storage key
Update mutations more often
Higher z-index for button
infinite: Invalidation should refetch
- 0.19.x
0.19.1
17 Dec 2025Warns if the user extends in create instead of ext
Thiner scrollbar
InitialDataUpdatedAt
Features
Warns if the user extends in create instead of ext
Thiner scrollbar
InitialDataUpdatedAt
devtools: Editable data
Bug Fixes
Use extend action to extend entry
0.19.0
16 Dec 2025- Breaking
mutations: Keep mutations key as passed
Message of missing query key
Display date for anonymous mutations
Breaking Changes
- Breaking
mutations: Keep mutations key as passed
Features
Message of missing query key
Display date for anonymous mutations
Display more minutes
Display date
Display empty list placeholder
Fix replay
devtools: Mutations
devtools: Mutations
devtools: Replay mutation
devtools: Inactive mutations
types: Usemutationoptionswithdefaults
Bug Fixes
Use global options for mutations
- 0.18.x
0.18.1
11 Dec 2025query: Add meta
Add hydrated data to queries
Set updatedAt based on entry.when
Features
query: Add meta
Bug Fixes
Add hydrated data to queries
Set updatedAt based on entry.when
query: Do not track components effect
0.18.0
2 Dec 2025- Breaking
While technically a fix, this is a breaking change if you were relying on an external signal that aborts within the
query. It used to not set the state by just being an AbortError DomException and now it will become an error. This behavior is more correct as we don't want to ignore aborted signals that are external. Each fetch creates an AbortController and passes the signal toquerywhich is aborted (without a reason) if any other method of the store fetches again. This is done to avoid using an outdated request. query: preserve any external AbortError
- 0.17.x
0.17.9
24 Nov 2025Export mutation cache
Expose mutation cache
Warn wrong useMutationcache usage
0.17.7
30 Oct 2025Export
toCacheKeyquery: abort signal if query becomes inactive
Avoid watched on enabled
0.17.6
25 Sep 2025Improve type of
DefineQueryOptionsMake type inference of DefineQueryOptions.placeholderData correct
0.17.5
11 Sep 2025query: add overloaded for optional define options params
0.17.3
1 Sep 2025Add ssrCatchError
0.17.0
3 Jun 2025- Breaking
Replace
EntryNodeKeywithEntryKey - Breaking
types: The
EntryKeyTaggedtype now has multiple type params and an array is no longer assignable to it. This is necessary to correctly infer the types forTDataandTDataInitialand if you were manually usingEntryKeyTagged, you will either need to cast arrays to it or useEntryKeyinstead. In most cases this should not affect you. This makes types stricter and also disallows setting a query data toundefined. If you were doingqueryCache.setQueryData(key, undefined), usequeryCache.setEntryStateinstead. - Removed
Remove deprecated
EntryNodeKey
Breaking changes
- Breaking
Replace
EntryNodeKeywithEntryKey - Breaking
types: The
EntryKeyTaggedtype now has multiple type params and an array is no longer assignable to it. This is necessary to correctly infer the types forTDataandTDataInitialand if you were manually usingEntryKeyTagged, you will either need to cast arrays to it or useEntryKeyinstead. In most cases this should not affect you. This makes types stricter and also disallows setting a query data toundefined. If you were doingqueryCache.setQueryData(key, undefined), usequeryCache.setEntryStateinstead.
Features
Add a queryCache.get method to a typed entry
Add error to tagged keys
Bug Fixes
types: avoid incorrect undefined from tagged keys
types: make options parameter optional in types
Code Refactoring
- Removed
Remove deprecated
EntryNodeKey
- 0.16.x
0.16.0
21 May 2025- Breaking
query:
queryCache.invalidateQueries()now accepts a second parameter to control whether to refetch or not active queries. It can be set to'all'to force fetch all queries. This replaces the existing behavior of passingactive: null(can be removed now) which wasn't actually working. You shouldn't be negatively affected by this change as it wasn't working previously. - Breaking
The internal cache structure has been refactored to be simpler, faster and smaller. Keys now support deeply nested objects and partially matches them when filtering (e.g.
queryCache.getEntries()). To achieve this, the hydrated version of the cache has changed.serializeTreeMaphas been removed butserializeQueryCache(which should be preferred) has been kept.EntryNodeKeyandTreeMapNode(internals) have been removed.EntryNodeKeywas juststring | number.toCacheKeyhas been adapted and now returns a plain string rather than an array. This also fixedqueryCache.getEntries(['1'])actually returning entries defined with a numeric key ([1]). The type forkeyis now stricter to ensure everything works well at the type level, you might notice it doesn't allowundefinedas a value (except in objects), this is intended as the serialized version (JSON) transforms it nonull, and will not match in the cache if used, if you want an nullish value, usenull. The documentation has been updated to reflect this - Breaking
types: If you built a plugin, you will have to rename the type params of generics like
UseQueryEntryExtensionsfromTResulttoTData. Otherwise, this change won't affect you.
This is the biggest release to date! Many bug fixes, typed keys, a lighter and faster build!
Breaking changes
- Breaking
query:
queryCache.invalidateQueries()now accepts a second parameter to control whether to refetch or not active queries. It can be set to'all'to force fetch all queries. This replaces the existing behavior of passingactive: null(can be removed now) which wasn't actually working. You shouldn't be negatively affected by this change as it wasn't working previously. - Breaking
The internal cache structure has been refactored to be simpler, faster and smaller. Keys now support deeply nested objects and partially matches them when filtering (e.g.
queryCache.getEntries()). To achieve this, the hydrated version of the cache has changed.serializeTreeMaphas been removed butserializeQueryCache(which should be preferred) has been kept.EntryNodeKeyandTreeMapNode(internals) have been removed.EntryNodeKeywas juststring | number.toCacheKeyhas been adapted and now returns a plain string rather than an array. This also fixedqueryCache.getEntries(['1'])actually returning entries defined with a numeric key ([1]). The type forkeyis now stricter to ensure everything works well at the type level, you might notice it doesn't allowundefinedas a value (except in objects), this is intended as the serialized version (JSON) transforms it nonull, and will not match in the cache if used, if you want an nullish value, usenull. The documentation has been updated to reflect this - Breaking
types: If you built a plugin, you will have to rename the type params of generics like
UseQueryEntryExtensionsfromTResulttoTData. Otherwise, this change won't affect you.
Features
query: allow dynamic typed keys
query: allow for typed query keys
queryCache.setQueriesData
types: explicit types for useInfiniteQuery
types: stricter keys
Bug Fixes
- 0.15.x
0.15.3
6 May 2025Correctly handle refetchOn* when false
0.15.1
26 Apr 2025Support node 18
0.15.0
18 Apr 2025- Breaking
mutations: mutations are now created each time they are invoked. This change will only affect users directly creating entries with the mutation store (which should be avoided except in very advanced cases). Given the new structure of mutation entries and the fact that they are recreated for each mutation in order to keep a history of mutations, the new process simplifies things and reduces bundle size. The actions
createandensurein the mutation store are now simpler and take less arguments (many were redundant). Alongside these changes, the mutation store has fixed many subtle bugs. Add gcTime option for global mutations
Add mutation id
Breaking changes
- Breaking
mutations: mutations are now created each time they are invoked. This change will only affect users directly creating entries with the mutation store (which should be avoided except in very advanced cases). Given the new structure of mutation entries and the fact that they are recreated for each mutation in order to keep a history of mutations, the new process simplifies things and reduces bundle size. The actions
createandensurein the mutation store are now simpler and take less arguments (many were redundant). Alongside these changes, the mutation store has fixed many subtle bugs.
Features
Add gcTime option for global mutations
Add mutation id
hmr: refetch on component change
mutations: simplify the entry creation in the mutation store
Untrack mutation entries
Bug Fixes
An entry with no options is stale
defineQuery: avoid pausing still active (fe00447), closes #246
mutations: create entries for each individual mutation
query: avoid deleting children of gced queries
setQueryData sets the status and trigger gc if possible
types: allow tuples in keys
types: infer initial data in setEntryState
Reverts
Revert "refactor: deprecate onMutate in favor of onBeforeMutate" (02add4a). This change never actually made it, it's here for the trace.
- 0.14.x
0.14.1
18 Mar 2025types: allow extending global query options
0.14.0
18 Mar 2025- Breaking
Every global query (
useQuery()anddefineQuery()) option passed toPiniaColadahas been moved to its own optionqueryOptions:app.use(PiniaColada, { plugins: [], - gcTime: 20_000, + queryOptions: { + gcTime: 20_000, + }, })You can also use the new codemods to automatically migrate this.
- Breaking
types: This changes allows for Pinia Colada global options to auto complete but it also requires you to use pass an options object to
app.use(PiniaColada, {}). This is just for typing reasons (it could be a limitation of Vue) but the same old code actually works.-app.use(PiniaColada) +app.use(PiniaColada, {}) - Breaking
Replace
serializewithserializeTreeMap
This version introduces codemods to automate migrations 🎉. Try them out with:
pnpm --package=@ast-grep/cli dlx ast-grep scan -r node_modules/@pinia/colada/codemods/rules/migration-0-13-to-0-14.yaml -i src
You can also globally install ast-grep and run:
ast-grep scan -r node_modules/@pinia/colada/codemods/rules/migration-0-13-to-0-14.yaml -i src
Remember to commit changes before running the codemods.
Breaking changes
- Breaking
Every global query (
useQuery()anddefineQuery()) option passed toPiniaColadahas been moved to its own optionqueryOptions:app.use(PiniaColada, { plugins: [], - gcTime: 20_000, + queryOptions: { + gcTime: 20_000, + }, })You can also use the new codemods to automatically migrate this.
- Breaking
types: This changes allows for Pinia Colada global options to auto complete but it also requires you to use pass an options object to
app.use(PiniaColada, {}). This is just for typing reasons (it could be a limitation of Vue) but the same old code actually works.-app.use(PiniaColada) +app.use(PiniaColada, {}) - Breaking
Replace
serializewithserializeTreeMap - Breaking
Removed
reviveTreeMap(not needed) - Breaking
Removed internal
createdQueryEntry
Features
Add codemods for migrations
Allow invalidating all queries no matter their active status
Allow nullish filters
Bug Fixes
Avoid unnecessary triggerCache
Initialize the infinite query pages
types: correctly type PiniaColada Vue plugin
types: placeholderData does not guarantee data (aed71c1), closes #217
Performance Improvements
Inline filter fn
Code Refactoring
- Removed
Remove deprecated functions
- 0.13.x
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.