Closed KeesCBakker closed 1 year ago
This will also remove some of the warnings when auditing the package. Current package will return:
New package:
@stephenyeargin, any thoughts on this?
Minor comments. I had a branch that replaced
request
withaxios
, but yours here is less obtrusive.
I used to be big on Axios, but I swapped it all out for fetch
(and node-fetch
). In future versions it will become standard in Node. I like this site as well: https://danlevy.net/you-may-not-need-axios/
Conclusion:
20, 18, 16: work like a charm 14: MockBot fails somewhere? 12: Crash on null coalescing operator 10: Mocha fails Below 10: yargs parser not supported
I get the feeling that the main problem is the testing framework itself. And it makes total sense that Mocha for example has no support for old versions. Node fetch@3 says something about a minimal node version, but https://www.npmjs.com/package/node-fetch/v/2.6.7 (v2) says nothing. We use v2 because v3 is mjs.
Should fix #161. Tried to keep the changes to a minimum. Did some local testing and my Grafana/Slack/S3 setup works like a charm.
Tests all work, but I'm not sure if they would have ever hit the actual request lib.
The only drawback I see is that you need to add
--no-experiemental-fetch
when testing. This has to do with the nock lib: https://github.com/nock/nock/issues/2397#issuecomment-1568646137