Closed robogeek closed 2 years ago
👍 sounds like we should add some feature detection for Bun.
you should use process.versions.node
(bun sets this to 16.14.0
right now). if that isn't supported on old versions of node, then fallback to process.version
. is that possible?
it seems process.versions (with an s) was added in v0.2.0, so i think its safe to just change all instances of it.
I decided to give Bun a try by running the Mocha test suite of one of my packages. The very first failure was in
yargs-parser
like so:Clearly, Bun isn't going to give a value for
process.version
that is compatible with Node.js versions. With this scriptI get this output:
For reference: https://github.com/Jarred-Sumner/bun/issues/462