Ensure compatibility with latest versions of Express
The most recent versions of Express (4.20.0 and above) changed the way that route patterns are compiled to regular expressions. This PR introduces compatibility with these new versions, while retaining compatibility with older versions. To prove this to myself, I updated the test suite to run against both old and new versions of Express. I recommend reviewing these changes with whitespace changes hidden so that you can see what actually changed in the tests.
@nwalters512 when will this be merged an a new version released?
@timd73 I don't know; I don't maintain this library. I'm just someone who uses it and decided to file this PR to fix the compatibility issues I was experiencing in my own project. You'll have to ask @AlbertoFdzM.
@AlbertoFdzM ?
@nwalters512 so what are we thinking? Has @AlbertoFdzM ceased maintaining this library?
I won't make assumptions about the maintainer or when he may be able to review this. I'm leaning towards forking this package and will likely do so if I don't hear anything by the end of this week. I hate to do this since there are a variety of other packages that rely on express-list-endpoints.
I ultimately forked this package, applied the changes from this PR, and released it as @prairielearn/express-list-endpoints. It's an ESM-only package and only officially supports express@^4.21.0.
I'm leaving this PR open in the sincere hope that the maintainer is ultimately able to merge it, as I don't think having a fork is the best long-term solution for the ecosystem.
@AlbertoFdzM Is there any chance you might be able to review and merge this request? It's quite fundamental. Really appreciate this project and your help here! 🙇