koajs / router

Router middleware for Koa. Maintained by @forwardemail and @ladjs.
MIT License
849 stars 174 forks source link

[147] Ensure path sanity checks provide clear errors during registrat… #154

Closed peterver closed 2 years ago

peterver commented 2 years ago

…ion checks

Checklist

peterver commented 2 years ago

this is an adjusted version of #147 with unit tests added for correctness

etroynov commented 2 years ago

@peterver hi you can change [v] -> [x] and list will be look like here: https://github.com/koajs/router/pull/153

etroynov commented 2 years ago

@wengeezhang could you check it?

etroynov commented 2 years ago

@peterver I suppose it's not good approach make PR from master to master, maybe you should create separate branch for it.

peterver commented 2 years ago

@peterver I suppose it's not good approach make PR from master to master, maybe you should create separate branch for it.

Apologies, first contribution here and want to get going :D I'm used to working in a git-flow approach (develop/master) and wasn't sure about the proper practice here :). Will adhere for future PR's thanks!

peterver commented 2 years ago

@etroynov I've opened a new PR #155 with all of the above adjustment requests included :). PS: there were 1 or 2 additional uses of double quote over single quote, I've gone ahead and changed those as well, thanks for ensuring code style :)

titanism commented 2 years ago

We have just published @koajs/router v11.0.0 which resolves this issue. This is mirrored to koa-router as well.

https://github.com/koajs/router/releases/tag/v11.0.0

This project is maintained by Forward Email and Lad.