node-coveralls icon indicating copy to clipboard operation
node-coveralls copied to clipboard

Replace `request` lib?

Open cktang88 opened this issue 6 years ago • 9 comments

Request is really bloated, and since it seems to only be used here to make a simple POST request, we can easily replace it with something lighter like got or axios. See https://bundlephobia.com/[email protected]

cktang88 avatar Dec 25 '18 22:12 cktang88

It is a really simple POST request; I think it can be easily replaced with just a call to require('https').request. request is really bloated and I'd like to see fewer utility packages such as this one using it. It includes a lot of unnecessary stuff to do just a simple call. Additionally I'm getting unnecessary security alerts from request.

Re: #200 #191 we'll have a lot less of these without request

seangenabe avatar May 05 '19 05:05 seangenabe

You could make a PR suggesting this change :)

XhmikosR avatar Oct 11 '19 08:10 XhmikosR

BTW https://packagephobia.now.sh/result?p=coveralls and https://packagephobia.now.sh/result?p=request which means request accounts for most of coveralls' size (~92.7%). IMO this is something that should be definitely looked into pretty soon.

XhmikosR avatar Nov 13 '19 18:11 XhmikosR

@nickmerwin thoughts?

cktang88 avatar Nov 13 '19 21:11 cktang88

Someone should submit a patch. We should definitely do this. Ideally without a lib, but if it's too many changes, we could try using one of the many lightweight alternatives.

Feel free to ping me when you have a PR.

XhmikosR avatar Nov 21 '19 07:11 XhmikosR

request 2.88.2 is the last version that will be released,

see: https://github.com/request/request/issues/3142

i can replace the request lib with the native http module, the code makes it look very straightforward, just want to make sure nobody else works on this and that i do not miss anything.

jaeh avatar Feb 13 '20 19:02 jaeh

Hi, note also that request has been deprecated

guimard avatar Jun 01 '20 14:06 guimard

+1 for require('https').request if it's just one simple post request. looking into ways to reduce my sub dependencies - thats why i'm here

jimmywarting avatar Sep 02 '20 21:09 jimmywarting

Since this library doesn't seem to be supported anymore I fix a bunch of things on a fork if you want to check it out and are still pulling the library into your packages: https://github.com/jtwebman/coveralls-next

jtwebman avatar Mar 06 '22 22:03 jtwebman