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

2153 Commits

Author SHA1 Message Date
EdamAmex
082862bb7d
chore(build): fix progress of log (#3665)
* chore(build): fix progress of log

* change implement

* revert
2024-11-14 15:15:59 +09:00
EdamAmex
8eff3f2ea7
docs: changed as even smaller (#3664) 2024-11-14 04:17:30 +09:00
Yusuke Wada
d4052153d8 v4.6.10 2024-11-13 17:34:04 +09:00
Taku Amano
4349735823
fix(middleware/combine): prevent c.req.routeIndex from being changed (#3663)
* test(middleware/combine): add test for every middleware

Co-authored-by: Paweł Dąbrowski <dabrowskip9@gmail.com>

* refactor(compose): Loosen `compose` parameter types

The current implementation of `compose` does not use some elements of the received middleware,
so they do not have to be passed on.

* fix(middleware/combine): prevent `c.req.routeIndex` from being changed

---------

Co-authored-by: Paweł Dąbrowski <dabrowskip9@gmail.com>
2024-11-13 17:31:06 +09:00
EdamAmex
7b308358f4
refactor(router): use # for private props to reduce the minified file size (#3660) 2024-11-13 04:38:10 +09:00
EdamAmex
7e17b76ce9
perf(trie-router): optimize and remove unnecessary processes (#3647)
* perf(trie-router): remove unnecessary processes and speed up

* revert (4)

* fix
2024-11-12 12:16:19 +09:00
EdamAmex
61bee9f651
refactor(hono-base): remove unneeded processes and variables (#3649) 2024-11-09 16:02:21 +09:00
rwv
8a8a576e5a
docs(service-worker): fix module docs for service worker adapter (#3645)
change from `Cloudflare Workers` to `Service Worker`
2024-11-08 15:47:27 +09:00
oussamasf
65f2a3be93
fix(serveStatic): add guard to prevent reading empty folders (#3639)
Fixes  #3628

* fix(serveStatic): add guard to prevent reading empty folders

* fix(serveStatic): remove unnecessary Deno.stat

* test(serveStatic): add test cases related to isDir guard
2024-11-08 10:06:53 +09:00
EdamAmex
a6ccfa29ca
chore(build): validate if exporting is correct in package.json and jsr.json (#3638)
* feat(build): for both exports to be the same

* some fix

* fix exclude of coverage

* update

* stylish error message and add comment

* revert auto lint

* chore: format
2024-11-07 17:37:53 +09:00
EdamAmex
48d2adcf73
refactor(hono-base): use object abbreviation notation (#3640) 2024-11-07 15:43:17 +09:00
EdamAmex
4598d7a20f
fix(jsr): fix missing exports (#3636) 2024-11-07 10:55:02 +09:00
EdamAmex
394a8f50df
chore: bump devDependencies (#3633)
* chore: bump devDependencies

* fix

* chore: format
2024-11-06 15:45:30 +09:00
Taku Amano
ebd1a0ecd3
ci(deno): merge deno runtime coverage (#3632) 2024-11-06 15:37:36 +09:00
Yusuke Wada
0a18c020c7
chore: format no-response.yml (#3622) 2024-11-04 14:56:58 +09:00
Yusuke Wada
7c050b2840
chore: deno install before jsr publishing (#3621) 2024-11-04 14:50:26 +09:00
Yusuke Wada
791d07a9e5
chore: fix jsr release workflow (#3620)
* chore: fix jsr release workflow

* remove the break
2024-11-04 14:32:41 +09:00
Yusuke Wada
3971f92878 v4.6.9 2024-11-04 14:10:41 +09:00
EdamAmex
d717a4fabf
fix(utils/crypto): fix types of crypto utility (#3614)
* fix(utils/crypto): fix types of crypto utility

* fix lint
2024-11-04 14:03:47 +09:00
Taku Amano
22db73f461
fix(middleware/etag): generate etag hash value from all chunks (#3604)
* fix(middleware/etag): generate etag hash value from all chunks

* refactor(middleware/etag): returns immediately if digest cannot be generated.

* refactor(utils/crypto): remove ReadableStream support

* test(middleware/etag): add tests for empty stream and null body

Co-authored-by: Yusuke Wada <yusuke@kamawada.com>

---------

Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2024-11-04 08:53:56 +09:00
EdamAmex
6b9fb24874
fix(helper/websocket): allow custom events to be passed to generics (#3616)
* fix(helper/websocket): allow custom events to be passed to generics

* chore: disable any

* add tests

* patch

* test patch
2024-11-03 16:14:03 +09:00
Yusuke Wada
ae6165b994
refactor: use # for private methods to reduce the minified file size (#3596)
* refactor: use `#` for private methods to reduce the bundle size

* use `#` for routers

* defined `#newResponse` with a method style

* Swap c.#newResponse and c.newResponse

* make `#newResponse` as `#method() {}` style
2024-11-03 08:31:59 +09:00
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