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

1615 Commits

Author SHA1 Message Date
Yusuke Wada
e675d50046
perf(utils/url): use slice + indexOf for getPath() (#2376)
* perf(utils/url): use `slice` + `indexOf` for `getPath()`

* denoify
2024-03-18 17:40:23 +09:00
Taku Amano
c2a21367e3
fix(router): accept reg exp meta characters in path (#2375)
* fix(router): accept reg exp meta characters in path

* chore: denoify
2024-03-18 17:38:36 +09:00
Jxck
062871d973
feat(utils/cookie): Typesafe cookie options (#2350)
* typesafe cookie options

* typesafe cookie options

* npm run denoify
2024-03-17 10:39:38 +09:00
Yusuke Wada
01ee574894 v4.1.1 2024-03-17 09:50:54 +09:00
Damián Pumar
b827efb3fb
fix(streaming): Fix stream SSE, not necessary close stream. (#2320)
* 🐛 Fix stream SSE, not necessary close stream.

*  Remove unused

*  Add deno files
2024-03-16 23:07:33 +09:00
Yusuke Wada
bc6330c91d
fix(context): set headers correctly if it has this.#headers (#2364)
* fix(context): set headers correctly if it has `this.#headers`

* denoify
2024-03-16 22:18:34 +09:00
Yusuke Wada
dd7561a4f1
fix(jsx-renderer): don't overwrite headers if stream is true (#2363)
* fix(jsx-renderer): dont overwrite headers if stream is `true`

* denoify
2024-03-16 21:40:59 +09:00
trkbt10
72f86509f7
fix(lambda-edge): Lambda@Edge GET/HEAD body error. (#2351)
* Fix: Return undefined body for GET/HEAD methods

* Convert to arrow function

* Remove redundant data check
2024-03-16 21:08:49 +09:00
Yusuke Wada
60d811558e
refactor(jsx-renderer): remove unnecessary comments for eslint (#2361)
* refactor(jsx-renderer): remove unnecessary comments for eslint

* denoify

* debug ci

* remove debug
2024-03-16 21:03:53 +09:00
Yusuke Wada
f64e448346
ci: fix bun version for denoify (#2362) 2024-03-16 21:01:35 +09:00
poteboy
25beca878f
fix(client): Remove trailing slash from /index for precise path matching (#2344) 2024-03-13 08:22:45 +00:00
Yusuke Wada
76864b43f8
fix(context): export ExecutionContext from hono (#2346)
* fix(context): export `ExecutionContext` from `hono`

* denoify
2024-03-13 17:01:26 +09:00
Yusuke Wada
139e863aa2 v4.1.0 2024-03-12 00:56:27 +09:00
Yusuke Wada
c7afb2d13d
Merge pull request #2327 from honojs/next
Next
2024-03-12 00:52:00 +09:00
Jxck
6eaa696c2f
feat(cookie): Add Cookie bis condition check (#2314)
* throw Erro for cookie max-age longer than 400days

* throw Error for cookie with expires longer than 400days

* throw Error for --Secure- cookie without Secure attributes

* throw Error for --Host- cookie without valid settings

* throw Error for Partitioned cookie without Secure attributes

* npm run denoify

* npm run format:fix

* bun run denoify
2024-03-11 05:35:05 +09:00
Yusuke Wada
568f75f87b
fix(websocket): export WebSocket helper for Deno (#2325)
* fix(websocket): export WebSocket helper for Deno

* denoify
2024-03-07 17:35:28 +09:00
Yusuke Wada
c1706dab7f
fix(body-limit): export bodyLimit for Deno (#2324)
* fix(body-limit): export `bodyLimit` for Deno

* denoify
2024-03-07 16:51:09 +09:00
Yusuke Wada
3126beb231
chore: bump up @hono/node-server (#2323)
* chore: bump up `@hono/node-server`

* update lock file
2024-03-07 15:37:16 +09:00
Yusuke Wada
8d8ecf45d9 Merge branch 'main' into next 2024-03-07 15:27:23 +09:00
watany
8ef9b7bb50
refactor(SSG): separate middleware logic (#2315)
* move to middleware

* move core logic

* denoify
2024-03-07 15:17:33 +09:00
Yusuke Wada
4ca5f60def v4.0.10 2024-03-06 07:27:45 +09:00
Shotaro Nakamura
47f5c545f2
feat: Introduce WebSocket Helper / Adapter (#2265)
* feat: Add WebSocket API

* chore: format code

* chore: denoify

* feat: remove `bun-types`

* fix(ws): Cloudflare workers

* feat(ws): Add Deno Adapter

* fix(ws): Add Deno exports to package.json

* feat: test code

* chore: denoify

* chore: format code

* fix: eslint

* chore: createBunWebSocket to createWebSocket

* chore: able to import from index.ts

* feat: add workers test

* feat: add deno test

* typo: `normalizedReceiveData`

* refactor: change way to discrimination client type

* fix: bypass test

* fix: format code and bypass test

* fix: forget to delete `console.log` for debug

* feat(ws): remove `hono/ws/{adapter}` import
2024-03-05 22:04:04 +09:00
Yusuke Wada
2a75c89000 v4.1.0-rc.1 2024-03-04 22:21:49 +09:00
Yusuke Wada
a64be6d828 Merge branch 'main' into next 2024-03-04 22:16:13 +09:00
Yusuke Wada
466bf491a1
feat: introduce Body Limit Middleware using stream (#2309)
* feat: introduce Body Limit Middleware using stream

* denoify

* feat(body-limit): Replace c.req.raw with body limit middleware proxy (#2109)

* fix(body-limit): fix typo

* feat(body-limit): Replace `c.req.raw` with body limit middleware proxy

* refactor(body-limit): we can trust content-length header

* fix(body-limit): call controller.error instead of throwing an error

* test(body-limit): add test for ReadableStream body

* chore: denoify

* refactor(middleware/body-limit): throw HTTPException instead of retuning c.text()

* remove `Unit` untility

* denoify

* fixed example

* denoify

---------

Co-authored-by: Ame_x <121654029+EdamAme-x@users.noreply.github.com>
Co-authored-by: Taku Amano <taku@taaas.jp>
2024-03-04 21:55:35 +09:00
Yusuke Wada
5db68b566b Revert "feat: introduce Body Limit Middleware using stream (#2103)"
This reverts commit 2a9c9a15a8.
2024-03-04 21:40:40 +09:00
Yusuke Wada
2a9c9a15a8
feat: introduce Body Limit Middleware using stream (#2103)
* feat: introduce Body Limit Middleware using stream

* denoify

* feat(body-limit): Replace c.req.raw with body limit middleware proxy (#2109)

* fix(body-limit): fix typo

* feat(body-limit): Replace `c.req.raw` with body limit middleware proxy

* refactor(body-limit): we can trust content-length header

* fix(body-limit): call controller.error instead of throwing an error

* test(body-limit): add test for ReadableStream body

* chore: denoify

* refactor(middleware/body-limit): throw HTTPException instead of retuning c.text()

* remove `Unit` untility

* denoify

* fixed example

* denoify

---------

Co-authored-by: Ame_x <121654029+EdamAme-x@users.noreply.github.com>
Co-authored-by: Taku Amano <taku@taaas.jp>
2024-03-04 21:36:26 +09:00
Taku Amano
e8f81bf427
fix (jsx/dom): keep ref.current value during lifecycle. (#2307)
* fix (jsx/dom): keep ref.current value during lifecycle.

* chore: denoify
2024-03-04 13:21:02 +09:00
Yusuke Wada
1511364e0b v4.0.9 2024-03-03 14:20:03 +09:00
Yusuke Wada
fc505bac4c
fix(types): use {} instead of Partial (#2305)
* fix(types): use `{}` instead of Partial

* denoify
2024-03-03 14:16:01 +09:00
Sor4chi
34fb36e960
fix(stream): remove async from onabort (#2293)
* fix: remove async from onAbort

* chore: denoify
2024-03-01 17:33:03 +09:00
Yusuke Wada
81264a9cf5 v4.0.8 2024-02-28 17:39:31 +09:00
Fuxiao Peng
c9567b60e5
fix(devDependencies): Fix the problem of missing glob package (#2277)
* fix(pnpm): Fix the problem of missing glob package caused by ghost dependency in pnpm

* run `bun install`

---------

Co-authored-by: yuanrang.peng <yuanrang.peng@tuya.com>
Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2024-02-28 17:23:52 +09:00
Taku Amano
b4912f32b6
fix(deno/jsx-precompile): use html() tag function if value is a promise (#2283) 2024-02-28 17:13:45 +09:00
Abhishek Mehandiratta
a3d9f1371b fix(sse): Handler stuck when awaiting aborted SSE stream (#2273)
* cancel internal stream reader on responseReadable abort

* run denoify
2024-02-27 12:57:41 +09:00
Shotaro Nakamura
d7b1fe8e11
fix(types): fix comment (#2278)
`c.jsonT` is removed
2024-02-27 12:15:30 +09:00
Taku Amano
577ce6811b
feat(jsx): more react staff (#2197)
* feat(jsx): Introduce useReducer hook

* feat(jsx): add dummy useDebugValue hook

* feat(jsx/dom): add createElement function

* feat(jsx): export all staffs from jsx as default

* chore: denoify

* refactor(jsx/dom): export jsx as an alias of createElement

* chore: denoify
2024-02-26 16:41:10 +09:00
Taku Amano
30b33b0e8c
feat(ssg): generate files concurrently (#2187)
* feat: Introduce utility for concurrent execution

* feat(ssg): generate files concurrently

* feat(ssg): For safety, the default number of concurrency in SSG is 2.

* fix(ssg): catch filesystem error

* test(ssg): migrate tests

* chore: denoify
2024-02-26 16:38:01 +09:00
berlysia
d4db45119f
fix(ssg): preserve binary files as-is (#2275)
* fix(ssg): preserve binary files as-is

* denoify

* test(ssg): cleanup

* test(ssg): merge tests for the right content and paths
2024-02-26 16:35:48 +09:00
Yusuke Wada
a32482ddb0
fix(ssg): allow app: Hono<any, any, any> for toSSG (#2272)
* fix(ssg): allow `app: Hono<any, any, any>` for `toSSG`

* denoify
2024-02-26 00:45:35 +09:00
Datron
2be989352c
feat(cookie): add secure and host prefix support (#2269) 2024-02-25 23:49:14 +09:00
Yusuke Wada
eee1dd461c v4.0.7 2024-02-25 22:24:26 +09:00
Yusuke Wada
1c4c3950fd
fix(types): MergeSchemaPath supports regexp path params (#2271)
* fix(types): `MergeSchemaPath` supports regexp path params

* denoify
2024-02-25 22:22:03 +09:00
ryu
3ef39b1441
feat(logger): support NO_COLOR (#2228) 2024-02-25 19:10:56 +09:00
Karibash
ce2a2f5964
feat(http-exception): Add a "cause" option to HTTPException (#2224) 2024-02-25 19:07:33 +09:00
Taku Amano
4b3cd3c6e1
fix(jsx/dom): import from correct file for avoiding circular dependency (#2268) 2024-02-25 13:41:59 +09:00
Yusuke Wada
5e9b9a3764 v4.0.6 2024-02-24 22:45:10 +09:00
Yusuke Wada
f8371ab356
fix(serve-static): support extensionless files and refactor (#2260) 2024-02-24 22:38:39 +09:00
Sor4chi
5816cb20d4
fix(stream): avoid hang up when stream helper's callback throw error (#2262)
* fix(stream): catch error for avoiding hang up
feat(stream): and add optional error handler

* chore: denoify

* fix(stream): use `SSEStreamingAPI` instead of `StreamingAPI` for `streamSSE`'s `onError` argument

* feat(stream): display `console.error` if stream `onError` is not set

* chore: denoify
2024-02-24 22:12:32 +09:00
Taku Amano
440d31b665
perf(jsx/dom): update textContent only when content changes (#2264)
* perf(jsx/dom): update textContent only when content changes

* chore: denoify

* test: refactor test to use simple spy instead of class mock
2024-02-24 13:08:46 +09:00