mirror of
https://github.com/cloudflare/workers-sdk.git
synced 2026-11-17 06:56:03 +00:00
* test: fix Node 24/25 miniflare tests Vite strips `//# sourceMappingURL=` comments from string literals during transformation, which was causing the inline source map test to fail. This fix moves the worker script with the inline source map to an external fixture file that is loaded at runtime, bypassing Vite's transformation and allowing the test to work correctly on all Node.js versions. * test: fix Node 25 wrangler tests by mocking undici globals Extend the undici mock in vitest.setup.ts to also replace FormData, Headers, Request, and Response with their global equivalents. This allows MSW to properly intercept and parse requests in Node 25 where native fetch/FormData classes differ from undici's implementations. Also update FormData snapshot assertions in pages/deploy.test.ts to use a new formDataToObject() helper that produces consistent output across Node versions, since the internal representation of FormData varies. * fix: patch buffer-equal-constant-time for Node 25 compatibility Node 25 removed SlowBuffer from the buffer module (it was deprecated in Node 24). The buffer-equal-constant-time package (last updated in 2013) accesses SlowBuffer.prototype without checking if it exists, causing a crash. This patch adds guards to check if SlowBuffer is defined before accessing its prototype. The fix is backwards compatible with older Node versions. This is a transitive dependency through: verdaccio -> @verdaccio/signature -> jsonwebtoken -> jws -> jwa -> buffer-equal-constant-time * test: disable native webstorage for wrangler tests on Node 25+ Node 25 has native localStorage enabled by default, which conflicts with MSW. Use a helper script to conditionally add --no-experimental-webstorage flag to NODE_OPTIONS only on Node 25+, since this flag doesn't exist in Node 20-24. |
History
|
|
|---|---|---|
| .. | ||
| @cloudflare__component-listbox@1.10.6.patch | ||
| @netlify__build-info.patch | ||
| buffer-equal-constant-time@1.0.1.patch | ||
| postal-mime.patch | ||
| toucan-js@4.0.0.patch | ||
| youch@4.1.0-beta.10.patch | ||