ladjs / superagent

Ajax for Node.js and browsers (JS HTTP client). Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
https://ladjs.github.io/superagent/
MIT License
16.58k stars 1.33k forks source link

Add test for old version Node #1722

Closed yunnysunny closed 2 years ago

yunnysunny commented 2 years ago

Some version of development packages we used is not suitable for old version node. This packages include eslint commitlint husky remark-cli xo. I moved all these to optional dependencies . And now we can install dependencies via yarn install --ignore-optional to skip the installing of incompatible packages.

And I also found the files in test folder can't been run on old version Node, so I transform them to ES5 files via bable.

codecov-commenter commented 2 years ago

Codecov Report

Merging #1722 (1330634) into master (0b5bbf2) will increase coverage by 0.08%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1722      +/-   ##
==========================================
+ Coverage   86.67%   86.76%   +0.08%     
==========================================
  Files          14       14              
  Lines        1133     1133              
==========================================
+ Hits          982      983       +1     
+ Misses        151      150       -1     
Impacted Files Coverage Δ
src/node/index.js 93.27% <0.00%> (+0.18%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0b5bbf2...1330634. Read the comment docs.

perrin4869 commented 2 years ago

This broke my CI, I don't think this is a good change. npm will install the optional dependencies by default, even though they really are just dev dependencies. I think the true solution is to drop old node version support

titanism commented 2 years ago

Agreed

titanism commented 2 years ago

v7.1.5 released to npm (note the tests are broken until someone rewrites them)

https://github.com/visionmedia/superagent/releases/tag/v7.1.5

yunnysunny commented 2 years ago

The fix has supplied. https://github.com/visionmedia/superagent/pull/1729