yargs / yargs-parser

:muscle: the mighty option parser used by yargs
http://yargs.js.org/
ISC License
491 stars 120 forks source link

fix: node version check now uses process.versions.node #450

Closed paperdave closed 2 years ago

paperdave commented 2 years ago

Closes #447 by using process.versions.node for testing the version. The only difference between these values is the v prefix, so it's not as trivial as swapping a variable. Also, just in case process.versions is somehow not set, this falls back to previous behavior.

With this change in place, Bun should be able to import yargs.

bcoe commented 2 years ago

@davecaruso I believe there's been a small dip in coverage because of the newline added, please feel free to update the file here:

https://github.com/yargs/yargs-parser/blob/main/.nycrc

On your branch, to bring the threshold down to 97.

paperdave commented 2 years ago

weird. i couldnt reproduce the failing test on my machine but i nonetheless updated the config.

bcoe commented 2 years ago

@paperdave thank you for the contribution 👌