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

13 Commits

Author SHA1 Message Date
Taku Amano
e9a54bb8fc
fix(reg-exp-router): Allows registering a star after a long prefix. (#684)
* fix(reg-exp-router): Allows registering a star after a long prefix.

* fix(reg-exp-router): It now works even if a short GET is registered after a long ALL.

* chore: denoify
2022-11-28 22:20:40 +09:00
Yusuke Wada
b963d6e7cb
feat(app): introduce app.on(method, path, handler) (#653)
* feat(app): introduce `app.on(method, path, handler)`

* Refactoring of feat/on branche (#655)

* refactor(reg-exp-router): Use `includes` instead of `find` to check if an element is in an array.

* fix(static-router): Copy middleware from METHOD_NAME_ALL for new method.

* chore: denoify

Co-authored-by: Taku Amano <taku@taaas.jp>
2022-11-08 03:17:34 +09:00
Taku Amano
e992c7b7f3
fix(reg-exp-router): Register path for all the methods if method === METHOD_NAME_ALL. (#580)
* fix(reg-exp-router): Register path for all the methods if method === METHOD_NAME_ALL.

* chore: denoify.
2022-10-03 07:50:57 +09:00
Nicholas Gates
af1de3574c
Fix Trie router multiple matching path parameters (#571)
* Failing test for prefix parameters

* Fix test by removing break

* Denoify
2022-09-30 22:25:24 +09:00
Taku Amano
2a80b58161 feat(reg-exp-router): support optional parameter (#542)
* feat(reg-exp-router): support optional parameter

* chore: denoify
2022-09-20 21:26:59 +09:00
Yusuke Wada
24c17e340a feat(trie-router): support optional parameter (#540) 2022-09-20 21:26:27 +09:00
Taku Amano
d12a11937b
feat: Lightweight RegExpRouter reborn (#519)
* Introduce RegExpLiteRouter.

* Replace RegExpRouter with RegExpLiteRouter.

* chore: denoify

* Remove old RegExpRouter and rename RegExpLiteRouter to RegExpRouter.

* chore: Update benchmarks/handle-event.
2022-09-14 08:01:14 +09:00
Taku Amano
a149dddfdc
Introduce StaticRouter and SmartRouter (#501)
* refactor(router): Export supported HTTP methods.

* refactor(router): Introduce UnsupportedPathError.

* feat(static-router): Introduce StaticRouter.

* feat(reg-exp-router): Add "allowAmbiguous" option to RegExpRouter.

* feat(smart-router):  Introduce SmartRouter.

* feat(hono): Make SmartRouter the default router.

* chore: denoify

* refactor(smart-router): routers is never undefined.

* chore: denoify

* refactor: Fix test for SmartRouter.
2022-09-12 20:49:18 +09:00
Taku Amano
ab14da6af7
fix: regexp ambigous route (#499)
* refactor(reg-exp-router): Add existence check instead of "ts-ignore".

* fix(reg-exp-router): Rebuild all matchers as "hasAmbiguous" if some methods are ambiguous.

* Run `yarn denoify`.
2022-09-05 19:17:11 +09:00
Yusuke Wada
83a95ba895
perf(trie-router): fine tuning, 9~10% faster (#473)
* perf(trie-router): fine tuning, 9~10% faster!

* update readme
2022-08-21 10:11:53 +09:00
Yusuke Wada
f6f454ed42
fix(trie-router): fix the rule for capturing named parameter (#419)
Close #418
2022-07-24 11:03:04 +09:00
Yusuke Wada
6030c051db
chore: rm *.ts.test from deno_dist (#338) 2022-07-02 22:31:10 +09:00
Yusuke Wada
d9e9e62e47
feat: support Deno! (#336) 2022-07-02 15:09:45 +09:00