C

pinia-colada-0-14-migration-recipe

How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

This codemod updates the usage of PiniaColada to ensure that the enabled and gcTime options are correctly placed under queryOptions. Previously, these options were directly passed as top-level properties, which is now deprecated. The codemod transforms these patterns into the new structure where enabled is nested under queryOptions.

Changes Applied:

  • Moves enabled under queryOptions
  • Moves gcTime under queryOptions if present
  • Ensures PiniaColada is always called with a valid configuration object

Before

plaintext

After

plaintext

Using this codemod

You can run this codemod with the following command:

bash

Ready to contribute?

Build your own codemod and share it with the community.