-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat(scripts): replace use of SWC CLI with SWC transform api #27380
feat(scripts): replace use of SWC CLI with SWC transform api #27380
Conversation
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 c5e50ec:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 730f5d298721c8471cc0734fffccb2eefadccb2d (build) |
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
FluentProviderWithTheme | virtual-rerender-with-unmount | 63 | 67 | 10 | Possible regression |
All results
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 565 | 569 | 5000 | |
Button | mount | 298 | 297 | 5000 | |
Field | mount | 991 | 1031 | 5000 | |
FluentProvider | mount | 646 | 646 | 5000 | |
FluentProviderWithTheme | mount | 81 | 81 | 10 | |
FluentProviderWithTheme | virtual-rerender | 68 | 70 | 10 | |
FluentProviderWithTheme | virtual-rerender-with-unmount | 63 | 67 | 10 | Possible regression |
InfoButton | mount | 10 | 14 | 5000 | |
MakeStyles | mount | 860 | 868 | 50000 | |
Persona | mount | 1626 | 1563 | 5000 | |
SpinButton | mount | 1294 | 1271 | 5000 |
📊 Bundle size reportUnchanged fixtures
|
Perf Analysis (
|
Scenario | Current PR Ticks | Baseline Ticks | Ratio |
---|---|---|---|
FlexMinimalPerf.default | 164 | 151 | 1.09:1 |
AttachmentMinimalPerf.default | 86 | 80 | 1.08:1 |
HeaderMinimalPerf.default | 222 | 208 | 1.07:1 |
ImageMinimalPerf.default | 230 | 218 | 1.06:1 |
TreeWith60ListItems.default | 89 | 84 | 1.06:1 |
CarouselMinimalPerf.default | 276 | 263 | 1.05:1 |
FormMinimalPerf.default | 231 | 221 | 1.05:1 |
PopupMinimalPerf.default | 363 | 347 | 1.05:1 |
PortalMinimalPerf.default | 90 | 86 | 1.05:1 |
MenuMinimalPerf.default | 520 | 501 | 1.04:1 |
SliderMinimalPerf.default | 738 | 707 | 1.04:1 |
SplitButtonMinimalPerf.default | 2340 | 2255 | 1.04:1 |
AlertMinimalPerf.default | 163 | 158 | 1.03:1 |
AvatarMinimalPerf.default | 109 | 106 | 1.03:1 |
ListCommonPerf.default | 396 | 386 | 1.03:1 |
ProviderMinimalPerf.default | 209 | 203 | 1.03:1 |
ToolbarMinimalPerf.default | 560 | 544 | 1.03:1 |
VideoMinimalPerf.default | 451 | 437 | 1.03:1 |
AttachmentSlotsPerf.default | 653 | 641 | 1.02:1 |
ChatDuplicateMessagesPerf.default | 153 | 150 | 1.02:1 |
DatepickerMinimalPerf.default | 3649 | 3580 | 1.02:1 |
DropdownMinimalPerf.default | 1419 | 1390 | 1.02:1 |
InputMinimalPerf.default | 553 | 540 | 1.02:1 |
ListWith60ListItems.default | 381 | 373 | 1.02:1 |
MenuButtonMinimalPerf.default | 990 | 970 | 1.02:1 |
SkeletonMinimalPerf.default | 198 | 195 | 1.02:1 |
AnimationMinimalPerf.default | 293 | 290 | 1.01:1 |
ChatMinimalPerf.default | 429 | 426 | 1.01:1 |
CheckboxMinimalPerf.default | 1173 | 1166 | 1.01:1 |
DropdownManyItemsPerf.default | 390 | 386 | 1.01:1 |
EmbedMinimalPerf.default | 1774 | 1751 | 1.01:1 |
HeaderSlotsPerf.default | 476 | 473 | 1.01:1 |
SegmentMinimalPerf.default | 200 | 199 | 1.01:1 |
TableManyItemsPerf.default | 1121 | 1110 | 1.01:1 |
TableMinimalPerf.default | 237 | 235 | 1.01:1 |
ButtonOverridesMissPerf.default | 634 | 633 | 1:1 |
DialogMinimalPerf.default | 453 | 453 | 1:1 |
ListNestedPerf.default | 332 | 333 | 1:1 |
TextAreaMinimalPerf.default | 290 | 291 | 1:1 |
CardMinimalPerf.default | 317 | 319 | 0.99:1 |
ChatWithPopoverPerf.default | 198 | 200 | 0.99:1 |
ItemLayoutMinimalPerf.default | 706 | 710 | 0.99:1 |
ReactionMinimalPerf.default | 214 | 216 | 0.99:1 |
StatusMinimalPerf.default | 399 | 402 | 0.99:1 |
DividerMinimalPerf.default | 207 | 212 | 0.98:1 |
LayoutMinimalPerf.default | 202 | 206 | 0.98:1 |
LoaderMinimalPerf.default | 195 | 198 | 0.98:1 |
RosterPerf.default | 1553 | 1584 | 0.98:1 |
ProviderMergeThemesPerf.default | 651 | 664 | 0.98:1 |
RadioGroupMinimalPerf.default | 259 | 265 | 0.98:1 |
IconMinimalPerf.default | 387 | 396 | 0.98:1 |
TreeMinimalPerf.default | 480 | 489 | 0.98:1 |
GridMinimalPerf.default | 187 | 192 | 0.97:1 |
RefMinimalPerf.default | 107 | 110 | 0.97:1 |
TooltipMinimalPerf.default | 1270 | 1310 | 0.97:1 |
TextMinimalPerf.default | 189 | 197 | 0.96:1 |
CustomToolbarPrototype.default | 1435 | 1488 | 0.96:1 |
ButtonSlotsPerf.default | 308 | 329 | 0.94:1 |
ListMinimalPerf.default | 300 | 320 | 0.94:1 |
AccordionMinimalPerf.default | 79 | 85 | 0.93:1 |
LabelMinimalPerf.default | 224 | 240 | 0.93:1 |
ButtonMinimalPerf.default | 82 | 89 | 0.92:1 |
BoxMinimalPerf.default | 190 | 214 | 0.89:1 |
🕵 fluentuiv9 No visual regressions between this PR and main |
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
BaseButton | mount | 610 | 619 | 5000 | |
Breadcrumb | mount | 1683 | 1689 | 1000 | |
Checkbox | mount | 1698 | 1706 | 5000 | |
CheckboxBase | mount | 1490 | 1488 | 5000 | |
ChoiceGroup | mount | 2909 | 2936 | 5000 | |
ComboBox | mount | 638 | 653 | 1000 | |
CommandBar | mount | 6215 | 6232 | 1000 | |
ContextualMenu | mount | 13033 | 13092 | 1000 | |
DefaultButton | mount | 751 | 732 | 5000 | |
DetailsRow | mount | 2227 | 2148 | 5000 | |
DetailsRowFast | mount | 2257 | 2168 | 5000 | |
DetailsRowNoStyles | mount | 1984 | 2069 | 5000 | |
Dialog | mount | 2751 | 2773 | 1000 | |
DocumentCardTitle | mount | 222 | 218 | 1000 | |
Dropdown | mount | 1957 | 2008 | 5000 | |
FocusTrapZone | mount | 1143 | 1137 | 5000 | |
FocusZone | mount | 1073 | 1086 | 5000 | |
GroupedList | mount | 41612 | 41936 | 2 | |
GroupedList | virtual-rerender | 20040 | 19969 | 2 | |
GroupedList | virtual-rerender-with-unmount | 50427 | 50788 | 2 | |
GroupedListV2 | mount | 235 | 223 | 2 | |
GroupedListV2 | virtual-rerender | 221 | 215 | 2 | |
GroupedListV2 | virtual-rerender-with-unmount | 215 | 233 | 2 | |
IconButton | mount | 1090 | 1079 | 5000 | |
Label | mount | 344 | 327 | 5000 | |
Layer | mount | 2702 | 2727 | 5000 | |
Link | mount | 387 | 394 | 5000 | |
MenuButton | mount | 937 | 950 | 5000 | |
MessageBar | mount | 21325 | 21296 | 5000 | |
Nav | mount | 1967 | 1972 | 1000 | |
OverflowSet | mount | 765 | 781 | 5000 | |
Panel | mount | 1797 | 1790 | 1000 | |
Persona | mount | 728 | 758 | 1000 | |
Pivot | mount | 882 | 873 | 1000 | |
PrimaryButton | mount | 860 | 852 | 5000 | |
Rating | mount | 4616 | 4603 | 5000 | |
SearchBox | mount | 902 | 948 | 5000 | |
Shimmer | mount | 1924 | 1872 | 5000 | |
Slider | mount | 1353 | 1323 | 5000 | |
SpinButton | mount | 2885 | 2847 | 5000 | |
Spinner | mount | 383 | 387 | 5000 | |
SplitButton | mount | 1865 | 1842 | 5000 | |
Stack | mount | 416 | 421 | 5000 | |
StackWithIntrinsicChildren | mount | 889 | 857 | 5000 | |
StackWithTextChildren | mount | 2669 | 2650 | 5000 | |
SwatchColorPicker | mount | 6098 | 6138 | 5000 | |
TagPicker | mount | 1462 | 1436 | 5000 | |
Text | mount | 364 | 382 | 5000 | |
TextField | mount | 918 | 904 | 5000 | |
ThemeProvider | mount | 841 | 839 | 5000 | |
ThemeProvider | virtual-rerender | 595 | 589 | 5000 | |
ThemeProvider | virtual-rerender-with-unmount | 1276 | 1265 | 5000 | |
Toggle | mount | 615 | 621 | 5000 | |
buttonNative | mount | 181 | 187 | 5000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach !
few questions:
- isn't this slower than executing
swc/cli
? ( i assume the cli does this anyway under the hood but on native level via rust ? thus should be faster ? ) - if it's slower than I'm bit on hold if we should go with this to mitigate that source map issue. Ideally the double source map issue should be resolved on swc core to mirror what is babel doing ( removes and re-emits source map based on source )
wdyt ?
@Hotell If you look at this file, it looks like the swc cli also uses With SWC/CLI average (3 runs on CI)
With SWC/core transform (1 runs on CI)
|
🕵 FluentUI-v0 No visual regressions between this PR and main |
* master: Added truncation and tooltips to the Breadcrumb (microsoft#27859) applying package updates applying package updates Export selection types from combobox (microsoft#28054) fix(react-datepicker-compat): Remove focus function from the deps to avoid constant move of focus (microsoft#28053) Updated poster for new stable components (microsoft#28051) Griffel/bump to 1.5.7 (microsoft#27925) feat(scripts): replace use of SWC CLI with SWC transform api (microsoft#27380) chore: Add positioning test for scroll jumps (microsoft#28043) chore: migrate to TS 4.5 (microsoft#27936) Fix toolbar divider styles (microsoft#28044) fix: createFocusOutlineStyle don't work with CSS variables (microsoft#27966) feat(react-tags): use simple button for TagButton content instead of aria button (microsoft#28033)
Changes:
instead of using the swc cli to transpile files, now use
transform
api via newswcTransform
function to allow for more programmatic customizability.As a happy side effect, this change removes the duplicate
sourceMappingUrl
from cjs outputs:Related Issue(s)
sources
point to.js
and cjs files contain duplicatedsourceMappingURL
#27320