Skip to content
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

Use actual names for keys instead of inferring. #1891

Merged
merged 1 commit into from Mar 26, 2021
Merged

Conversation

seivan
Copy link
Contributor

@seivan seivan commented Mar 23, 2021

Fix: #1841 (comment)

Not sure if this is a bug in deno itself, but for now this doesn't work when building distributable binaries.

There is a distinction between the names of an exported value between deno run and deno compile when importing an object and using it as a key in a new object

In 'https://deno.land/x/yargs_parser@v20.2.4-deno/deno.ts'

export default yargsParser

In 'https://deno.land/x/yargs/deno.ts'

import Parser from 'https://deno.land/x/yargs_parser@v20.2.4-deno/deno.ts';

const newObject = {
 Parser
}

This will create {yargParser: Parser} in deno compile while work as intended with deno run where you get {Parser: Parser}

The codebase relies on shim.Parser and that will be undefined when running deno compile to build binaries as it would be called shim.yargParser

@bcoe bcoe merged commit b96ef01 into yargs:master Mar 26, 2021
@bcoe
Copy link
Member

bcoe commented Mar 26, 2021

@seivan thank you for the fix 👌 I believe it will be a few more weeks before we get to the v17.x.x release of yargs -- but I'll do my best to get this out soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deno bundle yargsParser initialization failure
2 participants