github cloudflare/workers-sdk @cloudflare/vitest-pool-workers@0.13.5

latest releases: @cloudflare/vite-plugin@1.30.2, @cloudflare/pages-shared@0.13.119, @cloudflare/containers-shared@0.13.1...
12 hours ago

Patch Changes

  • #13077 11c77b7 Thanks @penalosa! - fix: runInDurableObject now correctly returns redirect responses (3xx) from Durable Object callbacks instead of throwing "Expected callback for X" errors

  • #13056 8384743 Thanks @penalosa! - fix: Support dynamic import() inside entrypoint and Durable Object handlers

    Previously, calling exports.default.fetch() or SELF.fetch() on a worker whose handler used a dynamic import() would hang and fail with "Cannot perform I/O on behalf of a different Durable Object". This happened because the module runner's transport — which communicates over a WebSocket owned by the runner Durable Object — was invoked from a different DO context.

    The fix patches the module runner's transport via the onModuleRunner hook so that all invoke() calls are routed through the runner DO's I/O context, regardless of where the import() originates.

  • #13074 4618c05 Thanks @penalosa! - fix: only apply module fallback extension probing for require(), not import

    The module fallback service previously tried adding .js, .mjs, .cjs, and .json suffixes to extensionless specifiers unconditionally. Per the Node.js spec, this extension-probing behaviour is specific to CommonJS require(). ESM import statements must include explicit file extensions.

    Extension-less TypeScript import specifiers continue to work correctly — they are resolved by Vite's resolver rather than the fallback's extension loop.

  • #13073 baec845 Thanks @penalosa! - Add adminSecretsStore() to cloudflare:test for seeding secrets in tests

    Secrets store bindings only expose a read-only .get() method, so there was previously no way to seed secret values from within a test. The new adminSecretsStore() helper returns Miniflare's admin API for a secrets store binding, giving tests full control over create, update, and delete operations.

    import { adminSecretsStore } from "cloudflare:test";
    import { env } from "cloudflare:workers";
    
    const admin = adminSecretsStore(env.MY_SECRET);
    await admin.create("test-value");
    
    const value = await env.MY_SECRET.get(); // "test-value"
  • #13083 cfd513f Thanks @penalosa! - Add a 30-second timeout to waitUntil promise draining to prevent hanging tests

    Previously, if a ctx.waitUntil() promise never resolved, the test suite would hang indefinitely after the test file finished. Now, any waitUntil promises that haven't settled within 30 seconds are abandoned with a warning, allowing the test suite to continue. This aligns with the production waitUntil limit.

  • Updated dependencies [eeaa473, 9fcdfca, bc24ec8, 1faff35, 0b4c21a, 535582d, 992f9a3, f4ea4ac, 91b7f73, f6cdab2, 53ed15a, ce65246, 7a5be20, 6b50bfa, 0386553, 9c5ebf5, 53ed15a, 53ed15a]:

    • wrangler@4.78.0
    • miniflare@4.20260317.3

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.