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

1184 Commits

Author SHA1 Message Date
CyberFlame
d64cbdb05a feat: Add CHIP support - supersedes #1198 (#1456)
Signed-off-by: CyberFlame <cyberflameu@gmail.com>
Co-authored-by: David Manouchehri <david.manouchehri@ai.moda>
2023-09-17 00:57:26 +09:00
Sor4chi
31f0605209 feat: Add c.stream() (#1437)
* feat: implement stream api utility-class

* test: write the test of StreamApi

* feat: implement `c.stream` to context

* test: write the test of `c.stream()`

* chore: denoify

* fix: extend for bytes, remove buffer system, add pipe and log interface

* test: update test about log, pipe, etc... for streaming API

* feat: extend textStream interface, remove utf-8 content-type

* test: add test about `c.textStream`

* refactor: update some args name

* chore: denoify

* fix: for deno, removed the optional parameter of `write` and `writeln`

* chore: denoify

* feat: add charset for textStream content-type header

* fix: rename textStream to streamText

* fix: reuse stream in streamText for bundle size

* feat: add `stream.wait()` api

* chore: denoify

* fix: rename `stream.wait` to `stream.sleep`

* test: use `stream.sleep` for waiting

* refactor: remove `stream.log`

* fix: remove preHeader from `c.stream()` and use `transfer-encoding` only `c.streamText()`

* chore: denoify

* refactoring: remove preHeader initialize

* test: reduce sleep duration

* chore: denoify

Co-authored-by: Glen Maddern <glenmaddern@gmail.com>
2023-09-17 00:57:26 +09:00
Yusuke Wada
96de2da8f9 v3.6.3 2023-09-16 23:13:15 +09:00
Yusuke Wada
b450751403
fix(types): support infering path types for multiple handlers (#1473)
* fix(types): support infering path types for multiple handlers

* denoify
2023-09-16 22:47:47 +09:00
Yusuke Wada
aa65a6e1b9
fix(types): return types of jsonT() should be union (#1471)
* fix(types): return types of `jsonT()` should be union

* denoify
2023-09-16 22:09:46 +09:00
Yusuke Wada
acbd961624 v3.6.2 2023-09-16 21:22:41 +09:00
Yusuke Wada
0febdf7544
fix(type): check 1st arg of middleware is string (#1470)
* fix(type): check 1st arg of middleware is `string`

* denoify
2023-09-16 21:05:31 +09:00
Yusuke Wada
bb386a49c9
fix(types): middleware with different env types (#1466)
* fix(types): middleware with different env types

* denoify

* fix factory helper
2023-09-16 20:32:54 +09:00
Rivaldi Putra
e4feba7830
test(types): Use ExpectTypeOf from vitest to test types (#1458)
Fix #1429
2023-09-15 18:53:58 +09:00
Yusuke Wada
d3a4f42f24 v3.6.1 2023-09-15 18:44:59 +09:00
watany
d8b0e7e51e
refactor(helper): Use getRuntimeKey() in env function (#1454)
* refactor

* lint&denoify

* marker

* type assersion

* revert fastly message
2023-09-15 18:40:06 +09:00
Yusuke Wada
9cb6b37fa3
fix(types): fix the type error in MiddlewareHandlerInterface (#1449)
* fix(types): fix the type error in `MiddlewareHandlerInterface`

* denoify
2023-09-13 08:57:52 +09:00
hagishi
00af2a5e60
feat: allow the type of app.request (#1444)
* feat: allow the type of app.request

* typo
2023-09-13 08:04:04 +09:00
Yusuke Wada
f521d30301
fix(hono-base): deprecate should be deprecated (#1448)
* fix(hono-base): `deprecate` should be `deprecated`

* denoify
2023-09-12 22:12:39 +09:00
hagishi
2a13b095c3
feat: extend app.request paramters (#1442)
* feat: extend app.request paramters

* denoify
2023-09-12 08:31:41 +09:00
Yusuke Wada
c3d984353a v3.6.0 2023-09-11 08:40:01 +09:00
Yusuke Wada
ba04dac74f
Merge pull request #1436 from honojs/next 2023-09-11 08:36:53 +09:00
Yusuke Wada
e4c4322941
feat(helper): introduce factory helper (#1434)
* feat(helper): introduce `factory` helper

* denoify
2023-09-11 07:31:30 +09:00
Yusuke Wada
a6d00dd461 v3.6.0-rc.2 2023-09-09 17:15:42 +09:00
Yusuke Wada
27d26204af
feat(jsx): export FC (#1420)
* feat(jsx): export `FC`

* denoify
2023-09-09 17:12:21 +09:00
Yusuke Wada
665f456f84
feat(context): introduce c.var (#1406)
* feat(context): introduce `c.var`

* denoify

* make it a property

* denoify

* make it a read-only

* fix the complex pattern
2023-09-09 17:11:16 +09:00
Yusuke Wada
0f6f40354b Merge branch 'main' into next 2023-09-09 17:07:42 +09:00
jkeys089
d6ec48ee02
feat(cookie): cookie parsing improvements (#1428) 2023-09-09 17:05:09 +09:00
Yusuke Wada
f2bdfd8423 Merge branch 'main' into next 2023-09-09 16:55:59 +09:00
Yusuke Wada
0cd3ea416a v3.6.0-rc.1 2023-09-09 16:55:37 +09:00
Yusuke Wada
7418198e36
fix(client): remove async from $url() (#1430)
* v3.6.0-rc.1

* fix(client): remove async from `$url()`

* denoify
2023-09-09 16:15:13 +09:00
Yusuke Wada
e83da7460c
test: tsc before vitest (#1427) 2023-09-08 22:31:15 +09:00
Yusuke Wada
bb1b9146ed
fix(types): fix MergeSchemaPath correct (#1426)
* fix(types): fix `MergeSchemaPath` correct

* denoify
2023-09-08 22:22:38 +09:00
Yusuke Wada
2d5b8e6d8c
ci: add --no-warnings option for main (#1425)
* test: add `--no-warnings` option for node

* enable it only for CI
2023-09-08 18:38:54 +09:00
Yusuke Wada
b7161090ea
test: ignore sandbox dir (#1424) 2023-09-08 18:10:12 +09:00
Derrick Farris
5b07146cf8
test(vitest): replace jest with vitest (#1404)
* test(vitest): replace `jest` with `vitest` for core tests

* test(fastly): `jest` -> `vitest`, correct env for fastly

* test(jest): remove `jest-environment-miniflare` as dep

* test(lagon): configure `lagon` tests to run on `vitest`

* test(lambda): `jest` -> `vitest`

* test(lambda-edge): `jest` -> `vitest`

* test(node): `jest` -> `vitest`

* test(wrangler): `jest` -> `vitest`

* chore(deps): remove `jest` and `ts-jest` from deps

* test(vitest): add `yarn coverage` for checking coverage

* test(fastly): fix check for `globalThis.crypto`

* test(handler): fix stray `.only`

* test(lagon): change env file back to original path

* test(fastly): go back to `jest` until `vitest` has support for fastly env

* test(fastly): remove hack for the `crypto` global from the test
2023-09-08 17:42:28 +09:00
Yusuke Wada
8fdf0cf4b7
feat(vercel): pass RequestContext (#1421)
* vercel pass RequestContext

* add an appropriate type and make it throws error is `passThroughOnException` is called

* denoify-ignore

---------

Co-authored-by: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com>
2023-09-08 17:00:59 +09:00
Yusuke Wada
963b94e67e Merge branch 'main' into next 2023-09-05 22:09:01 +09:00
Yusuke Wada
aee2093a39
feat(req): deprecate c.req.headers (not c.req.header) and others (#1410)
* feat(req): deprecate `c.req.headers` (not `c.req.header`) and others

* denoify
2023-09-05 22:08:43 +09:00
Yusuke Wada
e20a9e1d92 v3.5.8 2023-09-05 18:19:14 +09:00
Yusuke Wada
3351e9db96
fix(jsx): enable Fragment (#1412)
* fix(jsx): enable `Fragment`

* denoify
2023-09-05 18:14:32 +09:00
Yusuke Wada
405ec8cdb7
fix(utils/buffer): don't decode space as + (#1411)
* fix(`utils/buffer`): don't decode space as `+`

* denoify
2023-09-05 17:30:40 +09:00
Yusuke Wada
40c350cd88
feat(context): introduce c.render() (#1397)
* feat(context): introduce `c.render()`

* denoify
2023-09-05 16:01:58 +09:00
Derrick Farris
8cea5bc9c3
feat(context): add status to TypedResponse (#1403)
* feat(context): add `status` to `TypedResponse`

* test(context): make sure `tRes` has `status` prop
2023-09-05 15:58:43 +09:00
Yusuke Wada
08cd702760 Merge branch 'main' into next 2023-09-05 15:55:47 +09:00
watany
dbd484176d
ci: Avoid denoify API rate limit (#1407) 2023-09-05 15:41:41 +09:00
watany
e8c3e3f3d2
ci: checkout@v4 (#1408) 2023-09-05 15:37:04 +09:00
Yusuke Wada
d194e9b3c2
fix(rpc): infer path with route() and basePath() (#1401)
* fix(rpc): infer path with `route()` and `basePath()`

* denoify
2023-09-04 07:59:04 +09:00
Yusuke Wada
4550b31030 v3.5.7 2023-09-03 14:55:12 +09:00
Yusuke Wada
5cbd89c3ae
fix(validator): cache arrayBuffer to use after validation (#1393)
* wip

* fix(validator): cache `arrayBuffer` to use after validation

* denoify

* refactor

* denoify

* make it `bufferToFormData()` in utils/buffer.ts
2023-09-03 14:43:01 +09:00
jkeys089
0316bbadf6
feat: improvements to secure headers middleware (#1395) 2023-09-03 07:51:36 +09:00
renzor
7b68ff61a4
feat: Add $url method to hono client to extract an endpoint's url (#1384) 2023-09-02 07:15:59 +09:00
Yusuke Wada
4d8034ea89 v3.5.6 2023-08-29 23:10:59 +09:00
Yusuke Wada
0ac27fc817
fix(types): infer a response type for async handler (#1385)
* fix(types): infer a response type for async handler

* denoify
2023-08-29 23:07:27 +09:00
Yusuke Wada
5d24a87bea v3.5.5 2023-08-28 23:08:17 +09:00