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
Transition away from request #134
Comments
I think it might be a bit early for this discussion. How I understand it, request is not being deprecated. It goes into maintenance mode. I might be splitting hairs here, but I think the important points are:
But it seems that it is already decided that even maintenance will stop at some point, so we might as well start thinking about alternatives, so thanks for bringing it up. Whether native fetch happens in Node.js core is still very much up to debate, as the discussion you linked to shows. Even if it landed, it would probably land in Node.js 13/14 earliest and not be backported to older versions. I think Traversion should support LTS Node.js versions that are not EOL, so even if native fetch lands, it will be a long time until a lib like Traverson could rely on. So, let's discuss alternatives. I don't think native fetch is the right way to go for Traverson, as pointed out above. This list has some interesting alternatives: These options seem particular interesting in my opinion:
Side note: Any of this would of course be breaking changes because we would need to remove all configuration API that leaked the fact that we use request underneath ( |
yep, this was my primary goal, just to get us thinking about it. i dont think there is any urgency at this point to make any switch soon.
this is a big part of why i think its worth us starting to give a change some thought. outside of dropping support for older node versions as they go out of the LTS support window, this will be an actually disruptive breaking change that would be good to do in a clean way.
yeah, not suggesting at all at this point that native fetch is necessarily the right answer, but worth keeping our eye on if we end up getting closer to thinking about making a switch. i do think there could be some advantages to something like this being native, but we'll see where it goes.
i agree with continuing to support LTS versions, but i think its worth considering (depending on how things play out) if the LTS support needs to be in the latest release of traverson. i could see an approach that makes a major release that switches to something supported on the latest versions, but continue to maintain the version using
i'm definitely open to options and i think the ones you suggest are good ones to start the conversation with. i think it would be good to introduce some level of official support for promises if we put the effort in to go down a new path, but don't have strong thoughts beyond that at this point.
i'm definitely supportive of steps that let us settle on a more common api between the browser and node, at least from a maintenance perspective. it seems that things are trending more and more in a fetch direction, so something aligned with that trend seems best to me. you probably have a much better handle on browser support needs than i do since i only use traverson on the node side. IE use seems to be trailing off anyway, but its become fairly common to use a fetch shim in that context these days, so recommending that route might be enough. if we consider it too early to take a serious look, maybe its best to just keep our eye out for trends in the community and how things like native fetch progress. mainly just wanted to give us a place to capture thoughts as they come up and get us thinking about things at least. |
with in addition to the options listed above, i've been using got a fair amount with success. it even has a migration guide from request. i figure its at least worth keeping in the mix. |
Since it is deprecated
May be worth keeping an eye on fetch being exposed in node and consider going that route.
The text was updated successfully, but these errors were encountered: