Skip to content

Releases: tsndr/cloudflare-worker-router

v3.0.0-3

28 Nov 22:05
v3.0.0-3
9f96fd1
Compare
Choose a tag to compare
v3.0.0-3 Pre-release
Pre-release

Add raw-request to req

v3.0.0-2

28 Nov 20:28
v3.0.0-2
07cb83f
Compare
Choose a tag to compare
v3.0.0-2 Pre-release
Pre-release

Make ctx optional in router.handle(...)

v3.0.0-1

28 Nov 19:36
v3.0.0-1
5e18d06
Compare
Choose a tag to compare
v3.0.0-1 Pre-release
Pre-release

Pre-Release

  • Switch to return syntax

Before

router.get('/test', ({ req, res }) => {
    res.body = "Hello World!"
}

After

router.get('/test', () => {
    return new Response('Hello World!')
}

v2.3.1

26 Nov 12:05
v2.3.1
f192b3d
Compare
Choose a tag to compare

Updated type dependencies

v2.3.0

24 Nov 23:46
v2.3.0
2529e5c
Compare
Choose a tag to compare
  • Added Env generic (thanks @anbcodes)
  • Updated readme

v2.2.0

02 Oct 22:38
v2.2.0
d3b86f1
Compare
Choose a tag to compare

Breaking Changes

Dropped default import, so make sure to update it.

Before

import Router from '@tsndr/cloudflare-worker-router'

After

import { Router } from '@tsndr/cloudflare-worker-router'

v2.1.2

02 Oct 22:14
v2.1.2
5fa3475
Compare
Choose a tag to compare

Updated readme

v2.1.1

02 Oct 22:04
v2.1.1
bdb7be3
Compare
Choose a tag to compare
  • Fixed cors overruling options requests

v2.1.0

29 Sep 17:00
v2.1.0
8e58dc3
Compare
Choose a tag to compare
  • Type fixes
  • Fixed CORS enabled by default. If you're relying on CORS headers to be enabled please make sure to enable them:
router.cors()

v2.0.2

19 Jul 13:09
v2.0.2
6f84645
Compare
Choose a tag to compare

Exporting types now