-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
deps: path-to-regexp@6.2.0 #102
Conversation
What are the changes between 3.x and 6.x? We need to document and add tests for whatever new features that were added to route paths, if any. The test suite is alsl unfortunately not comprehensive, so no failure does not mean there isn't some breaking change we need to document, and perhaps test to add. Getting a list of what the changes were in the dependency would help determine that. For example, the "Custom Prefix and Suffix" system I believe was added in 6.0 and of course we have no tests or any docs around that. I'm sure there are other changes, but I know that is at least one. |
@dougwilson I 100% understand where you're coming from and I'm all for doing this at some point - but may I ask you to elaborate on why you think we should do it now? |
The path-to-regexp module is not an internal implementation detail; it is actually the main component of this module's (and Express's) public API: the route strings. Are you suggesting that Express should not document what kind of things you can put in the argument for something like |
Here is a breaking change I just found with this upgrade that breaks the I'm sure I'm just scratching the surface of the breaking changes in how the paths work with these two major version bumps, as I just stopped once I saw the first breaking change in path-to-regexp dependency. As noted, the test suite in here is not very great, especially when a PR like this adds no tests in order to detect future breaking changes :) |
Gotcha. I disagree, though. From my POV, it most definitely is an implementation detail. How much
No. I'm suggesting that it is already documented and supported and there's no further need to add more details than the ones we have now, unless we introduce a breaking change. |
Agreed, then. If it breaks the existing public API, it should def be tested and documented. Good catch. |
Gotcha. So I get it, they should not know path-to-regexp exists today, apologies there. I think we are on the same page. So when a user sees the following path |
Perhaps the problem with my focus is that I may be relying a bit too much on the test suite here. I saw all
It depends. Does that exist today, i.e.: is that supported with latest Express 5 beta release? If it is, there should already be docs for that (if there aren't, we should add them). If it's not, then there wouldn't be a specific place as it is simply not supposed to work with this release. I guess what I'm trying to convey here is that |
Right, as I said, the test suite is not a good indicator. It is very lacking. I have over time added a lot more tests, but there is still more to add. It doesn't always keep up, either, like this PR doesn't add any tests for all the new path matching added in the version upgrade.
It doesn't exist in the current Express 5, as that is based off path-to-regexp 0.1.x. Your PR here is what is adding that feature, so it would not exist in any current documentation, which is why I'm saying should it be added somewhere as part of this upgrade which adds this feature.
That is an interesting take. I don't believe the path-to-regexp project is run like that, so maybe we need to bring that up with that project's maintainers. Edit: OR there should be logic added here that filters out the features from path-to-regexp to just the ones that we want to expose. |
My point is that it's really not adding it.
Right. This is what I was trying to say. It's completely fine to let Anyway, regardless, I've added a bunch of new tests for all new features I could find on |
But from a user's perspective who is using
Gotcha. So what should we do instead? |
3e46aa2
to
6c8904d
Compare
@dougwilson I see you've added test pipelines for very ancient runtimes. This is likely to make tests fail due to the lack of support for widely used language features, such as destructuring, in third-party dependencies. If we really need to support things like |
I didn't add any new pipelines; this module has always ran tests against all the Node.js versions listed in the If upgrading path-to-regexp no longer works on the Node.js versioned listed in the engines field, then we need to evaluate the impact of bumping the engines requirement in this module and it's consumers (mainly Express). |
Weird. No pipelines were run in any of my previous commits. It was only after I rebased your latest changes from Also, the |
The project was out of OSS credits in Travis CI at the time.
The io.js platform was ths fork of Node.js that then became Node.js again with version 4 (Node.js 4 is io.js 4). It used the same field in engines. Effectively Node.js was called io.js for versions 1, 2, and 3. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I would know of a bunch. Just search "engines iojs" on all of Github and you'll see it popping out quite a few times.
I couldn't find any tight info on this. EDIT: According to their Travis CI config, they only run tests against IMHO, in this day and age, it makes little sense to keep supporting runtimes below LTS. The feature gap is no longer what it used to be and I like to think that we won't be having an angry |
Can you be more specific? Which ones? I mean, this module has only ever supported being installed by npm and npm never used iojs field when installing on io.js (I even put in a feature request for npm at the time and it was rejected).
I don't disagree. If this is a blocker for this PR, definitely open up a new issue to track this and you can link yo this PR as support for the reasoning 👍 . We want to make sure that users have a chance to see an upcoming change link this and have a forum to be able to voice their opinion on it. This is our process for dropping things like Node.js versions. |
This comment has been minimized.
This comment has been minimized.
I have created a pull request in the documentation repo to document these changes in the Express v5 migration guide: expressjs/expressjs.com#1316 |
@dougwilson Any chance of reviving this? What's the current holdup? |
Bump, this seems to be the last blocker for 2.0.0. |
If anyone can do a recap of what exactly needs to be done to land this, I'm very willing to put in the work 😄 But I'll be honest, I find it a bit hard to navigate what's going on right now... |
b72f040
to
4d4323d
Compare
4d4323d
to
83b4830
Compare
Hey @nfantone! I am the person who landed the first |
Hey @wesleytodd — happy to help. Honestly, I barely remember what I did here, but seems like it was awaiting a review. I'll follow your lead. Let me know what I can do to help. |
Awesome! So I think the first thing is to chat with @blakeembrey about this. We discussed on the TC call last week that we would follow his lead on which major version of |
Latest should be good. I'd land this, and then maybe another minor that I need to produce to add back Once we have the min node.js version support defined for node 5.x I can also set that up in |
Hey, so an update on this. We are going a bit of a different direction now. I am probably going to need to subsume this PR into #117 (where applicaable) because we are entirely dropping the regular expression handling in Really sorry this never landed, as the original person to land an update like this many years ago, I feel the disappointment on doing all this work for it not to ever be used by users very keenly. That said, we are moving forward and should hopefully avoid this kind of stagnation in the future. |
path-to-regexp
to6.2.0
.path-to-regexp@3.2.0
..md
files.