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

refactor: quote properties used for meta-programming #371

Merged
merged 3 commits into from
Jun 20, 2021

Conversation

jkrems
Copy link
Contributor

@jkrems jkrems commented Apr 9, 2021

The library is currently very close to compatible with advanced optimizations done by closure compiler. This is the only issue I found: The properties on the interface may be renamed but the string literals are hard to track back to the property names. Using an explicit enum works around this issue.

I could have used an "normal" enum but this way there should be no observable difference in the non-optimized JavaScript.

@jkrems jkrems marked this pull request as ready for review April 9, 2021 03:03
@bcoe
Copy link
Member

bcoe commented Apr 9, 2021

@jkrems this looks good to me. Is there a smoke test we can somehow add so that we don't introduce a regression that breaks your use-case?

@jkrems
Copy link
Contributor Author

jkrems commented Apr 9, 2021

Testing it can get a bit involved unfortunately. Something like this PR would achieve it though: #373

@bcoe
Copy link
Member

bcoe commented Apr 11, 2021

@jkrems what order should I land these in, the tests you added seem great to me.

@jkrems
Copy link
Contributor Author

jkrems commented Apr 11, 2021

Technically the smoke test PR also has this commit. I wasn't sure where you fall on PR size. I can rebase the smoke test pretty quickly if you want to land the quoting fixes independently.

@bcoe bcoe changed the title Quote properties used for meta-programming refactor: quote properties used for meta-programming Jun 20, 2021
@bcoe
Copy link
Member

bcoe commented Jun 20, 2021

@jkrems sorry for the slow turnaround on this, have had almost no time for open source this past few months.

I'm working on cleaning up some of these old PRs.

@bcoe bcoe merged commit 2cfab05 into yargs:master Jun 20, 2021
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.

None yet

2 participants