Skip to content

Conversation

@yashkohli88
Copy link
Contributor

Overview

This PR removes the deprecated request package and replaces its usage for downloading packages across all supported ecosystems with a new getStream function.
It also updates dependencies and modernizes related testing and fetch logic.

Key Changes

  • New getStream function in lib/fetch.js exported to provide streaming downloads using axios.
  • Replaced all usage of request in package fetchers across:
    • Conda
    • Debian
    • Go
    • Maven
    • NPM
    • Composer
    • PyPI
    • RubyGems
  • Removed the deprecated request dependency from package.json.
  • Updated axios to version 1.11.0.
  • Updated tests and mocks to match new streaming approach, including proxyquire stubs.
  • Addressed formatting issues and cleaned up code.

Motivation

  • The request package is deprecated and no longer maintained.
  • Modern HTTP libraries like axios offer better security, support, and community engagement.
  • Uniform download logic across all ecosystem fetchers simplifies maintenance and enables enhancements.

Testing

  • Updated and added unit tests for getStream and affected providers.
  • Tests cover both direct URL and options object, as well as default headers and error handling.
  • Updated all test and mock code to use Promise-based streaming stubs for fetchers.

Closes: #573

jamesiri and others added 27 commits December 9, 2025 15:32
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 6.0.5 to 6.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/v6.0.6/CHANGELOG.md)
- [Commits](moxystudio/node-cross-spawn@v6.0.5...v6.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-version: 6.0.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [sha.js](https://github.com/crypto-browserify/sha.js) from 2.4.11 to 2.4.12.
- [Changelog](https://github.com/browserify/sha.js/blob/master/CHANGELOG.md)
- [Commits](browserify/sha.js@v2.4.11...v2.4.12)

---
updated-dependencies:
- dependency-name: sha.js
  dependency-version: 2.4.12
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [on-headers](https://github.com/jshttp/on-headers) to 1.1.0 and updates ancestor dependency [morgan](https://github.com/expressjs/morgan). These dependencies need to be updated together.


Updates `on-headers` from 1.0.2 to 1.1.0
- [Release notes](https://github.com/jshttp/on-headers/releases)
- [Changelog](https://github.com/jshttp/on-headers/blob/master/HISTORY.md)
- [Commits](jshttp/on-headers@v1.0.2...v1.1.0)

Updates `morgan` from 1.9.1 to 1.10.1
- [Release notes](https://github.com/expressjs/morgan/releases)
- [Changelog](https://github.com/expressjs/morgan/blob/master/HISTORY.md)
- [Commits](expressjs/morgan@1.9.1...1.10.1)

---
updated-dependencies:
- dependency-name: on-headers
  dependency-version: 1.1.0
  dependency-type: indirect
- dependency-name: morgan
  dependency-version: 1.10.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) to 1.9.0 and updates ancestor dependency [express](https://github.com/expressjs/express). These dependencies need to be updated together.


Updates `path-to-regexp` from 1.8.0 to 1.9.0
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](pillarjs/path-to-regexp@v1.8.0...v1.9.0)

Updates `express` from 4.19.2 to 4.21.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md)
- [Commits](expressjs/express@4.19.2...4.21.2)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-version: 1.9.0
  dependency-type: indirect
- dependency-name: express
  dependency-version: 4.21.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@yashkohli88 yashkohli88 force-pushed the yk/update-dep-request branch 2 times, most recently from 975855c to 8d5c962 Compare December 9, 2025 16:53
@yashkohli88 yashkohli88 marked this pull request as ready for review December 10, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants