You can now use Promise.try() in Cloudflare Workers. Refer to tc39/proposal-promise-try for more context on this API that has recently been added to the JavaScript language.
2024-08-14
When using the nodejs_compat_v2 compatibility flag, the setImmediate(fn) API from Node.js is now available at the global scope.
The internal_writable_stream_abort_clears_queue compatibility flag will ensure that certain WritableStreamabort() operations are handled immediately rather than lazily, ensuring that the stream is appropriately aborted when the consumer of the stream is no longer active.
Fixed a bug where when writing to an HTTP Response body would sometimes hang when the client disconnected (and sometimes throw an exception). It will now always throw an exception.
Fixed a bug which caused Date.now() to return skewed results if called before the first I/O of the first request after a Worker first started up. The value returned would be offset backwards by the amount of CPU time spent starting the Worker (compiling and running global scope), making it seem like the first I/O (e.g. first fetch()) was slower than it really was. This skew had nothing to do with Spectre mitigations; it was simply a longstanding bug.
2024-06-24
Exceptions thrown from Durable Object internal operations and tunneled to the caller may now be populated with a .retryable: true property if the exception was likely due to a transient failure, or populated with an .overloaded: true property if the exception was due to overload.
2024-06-20
We now prompt for extra confirmation if attempting to rollback to a version of a Worker using the Deployments API where the value of a secret is different than the currently deployed version. A ?force=true query parameter can be specified to proceed with the rollback.
Fixed a bug where exceptions propagated from JS RPC calls to Durable Objects would lack the .remote property that exceptions from fetch() calls to Durable Objects have.
2024-06-12
Blob and Body objects now include a new bytes() method, reflecting recentadditions to web standards.
The new fetch_standard_url compatibility flag will become active by default on June 3rd, 2024 and ensures that URLs passed into the fetch(...) API, the new Request(...) constructor, and redirected requests will be parsed using the standard WHATWG URL parser.
DigestStream is now more efficient and exposes a new bytesWritten property that indicates that number of bytes written to the digest.
2024-05-13
Updated v8 to version 12.5.
A bug in the fetch API implementation would cause the content type of a Blob to be incorrectly set. The fix is being released behind a new blob_standard_mime_type compatibility flag.
2024-05-03
Fixed RPC to/from Durable Objects not honoring the output gate.
The internal_stream_byob_return_view compatibility flag can be used to improve the standards compliance of the ReadableStreamBYOBReader implementation when working with BYOB streams provided by the runtime (like in response.body or request.body). The flag ensures that the final read result will always include a value field whose value is set to an empty Uint8Array whose underlying ArrayBuffer is the same memory allocation as the one passed in on the call to read().
The Web platform standard reportError(err) global API is now available in workers. The reported error will first be emitted as an 'error' event on the global scope then reported in both the console output and tail worker exceptions by default.
2024-04-26
Updated v8 to version 12.4.
2024-04-11
Improve Streams API spec compliance by exposing desiredSize and other properties on stream class prototypes
The new URL.parse(...) method is implemented. This provides an alternative to the URL constructor that does not throw exceptions on invalid URLs.
R2 bindings objects now have a storageClass option. This can be set on object upload to specify the R2 storage class - Standard or Infrequent Access. The property is also returned with object metadata.
There is no longer an explicit limit on the total amount of data which may be uploaded with Cache API put() per request. Other Cache API Limits continue to apply.
The Web standard ReadableStream.from() API is now implemented. The API enables creating a ReadableStream from a either a sync or async iterable.
2024-04-03
When the brotli_content_encoding compatibility flag is enabled, the Workers runtime now supports compressing and decompressing request bodies encoded using the Brotli compression algorithm. Refer to this docs section for more detail.
The new unwrap_custom_thenables compatibility flag enables workers to accept custom thenables in internal APIs that expect a promise (for instance, the ctx.waitUntil(...) method).
TransformStreams created with the TransformStream constructor now have a cancel algorithm that is called when the stream is canceled or aborted. This change is part of the implementation of the WHATWG Streams standard.
Exceptions reported to Tail Workers now include a "stack" property containing the exception's stack trace, if available.
2024-03-11
Built-in APIs that return Promises will now produce stack traces when the Promise rejects. Previously, the rejection error lacked a stack trace.
A new compat flag fetcher_no_get_put_delete removes the get(), put(), and delete() methods on service bindings and Durable Object stubs. This will become the default as of compatibility date 2024-03-26. These methods were designed as simple convenience wrappers around fetch(), but were never documented.
A new usage model called Workers Standard is available for Workers and Pages Functions pricing. This is now the default usage model for accounts that are first upgraded to the Workers Paid plan. Read the blog post for more information.
The usage model set in a script's wrangler.toml will be ignored after an account has opted-in to Workers Standard pricing. It must be configured through the dashboard (Workers & Pages > Select your Worker > Settings > Usage Model).
Workers and Pages Functions on the Standard usage model can set custom CPU limits for their Workers
2023-10-20
Added the crypto_preserve_public_exponent
compatibility flag to correct a wrong type being used in the algorithm field of RSA keys in
the WebCrypto API.
2023-10-18
The limit of 3 Cron Triggers per Worker has been removed. Account-level limits on the total number of
Cron Triggers across all Workers still apply.
2023-10-12
A TCP Socket's WritableStream now ensures the connection has opened before resolving the promise returned by close.
2023-10-09
The Web Platform standard CustomEvent class is now available in Workers.
Fixed a bug in the WebCrypto API where the publicExponent field of the algorithm of RSA keys would have the wrong type. Use the crypto_preserve_public_exponent compatibility flag to enable the new behavior.
Fixes regression in the TCP Sockets API where connect("google.com:443") would fail with a TypeError.
2023-06-19
The TCP Sockets API now reports clearer errors when a connection cannot be established.
Updated V8 to 11.5.
2023-06-09
AbortSignal.any() is now available.
Updated V8 to 11.4.
Following an update to the WHATWG URL spec, the delete() and has() methods of the URLSearchParams class now accept an optional second argument to specify the search parameter’s value. This is potentially a breaking change, so it is gated behind the new urlsearchparams_delete_has_value_arg and url_standard compatibility flags.
A new Hibernatable WebSockets API
(beta) has been added to Durable Objects. The Hibernatable
WebSockets API allows a Durable Object that is not currently running an event
handler (for example, processing a WebSocket message or alarm) to be removed from
memory while keeping its WebSockets connected (“hibernation”). A Durable Object
that hibernates will not incur billable Duration (GB-sec) charges.
2023-05-16
The new connect() method allows you to connect to any TCP-speaking services directly from your Workers. To learn more about other protocols supported on the Workers platform, visit the new Protocols documentation.
We have added new native database integrations for popular serverless database providers, including Neon, PlanetScale, and Supabase. Native integrations automatically handle the process of creating a connection string and adding it as a Secret to your Worker.
You can now also connect directly to databases over TCP from a Worker, starting with PostgreSQL. Support for PostgreSQL is based on the popular pg driver, and allows you to connect to any PostgreSQL instance over TLS from a Worker directly.
The R2 Migrator (Super Slurper), which automates the process of migrating from existing object storage providers to R2, is now Generally Available.
2023-05-15
Cursor, an experimental AI assistant, trained to answer
questions about Cloudflare's Developer Platform, is now available to preview!
Cursor can answer questions about Workers and the Cloudflare Developer Platform,
and is itself built on Workers. You can read more about Cursor in the announcement
blog.
The new nodeJsCompatModule type can be used with a Worker bundle to emulate a Node.js environment. Common Node.js globals such as process and Buffer will be present, and require('...') can be used to load Node.js built-ins without the node: specifier prefix.
Fixed an issue where websocket connections would be disconnected when updating workers. Now, only websockets connected to Durable Object instances are disconnected by updates to that Durable Object’s code.
2023-04-28
The Web Crypto API now supports curves Ed25519 and X25519 defined in the Secure Curves specification.
The global connect method has been moved to a cloudflare:sockets module.
2023-04-14
No externally-visible changes this week.
2023-04-10
URL.canParse(...) is a new standard API for testing that an input string can be parsed successfully as a URL without the additional cost of creating and throwing an error.
The Workers-specific IdentityTransformStream and FixedLengthStream classes now support specifying a highWaterMark for the writable-side that is used for backpressure signaling using the standard writer.desiredSize/writer.ready mechanisms.
2023-03-24
Fixed a bug in Wrangler tail and live logs on the dashboard that
prevented the Administrator Read-Only and Workers Tail Read roles from successfully
tailing Workers.
2023-03-09
No externally-visible changes.
2023-03-06
Workers Logpush now supports
300 characters per log line. This is an increase from the previous limit of 150
characters per line.
2023-02-06
Fixed a bug where transferring large request bodies to a Durable Object was unexpectedly slow.
Previously, an error would be thrown when trying to access unimplemented standard Request and Response properties. Now those will be left as undefined.
2023-01-31
The request.cf object now includes two additional properties, tlsClientHelloLength and tlsClientRandom.
2023-01-13
Durable Objects can now use jurisdictions with idFromName via a new subnamespace API.