Releases: lukeed/worktop
v0.8.0-next.18
Breaking
-
Changed matching behavior of optional wildcard routes (eg;
/books/*?
): 0f4d4a6
Seeregexparam@3.0
release notes for more info. -
Changed the
context.params
wildcard value key from"wild"
to"*"
: d770b39
Seeregexparam@3.0
release notes for more info.API.add('GET', '/foo/*', (req, context) => { -- let value = context.params.wild; ++ let value = context.params['*']; });
Full Changelog: v0.8.0-next.16...v0.8.0-next.18
v0.8.0-next.16
Patches
- Upgrade
mrmime
version (#180): 8c5855c
Seemrmime@2.0
release notes
Thank you @benmccann~!
Full Changelog: v0.8.0-next.15...v0.8.0-next.16
v0.8.0-next.15
Patches
- Add
types
conditions for"exports"
map (#175): bdc0695 - fix(cfw): fix
structuredClone
typo (#163): 406f5e3
Thank you @leader22 - fix(cfw): add
structuredClone
andqueueMicrotask
types: 4f251a4 - fix(cfw): add
HTMLRewriter
types: 1bb1e7e - fix(cfw): declare
Headers.getAll
method signature: 3f8c224
Chores
Full Changelog: v0.8.0-next.14...v0.8.0-next.15
v0.8.0-next.14
Breaking
Patches
- (
worktop/cfw.kv
): Ensure internalCache
entity keys are URL-friendly: d1f9d5c - (
worktop/cfw.kv
): Accept type-argument inEntity
definition: 6f47542
Chores
Full Changelog: v0.8.0-next.13...v0.8.0-next.14
v0.8.0-next.13
Features
Patches
-
(
worktop/cfw
) Updaterequest.cf
type definitions (#157): 2c1589b, 24e758d
Thank you @eugene1g -
(
worktop/cache
) Only allow RFC7231 status codes to be cached (#143): a3fd957
Chores
- Use
bundt@next
for building monorepo packages (#152): 42b8dc5, e7d537a - (WIP/DEFERRED) Contribute
Database
class fromworktop/cfw.durable
(#148, #149): f402194, f9f6f10, 867322f
Thank you @eidam!
Full Changelog: v0.8.0-next.12...v0.8.0-next.13
v0.8.0-next.12
Patches
- (
worktop/cfw
): Do not passctx
parameter thru torun
directly: 235d800
v0.8.0-next.11
Features
- (
worktop/cfw
): AddModule.Service
type interface: 2f5dd4d
Definition provided for the Workers Services beta
v0.8.0-next.10
Breaking
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/kv
module has been renamed toworktop/cfw.kv
because it belongs to (and only works with) Cloudflare. Similarly, there's aworktop/ws
core module, which includes shared WebSocket utility, but there are also thewoktop/deno.ws
andworktop/cfw.ws
modules, 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/cache
module (#139): 985150b
Add acache
argument to thelookup
,save
, andsync
methods.
Note: Existing users can useworktop/cfw.cache
for a drop-in replacement. -
(
worktop/ws
): Move thelisten
method & CF-specific types to the newworktop/cfw.ws
module (#134): 504328d
Previously, theworktop/ws
module had Cloudflare-specific information within it.
It's now general-purpose and all Cloudflare-specific contents have been moved to the (new)worktop/cfw.ws
module. See #133 for more info -
Rename
worktop/kv
toworktop/cfw.kv
: abf3d8a -
Rename
worktop/kv.assets
toworktop/cfw.kv.assets
: 78ab152 -
Rename
worktop/durable
toworktop/cfw.durable
: 92339d3 -
(
worktop/sw
): Removedreply
andlisten
; usestart
instead. -
(
worktop/cache
): Removedreply
andlisten
; usestart
instead. -
(
worktop/module
): Deleted. Seeworktop/cfw
instead. -
(
worktop/ws
): MoveWebSocketPair
global type toworktop/cfw
module: 9572f22 -
(
worktop
): MoveCronEvent
toworktop/cfw
module: e3af56c -
(
worktop
): MoveBindings
toworktop/cfw
module: 88f7d93
Features
-
Adds Deno support via the new
worktop/deno
module: 5bae9a5
Offers astart
export which can run a worktopRouter
in Deno Deploy or a standard Deno runtime. -
Add
worktop/deno.ws
module: 91d8e73
A WebSocket module specifically for the Deno environment; see #133 -
Add
worktop/cfw.cache
module (#139): 3f516de
A module for the Cache API specifically for the Cloudflare environment.
Patches
- (
worktop/sw
): Ensurectx.waitUntil
is forwarded: 61a558f
In Cloudflare environment, the previous...ctx
destructure hid thewaitUntil
&passThrough
methods.
Full Changelog: v0.8.0-next.9...v0.8.0-next.10
v0.8.0-next.9
Patches
- (
durable
): Correctstate.blockConcurrencyWhile
types & usage (#116, #120 ): 1f9e34f
Thank you @ConProgramming~! - (
cache
): Do not cache aResponse
with a101
status code (#121): 9457785 - (
router
): Mark thecontext
parameter withinInitializer
as optional (#120): ce6872b - (
cors
) Removeorigin
scope hoisting (#118): 88f0433
Chores
- Update the README and "kv-todos" examples (#111): 4d9f210
Thank you @itsmatteomanf~! - Bump
typescript
version: 428a2d4
Full Changelog: v0.8.0-next.8...v0.8.0-next.9