less / less.js

Less. The dynamic stylesheet language.
http://lesscss.org
Apache License 2.0
17.02k stars 3.41k forks source link

Replace `request` with `node-fetch` #3505

Closed sntran closed 4 years ago

sntran commented 4 years ago

Even though request is one of the optionalDepedencies, it is still installed through normal npm install, and not many people will remember to use the --no-optional flag.

I did a search and request is only used in lib/less-node/url-file-manager.js. In that case, it's probably leaner to switch to something like node-fetch. request is 3.84MB installed while node-fetch is only 153KB installed.

I would be happy to create a PR for it if it's worth considering.

jburson commented 4 years ago

Also, request generates warnings for all consumers: warning less > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

matthew-dean commented 4 years ago

This has been replaced with native-request via this PR: https://github.com/less/less.js/pull/3501