Skip to content

@cloudflare/vitest-plugin@1.0.0

Choose a tag to compare

@workers-devprod workers-devprod released this 20 Aug 17:42
· 2 commits to main since this release
38b4623

Major Changes

  • #15074 bfcc442 Thanks @penalosa! - Rename @cloudflare/vitest-pool-workers to @cloudflare/vitest-plugin for the v1 release

    The package has been renamed from @cloudflare/vitest-pool-workers to @cloudflare/vitest-plugin to 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.0 while preserving workspace:/catalog:/link:/file: protocol references, along with any overrides, resolutions and pnpm.overrides entries.
    • Rewrites imports such as import { cloudflareTest } from "@cloudflare/vitest-pool-workers" to import { cloudflareTest } from "@cloudflare/vitest-plugin", preserving any subpaths.
    • Updates the types entry in your test tsconfig.json from @cloudflare/vitest-pool-workers/types to @cloudflare/vitest-plugin/types.

    Pass --dry-run to 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 any import/require of the plugin, and the types entry in your test tsconfig.json.

Minor Changes

  • #14690 d81fae7 Thanks @penalosa! - Add a central CLI for Cloudflare codemods

    Run 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-workers to @cloudflare/vitest-plugin v1 rename (vitest:pool-workers-to-vitest-plugin). The existing Vitest transform now lives in this dedicated package.

Patch Changes