upgrade path-to-regexp package?
I filed this bug with the path-to-regexp package. However, I noticed that [email protected] is currently using [email protected]. I did a test install with [email protected] and my local instance stopped having those issues in the ticket I linked to.
Thanks for the poke :) we already have several issues about this and even a PR. Since the upgrade is not backwards compatible it can't be done until express 5.0. I'm going to close this since we have several others open :)
wow that was fast 😄 good to know and I meant to say [email protected], not 3.1.4x. So this upgrade will happen when 5.x is released?
Yes
@dougwilson can you suggest any workarounds? The only one I can think of based on what you've said is to fork the [email protected] and upgrade the path-to-regexp package in that fork until we can upgrade to 5.x.
Wait until the main person of the module replies to your bug. That module is part of the Express project, so it's possible there is a bug fix made to the 0.1.x line, which has happened several times. It depends on what the issue is.
Otherwise, just provide a regular expression as your path to express directly instead of a string and you can use whatever kind of expression you desire.
For example, your bug report has:
router.use('/(segment1|segment2|segment3)', someMethod);
You can use the array syntax for that:
router.use(['/segment1', '/segment2', '/segment3'], someMethod);
i went with using an actual regex instead. thanks