itty-router 3.0.4 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +3 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -14,11 +14,10 @@
14
14
  Tiny, zero-dependency router with route param and query parsing - built for [Cloudflare Workers](https://developers.cloudflare.com/workers/), but works everywhere!
15
15
 
16
16
  # Major Announcement: v3.x is Live!
17
- Version 3 introduces itty as a TypeScript-first library. This version should break no existing JS users, but TS users may have to update their types, as shown below. Please [join the discussion on Discord](https://discord.gg/53vyrZAu9u) to assist in this rollout! In the meantime, thanks everyone for your patience! Here are the major changes in version 3, with `itty-router-extras` (certainly) and likely `itty-cors` to be added into core as upcoming minor releases.
17
+ Version 3 introduces itty as a TypeScript-first library. This version should break no existing JS users, but TS users will likely need to [update their types](#typescript). Please [join the discussion on Discord](https://discord.gg/53vyrZAu9u) to assist in this rollout! In the meantime, thanks everyone for your patience!
18
+
19
+ Here are the major changes in version 3, with `itty-router-extras` (certainly) and likely `itty-cors` to be added into core as upcoming minor releases:
18
20
 
19
- ### Increase in bundle size (~250 bytes)
20
- This was sadly overdue (and hopefully can be golfed down a bit), but as a result addressed the following issues from v3.x:
21
-
22
21
  1 . Routes can now capture complex/unknown paths using the trailing `+` modifier. As a result, this is now possible:
23
22
  ```js
24
23
  router.handle('/get-file/:path+', ({ params }) => params)
@@ -33,9 +32,6 @@ This was sadly overdue (and hopefully can be golfed down a bit), but as a result
33
32
  // GET /foo?pets=mittens&pets=fluffy&pets=rex&bar=baz => { bar: "baz", pets: ["mittens", "fluffy", "rex"] }
34
33
  ```
35
34
 
36
- ### Breaking TS changes
37
- I've been forced to rewrite the TS types. This will need a bit of documentation...
38
-
39
35
  ### Addons & Related Libraries
40
36
  1. [itty-router-extras](https://www.npmjs.com/package/itty-router-extras) - adds quality-of-life improvements and utility functions for simplifying request/response code (e.g. middleware, cookies, body parsing, json handling, errors, and an itty version with automatic exception handling)!
41
37
  2. [itty-cors](https://www.npmjs.com/package/itty-cors) (early access/alpha) - Easy CORS handling for itty APIs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itty-router",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "Tiny, zero-dependency API router - built for Cloudflare Workers, but works everywhere!",
5
5
  "sourceType": "module",
6
6
  "main": "./dist/itty-router.js",