Skip to content

Conversation

@hybrist
Copy link
Contributor

@hybrist hybrist 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.

@hybrist hybrist 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?

@hybrist hybrist force-pushed the prop-rename-friendly branch from 24593fe to a03364f Compare April 9, 2021 16:14
@hybrist
Copy link
Contributor Author

hybrist 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.

@hybrist
Copy link
Contributor Author

hybrist 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

2 participants