You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
$ bun run ./node_modules/mocha/bin/mocha.js test-partials.js test-parse.js test-process.js
986 | ? Number(process.env.YARGS_MIN_NODE_VERSION)
987 | : 10;
988 | if (process && process.version) {
989 | const major = Number(process.version.match(/v([^.]+)/)[1]);
990 | if (major < minNodeVersion) {
991 | throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
^
error: yargs parser supports a minimum Node.js version of 10. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions
at /home/david/Projects/akasharender/mahabhuta/test/node_modules/yargs-parser/build/index.cjs:991:14
at bun:wrap:1:16354
at /home/david/Projects/akasharender/mahabhuta/test/node_modules/mocha/lib/cli/options.js:12:28
at bun:wrap:1:16354
at /home/david/Projects/akasharender/mahabhuta/test/node_modules/mocha/bin/mocha.js:13:30
Clearly, Bun isn't going to give a value for process.version that is compatible with Node.js versions. With this script
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?
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
The text was updated successfully, but these errors were encountered: