Skip to content

Request’s Past, Present and Future #3142

Open

Description

@mikeal

Before I go into the details and reasoning I’ll get straight to the point. The most valuable thing request can do for the JavaScript ecosystem is to go into maintenance mode and stop considering new features or major releases.

Apologies in advance to the other committers on request that have been doing their best to improve it, but it’s for the best.

2009

The first version of request was one of the first modules ever created for the Node.js ecosystem. The earliest versions were written to APIs that pre-date the standard callback interface, streams, node_modules and npm. For the first few years, request and Node.js evolved together, each learning from the other. As Node.js improved and migrated core interfaces so did request. As request adopted changes to the core http library and streams it also informed improvements like the pipe event (which enabled request’s one line proxy) and one of Core http’s many re-writes (the one I had to write).

npm

request was one of the first modules added to the npm registry. As npm grew so did dependence on request. Even now, when npm is used far more for front-end than back-end work, request remains one of the most depended on modules in the registry. As I write this, 41K modules depend on request and it is downloaded 14 million times a week.

The place request has in the Node.js ecosystem is no longer one of an innovator but of an incumbent. If you Google for how to do something with HTTP in Node.js the examples are likely to show request as the client and express as the server. This has two notably bad effects.

It’s much harder for new libraries accomplishing similar tasks to gain adoption because of the incumbent position request holds over the ecosystem. It’s also very hard to change request in any meaningful way as the change not only may not be adopted by the majority of its dependents but it would put it out of alignment with the thousands of blog posts and stack overflow responses that use request.

Modern JavaScript

The last few years have been dramatic ones in JavaScript. Features people had talked about for years went from ideas, to standards, to features you can reliably depend on in most environments. The speed at which these have been adopted is staggering, mostly thanks to auto-updating browsers and an aggressive Node.js release schedule.

The patterns at the core of request are out of date. A few people might argue with that assessment, and I know who they are so I won’t be surprised, but it’s true. I have often been skeptical of the impact some of these features would have only to find myself adopting them wholesale not long after they are available in only the latest release of Node.js.

There’s a transition happening now in the ecosystem to these patterns. How messy that will be is still up in the air and I’m not going to try and read the tea leafs and figure out what the future looks like in that regard. The question for request is “Do we try to survive through that transition?” A year ago, I thought the answer was obvious and that we would, but now I’m convinced of the opposite.

A version of request written to truly embrace these new language patterns is, effectively, a new module. I’ve explored this space a bit already and have a project I’m quite happy with but it is incompatible with request in every conceivable way. What’s the value in a version of request that is incompatible with the old patterns yet not fully embracing the new ones? What’s the point in being partially compatible when there’s a whole world of new modules, written by new developers, that are re-thinking these problems with these patterns in mind?

The best thing for these new modules is for request to slowly fade away, eventually becoming just another memory of that legacy stack. Taking the position request has now and leveraging it for a bigger share of the next generation of developers would be a disservice to those developers as it would drive them away from better modules that don’t have the burden of request’s history.

Maintenance Mode

Here’s the plan.

  • request will stop accepting new features.
  • request will stop considering breaking changes.
  • The committers that are still active will try to merge fixes in a timely fashion, no promises though.
  • Releases will be fully automated, any merge into master will be published. I’ve already built this for some other projects using GitHub Actions.
    • We’re going to have to remove inactive collaborators and enforce 2fa, because commit rights will effectively become npm publish rights.

Activity

  1. reconbot commented on Mar 30, 2019

    @reconbot
    Contributor

    I fully support this, I think a warning message and/or deprecating new releases is in order.

    As for the change in process and guidelines, it makes my job a lot easier 👌

  2. simov commented on Mar 31, 2019

    @simov
    Member

    Very well said @mikeal. I'm pinning this issue to gain more visibility.

  3. pinned this issue on Mar 31, 2019
  4. reconbot commented on Mar 31, 2019

    @reconbot
    Contributor

    Things we might do - please discuss and volunteer!

    • update readme with current state of project
    • update ci publishing pipeline @mikeal
    • provide a doc with some guidance on request alternatives Alternative libraries to request #3143
    • add a warning message on install of the package to use another package and reference the doc
    • pick a date to stop support (I vote 6 months, but 12 is probably friendlier)
    • close all feature requests and feature prs
    • review and merge relevant bug fixes
    • add github issue and pr templates explaining that features wont be merged
    • deprecate the next major version (3.x) so project’s in active maintenance get a warning but older projects continue as usual
  5. analog-nico commented on Apr 1, 2019

    @analog-nico
    Member

    It makes a lot of sense! I will slowly adopt this policy for the request-promise family as well. Cheers to your important contributions to the node ecosystem!

  6. bajtos commented on Apr 2, 2019

    @bajtos

    deprecate the latest npm package and auto deprecate them on publish

    Please be careful about deprecation. As Mikael wrote above, there are 41K modules depending on request. Many of these modules are useful in the current state and work well for their users, but their maintainers may not have time to rework those modules to use something else than request. By deprecating request at install time, you will basically deprecate a large portion of npm module ecosystem.

    As I see it, maintenance mode is not the same thing as deprecation.

    • Maintenance mode = we will fix bugs and security vulnerabilities so that you can keep using this package.
    • Deprecation = nobody should be using this package any more. This typically happens when the module is abandoned and won't receive any further bug or security fixes.
  7. reconbot commented on Apr 2, 2019

    @reconbot
    Contributor

    I hear you. The full text

    deprecate the latest npm package and auto deprecate them on publish via ci (maybe after support has been stopped?)

    I think we should eventually deprecate request because I don't want new projects to use it.
    I've been trying to triage the issues and prs down to a list we can solve, but there are bugs that we cannot fix without a breaking change. Therefore they wont get fixed and new users will have issues.

    For example following redirects looses request bodies and cookies, and url parsing to remove relative paths are both bugs but I'm not sure they'll ever be fixed.

    Maybe deprecation isn't the right answer, but I don't know how else to approach that.

    Does that make sense?

  8. mikeal commented on Apr 2, 2019

    @mikeal
    MemberAuthor

    Let’s just bump the major version when we deprecate. That way most people depending on the project won’t see this error until they try to upgrade to a new major, which means they are actively developing it and really should look for an alternative.

  9. nylen commented on Apr 3, 2019

    @nylen
    Member

    I'm proud to have been part of the history of request. I will also check out bent, it looks interesting, and small, which is more important to me these days.

    We’re going to have to remove inactive collaborators and enforce 2fa, because commit rights will effectively become npm publish rights.

    Fine to remove me.

  10. JonathanRowell commented on Apr 4, 2019

    @JonathanRowell

    I think we should eventually deprecate request because I don't want new projects to use it.

    As a programmer who is VERY grateful for the module and who uses it all the time I WANT to use it on new projects.

  11. rimiti commented on Apr 4, 2019

    @rimiti

    I'm proud having used this amazing tool. It forced the community to improve. 🙏
    If you need help to maintain it do not hesitate to contact me.

  12. pdxmholmes commented on Apr 4, 2019

    @pdxmholmes

    While I respect your decision, I would ask you to consider how much real world, production, code relies on request currently. It's far more than even NPM stats can tell you. I fully understand wanting to move on to a new thing and doing something in a new, more interesting way...this is the JavaScript ecosystem after all, have to chase the new thing. But please consider the amount of time and money you'd be costing professional engineering organizations by wholesale deprecating request. If you want to leave it in maintenance mode, that's fine, but understand that plenty of people have absolutely no practical reason to change libraries. Forcing people to change because of ideology is going to lead to frustration.

    Regardless, thanks for the hard work everyone has put in to this library.

  13. kibertoad commented on Apr 5, 2019

    @kibertoad

    I wonder what library could be considered modern and recommended now. Superagent is mostly in maintenance mode right now, axios not too active altogether.

  14. 481 remaining items

  15. riclf commented on Oct 11, 2022

    @riclf
  16. Vilx2 commented on Oct 11, 2022

    @Vilx2
  17. jslegers commented on Oct 11, 2022

    @jslegers

    image

  18. tushart681 commented on Oct 19, 2022

    @tushart681

    npm WARN deprecated [email protected]: this library is no longer supported
    npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (debug-js/debug#797)
    npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
    npm WARN deprecated [email protected]: request has been deprecated, see #3142
    npm ERR! Cannot read properties of null (reading 'pickAlgorithm')

    npm ERR! A complete log of this run can be found in:
    npm ERR! C:\Users\User.DESKTOP-GDKI8TK\AppData\Local\npm-cache_logs\2022-10-19T15_42_31_034Z-debug-0.log

  19. tushart681 commented on Oct 19, 2022

    @tushart681

    npm WARN deprecated [email protected]: this library is no longer supported
    npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (debug-js/debug#797)
    npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
    npm WARN deprecated [email protected]: request has been deprecated, see #3142
    npm ERR! Cannot read properties of null (reading 'pickAlgorithm')

    npm ERR! A complete log of this run can be found in:
    npm ERR! C:\Users\User.DESKTOP-GDKI8TK\AppData\Local\npm-cache_logs\2022-10-19T15_42_31_034Z-debug-0.log

    what can i do? when i install firebase tools , than i found this error

  20. ggirishk commented on Jan 28, 2023

    @ggirishk

    Error: This command is not available when running the Angular CLI outside a w
    orkspace.

  21. rzr commented on Feb 16, 2023

    @rzr
  22. Richienb commented on Feb 16, 2023

    @Richienb

    The problem with request appears to not be a lack of community engagement, but rather the realisation that request is too mature for any significant changes to be made.

    Not a problem with abandonment.

  23. rzr commented on Jul 27, 2023

    @rzr

    Is there any fork that is planing to maintain it ?

  24. birkskyum commented on Sep 13, 2023

    @birkskyum

    Would it make sense to make request a thin wrapper around a modern and safe solution in a patch or minor release?

    That would allow all the 300k repos that depend on this to migrate automatically.

  25. zzz6519003 commented on Nov 11, 2024

    @zzz6519003

    先自我介绍

  26. danieldanielecki commented on Nov 12, 2024

    @danieldanielecki

    Resources for your next certifications & learnings: https://github.com/Ditectrev
    Comes with Web & PWA platform, and iOS/iPadOS/macOS app. #OpenSource

  27. BREEZY22-23 commented on Feb 4, 2025

    @BREEZY22-23

    Bot

  28. jakeNiemiec commented on Feb 5, 2025

    @jakeNiemiec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    neverstaleSomething that lasts forever

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions