0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-22 11:17:33 +01:00
Commit Graph

551 Commits

Author SHA1 Message Date
Yusuke Wada
350040470d v4.5.11 2024-09-03 16:54:12 +09:00
Yusuke Wada
040b0d41de v4.5.10 2024-08-31 11:33:24 +09:00
yasuaki640
18f937d3be
chore(test): migrate to vitest v2 (#3326)
* migrate vitest v2

* re run bun i
2024-08-29 16:57:40 +09:00
Yusuke Wada
f9349ecca2 v4.5.9 2024-08-26 21:35:28 +09:00
Yusuke Wada
d1c7f6f5f1 v4.5.8 2024-08-22 16:07:04 +09:00
Yusuke Wada
b0af71fbcc v4.5.7 2024-08-21 11:14:42 +09:00
Yusuke Wada
8f1680238b v4.5.6 2024-08-17 19:16:21 +09:00
Yusuke Wada
986db292e8 v4.5.5 2024-08-11 13:05:23 +09:00
Yusuke Wada
e1235462c8 v4.5.4 2024-08-06 20:21:43 +09:00
Yusuke Wada
1fafc7aec8 v4.5.3 2024-07-29 22:37:13 +09:00
Yusuke Wada
a63bcfd6fb v4.5.2 2024-07-27 18:05:28 +09:00
Yusuke Wada
0535579de5 v4.5.1 2024-07-20 23:10:42 +09:00
Shotaro Nakamura
f23a416f75
chore: remove rimraf and use bun shell (#3146) 2024-07-18 18:34:33 +09:00
Yusuke Wada
801e1b9027 v4.5.0 2024-07-16 23:02:21 +09:00
Taku Amano
9a6e52d734
feat(middleware/combine): Introduce combine middleware (#2941)
* feat(middleware/predicate): Introduce predicate middleware

* fix: apply `bun run format:fix`

* refactor: rename middleware predicate -> combine
2024-07-13 18:49:10 +09:00
ryu
e6d253d96f
feat(middleware): introduce Request ID middleware (#3082)
* feat(middleware): introduce Request ID middleware

* fix not to accept empty string in header

* rename requestID to requestId

* pass the context to the generator option

* add typesVersions

* fix typo

Co-Authored-By: Taku Amano <taku@taaas.jp>

* change to generate id if validation fails

Co-Authored-By: Taku Amano <taku@taaas.jp>

* fix limit length test

---------

Co-authored-by: Taku Amano <taku@taaas.jp>
2024-07-13 14:02:36 +09:00
Shotaro Nakamura
c2698fa2e0
feat: Introduce Service Worker Adapter (#3062)
* feat: Intoroduce service worker adapter

* test: add test

* chore: format code

* refactor: handler.ts

* chore: remove unused import

* fix: add webworker to jsr.json

* fix: triple slash directives to tsconfig.json

* feat: add types.ts to define worker types
2024-07-11 17:16:52 +09:00
Shotaro Nakamura
71cdcf40d8
feat: Introduce IP Restriction Middleware (#2813)
* feat: Introduce IP Limit Middleware

* chore(jsr): add return types

* chore: format code

* fix: eslint

* feat: if allow is empty, set allow at * by default (#3)

* feat: if allow is empty, set allow at * by default

* fix

* feat: remove wildcard

* chore: fix spelling

* chore: format

* chore: sort imports

* fix: test

* chore: sort imports

* feat: renamed `ipLimit` to `ipRestriction`

* feat: accept `(c: Context) => string)`

* chore: format code

* feat: allow/deny -> allowList/denyList

* feat: suport function rule

* chore: format code

* fix: test code

* feat: suport custom errors

* fix: test code

* fix: name in test code

* feat: allow function to named function

* perf(ip-restriction): optimize ip-restriction middleware by prepare matcher function in advance

* feat: don't use random ip in test

* chore: ipVn to ipvn

* fix: test code

* fix: fix type error in ip-restriction middleware test

* chore: rename `IPRestrictRule` to `IPRestrictionRule`

* docs(ip-restriction): add a comment to explain the normalization of IPv6 address

* docs(ip-restriction): fix typo in comment

* refactor(ip-restriction): rename convertIPv6ToString to convertIPv6BinaryToString

* feat: support to receive `Context` in `onError`

* fix: https://github.com/honojs/hono/pull/2813#discussion_r1667327721

* fix: format code

* feat: use `Forbidden`

* tracking the `next`

* remove importing `HonoRequest`

---------

Co-authored-by: Ame_x <121654029+EdamAme-x@users.noreply.github.com>
Co-authored-by: Taku Amano <taku@taaas.jp>
Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2024-07-08 23:26:01 +09:00
Yusuke Wada
58f421fa27 Merge branch 'main' into next 2024-07-08 22:10:10 +09:00
Shotaro Nakamura
97ec6521a7
chore: replace tsx with Bun (#3103) 2024-07-07 15:55:19 +09:00
Yusuke Wada
cff2768de0 v4.4.12 2024-07-06 16:13:29 +09:00
Yusuke Wada
75c314c279 v4.4.11 2024-07-03 10:53:44 +09:00
Yusuke Wada
c095dfac4e v4.4.10 2024-06-30 07:55:36 +09:00
Yusuke Wada
f2908d62fb v4.5.0-rc.2 2024-06-29 17:39:50 +09:00
Yusuke Wada
ebbaea982c Merge branch 'main' into next 2024-06-29 17:13:45 +09:00
Taku Amano
2d3bc55954
fix(streaming): call stream.abort() explicitly when request is aborted (#3042)
* feat(utils/stream): enable to abort streaming manually

* feat(utils/stream): prevent multiple aborts, and enable to get the abort status

* fix(streaming): call `stream.abort()` explicitly when request is aborted

* test: add tests for streaming

* docs(stream): add comments

* test: add --allow-net to deno test command in ci.yml

* test(streaming): update test code

* test(stream): retry flaky test up to 3 times at "bun"

* test(streaming): refactor test to use afterEach

* fix(streaming): in bun, `c` is destroyed when the request is returned, so hold it until the end of streaming

* refactor(streaming): tweaks code layout
2024-06-29 07:00:28 +09:00
Yusuke Wada
5201c9fe31 Merge branch 'main' into next 2024-06-27 21:59:59 +09:00
Yusuke Wada
2ba805ca28 v4.4.9 2024-06-27 18:22:44 +09:00
Yusuke Wada
0a4621f737
docs: update the description of package.json and README (#3052) 2024-06-27 17:13:29 +09:00
Yusuke Wada
42436bf799 Merge branch 'main' into next 2024-06-27 10:09:56 +09:00
Yusuke Wada
d21f8eb27a v4.4.8 2024-06-25 06:24:12 +09:00
Yusuke Wada
7ee829be6b v4.4.7 2024-06-19 15:24:23 +09:00
Yusuke Wada
614dff06ba v4.4.6 2024-06-14 07:08:43 +09:00
Yusuke Wada
61d50f6fe9 v4.5.0-rc.1 2024-06-12 12:17:46 +09:00
Taku Amano
c910923aea
feat(jsx/server): introduce jsx/dom/server module for compatibility with react-dom/server (#2930)
* feat(jsx/server): introduce `jsx/dom/server` module for compatibility with `react-dom/server`

* refactor: tweaks signature of onError callback in renderToReadableStream for compatibility

* Add jsx/dom/server to jsr.json

* fix: relative import path error in `deno publish`
2024-06-12 11:59:51 +09:00
Yusuke Wada
75663ff162 v4.4.5 2024-06-11 10:22:18 +09:00
Yusuke Wada
fe7cfcf719 v4.4.4 2024-06-06 23:01:46 +09:00
Yusuke Wada
6a5c649dce v4.4.3 2024-06-03 20:48:41 +09:00
Yusuke Wada
786f9e2a9d
test(workerd): add tests for WebSocket (#2891) 2024-06-03 00:14:11 +09:00
Yusuke Wada
f634c82451
test(workerd): rename the runtime test wrangler to workerd (#2888)
* test(workerd): rename the runtime test `wrangler` to `workerd`

* fixed ci.yml

* fixed a typo

* use node 20.x
2024-06-02 22:49:40 +09:00
Yusuke Wada
0c89700f55 v4.4.2 2024-05-31 08:14:26 +09:00
Yusuke Wada
c8beddb7c7 v4.4.1 2024-05-31 08:02:07 +09:00
odri
366f760a30
fix(client): allow multiple files on the same key in form (#2791)
* fix(client): allow multiple files on the same key in form

* add tests and update `msw`

* fixed import order

Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2024-05-28 18:39:01 +09:00
Yusuke Wada
03090608db v4.4.0 2024-05-27 16:49:02 +09:00
Taku Amano
593cb7a89d
feat(jsx/dom): introduce react-dom/client APIs and React.version (#2795)
* feat(jsx): export version string from jsx

* feat(jsx/dom): introduce react-dom/client APIs

* docs(jsx/dom/client): add module description

* chore: add jsx/dom/client to jsr.json

* refactor(jsx/dom): declare types explicitly.
2024-05-26 22:55:30 +09:00
Yusuke Wada
cc4b2b3c7f
chore(lint): update eslint rules (#2790)
* chore(lint): update eslint rules

* fix formats
2024-05-26 05:17:45 +09:00
Yusuke Wada
179d21b6d2 v4.4.0-rc.1 2024-05-25 10:27:50 +09:00
Yusuke Wada
1b2a4c0800
feat(jsr): support JSR (#2662)
* feat(jsr): reduce slow types (#2369)

* feat(jsr): reduce slow types

* fix: use allow function

* chore: format code

* chore: denoify

* add `deno.json`

* add `jsr-dry-run` command for CI

* don't put `JSX` on `global`

* fix test settings for deno

* don't use `dynamicClass`

* don't declare `ExecutionContext` in `global`

* goodbye denoify

* exports `./middleware`

* exports `./helper`

* exports each helper and middleware

* remove the `awslambda` implementation which is not enough

* feat(jsr): remove helper.ts and middleware.ts (#2667)

* feat(jsr): remove helper.ts and middleware.ts

* fix: fix test

* dont' use `SuperClass`

Co-authored-by: Taku Amano <taku@taaas.jp>

* feat(jsr): delete `mod.ts` (#2669)

* rename `deno.json` to `jsr.json`

* lint

* remove slow type in lambda adapter

* fixed runtime test for deno

* export all utils

* add a GitHub action to publish the package to JSR

* fixed declaring `ContextVariableMap`

* fixed the type error

* include `jsr.json` in `jsr.json`

* update `jsr.json`

---------

Co-authored-by: Shotaro Nakamura <79000684+nakasyou@users.noreply.github.com>
Co-authored-by: Taku Amano <taku@taaas.jp>
2024-05-24 17:47:28 +09:00
Yusuke Wada
317b3d5534 v4.3.11 2024-05-24 17:33:21 +09:00
Yusuke Wada
a9d1e2c694 v4.3.10 2024-05-24 17:33:21 +09:00