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

chore(scripts): enable type-checks on ci and fix all ts-errors #24264

Merged
merged 2 commits into from
Aug 11, 2022

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Aug 8, 2022

Current Behavior

  • scripts/ is not type-checked on local nor on CI
  • when run tsc there are 38 errors
  • DX is broken for testing

New Behavior

  • scripts/ is type-checked
  • no tsc errors
  • DX works for testing

Additional features:

  • removed npm script aliases not used anywhere
  • removed code not used anywhere

Related issues

follows/complements #24255
fixes partially #24349

package.json Outdated Show resolved Hide resolved
@Hotell Hotell force-pushed the hotell/build/scripts-folder-cleanup branch from 16852f7 to 24abc7f Compare August 8, 2022 09:06
@DustyTheBot
Copy link

DustyTheBot commented Aug 8, 2022

Warnings
⚠️ There are no updates provided to CHANGELOG. Ensure there are no publicly visible changes introduced by this PR.

Generated by 🚫 dangerJS against 477ea1b

// This config is used for running build scripts through ts-node
"extends": "@tsconfig/node14/tsconfig.json",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

mirror our supported nodejs version

@@ -81,10 +78,7 @@ const makeConfig = (srcPath: string, name: string): webpack.Configuration => ({
},
}),
plugins: [
new CleanWebpackPlugin([paths.base('stats')], {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this config was invalid for some time.... also causing ts errors

@@ -2,16 +2,10 @@
"name": "@fluentui/scripts",
"version": "1.0.0",
"private": true,
"main": "./index.js",
"bin": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

redundant manual work that;s done by default by nodejs

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 8, 2022

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 67bef71:

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

@size-auditor
Copy link

size-auditor bot commented Aug 8, 2022

Asset size changes

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

Baseline commit: 84017b6464e13c46a7ae8c61875ead2ff4b6965b (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 8, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1468 1536 5000
Button mount 1135 1125 5000
FluentProvider mount 1845 1844 5000
FluentProviderWithTheme mount 756 747 10
FluentProviderWithTheme virtual-rerender 691 696 10
FluentProviderWithTheme virtual-rerender-with-unmount 749 731 10
MakeStyles mount 2272 2270 50000
SpinButton mount 3004 2898 5000

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 8, 2022

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
global-context
createContext
533 B
341 B
global-context
createContextSelector
554 B
348 B
priority-overflow
createOverflowManager
2.936 kB
1.212 kB
react-accordion
Accordion (including children components)
79.485 kB
24.082 kB
react-alert
Alert
82.763 kB
20.582 kB
react-avatar
Avatar
48.172 kB
13.615 kB
react-avatar
AvatarGroup
13.43 kB
5.382 kB
react-avatar
AvatarGroupItem
64.878 kB
18.284 kB
react-badge
Badge
22.494 kB
7.157 kB
react-badge
CounterBadge
23.397 kB
7.449 kB
react-badge
PresenceBadge
23.947 kB
7.022 kB
react-button
Button
36.396 kB
9.575 kB
react-button
CompoundButton
43.469 kB
10.812 kB
react-button
MenuButton
39.014 kB
10.456 kB
react-button
SplitButton
46.506 kB
11.827 kB
react-button
ToggleButton
51.91 kB
11.003 kB
react-card
Card - All
67.42 kB
19.249 kB
react-card
Card
63.102 kB
18.167 kB
react-card
CardFooter
8.461 kB
3.555 kB
react-card
CardHeader
9.504 kB
3.896 kB
react-card
CardPreview
8.562 kB
3.61 kB
react-combobox
Combobox (including child components)
71.331 kB
23.323 kB
react-combobox
Dropdown (including child components)
70.459 kB
23.182 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
188.604 kB
51.784 kB
react-components
react-components: FluentProvider & webLightTheme
32.688 kB
10.736 kB
react-dialog
Dialog (including children components)
85.064 kB
25.293 kB
react-divider
Divider
16.321 kB
5.837 kB
react-image
Image
10.68 kB
4.215 kB
react-input
Input
23.554 kB
7.644 kB
react-label
Label
9.238 kB
3.815 kB
react-link
Link
12.197 kB
4.912 kB
react-menu
Menu (including children components)
114.702 kB
35.037 kB
react-menu
Menu (including selectable components)
117.901 kB
35.533 kB
react-overflow
hooks only
10.839 kB
4.146 kB
react-popover
Popover
102.042 kB
31.308 kB
react-portal
Portal
10.49 kB
3.845 kB
react-positioning
usePositioning
19.656 kB
7.388 kB
react-provider
FluentProvider
15.565 kB
5.818 kB
react-radio
Radio
36.13 kB
11.947 kB
react-radio
RadioGroup
14.319 kB
5.711 kB
react-select
Select
20.746 kB
7.299 kB
react-slider
Slider
31.988 kB
10.019 kB
react-spinbutton
SpinButton
43.899 kB
12.362 kB
react-spinner
Spinner
19.932 kB
6.363 kB
react-switch
Switch
32.438 kB
10.218 kB
react-text
Text - Default
11.572 kB
4.537 kB
react-text
Text - Wrappers
14.882 kB
4.977 kB
react-textarea
Textarea
23.674 kB
7.83 kB
react-theme
Single theme token import
69 B
89 B
react-theme
Teams: all themes
28.995 kB
6.215 kB
react-theme
Teams: Light theme
16.973 kB
4.86 kB
react-tooltip
Tooltip
41.307 kB
14.586 kB
react-utilities
SSRProvider
189 B
161 B
🤖 This report was generated against 84017b6464e13c46a7ae8c61875ead2ff4b6965b

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 8, 2022

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
TreeWith60ListItems.default 135 112 1.21:1
CardMinimalPerf.default 473 400 1.18:1
HeaderMinimalPerf.default 302 255 1.18:1
AttachmentMinimalPerf.default 124 106 1.17:1
CarouselMinimalPerf.default 392 336 1.17:1
ButtonSlotsPerf.default 459 401 1.14:1
ChatWithPopoverPerf.default 320 283 1.13:1
TableMinimalPerf.default 322 288 1.12:1
ImageMinimalPerf.default 292 262 1.11:1
ProviderMergeThemesPerf.default 1049 941 1.11:1
RefMinimalPerf.default 190 172 1.1:1
ChatDuplicateMessagesPerf.default 236 219 1.08:1
DropdownManyItemsPerf.default 539 497 1.08:1
ListCommonPerf.default 527 490 1.08:1
ListWith60ListItems.default 487 453 1.08:1
InputMinimalPerf.default 1098 1026 1.07:1
SegmentMinimalPerf.default 268 250 1.07:1
ChatMinimalPerf.default 572 540 1.06:1
DialogMinimalPerf.default 643 614 1.05:1
IconMinimalPerf.default 503 481 1.05:1
FormMinimalPerf.default 340 327 1.04:1
TableManyItemsPerf.default 1461 1414 1.03:1
TreeMinimalPerf.default 604 588 1.03:1
CheckboxMinimalPerf.default 2218 2172 1.02:1
GridMinimalPerf.default 247 242 1.02:1
LabelMinimalPerf.default 319 313 1.02:1
ListNestedPerf.default 461 451 1.02:1
ReactionMinimalPerf.default 313 307 1.02:1
SliderMinimalPerf.default 1396 1368 1.02:1
SplitButtonMinimalPerf.default 3411 3354 1.02:1
AvatarMinimalPerf.default 155 153 1.01:1
DropdownMinimalPerf.default 2437 2417 1.01:1
LayoutMinimalPerf.default 258 256 1.01:1
MenuMinimalPerf.default 626 621 1.01:1
MenuButtonMinimalPerf.default 1264 1252 1.01:1
PortalMinimalPerf.default 142 141 1.01:1
VideoMinimalPerf.default 517 511 1.01:1
ProviderMinimalPerf.default 303 304 1:1
TextMinimalPerf.default 278 279 1:1
TextAreaMinimalPerf.default 342 341 1:1
SkeletonMinimalPerf.default 271 274 0.99:1
StatusMinimalPerf.default 537 543 0.99:1
DatepickerMinimalPerf.default 4759 4839 0.98:1
HeaderSlotsPerf.default 608 620 0.98:1
ToolbarMinimalPerf.default 695 714 0.97:1
AlertMinimalPerf.default 195 203 0.96:1
AttachmentSlotsPerf.default 868 904 0.96:1
ButtonOverridesMissPerf.default 1157 1200 0.96:1
RosterPerf.default 870 909 0.96:1
CustomToolbarPrototype.default 2062 2157 0.96:1
TooltipMinimalPerf.default 826 883 0.94:1
AnimationMinimalPerf.default 395 427 0.93:1
ButtonMinimalPerf.default 119 131 0.91:1
ListMinimalPerf.default 377 416 0.91:1
RadioGroupMinimalPerf.default 334 367 0.91:1
BoxMinimalPerf.default 252 279 0.9:1
EmbedMinimalPerf.default 3071 3408 0.9:1
ItemLayoutMinimalPerf.default 892 990 0.9:1
FlexMinimalPerf.default 204 230 0.89:1
LoaderMinimalPerf.default 504 566 0.89:1
AccordionMinimalPerf.default 102 116 0.88:1
PopupMinimalPerf.default 458 536 0.85:1
DividerMinimalPerf.default 258 330 0.78:1

@@ -1,4 +1,4 @@
import CleanWebpackPlugin from 'clean-webpack-plugin';
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
Copy link
Member

Choose a reason for hiding this comment

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

TBH I don't think that this thing even works. @miroslavstastny is it still collecting stats?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dunno about before, but now it should :D

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 8, 2022

Perf Analysis (@fluentui/react)

Scenario Render type Master Ticks PR Ticks Iterations Status
Dropdown mount 3342 3438 5000 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 929 936 5000
Breadcrumb mount 2802 2785 1000
Checkbox mount 2677 2624 5000
CheckboxBase mount 2328 2308 5000
ChoiceGroup mount 4805 4836 5000
ComboBox mount 998 1055 1000
CommandBar mount 10731 10661 1000
ContextualMenu mount 11962 12036 1000
DefaultButton mount 1170 1172 5000
DetailsRow mount 3874 3873 5000
DetailsRowFast mount 3902 3889 5000
DetailsRowNoStyles mount 3749 3668 5000
Dialog mount 2920 2881 1000
DocumentCardTitle mount 185 172 1000
Dropdown mount 3342 3438 5000 Possible regression
FocusTrapZone mount 1933 1962 5000
FocusZone mount 1884 1857 5000
IconButton mount 1832 1838 5000
Label mount 363 363 5000
Layer mount 3245 3271 5000
Link mount 486 495 5000
MenuButton mount 1538 1542 5000
MessageBar mount 2162 2158 5000
Nav mount 3452 3388 1000
OverflowSet mount 1134 1139 5000
Panel mount 2297 2246 1000
Persona mount 1051 1049 1000
Pivot mount 1534 1532 1000
PrimaryButton mount 1341 1345 5000
Rating mount 7865 7815 5000
SearchBox mount 1306 1350 5000
Shimmer mount 2547 2509 5000
Slider mount 2003 1981 5000
SpinButton mount 5171 5334 5000
Spinner mount 441 439 5000
SplitButton mount 3266 3288 5000
Stack mount 535 528 5000
StackWithIntrinsicChildren mount 2334 2328 5000
StackWithTextChildren mount 5349 5317 5000
SwatchColorPicker mount 11871 11827 5000
TagPicker mount 2819 2822 5000
TeachingBubble mount 91357 92524 5000
Text mount 432 434 5000
TextField mount 1432 1434 5000
ThemeProvider mount 1251 1222 5000
ThemeProvider virtual-rerender 685 686 5000
ThemeProvider virtual-rerender-with-unmount 1851 1843 5000
Toggle mount 813 819 5000
buttonNative mount 139 139 5000

@layershifter layershifter removed their assignment Aug 8, 2022
@Hotell Hotell self-assigned this Aug 8, 2022
@Hotell Hotell force-pushed the hotell/build/scripts-folder-cleanup branch 2 times, most recently from 17c4d45 to 67bef71 Compare August 9, 2022 15:45
@Hotell
Copy link
Contributor Author

Hotell commented Aug 10, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@Hotell Hotell force-pushed the hotell/build/scripts-folder-cleanup branch from 67bef71 to 477ea1b Compare August 10, 2022 10:12
@Hotell Hotell marked this pull request as ready for review August 10, 2022 11:44
@Hotell Hotell requested review from a team as code owners August 10, 2022 11:44
@Hotell Hotell requested a review from layershifter August 10, 2022 13:17
@Hotell Hotell merged commit 512bac0 into microsoft:master Aug 11, 2022
@Hotell Hotell deleted the hotell/build/scripts-folder-cleanup branch August 11, 2022 08:32
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.

5 participants