feat: add validation into mergeClasses for makeResetStyles calls#260
Merged
layershifter merged 2 commits intomicrosoft:mainfrom Oct 26, 2022
Merged
Conversation
📊 Bundle size reportUnchanged fixtures
|
ba21a5e to
a686cfa
Compare
layershifter
commented
Oct 24, 2022
Comment on lines
-4
to
-6
| /** | ||
| * @internal | ||
| */ |
Member
Author
There was a problem hiding this comment.
Oops, a leftover from the time when it was unstable.
layershifter
commented
Oct 24, 2022
| /** | ||
| * form parts of regular expression and removes collected classNames from string | ||
| * @example | ||
| * regex = /r?(f16th3vw|frdkuqy0|fat0sn40|fjseox00)/ |
Member
Author
There was a problem hiding this comment.
We don't use r prefix for RTL classes for a long time.
ling1726
reviewed
Oct 25, 2022
| @@ -0,0 +1,7 @@ | |||
| { | |||
| "type": "patch", | |||
Contributor
There was a problem hiding this comment.
shouldn't this be a minor ?
layershifter
commented
Oct 25, 2022
change/@griffel-jest-serializer-d855a4d4-e4c6-4f70-a258-c22caa4992ea.json
Outdated
Show resolved
Hide resolved
ling1726
approved these changes
Oct 25, 2022
bsunderhus
approved these changes
Oct 26, 2022
This was referenced Oct 27, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #261.
Fixes #230.
This PR modifies:
mergeClasses()in Griffel core to emit errors if a call contains multiple occupancies of classes frommakeResetStyles.makeResetStylesBoth changes uses new global variable
DEBUG_RESET_CLASSESto store classes. This works similarly toDEFINITION_LOOKUP_TABLE, but we needDEBUG_RESET_CLASSESonly in development/tests so it has zero impact on production bundles.