Patch Changes
-
#14398
c5014ccThanks @apeacock1991! - AddevictDurableObjectandevictAllDurableObjectstest helpers tocloudflare:testThese helpers let you exercise how a Durable Object behaves across evictions in your tests. Eviction is graceful: durable storage is preserved, in-memory state is reset by tearing down the instance, hibernatable WebSockets are hibernated rather than closed, and eviction waits for in-flight requests to drain.
import { evictDurableObject, evictAllDurableObjects } from "cloudflare:test"; import { env } from "cloudflare:workers"; const id = env.COUNTER.idFromName("my-counter"); const stub = env.COUNTER.get(id); // Evict the Durable Object instance pointed to by a specific stub await evictDurableObject(stub); await evictDurableObject(stub, { webSockets: "close" }); // Evict all currently-running Durable Objects in evictable namespaces await evictAllDurableObjects();
-
#14394
8a5cf8cThanks @Partha-Shankar! - fix(d1): escapemigrationsTableNameand filenames in SQLite queriesD1 migration commands in both
wranglerand@cloudflare/vitest-pool-workersinterpolated themigrationsTableNameconfig value and migration filenames directly into SQL strings without any escaping. This meant:- A table name such as
my"tablewould produce invalid SQL inCREATE TABLE,SELECT, andINSERTstatements, and - A migration filename containing an apostrophe (e.g.
what's-new.sql) would break theINSERT INTO ... VALUES ('...')statement appended after each migration inwrangler.
Both identifiers are now properly escaped before interpolation:
migrationsTableNameis wrapped in double-quotes with internal double-quotes doubled (SQL-standard identifier quoting), and migration filenames used as string literals have their single-quotes doubled before insertion. - A table name such as
-
Updated dependencies [
5f40dd5,34e0cef,3b743c1,daa5389,8a5cf8c]:- wrangler@4.105.0
- miniflare@4.20260625.0