🚧 Changelog
#
0.10.0Date: 2021-11-25
- Upgrade
http-error
s package to major version 2.0.0 which also upgrades a transitive dependency which usedeval
.
#
0.9.5Date: 2021-11-25
- Undo the workaround introduced in 0.9.3 for Miniflare support - it is no longer needed.
#
0.9.4Date: 2021-11-17
- Added
"type": "module"
to the package.json
#
0.9.3Date: 2021-11-16
- Updated to new Cloudflare workers types package, allowing for stricter typing of
response.webSocket
field. - Added workaround to support Miniflare (and the underlying
undici
library) out of the box.
#
0.9.2Date: 2021-10-04
- Added
Context.response.overwrite
which 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.1Date: 2021-10-03
- Add
webSocket
field to Response to match Cloudflare's (non-standard) API. - You can now pass
null
to construct a body.
#
0.9.0Date: 2021-10-02
- Breaking Change:
Context.state
has been renamed toContext.data
to prevent confusion when using Durable Objects. - The Sunder app constructor now takes a
state
argument for injecting Durable Object state. Context.state
now contains a Durable Worker state (if any), this means that Sunder now has first class Durable Objects support!
#
0.8.0Date: 2021-09-27
- Breaking Change: All Sunder types now take an additional
EnvironmentType
generic type argument, it is the first such argument (beforeParamsType
andStateType
).
The tl;dr fix is to replaceContext<{id: string}>
withContext<{}, {id: string}>
. - Performance improvement for
get
,set
andhas
shorthands onctx.request
an anonymous function was created on every invocation before this change. - Support for
modules
build-mode in Cloudflare Workers.- A new
fetch
method was added toSunder
applications that has the same signature as the - The
handle
method onSunder
now takes a second argument where you can provide your ownenv
in case you are not usingmodules
. - The Sunder Context now has a
env
field, which is type-checked by the Typescript compiler (and supports auto-completion!).
- A new
#
0.7.2Date: 2021-05-24
- Changed
self.Blob
toglobalThis.Blob
to support different environments more easily.
#
0.7.1Date: 2021-02-14
- Added missing
Router#options
function to the router to handle OPTIONS requests.
#
0.7.0Date:: 2021-01-31
- Potentially breaking change: Rename
createError
tocreateHttpError
(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.state
your handler/middleware expects. - The
Router
class now has a generic type argument, which allows you to define the type ofcontext.state
when it enters your Router.