Skip to content
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

[DEV] 'request' NPM package is deprecated #970

Closed
danielweck opened this issue Mar 16, 2020 · 7 comments
Closed

[DEV] 'request' NPM package is deprecated #970

danielweck opened this issue Mar 16, 2020 · 7 comments

Comments

@danielweck
Copy link
Member

request/request#3142

@danielweck
Copy link
Member Author

@danielweck
Copy link
Member Author

request/request#3143

@danielweck
Copy link
Member Author

notes about Electron ‘net’ module support

sindresorhus/got#899

arantes555/electron-fetch#17

@danielweck
Copy link
Member Author

danielweck commented Apr 3, 2020

Given our minimal usage of request (and request-promise) in readium-desktop and the underlying R2 packages (i.e. HTTP GET POST PUT with follow-redirects, stream support, JSON body, timeout ... and not much else, no complex middleware and proxy-ing capabilities), I think any of the popular alternative libs would do. However, I am particularly impressed by the documentation of ‘got’, notably the migration guide:
https://github.com/sindresorhus/got/blob/master/documentation/migration-guides.md
...’got’ is also feature-packed if we need to dig deeper, in the future.
Note: this is a non-isomorphic, Node-only lib (which is fine in our integration context), and note that the Electron ‘net’ support is not reliable (which is also okay, see comment above for details).

@panaC
Copy link
Member

panaC commented Apr 3, 2020

Sounds good !

@danielweck
Copy link
Member Author

danielweck commented Oct 14, 2020

I am re-opening this issue, as the request package dependency is still present in Thorium:

import * as request from "request";

"request": "^2.88.2",

"@types/request": "^2.48.5",

=>

request.post({
form: login && password ? {
grant_type: "password",
username: login,
password,
} : {
grant_type: "refresh_token",
refresh_token: refreshToken,
},
headers,
agentOptions: {
rejectUnauthorized: IS_DEV ? false : true,
},
method: "POST",
uri: oAuthUrl,
})

@danielweck danielweck reopened this Oct 14, 2020
@danielweck
Copy link
Member Author

Note that request will remain a transitive dependency in Thorium for as long as R2 packages continue to use it (LCP/LSD return/renew, for example).

@danielweck danielweck changed the title 'request' NPM package is deprecated [DEV] 'request' NPM package is deprecated May 19, 2021
@danielweck danielweck moved this to Done in Thorium v2.0.0 Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants