Major Changes
-
#15074
bfcc442Thanks @penalosa! - Rename@cloudflare/vitest-pool-workersto@cloudflare/vitest-pluginfor the v1 releaseThe package has been renamed from
@cloudflare/vitest-pool-workersto@cloudflare/vitest-pluginto be clearer about it's usage.To migrate, run the codemod from the root of your project:
npx @cloudflare/codemods vitest:pool-workers-to-vitest-plugin
This handles the whole rename for you:
- Replaces the dependency in your
package.json, moving plain version ranges to^1.0.0while preservingworkspace:/catalog:/link:/file:protocol references, along with anyoverrides,resolutionsandpnpm.overridesentries. - Rewrites imports such as
import { cloudflareTest } from "@cloudflare/vitest-pool-workers"toimport { cloudflareTest } from "@cloudflare/vitest-plugin", preserving any subpaths. - Updates the
typesentry in your testtsconfig.jsonfrom@cloudflare/vitest-pool-workers/typesto@cloudflare/vitest-plugin/types.
Pass
--dry-runto preview the changes first, or--files <glob>to restrict which files are considered.If you would rather migrate by hand, the only changes needed are the dependency name in
package.json, the package specifier in anyimport/requireof the plugin, and thetypesentry in your testtsconfig.json. - Replaces the dependency in your
Minor Changes
-
#14690
d81fae7Thanks @penalosa! - Add a central CLI for Cloudflare codemodsRun a codemod by name, e.g.
npx @cloudflare/codemods vitest:v3-to-v4. The initial migrations cover Vitest v3 to v4 configuration (vitest:v3-to-v4) and the@cloudflare/vitest-pool-workersto@cloudflare/vitest-pluginv1 rename (vitest:pool-workers-to-vitest-plugin). The existing Vitest transform now lives in this dedicated package.