@cloudflare/vitest-pool-workers@0.18.7
Patch Changes
-
#14713
de34449Thanks @allocsys! - Fix a non-ASCII path failure during the Miniflare WebSocket handshake: theMF-Vitest-Worker-Dataheader embedded the rawprocess.cwd()value, which threw a Latin-1/ASCII header encoding error when the workspace path contained non-ASCII characters (e.g. CJK characters) on Windows. The value is now percent-encoded on write and decoded on read, matching the fix applied to the module fallback redirect response. -
#14713
de34449Thanks @allocsys! - Fix a runtime start-up failure ("No such module "cloudflare:test-internal"") when the project workspace path contains non-ASCII characters (e.g. CJK characters) on Windows. The module fallback service's redirect response set the target file path directly as an HTTPLocationheader value, but headers are restricted to the Latin-1/ASCII byte range, so any non-ASCII byte in the path caused header construction to throw. Such paths are now percent-encoded (and tagged with a sentinel prefix) before being used as a header value, and decoded again only for the values we encoded, so the round-trip is unambiguous and a workspace path containing a literal%is left untouched instead of being mis-decoded. -
#14739
5eac99eThanks @Ankcorn! - Support testing Streaming Tail Workers in Vitest Pool Workers. -
#14763
538e867Thanks @gianghungtien! - TreatwebSocketMessage(),webSocketClose()andwebSocketError()as optional Durable Object handlersThe pool wraps each Durable Object class and installs a prototype method for every default handler before user code is loaded, so
workerdalways sees a handler and always dispatches. When the wrapped class didn't actually define one, the wrapper threw<ClassName> exported by <path> does not define a `webSocketClose()` method, even though deployed Workers silently ignore these events for classes that omit them. A hibernatable Durable Object defining onlywebSocketMessage()would log an uncaughtTypeErroron every close.These three handlers now no-op when absent, matching deployed behaviour.
alarm()is unchanged and still reports a missing handler, sinceworkerdrejectssetAlarm()up front on a class without one. -
Updated dependencies [
42af66d,a0a091b,f03b108,deae171,0df3d43,d83a476,4e92e32,d1d6945,4815711,a0c8bb1,a50f73a,2b390d7,c82d96b,34430b3,f75ae5d]:- miniflare@4.20260721.0
- wrangler@4.113.0