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

1345 Commits

Author SHA1 Message Date
Yusuke Wada
8edb160c0e v3.11.7 2023-12-14 10:24:02 +09:00
Yusuke Wada
8e2b6b0851
Merge pull request from GHSA-f6gv-hh8j-q8vq
* fix(trie-router): don't remain with the values of named param

* denoify

* fix: don't share `params`

* denoify
2023-12-14 10:21:02 +09:00
Yusuke Wada
af9e485266
chore: bump up @hono/eslint-config (#1816) 2023-12-13 19:29:26 +09:00
Yusuke Wada
18b62821dd
chore: use @hono/eslint-config (#1815) 2023-12-13 18:35:30 +09:00
Yusuke Wada
0e11444b44 v3.11.6 2023-12-13 16:23:26 +09:00
Yusuke Wada
4c4c4ee42c
fix(context): set status correctly (#1814)
* fix(context): set `status` correctly

* denoify
2023-12-13 16:21:53 +09:00
Yusuke Wada
a86b75b2e4 v3.11.5 2023-12-13 09:05:04 +09:00
Yusuke Wada
af8d16b6db
fix(context): c.json() allows object and returns JSONParsed<T> (#1806)
* fix(context): `c.json()` allows object and returns JSONParsed<T>

* denoify
2023-12-13 09:01:34 +09:00
ryu
87e256b4c6
docs(readme): update hono/tiny size (#1809) 2023-12-13 07:56:55 +09:00
Yusuke Wada
0f33cf8d45
fix(context): set headers values correctly (#1808)
* fix(context): set headers values correctly

* denoify
2023-12-12 13:04:53 +09:00
Yusuke Wada
75dbd4dc22 v3.11.4 2023-12-09 17:07:05 +09:00
Yusuke Wada
6830e7b99c
fix(client): c.json() supports undefined/null response (#1794)
* fix(client): `c.json()` supports `undefined`/`null` response

* denoify
2023-12-09 16:14:55 +09:00
Yusuke Wada
0afb5e1bba v3.11.3 2023-12-07 09:36:36 +09:00
Elias Brange
521db649b2
fix: add missing tail to svg regex (#1788) 2023-12-07 07:44:25 +09:00
Yusuke Wada
477e763ad3
fix(client): make ClientResponse.json() returns Union correctly (#1786)
* fix(client): make `ClientResponse.json()` returns Union correctly

* denoify
2023-12-06 23:11:34 +09:00
Yusuke Wada
19060105f1
fix(base): name private _basePath instead of #basePath (#1785)
* fix(base): name `private _basePath` instead of `#basePath`

* denoify
2023-12-06 22:23:50 +09:00
Yusuke Wada
f841c2dcae v3.11.2 2023-12-05 18:52:22 +09:00
Ben
41075d5a80
fix(types): Added E env type argument to showRoutes & inspectRoutes hono parameter (#1778)
* Fixed `showRoutes` doc comment import path

* Fixed `showRoutes` & `inspectRoutes` Hono parameter types

* Updated `deno_dist` Deno files

* Renamed type arguments from `TEnv` to `E`
2023-12-05 18:47:45 +09:00
Yusuke Wada
5e0ef3048b v3.11.1 2023-12-04 22:17:11 +09:00
Yusuke Wada
42912df795
fix(context): Strict type checking c.json() (#1776)
* fix(context): Strict type checking `c.json()`

* denoify
2023-12-04 22:14:49 +09:00
Yusuke Wada
8028437b0f v3.11.0 2023-12-04 17:40:57 +09:00
Yusuke Wada
b21f33c987
Merge pull request #1774 from honojs/next
Next
2023-12-04 17:36:48 +09:00
Yusuke Wada
22b5f532b4
refactor: use # for private properties (#1762)
* refactor: use `#` for private properties

* denoify
2023-12-04 17:29:24 +09:00
Yusuke Wada
86c4165ea4
fix(factory): Filter undefined in createHandlers (#1772)
* fix(factory): Filter undefined in `createHandlers`

* denoify
2023-12-04 09:47:45 +09:00
Yusuke Wada
5f42d3cca4
feat(jsx): mark ErrorBoundary as experimental (#1771)
* feat(jsx): mark `ErrorBoundary` as `experimental`

* denoify
2023-12-04 05:56:25 +09:00
Yusuke Wada
0497097b15 v3.10.5 2023-12-04 05:01:30 +09:00
Taku Amano
ae0b01e544
chore(benchmarks/jsx): Update benchmark (#1768)
* chore(benchmarks/jsx): Update benchmark

* chore: Delete files that have been added by mistake
2023-12-03 22:03:55 +09:00
Yusuke Wada
99f5e132bc
fix(client): Allow optional props in JSON response (#1769)
* fix(client): allow optional props in JSON response

* denoify
2023-12-03 18:55:59 +09:00
Taku Amano
d86fcd41e1
feat(request): Introduce matchedRoutes and routePath for HonoRequest (#1744)
* feat(request): Introduce `matchedRoutes` and `routePath` for `HonoRequest`

* test: update test.

* chore: denoify

* fix: Remove unused type imports.
2023-12-03 18:55:38 +09:00
Taku Amano
d16aedfffd
feat: Ensure that calls to c.json() have a type equivalent to c.jsonT() (#1728)
* feat: Ensure that calls to `c.json()` have a type equivalent to `c.jsonT()`

* refactor: Objects with "response" properties are never returned by the handler

* refactor: "status" is not needed in TypedResponse

* refactor: Revive `c.jsonT()` and add @deprecated label

* refactor: Tweaks commenting on "eslint-disable" broken by `format:fix`

* test: Use `c.json()` instead of `c.jsonT()` to make sure there are no problems

* refactor: allow ambiguous type for `c.json()`

* chore: denoify

* fix: Remove unused TypedResponse from import statement
2023-12-03 09:03:14 +09:00
Yusuke Wada
b6133c4130
refactor(router): remove duplication MESSAGE_MATCHER_IS_ALREADY_BUILT (#1763)
* refactor(router): duplicated messages as `MESSAGE_MATCHER_IS_ALREADY_BUILT`

* denoify
2023-12-02 06:10:37 +09:00
Yusuke Wada
63179949c9
fix(types): Keep Env types with changed routes (#1757)
* fix(types): Keep `Env` types with changed routes

* denoify
2023-12-02 05:23:00 +09:00
Yusuke Wada
472fee3629 Merge branch 'main' into next 2023-12-02 05:22:10 +09:00
Yusuke Wada
bd00d28469 v3.10.4 2023-12-02 05:19:22 +09:00
Yusuke Wada
4fdfdd6d12
fix(context): Set content-type with c.text() correctly (#1761)
* fix(context): Set `content-type` with `c.text()` correctly

* denoify
2023-12-02 05:15:09 +09:00
Taku Amano
bd36ad10fc
feat(helper/dev): Introduce inspectRoutes() and showRoutes() (#1716)
* feat(dev): Introduce "dev" helper

* feat(dev): Expose "dev" helper

* refactor: Use "named function" in some middleware.

* feat: `app.showRoutes()` is now deprecated. Use `showRoutes()` in `helper` instead.

* refactor: export RouterRoute interface for utility

* refactor: remove captureRouteStackTrace, add inspectRoutes

`captureRouteStackTrace` will be implemented after some more thought.
Instead, I added `inspectRoutes` to get routes as data.

* test: add tests for helper/dev/index.ts

* fix: run `format:fix`

* refactor: use named functions for middleware

* chore: denoify

* docs: tweaks deprecation warning message

* refactor(dev): Simplification of showList options

* chore: denoify
2023-11-29 19:22:09 +09:00
Stibbs
f4ff712796
feat(bearerAuth): accept a list of token strings (#1749)
* bearer-auth accepts list of token strings

* add yarn denoify output

* remove test files. retain only deno_dist bearer-auth
2023-11-29 19:04:20 +09:00
Yusuke Wada
10c16c23ef
feat(context): remove experimental from c.render/c.setRenderer() (#1748)
* feat(context): remove `experimental` from `c.render` and `c.setRenderer()`

* denoify
2023-11-29 17:38:45 +09:00
Yusuke Wada
6dd1a77fb7
feat: introduce createFactory() and createHandlers() (#1743)
* feat(helper/factory): introduce `createHandlers()`

* create `Factory` class

* support up to 10 handlers

* denoify

* fixed tests
2023-11-29 17:29:49 +09:00
Gabriel Donnantuoni Lima
b80895a8bd
feat(types): Support types until 10 handlers (#1735)
* feat: Support types until 10 handlers

* denoify

* feat: extend OnHandlerInterface to support until 10 handlers

* denoify
2023-11-29 04:18:11 +09:00
Yusuke Wada
19641d07c1 Merge branch 'main' into next 2023-11-28 18:00:14 +09:00
Yusuke Wada
d34343c4a3 v3.10.3 2023-11-28 17:57:57 +09:00
Yusuke Wada
7dc215577a
fix(helper/cookie): make default Path=/ for setCookie()/setSignedCookie() (#1742)
* fix(helper/cookie): make default `path` as `/` for `setCookie()`/`setSignedCookie()`

* denoify

* fixed test
2023-11-28 17:52:34 +09:00
Taku Amano
c3275eebf0
fix(jsx): Write the raw value if the value is a HtmlEscaped string (#1739)
* fix(jsx): Write the raw value if the value is a HtmlEscaped string

* chore: denoify
2023-11-27 17:19:35 +09:00
watany
bea87a0429
feat(adaptor): Enhance AWS Lambda Event Handling and Interface (#1710) 2023-11-27 15:31:10 +09:00
Robert Sasak
79dc187dbb
fix(validator): Invalid HTTP header error is hidden (#1694)
* Invalid HTTP header error is hidden

This error is captured and never shown which may by misleading. This PR suggest to throw this error directly to the reponse.

* fixed the linter error

* add a test

* denoify

---------

Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2023-11-21 19:42:27 +09:00
Taku Amano
cd6c488b76
feat(jsx): Introduce ErrorBoundary component (#1714)
* feat(jsx/streaming): Support Suspense in non-streaming mode.

* feat(jsx): Introduce ErrorBoundary component.

* chore: denoify

* feat: Support ErrorBoundary[fallbackRender].

* chore: denoify

* Rename utils.ts to components.ts

* refactor: export the ErrorBoundary component from the top level.

* fix: tweaks `resolveStream` to work with nested components

* refactor: Import `childrenToString` from `components.ts`

* fix: return immediately if the element is not found

* test: add test for jsx/components

* fix: run `npm run format:fix`

* chore: denoify
2023-11-21 18:05:05 +09:00
Yusuke Wada
f20e4fc73f
chore: remove jest.config.js (#1731) 2023-11-21 17:38:00 +09:00
Yusuke Wada
1a3a9022ca v3.10.2 2023-11-21 17:20:50 +09:00
Yusuke Wada
257d5711b4
fix(compose): allow onError() handler to be async (#1730)
* fix(compose): allow `onError()` handler to be async

* denoify
2023-11-21 17:15:01 +09:00