-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
Optionally account for extra wildcard groups, fixing #2617 #2637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Nice :)! Any insight into the one failing test? |
|
Yup, it wont pass until pillarjs/path-to-regexp#51 is in..... it'll also need to get tagged and put into npm and then we'll need to update the package.json, so it's not exactly the quickest fix. |
|
Gothcha, makes sense :) Sounds like a solid plan to me. I'll check out the changes in the meantime :D |
|
|
|
Whoo! I really appreciate your effort :) I really want to get an updated debug module, but idk how long I want to keep waiting, lol |
|
Spoke before I checked: debug was published :D |
|
Thanks for this and getting |
|
Looks like I found a bug pillarjs/path-to-regexp#55 that is blocking the upgrade to 0.1.5. Hopefully it'll get fixed soon :)! |
|
Ah, @chrisinajar , I see you actually implemented the feature in I originally had this fix targeted for 4.13, but with this issue and no fix in sight, I'm dropping the 4.13 milestone. I plan to get 4.13 released by Monday 6/22 and if this fix misses that window, it won't have a chance of getting released until 4.14, in 1-2 months. |
Failing test cases for #2617 and optional support for future index value in path-to-regexp from pillarjs/path-to-regexp#51
The issue is that wildcard *'s result in extra capture groups in the regexp, which is expected, however the keys array doesn't account for this at all. The result is that if you have a * wildcard before any :named parameters then their values will be flip-flopped.
At first I tried making path-to-regexp return the wildcard groups in the keys array, however it resulted in deadlocking the testcase without any errors, so I deemed it too API breaking. Instead I added an "index" value to the keys which correlates to the index in the array of matches.