github cloudflare/workers-sdk @cloudflare/vitest-plugin@1.2.0

latest releases: @cloudflare/vite-plugin@1.57.1, wrangler@4.136.1, @cloudflare/vitest-plugin@1.2.1...
4 hours ago

Minor Changes

  • #15713 3c75cad Thanks @jamesopstad! - Define experimental Cloudflare configuration with a single default export

    Experimental cloudflare.config.ts files now define settings and resources together in a default-exported defineConfig() call. Add a Worker under worker, add Containers to the containers array, or omit both to provide settings only.

    import * as entrypoint from "./src/index.ts" with { type: "cf-worker" };
    
    export default defineConfig({
    	accountId: "...",
    	complianceRegion: "public",
    	worker: {
    		name: "my-worker",
    		compatibilityDate: "2026-09-18",
    		entrypoint,
    	},
    });
  • #15707 95af41d Thanks @halfstack-dev! - Support nested D1 migration layouts in readD1Migrations()

    readD1Migrations() now accepts the same migrationsDir / migrationsPattern options Wrangler uses, so Vitest can apply Drizzle-style nested files such as 0001_init/migration.sql. Discovery is shared with Wrangler via @cloudflare/workers-utils, so the test path and wrangler d1 migrations apply stay aligned.

    The original readD1Migrations(migrationsPath) signature still reads only top-level *.sql files in that directory.

Patch Changes

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.