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

feat(scripts): use solution ts config when enabled within tsc just task #20515

Merged
merged 2 commits into from
Nov 10, 2021

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Nov 4, 2021

Pull request checklist

Description of changes

  • use tsconfig.lib.json (if project uses solution style configs) for production build (tsc compilation)
  • remove hard-coded es5 from all targets except amd and use target defined per package within tsconfig.lib.json if it exists ( this should reduce bundle size as there will be less transpiled code to lower versions of ECMA standard)
    ts-solution-configs

Focus areas to test

(optional)

@Hotell Hotell changed the title Hotell/build system/ts solution cfg 2 feat(scripts): use solution ts config when enabled within tsc just task Nov 4, 2021
@Hotell Hotell added this to the November Project Cycle Q4 2021 milestone Nov 4, 2021
@Hotell Hotell mentioned this pull request Nov 4, 2021
9 tasks
@size-auditor
Copy link

size-auditor bot commented Nov 4, 2021

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 5e04b6208619318aa256768635101d5e64b96cc5 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Nov 4, 2021

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-accordion
Accordion (including children components)
56.753 kB
17.873 kB
react-avatar
Avatar
54.097 kB
15.331 kB
react-badge
Badge
22.394 kB
6.707 kB
react-badge
CounterBadge
24.773 kB
7.387 kB
react-badge
PresenceBadge
29.768 kB
8.517 kB
react-button
Button
24.651 kB
7.462 kB
react-button
CompoundButton
29.939 kB
8.418 kB
react-button
MenuButton
27.046 kB
8.227 kB
react-button
SplitButton
33.261 kB
9.328 kB
react-button
ToggleButton
33.78 kB
8.065 kB
react-card
Card - All
48.534 kB
14.421 kB
react-card
Card
43.954 kB
13.196 kB
react-card
CardFooter
7.418 kB
3.182 kB
react-card
CardHeader
8.778 kB
3.64 kB
react-card
CardPreview
7.682 kB
3.341 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
166.267 kB
47.598 kB
react-components
react-components: FluentProvider & webLightTheme
31.058 kB
10.346 kB
react-divider
Divider
14.828 kB
5.375 kB
react-image
Image
9.041 kB
3.734 kB
react-input
Input
13.83 kB
4.958 kB
react-label
Label
8.177 kB
3.445 kB
react-link
Link
10.883 kB
4.449 kB
react-make-styles
makeStaticStyles (runtime)
7.59 kB
3.322 kB
react-make-styles
makeStyles + mergeClasses (runtime)
22.238 kB
8.411 kB
react-make-styles
makeStyles + mergeClasses (build time)
2.561 kB
1.206 kB
react-menu
Menu (including children components)
103.644 kB
31.979 kB
react-menu
Menu (including selectable components)
106.032 kB
32.349 kB
react-popover
Popover
99.149 kB
30.108 kB
react-portal
Portal
6.621 kB
2.226 kB
react-positioning
usePopper
22.808 kB
7.935 kB
react-provider
FluentProvider
14.056 kB
5.267 kB
react-slider
RangedSlider
39.807 kB
11.454 kB
react-slider
Slider
33.204 kB
10.302 kB
react-switch
Switch
25.311 kB
8.143 kB
react-text
Text - Default
10.603 kB
4.172 kB
react-text
Text - Wrappers
13.899 kB
4.513 kB
react-theme
Teams: all themes
25.334 kB
6.012 kB
react-theme
Teams: Light theme
16.937 kB
4.948 kB
react-tooltip
Tooltip
43.871 kB
15.165 kB
react-utilities
SSRProvider
189 B
161 B
🤖 This report was generated against 5e04b6208619318aa256768635101d5e64b96cc5

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 4, 2021

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 92e68ae:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@fabricteam
Copy link
Collaborator

fabricteam commented Nov 4, 2021

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 972 983 5000
BaseButton mount 973 942 5000
Breadcrumb mount 2634 2779 1000
ButtonNext mount 548 548 5000
Checkbox mount 1554 1580 5000
CheckboxBase mount 1361 1372 5000
ChoiceGroup mount 4890 4865 5000
ComboBox mount 991 1017 1000
CommandBar mount 10504 10286 1000
ContextualMenu mount 6808 6493 1000
DefaultButton mount 1232 1177 5000
DetailsRow mount 3831 3845 5000
DetailsRowFast mount 3946 3790 5000
DetailsRowNoStyles mount 3709 3763 5000
Dialog mount 2671 2661 1000
DocumentCardTitle mount 167 166 1000
Dropdown mount 3401 3287 5000
FluentProviderNext mount 3961 3943 5000
FluentProviderWithTheme mount 253 236 10
FluentProviderWithTheme virtual-rerender 102 108 10
FluentProviderWithTheme virtual-rerender-with-unmount 261 291 10
FocusTrapZone mount 1916 1903 5000
FocusZone mount 1875 1851 5000
IconButton mount 1864 1834 5000
Label mount 376 351 5000
Layer mount 3024 3026 5000
Link mount 487 505 5000
MakeStyles mount 1820 1891 50000
MenuButton mount 1470 1525 5000
MessageBar mount 2029 2050 5000
Nav mount 3412 3328 1000
OverflowSet mount 1161 1130 5000
Panel mount 2566 2537 1000
Persona mount 848 851 1000
Pivot mount 1476 1477 1000
PrimaryButton mount 1372 1297 5000
Rating mount 7842 7911 5000
SearchBox mount 1325 1348 5000
Shimmer mount 2569 2592 5000
Slider mount 1995 2055 5000
SpinButton mount 5106 5168 5000
Spinner mount 450 430 5000
SplitButton mount 3279 3263 5000
Stack mount 539 509 5000
StackWithIntrinsicChildren mount 1762 1805 5000
StackWithTextChildren mount 4706 4696 5000
SwatchColorPicker mount 10754 10660 5000
TagPicker mount 2683 2698 5000
TeachingBubble mount 13277 13307 5000
Text mount 433 433 5000
TextField mount 1448 1425 5000
ThemeProvider mount 1209 1198 5000
ThemeProvider virtual-rerender 651 601 5000
ThemeProvider virtual-rerender-with-unmount 1926 1934 5000
Toggle mount 851 834 5000
buttonNative mount 125 145 5000

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
IconMinimalPerf.default 661 586 1.13:1
AlertMinimalPerf.default 284 254 1.12:1
DividerMinimalPerf.default 392 355 1.1:1
ButtonMinimalPerf.default 185 170 1.09:1
ImageMinimalPerf.default 389 365 1.07:1
ChatWithPopoverPerf.default 401 379 1.06:1
ButtonOverridesMissPerf.default 1861 1768 1.05:1
CardMinimalPerf.default 566 540 1.05:1
GridMinimalPerf.default 358 340 1.05:1
InputMinimalPerf.default 1361 1291 1.05:1
RosterPerf.default 1280 1216 1.05:1
TableMinimalPerf.default 416 397 1.05:1
TooltipMinimalPerf.default 1077 1029 1.05:1
BoxMinimalPerf.default 357 344 1.04:1
TextAreaMinimalPerf.default 495 478 1.04:1
TreeWith60ListItems.default 194 187 1.04:1
CarouselMinimalPerf.default 481 465 1.03:1
SliderMinimalPerf.default 1755 1706 1.03:1
TreeMinimalPerf.default 816 794 1.03:1
ChatDuplicateMessagesPerf.default 300 295 1.02:1
ProviderMinimalPerf.default 1166 1138 1.02:1
SplitButtonMinimalPerf.default 4331 4266 1.02:1
DialogMinimalPerf.default 763 752 1.01:1
DropdownMinimalPerf.default 3233 3189 1.01:1
EmbedMinimalPerf.default 4334 4303 1.01:1
HeaderSlotsPerf.default 750 743 1.01:1
ListCommonPerf.default 660 653 1.01:1
ListMinimalPerf.default 507 504 1.01:1
ListNestedPerf.default 558 551 1.01:1
RadioGroupMinimalPerf.default 454 448 1.01:1
ReactionMinimalPerf.default 395 392 1.01:1
RefMinimalPerf.default 236 233 1.01:1
DatepickerMinimalPerf.default 5588 5616 1:1
FormMinimalPerf.default 421 419 1:1
ItemLayoutMinimalPerf.default 1228 1227 1:1
PopupMinimalPerf.default 633 633 1:1
StatusMinimalPerf.default 675 676 1:1
CustomToolbarPrototype.default 4175 4179 1:1
ToolbarMinimalPerf.default 948 944 1:1
CheckboxMinimalPerf.default 2779 2817 0.99:1
LabelMinimalPerf.default 397 403 0.99:1
SkeletonMinimalPerf.default 364 368 0.99:1
TextMinimalPerf.default 353 357 0.99:1
AnimationMinimalPerf.default 411 421 0.98:1
AttachmentMinimalPerf.default 155 158 0.98:1
FlexMinimalPerf.default 290 296 0.98:1
LoaderMinimalPerf.default 732 746 0.98:1
MenuMinimalPerf.default 842 857 0.98:1
PortalMinimalPerf.default 182 186 0.98:1
ProviderMergeThemesPerf.default 1750 1801 0.97:1
TableManyItemsPerf.default 1911 1978 0.97:1
VideoMinimalPerf.default 631 650 0.97:1
AccordionMinimalPerf.default 154 160 0.96:1
AttachmentSlotsPerf.default 1051 1091 0.96:1
ButtonSlotsPerf.default 556 580 0.96:1
DropdownManyItemsPerf.default 693 720 0.96:1
MenuButtonMinimalPerf.default 1648 1723 0.96:1
ChatMinimalPerf.default 639 673 0.95:1
HeaderMinimalPerf.default 353 372 0.95:1
LayoutMinimalPerf.default 362 380 0.95:1
AvatarMinimalPerf.default 197 213 0.92:1
ListWith60ListItems.default 629 687 0.92:1
SegmentMinimalPerf.default 340 376 0.9:1

@Hotell Hotell force-pushed the hotell/build-system/ts-solution-cfg-2 branch from 6238782 to b132657 Compare November 5, 2021 12:06
@@ -40,10 +44,13 @@ function prepareTsTaskConfig(options: TscTaskOptions) {
const normalizedOptions = { ...options };
normalizedOptions.baseUrl = '.';
normalizedOptions.rootDir = './src';
normalizedOptions.project = path.basename(tsConfigFilePath);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I don't quite understand how the issue relates to this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that we cannot use build mode at this point, which is ok for now.

@Hotell Hotell marked this pull request as ready for review November 8, 2021 15:49
@Hotell Hotell requested a review from a team as a code owner November 8, 2021 15:49

return normalizedOptions;
}

options.target = 'es5';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you didn't remove any hardcoded es5 targets right ? it seems rather that you added them

Copy link
Contributor Author

@Hotell Hotell Nov 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed them from all tsc tasks by default to maintain old behaviours (please mind the if branch with exit early statement). They are added to non converge/modern packages to not break any behaviours

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually just checked this recently, the hardcoded es5 target is never needed because all v8-related packages explicitly declare a target. (That's why it was removed from this task by @GeoffCoxMSFT's recent PR to update libs/target for converged.)

@Hotell Hotell requested a review from ling1726 November 9, 2021 11:08
@Hotell Hotell merged commit 6f0dce2 into microsoft:master Nov 10, 2021
mlp73 pushed a commit to mlp73/fluentui that referenced this pull request Jan 17, 2022
…sk (microsoft#20515)

* feat(scripts): use solution ts config when enabled within  tsc just task

* fixup! feat(scripts): use solution ts config when enabled within  tsc just task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants