Pinia Colada v1.2.0

posva/pinia-colada
Share
Summary
Pinia Colada v1.2.0 introduces several key features including `defineMutationOptions` for type-safe reusable mutation options and `defineInfiniteQueryOptions` for enhanced infinite query support. Additionally, it includes important bug fixes to improve stability, such as avoiding the abortion of settled queries during garbage collection and aligning mutation lifecycle with query definitions. The release also optimizes performance with a smaller bundle size.

Full release notes

   🚀 Features

  • Add entry to UseMutationGlobalContext  -  by @posva in https://github.com/posva/pinia-colada/issues/544 (21826)
  • Add defineMutationOptions for type-safe reusable mutation options  -  by @posva (56773)
  • Add tagged key type to defineMutationOptions  -  by @posva (fa54b)
  • Warn when defineMutation is called outside a scope  -  by @posva (bc0bb)
  • infinite: Add defineInfiniteQueryOptions and getter support for useInfiniteQuery  -  by @posva (2dce2)
  • infinite-query: Add setInfiniteQueryData to safely set infinite query data  -  by @posva (96b58)

   🐞 Bug Fixes

  • Avoid aborting settled queries during garbage collection  -  by @markimbriaco, Mark Imbriaco and @posva in https://github.com/posva/pinia-colada/issues/548 (9b56a)
  • Missing global type of context in onMutate  -  by @posva (5bb4a)
  • Resolve type errors in defineMutationOptions tests  -  by @posva (aec43)
  • Avoid undefined in mutation key to fix type error with custom ErrorDefault  -  by @posva (98210)
  • Also guard previousPageParam in the check  -  by @tzzo (cc5e5)
  • Use proper cast for readonly ext in test  -  by @tzzo (5f997)
  • Align defineMutation lifecycle with defineQuery  -  by @posva (cac83)
  • cache-persister: Guard localStorage.clear() for Node 25+  -  by @posva (c29c6)
  • infinite-query: Guard computePageParams against missing ext refs  -  by @tzzo (113d6)

   🏎 Performance

  • Smaller bundle  -  by @posva (bb68d)
    View changes on GitHub

Latest Pinia Colada releases

All releases