Patch Changes
-
#13077
11c77b7Thanks @penalosa! - fix:runInDurableObjectnow correctly returns redirect responses (3xx) from Durable Object callbacks instead of throwing "Expected callback for X" errors -
#13056
8384743Thanks @penalosa! - fix: Support dynamicimport()inside entrypoint and Durable Object handlersPreviously, calling
exports.default.fetch()orSELF.fetch()on a worker whose handler used a dynamicimport()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
onModuleRunnerhook so that allinvoke()calls are routed through the runner DO's I/O context, regardless of where theimport()originates. -
#13074
4618c05Thanks @penalosa! - fix: only apply module fallback extension probing forrequire(), notimportThe module fallback service previously tried adding
.js,.mjs,.cjs, and.jsonsuffixes to extensionless specifiers unconditionally. Per the Node.js spec, this extension-probing behaviour is specific to CommonJSrequire(). ESMimportstatements must include explicit file extensions.Extension-less TypeScript
importspecifiers continue to work correctly — they are resolved by Vite's resolver rather than the fallback's extension loop. -
#13073
baec845Thanks @penalosa! - AddadminSecretsStore()tocloudflare:testfor seeding secrets in testsSecrets store bindings only expose a read-only
.get()method, so there was previously no way to seed secret values from within a test. The newadminSecretsStore()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
cfd513fThanks @penalosa! - Add a 30-second timeout towaitUntilpromise draining to prevent hanging testsPreviously, if a
ctx.waitUntil()promise never resolved, the test suite would hang indefinitely after the test file finished. Now, anywaitUntilpromises that haven't settled within 30 seconds are abandoned with a warning, allowing the test suite to continue. This aligns with the productionwaitUntillimit. -
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