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

2131 Commits

Author SHA1 Message Date
TATSUNO “Taz” Yasuhiro
e43f203a2a
perf(helper/cookie): fast-path for name specified (#3608)
* perf(helper/cookie): fast-path for a specific key

* perf(helper/cookie): fast-path for a specific key not found

* perf(helper/cookie): added test for missing case

* perf(helper/cookie): fix tests

* perf(helper/cookie): fix tests

* perf(helper/cookie): cleanup tests
2024-11-03 07:58:31 +09:00
EdamAmex
e9830c6ba1
perf(utils): use | 0 instead of Math.floor (#3605) 2024-11-03 07:50:10 +09:00
EdamAmex
8d775dcdf5
chore: automatically close issues marked as “not bug” over time (#3611)
* ci: automatically close issues marked as “not bug” over time

* Update no-response.yml

* add comment
2024-11-03 07:40:11 +09:00
EdamAmex
3aad86c78c
refactor(utils/mime): make object and type commonality (#3606)
* refactor(utils/mime): make object and type commonality

* change to <string, BaseMime>
2024-11-02 19:43:49 +09:00
TATSUNO “Taz” Yasuhiro
f3577a16b0
perf(middleware/logger): optimize color status (#3603)
* refactor(logger): optimize colors status

* refactor(logger): add failing test

* refactor(logger): remove unreachable cases. Response accepts 200-599

* refactor(logger): added fallback

* perf(middleware/logger): cleanup tests

* perf(middleware/logger): test unsupported status code forcibly
2024-11-02 16:16:47 +09:00
EdamAmex
9f21a95079
chore(ISSUE_TEMPLATE): encourage them to add a version if possible (#3599)
* chore(ISSUE_TEMPLATE): encourage them to add a version if possible

* Update 1-bug-report.yml
2024-11-02 16:11:30 +09:00
Minsoo Choo
08e2912eb8
ci: Use latest version of Bun and Deno for CI (#3554)
* workflow: update setup-bun to v2

* workflow: use bun 1.1.33

* workflow: use deno 2.x
2024-11-02 16:08:31 +09:00
Hyeseong Kim
01277aa389
feat(context): allow URL object on c.redirect() (#3609)
* feat(context): allow URL object on `c.redirect()`

* Update src/context.ts

Co-authored-by: EdamAmex <121654029+EdamAme-x@users.noreply.github.com>

---------

Co-authored-by: EdamAmex <121654029+EdamAme-x@users.noreply.github.com>
2024-11-01 18:04:33 +09:00
Taku Amano
224ec367f3
refactor(context): use simple for-of syntax (#3598) 2024-11-01 18:02:08 +09:00
TATSUNO “Taz” Yasuhiro
ae99d86d89
refactor: remove useless spread (#3600)
* refactor: remove useless spread

* refactor: remove useless spread fallback

* refactor(adapter/lambda-edge): remove unneeded ternary operators

* refactor: remove useless fallback

---------

Co-authored-by: EdamAmex <121654029+EdamAme-x@users.noreply.github.com>
2024-11-01 10:30:49 +09:00
TATSUNO “Taz” Yasuhiro
1af7e58ae0
refactor: compare with undefined directly (#3602) 2024-11-01 10:22:08 +09:00
TATSUNO “Taz” Yasuhiro
c88ead6d72
refactor(helper/html): Prefer Array.isArray over instanceof Array (#3601) 2024-11-01 10:14:44 +09:00
EdamAmex
4dd8b2b435
perf(context): improve performance of context (setHeaders) (#3592)
* perf(context): improve performance of context (newResponse, setHeaders)

* Revert context.ts
2024-10-31 15:55:49 +09:00
EdamAmex
a16bcda120
perf(utils/url): improve performance of url utility (#3593)
* perf(utils/url): improve performancec of url utility

* Revert cache length
2024-10-31 15:31:40 +09:00
EdamAmex
7183bbe41a
fix(hono-base): remove .matchRoute and reduce bundle size (#3595) 2024-10-31 15:25:04 +09:00
shray sharma
fea5947ea2
refactor(timing/utils-body): a few minor edits (#3557)
* upd

* upd

* upd

* upd

* Add files via upload
2024-10-31 11:50:41 +09:00
EdamAmex
caeecf99a8
fix(types): remove any and fix types of adapter/deno (#3291)
* fix(types): remove any and fix types of adapter/deno

* fix some errors

* refactor jsdoc
2024-10-30 17:58:08 +09:00
EdamAmex
7a9e387af6
perf(router): use .concat instead of spread syntax (#3584)
* perf(reg-exp-router): use `.concat` instead of spread syntax

* chore: format
2024-10-30 15:52:17 +09:00
EdamAmex
efd3d04c56
perf(compose): check if it is a instance only once (#3585)
* perf(compose): check if it is a instance only once

* chore: fix syntax

* chore: sort if condition
2024-10-30 15:29:09 +09:00
Taku Amano
3164326351
fix(jsx/dom): fix dom rendering bugs for fragment. (#3569) 2024-10-30 11:11:55 +09:00
Taku Amano
ea3d799cdf
fix(jsx/dom): fix memo for DOM renderer (#3568)
Fixes #3473
Fixes #3567

* fix(jsx/dom): fix memoization mechanism in dom renderer

* fix(jsx/dom): fix `memo` for DOM renderer

* feat(jsx/dom): implement light weight `memo` function for DOM renderer

* test(jsx/dom): add tests for memoization
2024-10-30 11:04:05 +09:00
Yusuke Wada
2bde76d3b5
fix(req): correct c.req.param decodes invalid percent strings (#3573)
* fix(req): correct `c.req.param` decodes invalid percent strings

* make `tryDecodeURIComponent` as a `const` function

* use `/\%/.test()` for a better performance
2024-10-30 10:59:05 +09:00
mattn
e9de50d7c3
refactor: fix typos (#3583) 2024-10-30 09:44:06 +09:00
Yusuke Wada
3af317f0ef v4.6.8 2024-10-29 15:38:47 +09:00
m-shaka
964aa549c1
fix(types): replace Hono with HonoBase to get better consistency of types (#3580) 2024-10-29 15:25:10 +09:00
EdamAmex
0e0b473071
fix(devcontainer): remove unknown flag on docker-compose (#3582) 2024-10-29 15:17:08 +09:00
EdamAmex
e7732a5f23
feat(header): suggest name of header and combine in one file (#3577)
* feat(header):ssuggest name of header and combine in one file

* chore: format and fix jsr path

* fix: fix types error of testing
2024-10-29 13:37:06 +09:00
Shotaro Nakamura
cb8244aea9
fix(bun/ws): supoort --hot (#3576) 2024-10-29 13:25:50 +09:00
Ariel-Moroshko
745c2919b6
fix(websocket): prevent sending entire buffer when streaming Uint8Array chunks (#3570)
* fix(websocket): prevent full buffer send on Uint8Array chunks

* Fix formatting and line endings for CI compliance
2024-10-29 13:12:54 +09:00
Ariel-Moroshko
a90db7c8dd
fix(websocket): Fix typo in WSContextInit type (#3575) 2024-10-29 13:01:37 +09:00
Cotton Hou
3a59d86533
fix(utils/cookie): partitioned typo in CookieOptions (#3566) 2024-10-27 19:37:17 +09:00
Shotaro Nakamura
f55dc45a31
fix(bun/ws): fix invalid types (#3562) 2024-10-27 10:14:06 +09:00
Yusuke Wada
7e11832526 v4.6.7 2024-10-26 11:19:12 +09:00
EdamAmex
10a5e65e85
perf(router): improve performance of router (#3526)
* perf(router):  improve performance of router

* coverage
2024-10-26 11:04:04 +09:00
Shotaro Nakamura
234b083777
feat(ws): Make WebSocket adapter more changeable (#3531)
* feat(ws): Make WebSocket adapter more changeable

* lint

* format code

* test: add tests

* format code

* lint:fix

* format code

* test: add more tests
2024-10-25 16:09:36 +09:00
Kaan Ozdokmeci
0a99bd3e74
feat(jwt): Support custom secret keys for signing JWTs (#3546)
* Support custom secret keys for signing JWTs

- Expanded key type check to include 'secret' for JWT signing. This aligns importPrivateKey method with importPublicKey method for handling "secret" type keys.

- Added a test case to sign, verify, and decode using a custom secret, ensuring the correct flow and error handling with mismatched keys.

* update comment for rejected private key imports
2024-10-23 17:59:09 +09:00
Yusuke Wada
7735f2f03c
fix(vercel): remove requestContext (#3549) 2024-10-23 09:36:24 +09:00
Yusuke Wada
631c0010ca v4.6.6 2024-10-22 14:18:17 +09:00
Alex Grover
3d8abbc239
fix(client): return query params in $url (#3541) 2024-10-22 14:14:01 +09:00
Pablo Berganza
267186d65e
fix(serve-static): silence NotFound warning on Deno (#3542)
fix(serve-static): silence `NotFound` warning on Deno
2024-10-22 13:40:07 +09:00
Cotton Hou
15938b4896
refactor(secure-headers): refine secureHeadersNonce init (#3535) 2024-10-22 10:31:58 +09:00
Marco Muser
f8664b03a6
chore: podman support for devcontainer (#3529)
* chore: add podman devcontainer support

* chore: remove deprecation warning

* chore: add extensions to devcontainer

---------

Co-authored-by: Marco Muser <marco.muser@enpal.de>
2024-10-20 07:07:22 +09:00
Yusuke Wada
90833d2467
docs(powered-by): add JSDoc (#3520) 2024-10-15 17:50:12 +09:00
Yusuke Wada
89a0ac18ed v4.6.5 2024-10-15 17:33:28 +09:00
Yusuke Wada
c4d19ec48e chore: update the lockfile 2024-10-15 17:26:19 +09:00
Shotaro Nakamura
6cf01e5523
fix(build): remove private fields (#3514)
* fix(build): remove private fields

* chore: format scripts

* test: add test code

* reduce package.json diff

* feat(build): add progress for removing private fields

* feat: rename `scripts` to `build`
2024-10-15 17:23:18 +09:00
Yusuke Wada
aa50e0ab77
Merge commit from fork 2024-10-15 17:16:47 +09:00
Yusuke Wada
f9e6ea7382
fix(factory): revert PR #3498 (#3515) 2024-10-15 11:54:31 +09:00
PatrickJS
fc9cc6da28
feat(powered-by): optional server name (#3492)
* refactor(powered-by): optional server name

* style(powered-by): format

* test(powered-by): test new config

* Update index.test.ts
2024-10-15 11:50:39 +09:00
Yuki Tanaka
cebf4e87f3
fix(cors): avoid setting Access-Control-Allow-Origin if there is no matching origin (#3510) 2024-10-14 21:02:41 +09:00