-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with node
and yarn
: process.version
#420
Comments
|
The version issue was also resolved by #392. Please close this issue. |
Thanks for a quick response! |
this only modifies the napi function, and not |
@davecaruso You're right, I'm sorry about that. Since we probably don't want to change our current |
I dislike this because it now requires anyone using yargs or depending on a package that uses it, all devs and users need that flag. It feels the same as but i do think process.version should contain the bun one since it's bun that we're running and not node. maybe they can convince yargs to switch to reading |
@davecaruso We should definitely try to get this into yargs. As a temporary workaround, you can use this flag: |
I think the best possible |
Good news: The |
and better news, i just opened PR yargs/yargs-parser#450 which should fix it. this obviously wont fix any other libraries doing this, but they should all change to this way of checking node. |
// @ts-expect-error
process.version = 300;
await import("./other-file");
|
btw, the process version check has been fixed, but i believe theres some other stuff we need before yargs fully works on bun; however those steps are our responsibility here and not theirs. |
|
Setting
YARGS_MIN_NODE_VERSION=0.1.2
solves the issue, but then I see:Without a trailing newline.
Also a little question: is it possible to pass command line arguments to script I run with bun?
-f dump
is handled by bun, but I need it to use other formatter that don't usesreadline
:).The text was updated successfully, but these errors were encountered: