Yusuke Wada
47dbeaa147
fix(trie-router-router): For "Named param with trailing wildcard" ( #1246 )
...
* fix(trie-router-router): For "Named param with trailing wildcard"
* denoify
2023-07-20 16:48:38 +09:00
Taku Amano
3e663af916
fix(pattern-router): For "Named param with trailing wildcard" ( #1244 )
...
* fix(pattern-router): For "Named param with trailing wildcard"
* chore: denoify
2023-07-20 16:48:21 +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
2d6abaff5c
fix(tire-router/pattern-router): fixed the named capture issue ( #1148 )
...
* fix(trie-router): fixed the named capture issue
* denoify
* denoify
* refactor(pattern-router): Use Object.assign for shortening the code. (#1154 )
* refactor(pattern-router): Use `Object.assign` for shortening the code.
* chore: denoify
---------
Co-authored-by: Taku Amano <taku@taaas.jp>
2023-06-03 09:08:01 +09:00
Taku Amano
2ff0605382
fix(reg-exp-router): Register static paths first for duplicate checking. ( #1146 )
...
* fix(reg-exp-router): Register static paths first for duplicate checking.
* chore: denoify
2023-06-01 17:37:19 +09:00
Yusuke Wada
84f8bc6fc8
fix(router): PatternRouter
supports a hostname, added tests ( #1114 )
...
* fix(router): `PatternRouter` supports a hostname, added tests
* denoify
2023-05-18 15:03:35 +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
f26630a61b
fix: remove type.ts
( #1082 )
...
* fix: remove not used `type.ts`
* denoify
2023-05-09 22:22:12 +09:00
Yusuke Wada
64ddf093d6
perf: use ===
instead of startsWith
and endsWith
( #1053 )
2023-04-30 21:18:32 +09:00
Yusuke Wada
0a19deaa5b
perf: shorten code ( #1051 )
2023-04-30 21:07:00 +09:00
Taku Amano
1a1de75296
feat: Introduce LinearRouter. ( #1043 )
...
* feat: Introduce LinearRouter.
* chore: Add benchmark script.
* chore: denoify
2023-04-28 12:10:20 +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
Yusuke Wada
9391278911
feat(router) [breaking]: StaticRouter obsolete ( #873 )
...
Co-authored-by: Taku Amano <taku@taaas.jp>
2023-02-09 16:58:28 +09:00
Taku Amano
d86728b4d1
perf(reg-exp-router): Cache Result<T> instead of T[] if there is no parameter. ( #867 )
...
* perf(reg-exp-router): Cache Result<T> instead of T[] if there is no parameter.
* chore: denoify
2023-02-08 06:47:19 +09:00
Taku Amano
01b9fd4537
feat(reg-exp-router): Lookup static path by using Object ( #845 )
...
* feat(reg-exp-router): Search by key of Object if `path` has no variables.
* feat(reg-exp-router): Returns an empty RegExp if node is not added.
* feat(reg-exp-router): Check ambiguous path for static.
* chore: fix typo in test case
* chore: denoify
2023-01-29 13:55:27 +09:00
Yusuke Wada
d2dd42b35e
fix: fixed bugs handling TypeResponse
( #791 )
2023-01-19 22:45:25 +09:00
Taku Amano
9bc52a5ddd
feat(reg-exp-router): regexp support path including slashes. ( #789 )
...
* feat(reg-exp-router): `regexp` support path including slashes.
* chore: denoify
2023-01-19 22:45:25 +09:00
Yusuke Wada
b723faa81f
feat(trie-router): regexp
support path including slashes ( #768 )
...
* feat(trie-router): `regexp` support path including slashes
* refactor(trie-router): Use `splitRoutingPath`. (#781 )
* refactor(utils): splitRoutingPath, allow `@` to be safely used in parameter names. (#790 )
Co-authored-by: Taku Amano <taku@taaas.jp>
2023-01-19 22:45:25 +09:00
Taku Amano
6d5de04743
fix(reg-exp-router): bug of "star and all" routing ( #707 )
...
* fix(reg-exp-router): Comparisons between middleware must be checked in both orientations.
* refactor(reg-exp-router): Simplify the conditions.
* chore: denoify
* fix(reg-exp-router): Copy middleware if the method of new middleware is METHOD_NAME_ALL.
* chore: denoify
2022-12-08 20:11:08 +09:00
Yusuke Wada
cf73de1344
fix(trie-router): bug for routing orders with named param ( #704 )
2022-12-08 00:54:55 +09:00
Jayden
760ae30251
Fix detecting node runtime ( #696 )
...
* Fix
* Denoify
* Avoid error in other runtime
* chore: remove unnecessary config testPathIgnorePatterns (#697 )
* Fix vercel
Co-authored-by: Horie Issei <issei.horie@is2ei.com>
2022-12-02 11:28:49 +09:00
Taku Amano
86699c1868
fix(reg-exp-router): Copy from METHOD_NAME_ALL for new methods ( #691 )
...
* fix(reg-exp-router): Copy from METHOD_NAME_ALL for new methods
* chore: denoify
* fix(reg-exp-router): Initialize both middleware and routes.
* chore: denoify
* fix(reg-exp-router):Fix middleware search routine.
* chore: denoify
2022-11-30 10:08:28 +09:00
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