0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-24 19:26:56 +01:00
Commit Graph

2085 Commits

Author SHA1 Message Date
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
m-shaka
331166471c
fix(types): rm ExcludeEmptyObject to fix massively increased type instantiations (#3507)
* fix: mv ExcludeEmptyObject to hono-base.ts

* refactor: rm ExcludeEmptyObject
2024-10-14 19:44:07 +09:00
Shotaro Nakamura
bd9effe34f
ci: use Deno v2 for a test running for deno (#3509)
* chore: use Deno v2 for a test running for deno

* use denoland/setup-deno@v2
2024-10-13 16:04:33 +09:00
Yusuke Wada
9986b47253
ci: use Deno v2 (#3506)
* ci: use Deno `v2`

* add `deno install` command

* use `bunx jsr publish --dry-run

* add `oven-sh/setup-bun@v1`
2024-10-12 14:09:21 +09:00
m-shaka
f1a7267948
perf(types): replace intersection with union to get better perf (#3443)
* perf(types): replace intersection with union to get better perf

* revert intersection

* format

* refactor: move ExcludeEmptyObject to utils/type.ts
2024-10-11 18:21:00 +09:00
Yusuke Wada
7c36339d14 v4.6.4 2024-10-11 17:29:52 +09:00
Yusuke Wada
04e5897b7d
refactor(jsx): add override to toStringToBuffer in classes extending JSXNode (#3505) 2024-10-11 16:45:19 +09:00
翠 / green
de7827ee27
fix(service-worker): bind fetch to globalThis (#3500)
* fix(service-worker): bind fetch to `globalThis`

* chore: ignore lint error
2024-10-11 10:11:52 +09:00
Yusuke Wada
d5166dd851
fix(factory): relax Bindings and Variables for createMiddleware (#3498)
* feat(factory): relax Bindings and Variables types

* add a break
2024-10-11 05:42:05 +09:00
Neko Hz
31b4cd414c
fix(types): add key to IntrinsicAttributes (#3474)
* add key to IntrinsicAttributes

* fix format error
2024-10-02 16:24:46 +09:00
TATSUNO “Taz” Yasuhiro
c0d782cd64
test(deno): remove duplicated app.get (#3469) 2024-09-30 15:44:32 +09:00
TATSUNO “Taz” Yasuhiro
f1ec415be0
chore(test): include bun coverage (#3457) 2024-09-28 11:54:31 +09:00
TATSUNO “Taz” Yasuhiro
bc20d30118
chore(test): suppress no-unused-vars 'x' is assigned a value but only used as a type (#3451) 2024-09-26 16:32:44 +09:00
Yusuke Wada
f87c22104e
chore: remove crypto-js from dev dependencies (#3447) 2024-09-24 21:43:49 +09:00
Yusuke Wada
200c4f9ea8
chore: upgrade dependencies (#3446)
* chore: upgrade dependecies

* fix wrangler version
2024-09-24 20:49:31 +09:00
Yusuke Wada
c34e602206 v4.6.3 2024-09-24 12:34:26 +09:00
Yusuke Wada
246a06aa1d
feat(serve-static): support absolute root (#3420)
* feat(serve-static): support absolute root

* add bun runtime test

* don't use `Request`

* add code for deno

* remove unnecessay `console.log`

* use `normalizeFilePath` instead of `URL`

* use `URL` for `options.root`

* don't allow directory traversal and fix the behavior when root including `../`
2024-09-24 12:23:35 +09:00
Taku Amano
7779fca9a5
feat(jsx/precompile): Normalization and stringification of attribute values as renderToString (#3432)
* feat(jsx/precompile): Normalization and stringification of attribute values as `renderToString`

* fix(jsx/precompile): boolean attributes are processed by compiler

* test: fix test data for jsx (precompile and react-jsx)

* fix(jsx/precompile): remove unnecessary import statement

* refactor(jsx/precompile): Normalization of keys from JSX to HTML is done by runtime, not by hono
2024-09-24 12:12:51 +09:00
Thomas Cruveilher
27961dcf31
feat(request): Make request.ts available throught JSR for frameworks that need to instantiate HonoRequest (#3425)
* Update jsr.json

* Update jsr.json
2024-09-24 12:09:54 +09:00
TinsFox
991a57bc00
feat(jwt): make JwtVariables generic for improved type safety (#3428) 2024-09-24 12:03:44 +09:00
Hiroki Isogai
8130a67da1
feat(secureHeader): add CSP Report-Only mode support (#3413) 2024-09-24 12:01:05 +09:00
Paweł Dąbrowski
fe0a82a615
fix(combine/every): make every middleware work with short-circuiting middlewares (#3441) 2024-09-24 11:58:39 +09:00
Neko Hz
ad0bba0964
fix(types): useSyncExternalStore type (#3437)
Align with react
note: the parameter is not used in function body
2024-09-23 17:18:37 +09:00
m-shaka
4878fcf57c
ci: prettify type check result and rm a comment (#3442) 2024-09-23 16:16:31 +09:00
m-shaka
e1eb98d293
perf(types): use homomorphic mapped type to reduce conditional branches (#3440) 2024-09-23 15:22:17 +09:00
m-shaka
1d8028a70d perf(types): rm conditions to get better performance (#3439) 2024-09-23 15:19:06 +09:00
Taku Amano
c502aa4331
refactor(jsx/streaming): Clarified the type of renderToReadableStream. (#3434) 2024-09-23 14:23:21 +09:00
m-shaka
66df4e1296
ci: Type check perf (#3406)
* chore: add scripts to monitor type check performance

* chore: add jobs for type-check-perf-monitoring

* chore: rm a comment

* refactor: mv type-check-perf perf-measures/type-check

* rm .eslintrc.cjs

* chore: ignore *result.txt
2024-09-22 18:11:32 +09:00
Yusuke Wada
dfbd717263
chore: rename runtime_tests to runtime-tests (#3419)
* chore: rename `runtime_tests` to `runtime-tests`

* fixed GitHub workflow
2024-09-17 14:51:43 +09:00
Yusuke Wada
b5c6285b84 v4.6.2 2024-09-17 10:15:40 +09:00
Taku Amano
27a57c3f67
fix(serve-static): use application/octet-stream if the mime type is not detected (#3415) 2024-09-17 10:07:36 +09:00
Taku Amano
0edb243a74
perf(serve-static): performance optimization for precompressed feature (#3414)
* perf(serve-static): use "Set" for checking precompressed

* refactor: define COMPRESSIBLE_CONTENT_TYPE_REGEX in utils

* refactor: set "Content-Type" header only if the content is defined

* perf(serve-static): find compressed file only if the mime type is compressible
2024-09-16 13:06:34 +09:00
Yusuke Wada
5f78e4e1b3
chore(lint): ESLint v9 (#3393)
* chore(lint): ESLint v9

* run prettier
2024-09-12 12:05:41 +09:00
Yusuke Wada
e0d17a3955 v4.6.1 2024-09-11 22:46:59 +09:00
Yoshiya Hinosawa
85c7dc6263
fix(build): improve addExtension esbuild plugin (#3405) 2024-09-11 22:43:33 +09:00
Yusuke Wada
73ff6c0e82 v4.6.0 2024-09-11 21:03:35 +09:00
Yusuke Wada
2da003b36f
Merge pull request #3394 from honojs/next
Next
2024-09-11 21:00:12 +09:00
Yusuke Wada
743f66c13a
fix(bearer-auth): typo (#3404) 2024-09-11 15:25:08 +09:00
Marcel Overdijk
c240ea5590
feat(bearer-auth): added custom response message options (#3372)
* feat(bearer-auth): added custom response message options

* feat(bearer-auth): using specific MessageFunction type

* feat(bearer-auth): refactored to du-duplicate code
2024-09-11 11:13:27 +09:00
Marcel Overdijk
c50be25c9e
feat(basic-auth): added custom response message option (#3371)
* feat(basic-auth): added custom response message option

* feat(basic-auth): using specific MessageFunction type
2024-09-11 11:10:17 +09:00
Yusuke Wada
a86f3cea5f
feat(serve-static): add onFound option (#3396) 2024-09-10 14:09:19 +09:00
kbkn3
3c4d4c2b59
fix(secure-headers): optimize getPermissionsPolicyDirectives function (#3398) 2024-09-09 21:54:27 +09:00
nitedani
c2b0de42a0
feat(context): make fetch Response headers mutable (#3318)
* make headers mutable

* add test

* immutability check

* revert change

* fix(context): clone response object if it's immutable

* test(runtime-node): specify ip address as numbers

* test(runtime-node): use address from server info instead of `127.0.0.1`

* test(runtime-node): use large date to test compress

---------

Co-authored-by: Taku Amano <taku@taaas.jp>
Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2024-09-08 15:59:42 +09:00
Taku Amano
8ca155ec9b
feat(helper/streaming): Support Promise<string> or (async) JSX.Element in streamSSE (#3344)
* feat(helper/streaming): Support Promise<string> or (async) JSX.Element in streamSSE

* refactor(context): enable to pass Promise<string> (includes async JSX.Element) to resolveCallback
2024-09-08 15:57:45 +09:00
Ivan Gabaldon
c8d5e3461d
feat(serveStatic): add precompressed option (#3366)
* Initial update

* typo

* sort new logic

* remove extra cast

* add more testing

* fix content existence
2024-09-08 15:55:17 +09:00
Marcel Overdijk
fdf77862ac
feat(contextStorage): added Context Storage Middleware (#3373) 2024-09-08 15:53:01 +09:00
Yusuke Wada
39600c4449
feat(jsx-renderer): set Content-Encoding when stream is true (#3355) 2024-09-08 15:50:54 +09:00