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

1762 Commits

Author SHA1 Message Date
Yusuke Wada
ab7144871b
refactor(cloudflare-workers): remove @cloudflare/workers-types (#2773)
* refactor(cloudflare-workers): remove `@cloudflare/workers-types`

* add `@denoify-ignore`

* add missing comment
2024-05-24 06:01:12 +09:00
fzn0x
568f87258d
feat(utils/body): add dot notation support for parseBody (#2675)
* feat: add dot notation support for parseBody

* denoify & lint

* refactor: default value and jsdoc

* denoify & lint

* test: more tests

* fix: destruct option key value to false if value is undefined

* types: remove object

* refactor: handle nested values inside a function

* fix: remove unusual import

* denoify & lint

* refactor: explicitly state just all and dot

* fix: issue raised by multiple append on the same dot notation key

* types: dont use {}

* chore: denoify & lint

* fix(types): Deno compatible types

* fix: should override value if  option is false

* chore: denoify & lint

* make option typings partials and should not update file object properties

* refactor: make code less complicated

* chore: add tsdoc

* chore: remove comment

* refactor(utils/body): reduce the complexity of O(mn)

* chore: remove parseAllValues and change value to BodyDataValue type
2024-05-23 05:49:24 +09:00
Taku Amano
778ac10e84
feat: decode percent-encoded path in getPath (#2714)
* feat: decode percent-encoded path in `getPath`

* refactor: Stop decoding URIs in the `param()` method, since they are already decoded in `getPath()`

* test: add tests for decoding URI in path

* chore: denoify

* Revert "refactor: Stop decoding URIs in the `param()` method, since they are already decoded in `getPath()`"

This reverts commit 7192497e69.

* refactor: Replace "%25" before applying decodeURI() for avoid double decoding

Co-authored-by: Szymon Marczak <36894700+szmarczak@users.noreply.github.com>

* chore: denoify

* refactor(utils): check existence of "%25" before replacing it with "%2525"

Co-authored-by: Szymon Marczak <36894700+szmarczak@users.noreply.github.com>

* feat(utils/url): Changed URL decoding to skip invalid sequences and decode as much as possible

* chore: denoify

---------

Co-authored-by: Szymon Marczak <36894700+szmarczak@users.noreply.github.com>
2024-05-23 05:44:00 +09:00
watany
8cb59e400f
feat(middleware): Introduce Timeout Middleware (#2615)
* 0.1

* v0.2

* 1.0

* multi runtime

* adding duration

* fix

* interface

* fix

* only input number

* return a named function

* setting exception

* simply

* rename type

* adding typesVersions

* typo

* add JSDoc

* denoify
2024-05-23 05:40:09 +09:00
Shotaro Nakamura
a8a5fb97ca
feat: Introduce ConnInfo helper/adapter (#2595)
* feat: Introduce ConnInfo helper/adapter

* chore: format code

* chore: run ESLint and add `// @denoify-ignore`

* chore: denoify

* feat: export conninfo types

* fix: fix test

* feat(conninfo/bun): support that env be {server: server}

* chore: eslint

* chore: `lint:fix`

* fix(conninfo/bun): English syntax for error message

* fix: don't use singleQuote in string
2024-05-23 05:39:18 +09:00
Yusuke Wada
9deb12fdb5
fix(http-exception): prioritize the status code (#2767)
* fix(http-exception): prioritize the status code

* denoify
2024-05-23 05:20:37 +09:00
watany
de889937cf
fix(secure-header): Replace NodeJS Buffer API (#2761)
* fix(secure-header): Replace NodeJS Buffer API

* change api
2024-05-22 18:30:20 +09:00
Yusuke Wada
75a7a09fc5 v4.3.9 2024-05-21 09:02:58 +09:00
Ilias YAHIA
a437161c2b
feat(aws-lambda): add support for alb multiValueQueryStringParameters (#2751) 2024-05-21 08:59:31 +09:00
Yusuke Wada
827cf60459
fix(factory): export CreateHandlersInterface (#2752)
* fix(factory): export `CreateHandlersInterface`

* denoify
2024-05-21 08:56:39 +09:00
Yusuke Wada
7f309ecb9d v4.3.8 2024-05-19 20:02:16 +09:00
Arkadii Shvartsman
ba644d4c00
fix(hono-jsx): make ref unrequried for forward ref (#2715)
* make ref unrequried for forward ref

* make ref unrequried for forward ref
2024-05-19 13:41:04 +09:00
Jari Aarniala
ee9ccf8d02
fix(context): Retain all cookies when passing ResponseInit to c.body (#2690)
* Add test to illustrate disappearing cookies

* Append cookie headers in newResponse
2024-05-19 07:19:21 +09:00
Yusuke Wada
9540e69aef
refactor(secure-headers): don't use Partial for the options (#2713)
* refactor(secure-headers): don't use `Partial` for the option

* denoify
2024-05-19 06:55:43 +09:00
Yusuke Wada
b7d72fd6dc
refactor(timing): don't use Partial for the options (#2712)
* refactor(timing): dont' use `Partial` for the options

* denoify
2024-05-18 19:05:01 +09:00
fzn0x
d87d996443
refactor(utils/jwt): remove some any (#2684)
* refactor(jwt): remove some `any`

* refactor(types): remove type confusion

* chore: denoify & lint

* chore: remove eslint comment
2024-05-17 07:02:43 +09:00
Yusuke Wada
f7225eefe6
test(validator): compatibility with Node.js v20.13.1 (#2682) 2024-05-16 08:08:12 +09:00
Yusuke Wada
753fcb4231 v4.3.7 2024-05-15 22:10:40 +09:00
Joe Harlow
cd8f15cf0a
fix(method-override): remove un-needed import of globally available object (#2679) 2024-05-15 21:59:09 +09:00
Rahul Mishra
e709821729
feat(utils/cookie): allow setting cookie SameSite attribute in lowercase too (#2668) 2024-05-14 17:24:54 +09:00
Ilias YAHIA
e1257f14e6
feat(aws-lambda): add alb event processor (#2657)
* feat(aws-lambda): add alb event processor

* fix: formatting issue
2024-05-13 14:41:57 +09:00
watany
422cc30e60
doc(ssg): Define the default value for Content-Type (#2666)
* doc(ssg): Define the default value for Content-Type

* denoify
2024-05-13 14:38:36 +09:00
Yusuke Wada
d0034c6948 v4.3.6 2024-05-13 07:55:57 +09:00
Yusuke Wada
506f7f1d1b
fix(utils/body): support multiple Files (#2665)
* fix(utils/body): support multiple `File`s

* denoify

* Make CI `Main` uses Node.js v20
2024-05-13 07:47:39 +09:00
Aditya Mathur
e1989ff74e
feat(cache): improved customizability (#2652)
* feat(cache): cacheName can accept functions too

* feat(cache): custom key generator option added

* chore(cache): updated deno files

* fix(cache): formatted and linted

* test(cache): added test case for customizability
2024-05-13 07:05:00 +09:00
Yusuke Wada
f3f6f029a6 v4.3.5 2024-05-12 16:19:07 +09:00
Yusuke Wada
e5975edc73
perf(types): add type annotations (#2663)
* feat(jsr): reduce slow types (#2369)

* feat(jsr): reduce slow types

* fix: use allow function

* chore: format code

* chore: denoify

* use `fn = () => {}` syntax for backwards compatible

* add type annotations and denoify

* add type annotations for helpers and denoify

* tweak

---------

Co-authored-by: Shotaro Nakamura <79000684+nakasyou@users.noreply.github.com>
2024-05-12 16:07:11 +09:00
Taku Amano
6db1cc63d5
feat(hono-base): tweaks fetch signature for better compatibility with deno serve (#2661) 2024-05-11 23:37:23 +09:00
Yusuke Wada
e460f024c6
refactor(context): remove some any (#2658)
* refactor(context): remove some `any`

* denoify
2024-05-11 07:00:16 +09:00
Yusuke Wada
dd52c56736 v4.3.4 2024-05-09 22:51:04 +09:00
Taku Amano
cd35af7655
feat(jsx/dom): support getServerSnapshot in useSyncExternalStore (#2646)
* feat(jsx/dom): support getServerSnapshot in useSyncExternalStore

* chore: denoify

* test: add tests for hooks with `.toString()`

* test: fix typo.

* refactor: set the flag to false at the end of top level render

* chore: denoify
2024-05-09 22:47:06 +09:00
Moritz Rebbert
aebaa28462
feat(validator): check for json subtypes in validator (#2634)
* check for json subtypes in validator

* formatting and deno_dist added

* review fix, string#match -> regexp#test

* format & lint
2024-05-09 16:23:57 +09:00
Yusuke Wada
f7faf38f6f
chore: update the pull request template (#2647) 2024-05-09 12:28:40 +09:00
Yusuke Wada
6e471ef7dd v4.3.3 2024-05-08 14:30:54 +09:00
Yusuke Wada
799a8d8ae5
fix(validator): form supports multiple values with foo[] (#2639)
* fix(validator): `form` supports multiple values `foo[]`

* denoify
2024-05-08 14:22:17 +09:00
Miguel Oliveira
413c936c60
refactor: improve parseBody function and docs (#2628)
* refactor: improve parsebody function and docs

* refactor: Improve test and function from color function

* chore: remove comments

* chore: use the previous function

* refactor: remove the if operator
2024-05-08 05:52:36 +09:00
Aluisio Amorim
c95e1355cf
fix(aws-lambda): avoid duplicating already set headers (#2585)
* fix: avoid duplicating already set headers

* test: add missing content-type header
2024-05-07 05:44:26 +09:00
Yusuke Wada
4cd2dffe13
fix(factory): support createFactory() destruction (#2623)
* fix(factory): support `createFactory()` destruction

* denoify

* fixed the arg

* denoify
2024-05-06 20:19:32 +09:00
Yusuke Wada
0fafd7aa8b
chore(eslint): enable @typescript-eslint/unbound-method (#2622)
* chore(eslint): enable `@typescript-eslint/unbound-method`

* denoify
2024-05-06 17:38:34 +09:00
Yusuke Wada
cb2416042c
fix(types): relax the type of c.req.param() (#2613)
* fix(types): relax the type of `c.req.param()`

* denoify
2024-05-05 09:37:29 +09:00
Yusuke Wada
a900fbeda9 v4.3.2 2024-05-05 08:23:59 +09:00
Yusuke Wada
e4c3e3a352
fix(types): correct inferring when Method has Endponts as Union (#2610)
* fix(types): correct inferring when Method has Endponts as Union

* rename the type

* denoify

* simplify

* denoify
2024-05-05 08:19:02 +09:00
Yusuke Wada
6946f16e5c v4.3.1 2024-05-04 18:20:43 +09:00
Trung Dang
7e87a3ba4a
fix(types): ToSchema compatibility (#2605)
* feat(types): reduce unnecessary extends check

* fix: `ToSchema` backward compat with `I` as `Input['in']`

* fix: `ToSchema` backward compat for `R`/`O` argument

* chore: denoify
2024-05-04 18:16:28 +09:00
Yusuke Wada
d44be955c0 v4.3.0 2024-05-03 19:36:38 +09:00
Yusuke Wada
1564cdeee0
Merge pull request #2600 from honojs/next
Next
2024-05-03 19:28:47 +09:00
Jonah Snider
78fa4cab13
feat(timing): allow crossOrigin in TimingOptions to be a function (#2359)
* feat: allow crossOrigin in TimingOptions to be a function

* chore: denoify

* chore: undo accidental change

* test: add tests
2024-05-03 09:18:45 +09:00
Yusuke Wada
791b9690cc Merge branch 'main' into next 2024-05-03 09:12:58 +09:00
Trung Dang
fb07fb4012
feat(hc): add init option (#2592) 2024-05-03 09:02:54 +09:00
Yusuke Wada
11a20a7db3
feat(factory): add createApp() (#2573)
* feat(factory): add `createApp()`

* add tests

* denoify
2024-05-03 08:38:25 +09:00