Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.88k stars 602 forks source link

Remove the temporary util.promisify dependency #546

Closed Raynos closed 4 years ago

Raynos commented 4 years ago

This util.promisify dependency increases the number of transitive dependencies of xml2js from 3 total => 27 total.

I inlined the implementation for the one place it was being used so that the xml2js library has a low dependency and will install fast.

I manually tested this change on node 12,10,8,6,4 and 0.12

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.03%) to 97.727% when pulling 3c2c99ab74f508af4b9fc95abc4c75d6a334fbc2 on optoolco:reduce-deps into aefc64af9e9badbd0aade00814548f2ea33c9b4e on Leonidas-from-XIV:master.

Leonidas-from-XIV commented 4 years ago

Hmm, that's interesting. I am surprised that you can use reject & friends in such old Node versions but the code looks good, passes CI and having fewer dependencies is neat for sure. Thanks for your contribution, merging!

Raynos commented 4 years ago

Only node 0.10 does not have global.Promise available ; it's also missing other apis like EventEmitter.prototype.removeAllListeners that causes the tests to fail.

Thanks for merging the contribution, let me know once you've released a new version :)

( git checkout master && npm version patch && git push origin master --tags && npm publish )

I'm excited about having a version of aws-sdk with less dependencies.

Leonidas-from-XIV commented 4 years ago

Just pushed 0.4.23.