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

42 Commits

Author SHA1 Message Date
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
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
22b5f532b4
refactor: use # for private properties (#1762)
* refactor: use `#` for private properties

* denoify
2023-12-04 17:29:24 +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
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
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
Taku Amano
ae3546e32a
fix: References this._s only when paramStash is passed from the router (#1715)
* fix: References this._s only when paramStash is passed from the router.

* chore: denoify

* fix: remove debug statement.

* test: Fix test for param keys.
2023-11-17 07:35:48 +09:00
Yusuke Wada
16396bc225
perf(compose): simplify (#1701)
* perf(compose): simplify

* denoify
2023-11-15 22:22:31 +09:00
Yusuke Wada
d711484ac7
feat(app): use console.error() for default errorHandler (#1687)
* feat(app): use `console.error()` for default `errorHandler`

* denoify
2023-11-13 01:18:54 +09:00
Yusuke Wada
397e9a5cb5
feat(hono): remove experimental flag from app.mount() (#1669)
* feat(hono): remove `experimental` flag from `app.mount()`

* denoify
2023-11-10 08:20:20 +09:00
Taku Amano
b94897d6c0
fix: c.req.params() in nested app with custom error handler. (#1593)
* fix: `c.req.params()` in nested app with custom error handler.

* chore: denoify
2023-10-18 12:28:37 +09:00
Yusuke Wada
68808453d5
refactor: refactored hono-base (#1588)
* refactor: refactored `hono-base`

* denoify
2023-10-17 06:36:09 +09:00
Yusuke Wada
319f49d493
Revert "feat(app): basePath option for the constructor, deprecate app.basePath() (#1560)" (#1586)
This reverts commit 8b6bd46e66.
2023-10-17 06:24:59 +09:00
Yusuke Wada
8b6bd46e66
feat(app): basePath option for the constructor, deprecate app.basePath() (#1560)
* feat(app): `basePath` option for the constructor, deprecate `app.basePath()`

* denoify

* refactor: `HonoOptions`

* denoify
2023-10-16 09:04:58 +09:00
Taku Amano
ec94acd909
feat: one params per a handler (optimized for RegExpRouter) (#1566)
Co-authored-by: Yusuke Wada <yusuke@kamawada.com>
2023-10-16 08:39:37 +09:00
Yusuke Wada
93fec337d0
refactor(hono-base): remove any casting (#1535)
* refactor(hono-base): remove `any` casting

* denoify
2023-10-03 23:19:05 +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
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
6034dd7f7f
fix(types): remove type-errors for routes (#1371)
* fix(types): remove type-errors for routes

* denoify

* fixed the client and the presets

* rename
2023-08-24 15:36:49 +09:00
Yusuke Wada
07bc29ee60
feat(app): pass env to getPath() (#1345)
* feat(app): pass `env` to `getPath()`

* denoify
2023-08-20 16:03:25 +09:00
Yusuke Wada
dc0696f2d1
refactor(context): allow passing HonoRequest as 1st arg (#1312)
* perf(context): allow passing `HonoRequest` as 1st arg

* denoify

* test: fix the node runtime test

* test: fix deno tests
2023-08-19 16:20:08 +09:00
Yusuke Wada
acbd495bbe
fix(app): set / for path as default (#1330)
* fix(app): set `/` for `path` as default

* denoify
2023-08-15 00:33:16 +09:00
Yusuke Wada
48a8729862
perf(hono-base): use constructor.name instead of instanceof (#1311)
* perf(hono-base): use `constructor.name` instead of `instanceof`

* denoify
2023-08-10 10:10:40 +09:00
Yusuke Wada
85f8ab663f
refactor(app): add "deprecate message" for app.handleEvent() (#1298)
* refactor(app): add "deprecate message" for `app.handleEvent()`

* denoify
2023-08-05 23:41:45 +09:00
Yusuke Wada
8e2eaf9d24
docs(jsdoc): fix a app.route() JSDoc description (#1296)
* docs(jsdoc): fix a `app.route()` JSDoc description

* denoify
2023-08-05 23:28:34 +09:00
Yusuke Wada
8ea833a7d0
refactor(hono-base): remove async/await from app.request (#1275)
* refactor(hono-base): remove async/await from `app.request`

* denoify
2023-07-28 17:52:11 +09:00
Yusuke Wada
b0a368676e
fix(hono-base): enable strict with getPath option (#1259)
* fix(hono-base): enable `strict` with `getPath` option

* denoify
2023-07-23 16:03:45 +09:00
Yusuke Wada
cef0adb1d6
fix(mount): include query params (#1224)
* fix(mount): include query params

* denoify
2023-07-08 18:25:50 +09:00
Yusuke Wada
5b873fcc5c
fix(types): allow not to set skipLibCheck (#1206)
* fix(types): allow not to set `skipLibCheck`

* use `unknown`

* denoify
2023-06-29 16:48:00 +09:00
Taku Amano
8a1b9aa9a8
refactor: Tweaks variable names to reduce code. (#1157)
* refactor: Tweaks variable names to reduce code.

* Delete meaningless comments

* chore: denoify
2023-06-04 09:16:29 +09:00
Yusuke Wada
0e1755c9e4
feat: handle HEAD method (#1142)
* feat: handle HEAD method

* remove `head` from `METHOS`

* fixed the lagon test

* show `depracated` message (will be removed next minor? version)

* denoify

* use `request.url`

* denoify

* Invoke dispatch() without changing request.method for HEAD method. (#1152)

* Invoke `dispatch()` without changing request.method for HEAD method.

* chore: denoify

* refactored

* denoify

* refactor: dispatch() arguments can no longer be omitted (#1156)

* Revert "refactored"

This reverts commit 2f8dacc42d.

* refactor: `dispatch()` arguments can no longer be omitted

* denoifiy

---------

Co-authored-by: Taku Amano <taku@taaas.jp>
2023-06-03 09:07:33 +09:00
Yusuke Wada
127fa30dce
fix(app): app.mount() supports / (#1119)
* fix(app): `app.mount()` supports `/`

* chore: denoify
2023-05-20 15:29:58 +09:00
Yusuke Wada
a2d22807e4
feat: app.mount() (#1104)
* feat: `mount()`

* update tests

* check header values

* chore: denoify

* make it as `app.mount()`

* denoify

* Generate new URL more simply. (#1112)

* Generate new URL more simply.

* chore: denoify

---------

Co-authored-by: Taku Amano <taku@taaas.jp>
2023-05-18 14:03:50 +09:00
Yusuke Wada
390d05b006
feat(app): app.routerName() (#1105)
* feat(context): `c.routerName()`

* chore: denoify

* Enable to get router name via `app.routerName`. (#1110)

---------

Co-authored-by: Taku Amano <taku@taaas.jp>
2023-05-18 00:05:28 +09:00
Yusuke Wada
a538d4ad81
fix(app): export fire() correctly (#1106) 2023-05-17 06:55:30 +09:00
Yusuke Wada
ccc4308871
fix(types): set / for generics basePath (#1083)
* fix(types): set `/` for generics `basePath`

* denoify

* fix `MergePath`

* tweak

* denoify
2023-05-14 08:18:45 +09:00
Taku Amano
b253a8735b
feat: Allow getPath to be replaced. (#1064)
* feat: Allow getPath to be replaced.

* chore: denoify
2023-05-03 22:13:23 +09:00
Yusuke Wada
677b572fd5 feat: introduce PatternRouter and hono/tiny (#1036)
* wip

* Use RegExp instead of URLPattern. (#1039)

* Use RegExp instead of URLPattern.

* refactor(url-pattern-router): tidy up.

* refactor(url-pattern-router): Tweaks type for mangling.

* refactor: Rename URLPatternRouter to PatternRouter.

* chore: denoify.

---------

Co-authored-by: Taku Amano <taku@taaas.jp>
2023-04-28 12:10:20 +09:00