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
Align Deno yargs_parser version with package.json version (fix .env() not working in Deno) #2306
base: main
Are you sure you want to change the base?
Align Deno yargs_parser version with package.json version (fix .env() not working in Deno) #2306
Conversation
52c1b6b
to
ab2668f
Compare
Refs yargs#2136 and https://github.com/yargs/yargs/pull/2231/files where it looks like the Deno shim got missed in the version bump. This should allow `.env()` to work in Deno resolving the original yargs#2136 issue.
ab2668f
to
4d2fd30
Compare
Thanks for tracking this down. I reproduced runtime failure locally, (and after update landed as I was investigating build failure 😄 ) see it fixed with PR changes. |
No problem :) |
Can this be merged? |
This missed the previous release but can hopefully go in the next one. |
@MaikuMori Does this PR address yargs/yargs-parser#405? Or unrelated? (I saw your comment there.) [Edit: fixed reference to yargs-parser issue] |
Sorry for the delay. I'm still getting:
Code is roughly: await yargs(Deno.args)
.version(false)
.command(
"something [a] [b]",
"Something something",
(yargs: YargsInstance) => {
return yargs
// https://github.com/yargs/yargs/pull/2306
.env("SOMETHING")
.positional("a", {
type: "string",
description: "A very A",
})
.positional("b", {
type: "string",
description: "Quite possibly B",
})
.option("p", {
alias: "possibly",
type: "number",
description: "A possible possibility",
default: 42,
});
},
async (args: Arguments) => {
console.log(args);
},
).parseAsync(); OS: Windows |
I just noticed it hasn't been merged. I do believe it should fix the issue. |
Refs #2136 and https://github.com/yargs/yargs/pull/2231/files where it looks like the Deno shim got missed in the version bump.
This should allow
.env()
to work in Deno resolving the original #2136 bug