Packages

@pinia/colada

1.4.9 · 30 Oct 2026MIT207.8k / weekRepositoryHomepagenpmAtom feed

Your version

0.15.0

18 Apr 2025Where it was published

0.21.7 is the newest release of 0.15.x.

In short

1 breaking5 new7 fixed1 changed

  • 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 create and ensure in the mutation store are now simpler and take less arguments (many were redundant). Alongside these changes, the mutation store has fixed many subtle bugs.

Release note

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 create and ensure in 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.

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.