🚧 Changelog
0.10.0#
Date: 2021-11-25
- Upgrade
http-errors package to major version 2.0.0 which also upgrades a transitive dependency which usedeval.
0.9.5#
Date: 2021-11-25
- Undo the workaround introduced in 0.9.3 for Miniflare support - it is no longer needed.
0.9.4#
Date: 2021-11-17
- Added
"type": "module"to the package.json
0.9.3#
Date: 2021-11-16
- Updated to new Cloudflare workers types package, allowing for stricter typing of
response.webSocketfield. - Added workaround to support Miniflare (and the underlying
undicilibrary) out of the box.
0.9.2#
Date: 2021-10-04
- Added
Context.response.overwritewhich allows you to overwrite the Response built up so far. This is very useful in the context of Durable Objects, in which you may want to forward the response.
0.9.1#
Date: 2021-10-03
- Add
webSocketfield to Response to match Cloudflare's (non-standard) API. - You can now pass
nullto construct a body.
0.9.0#
Date: 2021-10-02
- Breaking Change:
Context.statehas been renamed toContext.datato prevent confusion when using Durable Objects. - The Sunder app constructor now takes a
stateargument for injecting Durable Object state. Context.statenow contains a Durable Worker state (if any), this means that Sunder now has first class Durable Objects support!
0.8.0#
Date: 2021-09-27
- Breaking Change: All Sunder types now take an additional
EnvironmentTypegeneric type argument, it is the first such argument (beforeParamsTypeandStateType).
The tl;dr fix is to replaceContext<{id: string}>withContext<{}, {id: string}>. - Performance improvement for
get,setandhasshorthands onctx.requestan anonymous function was created on every invocation before this change. - Support for
modulesbuild-mode in Cloudflare Workers.- A new
fetchmethod was added toSunderapplications that has the same signature as the - The
handlemethod onSundernow takes a second argument where you can provide your ownenvin case you are not usingmodules. - The Sunder Context now has a
envfield, which is type-checked by the Typescript compiler (and supports auto-completion!).
- A new
0.7.2#
Date: 2021-05-24
- Changed
self.BlobtoglobalThis.Blobto support different environments more easily.
0.7.1#
Date: 2021-02-14
- Added missing
Router#optionsfunction to the router to handle OPTIONS requests.
0.7.0#
Date:: 2021-01-31
- Potentially breaking change: Rename
createErrortocreateHttpError(not exposed from top level Sunder package, but you may have imported it anyway). - Handlers and Middleware now have a second generic argument, their
StateType, which allows you to type whatcontext.stateyour handler/middleware expects. - The
Routerclass now has a generic type argument, which allows you to define the type ofcontext.statewhen it enters your Router.