-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow returning parallel variants from
addVariant
or matchVariant
…
… callback functions (#8455) * allow to return an array of format strings from matchVariant or addVariant * add parallel variant with function test * upgrade test to use a function call * allow to return parallel variants from variant function Caveat: this now belongs to the same plugin and is not registered as separate variants which means that sort order can differ. * prevent crash if `.toMatchFormattedCss()` receives undefined * update changelog * ensure that we use a local list of variant functions Now that a variant function can return a list of variant functions from within the plugin, we have to make sure to executed and register those functions as well. However, we need to make sure that this list is local for the variant and not "globally" registered otherwise we keep add a dynamic function to the global list which results in duplicate output becaus multiple duplicate variants will be registered. * add little warning regarding potential clashes * Update CHANGELOG.md
- Loading branch information
1 parent
2dffc87
commit d2fdf9e
Showing
6 changed files
with
108 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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