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

Solve issue with EnhancedScript.prototype.findMissingMatchesInJSX only reporting parameter 't' as missing. Fixes #716 #934

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

smukkejohan
Copy link
Contributor

Seems this method is written with the expectation that matchAll (https://github.com/IonicaBizau/match-all/) is returning a nested array with capture groups. Maybe it has done before? Atleast it doesn't now. Using the native string.matchAll makes the remaining method work as expected printing warnings for the appropriate parameters that are accessed with NX.get but does not have values defined in the job.

Not sure if there are other places where the use of the matchAll package may be causing similar issues - did not test with anything else than parameters.

I could make a PR to replace all uses of match-all with native string.matchAll unless you are aware of some edge cases where the library is solving some issue - may be on certain platforms?

@smukkejohan smukkejohan changed the title Fixes #716 Solve issue with EnhancedScript.prototype.findMissingMatchesInJSX only reporting parameter 't' as missing. Fixes #716 Nov 2, 2023
@smukkejohan
Copy link
Contributor Author

Also fixes #563

@inlife
Copy link
Owner

inlife commented Nov 2, 2023

Hey @smukkejohan

Oh, amazing job tracking down that bug! This was an old issue I was not able to identify. Great stuff.

Not aware of the edge cases.

I see a second PR, how would you want to approach merging processes for these two?

@smukkejohan
Copy link
Contributor Author

smukkejohan commented Nov 2, 2023 via email

@inlife
Copy link
Owner

inlife commented Nov 2, 2023

Awesome, merging this.

@inlife inlife merged commit 7980b8d into inlife:master Nov 2, 2023
@smukkejohan smukkejohan deleted the patch-2 branch November 6, 2023 10:41
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.

2 participants