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

842 Commits

Author SHA1 Message Date
Yusuke Wada
85e3c6a275 feat: new validator middleware using 3rd-party & current middleware obsolete (#745)
* feat: introduce HonoRequest with "wrapper pattern" (#733)

* feat: HonoRequest

* avoid `awaits`

* use `raw` instead of `original`

* feat: types for "RPC" support & build-in validator obsolete

* feat: introduce HonoRequest with "wrapper pattern" (#733)

* feat: HonoRequest

* avoid `awaits`

* use `raw` instead of `original`

* create generic middleare for 3rd-party validator

* indent

* support multiple validators and refactor

* remove unsed lines

* denoify
2023-01-19 22:40:13 +09:00
Yusuke Wada
a6d54dbff3 feat: introduce HonoRequest with "wrapper pattern" (#733)
* feat: HonoRequest

* avoid `awaits`

* use `raw` instead of `original`
2023-01-19 22:40:13 +09:00
Yudai Nakata
8dfdba9b44
build: validate package exports after build (#824) 2023-01-19 22:32:11 +09:00
Yusuke Wada
dd830d405a v2.7.3 2023-01-18 09:29:18 +09:00
Yusuke Wada
3e0f5dae31
fix: fixed type error for optional parameters (#814) 2023-01-18 09:25:37 +09:00
Yusuke Wada
da0a7ce55c
fix(context): enable destruction such json (#813)
This will fix #812
2023-01-18 08:23:58 +09:00
华晨
7103fe8426
remove unnecessary individual strict mode family options (#805) 2023-01-16 09:52:52 +09:00
Yusuke Wada
7126cf254e v2.7.2 2023-01-09 00:33:00 +09:00
Yusuke Wada
4298f8266a
fix(cors): fix bugs handling pre-flight (#792) 2023-01-09 00:30:53 +09:00
Taishi Naritomi
897c4017b7
fix: package.json exports static-router (#776) 2023-01-04 17:49:48 +09:00
Yusuke Wada
c6969533a7
chore: update license, contributors as the copyright holders (#769) 2023-01-02 19:18:59 +09:00
Yusuke Wada
cce0525965 v2.7.1 2022-12-30 10:04:11 +09:00
Yusuke Wada
90de083e1d chore: denoify 2022-12-30 10:01:46 +09:00
Yusuke Wada
a1b0ed1c55
chore(validator): show warnings about the breaking changes (#760) 2022-12-30 09:56:36 +09:00
Yusuke Wada
16896f936f
docs(migration): write about validator middleware (#759) 2022-12-30 09:45:52 +09:00
Yusuke Wada
aa080a8cec v2.7.0 2022-12-27 23:10:37 +09:00
Taishi Naritomi
ac7fcfaff2
fix package.json & tsconfig.build.json (#747)
Fix #668
2022-12-27 22:59:23 +09:00
Tom Lienard
884b287f3d
feat: Lagon support with runtime detection & tests (#742)
* feat: Lagon support with runtime detection & tests

* ci: build before running test:lagon

* refactor: remove mentions of Lagon since it's still in dev

* test: enable ETag test
2022-12-25 01:42:59 +09:00
Yusuke Wada
4f772ddb44 docs(readme): fixed shields.io badage image url 2022-12-21 06:42:27 +09:00
Yusuke Wada
720d0c3ce2 v2.6.2 2022-12-14 22:14:28 +09:00
Yusuke Wada
9a6e4c1802
perf(context): c.text() returns a response immediately if headers is empty (#722) 2022-12-14 22:03:02 +09:00
Yusuke Wada
d755ed50b5
fix(request): req.param() should return undefined not "undefined" (#721) 2022-12-14 01:07:07 +09:00
Yusuke Wada
c6b434addd refactor: shorten 2022-12-13 20:36:30 +09:00
Yusuke Wada
b1973d0c7f
fix(type): make SchemaToProp work correctly (#720) 2022-12-13 17:22:33 +09:00
Yusuke Wada
e6635e9997 chore: denoify 2022-12-12 22:10:14 +09:00
Ren Hiyama
b1fbaecbec
Log a more detailed error stack. (#719) 2022-12-12 22:01:42 +09:00
Yusuke Wada
52ef58396e v2.6.1 2022-12-11 11:15:13 +09:00
Yusuke Wada
fdea3b1cc6
fix(type): infer types correctly (#715) 2022-12-11 11:05:30 +09:00
Yusuke Wada
3def9b12c0
fix(type): fix the type mismatch if using Handler as middleware (#714)
* fix(type): fix the type mismatch if using `Handler` as middleware

* remove a line
2022-12-10 23:11:27 +09:00
Yusuke Wada
7e8226623a v2.6.0 2022-12-10 17:21:06 +09:00
Yusuke Wada
023d1738f0 chore: denoify 2022-12-10 17:16:04 +09:00
Yusuke Wada
59bb0b1a40
feat(handler): "schema" allow normal types (#700)
* feat(handler): "schema" allow normal types

* check types for handler+validator+handler pattern

* denoify

* improve type definitions
2022-12-10 16:37:14 +09:00
unworthyEnzyme
34231435a6
fix: cookie should return string | undefined (#709)
* `cookie` should return `string | undefined`

* update the tests
2022-12-10 01:09:18 +09:00
Yusuke Wada
6c294039c1 v2.5.10 2022-12-08 21:51:04 +09:00
Yusuke Wada
a5b8b44793
fix(validator): enable checking undefined in rules (#708) 2022-12-08 21:45:54 +09:00
Taku Amano
6d5de04743
fix(reg-exp-router): bug of "star and all" routing (#707)
* fix(reg-exp-router): Comparisons between middleware must be checked in both orientations.

* refactor(reg-exp-router): Simplify the conditions.

* chore: denoify

* fix(reg-exp-router): Copy middleware if the method of new middleware is METHOD_NAME_ALL.

* chore: denoify
2022-12-08 20:11:08 +09:00
Yusuke Wada
4c89a7ad54 v2.5.9 2022-12-08 00:59:11 +09:00
Yusuke Wada
cf73de1344
fix(trie-router): bug for routing orders with named param (#704) 2022-12-08 00:54:55 +09:00
Yusuke Wada
08a1b7843d v2.5.8 2022-12-05 18:33:33 +09:00
Jayden
760ae30251
Fix detecting node runtime (#696)
* Fix

* Denoify

* Avoid error in other runtime

* chore: remove unnecessary config testPathIgnorePatterns (#697)

* Fix vercel

Co-authored-by: Horie Issei <issei.horie@is2ei.com>
2022-12-02 11:28:49 +09:00
Horie Issei
7a146a6f3f
chore: remove unnecessary config testPathIgnorePatterns (#697) 2022-12-02 02:18:00 +09:00
Dario Piotrowicz
9d73771d49
chore: fix lint warnings (#694) 2022-12-01 07:49:28 +09:00
Yusuke Wada
0774067e20 v2.5.7 2022-12-01 00:13:57 +09:00
Arnaud Dagnelies
9af95c886e
fix: Updated CORS (#693)
* Updated CORS

Do not call `next` for OPTIONS pre-flight requests to avoid side effects and more sensible defaults.

* restoring default cors headers

* restoring cors default allowed methods to avoid breaking change

* Deno dist stuff
2022-12-01 00:11:06 +09:00
Dario Piotrowicz
1f43164da5
Fix Validation of optional empty/undefined arrays (#690)
* * fix(validator): allow empty and undefined optional arrays

fix the bug of empty and undefined array causing a validation fail
when those are anyways optional

resolves #677

* denonify changes
2022-11-30 19:48:43 +09:00
Taku Amano
86699c1868
fix(reg-exp-router): Copy from METHOD_NAME_ALL for new methods (#691)
* fix(reg-exp-router): Copy from METHOD_NAME_ALL for new methods

* chore: denoify

* fix(reg-exp-router): Initialize both middleware and routes.

* chore: denoify

* fix(reg-exp-router):Fix middleware search routine.

* chore: denoify
2022-11-30 10:08:28 +09:00
Dario Piotrowicz
07efdb5103
fix(validator): fix subsequent nested objects names (#683)
* fix(validator): fix subsequent nested objects names

fix the bug of having subsequent objects inside a nested structure
causing the validator to forget the previous keys in the scheme's path

fixes point 1 of #677

* deonify changes
2022-11-29 22:02:20 +09:00
Taku Amano
e9a54bb8fc
fix(reg-exp-router): Allows registering a star after a long prefix. (#684)
* fix(reg-exp-router): Allows registering a star after a long prefix.

* fix(reg-exp-router): It now works even if a short GET is registered after a long ALL.

* chore: denoify
2022-11-28 22:20:40 +09:00
Yusuke Wada
9f7b5de9aa chore: denoify 2022-11-28 08:45:57 +09:00
Dario Piotrowicz
35ab653f1b
fix(validator): fix jsons validation after arrays (#680)
* fix(validator): fix jsons validation after arrays

fix the bug of `v.json()` calls made after a `v.array()` to be mistakenly
considered as still being inside the array

fixes one of the issues mentioned in #677

* fixup! fix(validator): fix jsons validation after arrays

create new RecursiveValidator class

* fixup! fix(validator): fix jsons validation after arrays

remove RecursiveValidator class
2022-11-28 08:17:26 +09:00