v0.8.0-next.10
Pre-releaseBreaking
IMPORTANT
There are several breaking changes in this release.
Going forward, worktop is a platform agnostic framework, offering a core set of modules that will work anywhere that supports the core set of Web APIs that are necessary. At time of this release, this includes Cloudflare Workers, Service Workers (web), and Deno. Adding Node.js support is planned for a near-future release.As part of this, worktop needed to rearrange — aka separate — the Cloudflare-specific methods & TypeScript interfaces away from the core modules and move them into namespaced submodules specific to Cloudflare. This pattern will be followed for other platforms with their own platform-specific types and/or behaviors, too.
For example, as shown below, the
worktop/kvmodule has been renamed toworktop/cfw.kvbecause it belongs to (and only works with) Cloudflare. Similarly, there's aworktop/wscore module, which includes shared WebSocket utility, but there are also thewoktop/deno.wsandworktop/cfw.wsmodules, which include implementations specific to Deno and Cloudflare, respectively.It is highly recommended you follow along #125, #132, #134, and #139 for more information and explanations.
-
(
worktop/cache): Generalizeworktop/cachemodule (#139): 985150b
Add acacheargument to thelookup,save, andsyncmethods.
Note: Existing users can useworktop/cfw.cachefor a drop-in replacement. -
(
worktop/ws): Move thelistenmethod & CF-specific types to the newworktop/cfw.wsmodule (#134): 504328d
Previously, theworktop/wsmodule had Cloudflare-specific information within it.
It's now general-purpose and all Cloudflare-specific contents have been moved to the (new)worktop/cfw.wsmodule. See #133 for more info -
Rename
worktop/kvtoworktop/cfw.kv: abf3d8a -
Rename
worktop/kv.assetstoworktop/cfw.kv.assets: 78ab152 -
Rename
worktop/durabletoworktop/cfw.durable: 92339d3 -
(
worktop/sw): Removedreplyandlisten; usestartinstead. -
(
worktop/cache): Removedreplyandlisten; usestartinstead. -
(
worktop/module): Deleted. Seeworktop/cfwinstead. -
(
worktop/ws): MoveWebSocketPairglobal type toworktop/cfwmodule: 9572f22 -
(
worktop): MoveCronEventtoworktop/cfwmodule: e3af56c -
(
worktop): MoveBindingstoworktop/cfwmodule: 88f7d93
Features
-
Adds Deno support via the new
worktop/denomodule: 5bae9a5
Offers astartexport which can run a worktopRouterin Deno Deploy or a standard Deno runtime. -
Add
worktop/deno.wsmodule: 91d8e73
A WebSocket module specifically for the Deno environment; see #133 -
Add
worktop/cfw.cachemodule (#139): 3f516de
A module for the Cache API specifically for the Cloudflare environment.
Patches
- (
worktop/sw): Ensurectx.waitUntilis forwarded: 61a558f
In Cloudflare environment, the previous...ctxdestructure hid thewaitUntil&passThroughmethods.
Full Changelog: v0.8.0-next.9...v0.8.0-next.10