feat(scripts-babel): implement v9 babel preset to properly resolve griffel module mappings#27313
Merged
Hotell merged 1 commit intomicrosoft:masterfrom Mar 29, 2023
Merged
Conversation
9f203c8 to
9825bc2
Compare
9825bc2 to
aad247d
Compare
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2b292b0:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 7c5c363d818caa8c02a3e598e4931b1e79f24829 (build) |
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 885 | 882 | 5000 | |
| Button | mount | 589 | 593 | 5000 | |
| Field | mount | 1571 | 1529 | 5000 | |
| FluentProvider | mount | 1083 | 1095 | 5000 | |
| FluentProviderWithTheme | mount | 294 | 298 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 266 | 283 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 291 | 286 | 10 | |
| InfoButton | mount | 200 | 195 | 5000 | |
| MakeStyles | mount | 1361 | 1368 | 50000 | |
| Persona | mount | 2120 | 2055 | 5000 | |
| SpinButton | mount | 1803 | 1838 | 5000 |
Collaborator
📊 Bundle size reportUnchanged fixtures
|
Collaborator
Perf Analysis (
|
Collaborator
🕵 fluentuiv9 No visual regressions between this PR and main |
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| BaseButton | mount | 990 | 983 | 5000 | |
| Breadcrumb | mount | 2328 | 2380 | 1000 | |
| Checkbox | mount | 2259 | 2272 | 5000 | |
| CheckboxBase | mount | 2001 | 2014 | 5000 | |
| ChoiceGroup | mount | 3847 | 3915 | 5000 | |
| ComboBox | mount | 1042 | 1058 | 1000 | |
| CommandBar | mount | 8395 | 8394 | 1000 | |
| ContextualMenu | mount | 18127 | 18087 | 1000 | |
| DefaultButton | mount | 1158 | 1177 | 5000 | |
| DetailsRow | mount | 3097 | 3076 | 5000 | |
| DetailsRowFast | mount | 3087 | 3106 | 5000 | |
| DetailsRowNoStyles | mount | 2829 | 2862 | 5000 | |
| Dialog | mount | 3413 | 3472 | 1000 | |
| DocumentCardTitle | mount | 445 | 469 | 1000 | |
| Dropdown | mount | 2745 | 2755 | 5000 | |
| FocusTrapZone | mount | 1664 | 1652 | 5000 | |
| FocusZone | mount | 1559 | 1587 | 5000 | |
| GroupedList | mount | 51133 | 59678 | 2 | |
| GroupedList | virtual-rerender | 24861 | 24738 | 2 | |
| GroupedList | virtual-rerender-with-unmount | 76490 | 76513 | 2 | |
| GroupedListV2 | mount | 456 | 457 | 2 | |
| GroupedListV2 | virtual-rerender | 440 | 421 | 2 | |
| GroupedListV2 | virtual-rerender-with-unmount | 444 | 448 | 2 | |
| IconButton | mount | 1600 | 1583 | 5000 | |
| Label | mount | 556 | 573 | 5000 | |
| Layer | mount | 3672 | 3764 | 5000 | |
| Link | mount | 666 | 660 | 5000 | |
| MenuButton | mount | 1399 | 1398 | 5000 | |
| MessageBar | mount | 27459 | 27454 | 5000 | |
| Nav | mount | 2734 | 2731 | 1000 | |
| OverflowSet | mount | 1130 | 1156 | 5000 | |
| Panel | mount | 2167 | 2197 | 1000 | |
| Persona | mount | 1125 | 1111 | 1000 | |
| Pivot | mount | 1373 | 1354 | 1000 | |
| PrimaryButton | mount | 1277 | 1266 | 5000 | |
| Rating | mount | 5863 | 5877 | 5000 | |
| SearchBox | mount | 1283 | 1279 | 5000 | |
| Shimmer | mount | 2465 | 2468 | 5000 | |
| Slider | mount | 1831 | 1802 | 5000 | |
| SpinButton | mount | 3925 | 3948 | 5000 | |
| Spinner | mount | 637 | 649 | 5000 | |
| SplitButton | mount | 2673 | 2702 | 5000 | |
| Stack | mount | 674 | 665 | 5000 | |
| StackWithIntrinsicChildren | mount | 1263 | 1257 | 5000 | |
| StackWithTextChildren | mount | 3384 | 3387 | 5000 | |
| SwatchColorPicker | mount | 8393 | 8483 | 5000 | |
| TagPicker | mount | 2172 | 2132 | 5000 | |
| Text | mount | 635 | 629 | 5000 | |
| TextField | mount | 1316 | 1353 | 5000 | |
| ThemeProvider | mount | 1244 | 1240 | 5000 | |
| ThemeProvider | virtual-rerender | 893 | 903 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 1799 | 1853 | 5000 | |
| Toggle | mount | 923 | 922 | 5000 | |
| buttonNative | mount | 413 | 413 | 5000 |
ling1726
reviewed
Mar 24, 2023
layershifter
approved these changes
Mar 27, 2023
…iffel module mappings
aad247d to
2b292b0
Compare
fabricteam
reviewed
Mar 28, 2023
Collaborator
🕵 FluentUI-v0 No visual regressions between this PR and main |
JustSlone
approved these changes
Mar 28, 2023
ling1726
approved these changes
Mar 29, 2023
behowell
added a commit
that referenced
this pull request
Mar 31, 2023
Modify the change from #27313 to use path.resolve to ensure the slashes are in the correct direction on Windows.
Closed
2 tasks
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.
Previous Behavior
v9 packages that use babelrc preset-v9 trigger warnings caused by invalid module path created by module-resolver within griffel preset transform.
New Behavior
v9 packages trigger no warnings.
preset-v9 has been completely refactored to match true mappings based on
tsconfig.base.json.Performance:
Processing tsconfig json within babel execution adds some perf owerhead ( around 500ms ) but this is acceptable taking into consideration that mappings are 100% correct all the time. When griffel will migrate to linaria 4 this overhead will be mitigated as griffel will be able to transrorm swc commonjs module output.
Related Issue(s)
babel-postprocesstriggers warnings for packages usingswc#27304