Packages

@pinia/colada

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

Your version

0.14.0

18 Mar 2025Where it was published

0.21.7 is the newest release of 0.14.x.

In short

5 breaking1 removed4 new1 faster5 fixed1 internal

  • Breaking

    Every global query (useQuery() and defineQuery()) option passed to PiniaColada has been moved to its own option queryOptions:

  • 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.

  • Breaking

    Replace serialize with serializeTreeMap

  • Breaking

    Removed reviveTreeMap (not needed)

  • Breaking

    Removed internal createdQueryEntry

  • Removed

    Remove deprecated functions

Release note

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() and defineQuery())
    option passed to PiniaColada has been moved to its own option
    queryOptions:

    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 serialize with serializeTreeMap

  • Breaking

    Removed reviveTreeMap (not needed)

  • Breaking

    Removed internal createdQueryEntry

Features

  • Add codemods for migrations

  • Allow global placeholderData (a98528a), closes #216

  • Allow invalidating all queries no matter their active status

  • Allow nullish filters

Bug Fixes

  • Avoid cancels to change the status (138857c), closes #210

  • 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

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.