compiler
compiler copied to clipboard
Fix `npm audit` complaining that elm is still using request
Quick Summary:
request has been deprecated, and npm audit complains about it. This PR simply removes request and replaces it with axios, semantics are equivalent.
Additional Info: I understand that we have the #2287 PR to overhaul the current npm installation, but it seems that progress there has been extremely slow.
Thanks for suggesting these code changes. To set expectations:
- Pull requests are reviewed in batches, so it can take some time to get a response.
- Smaller pull requests are easier to review. To fix nine typos, nine specific issues will always go faster than one big one. Learn why here.
- Reviewers may not know as much as you about certain situations, so add links to supporting evidence for important claims, especially regarding standards for CSS, HTTP, URI, etc.
Finally, please be patient with the core team. They are trying their best with limited resources.
I tried implementing it using https from the Node.js standard library, but the elm download URL needs to follow a redirect, and it seems to work better if implemented with the follow-redirect library instead.
My experimental implementation is here: https://github.com/mather/elm-compiler/blob/82398ec1ced4dd9afd3380521f16b44e54a294c9/installers/npm/download.js
@mather See https://github.com/elm/compiler/commit/41ec49ed921a2409afda483eb9e29197e262fe27