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

fix(scripts-tasks): make generate-api work in deterministic way #28215

Merged

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Jun 14, 2023

Previous Behavior

generate-api is non deterministic/broken on ci/local environmnent

New Behavior

generating api (api.md)

yarn workspace <your-package-name> generate-api won't work anymore if your package dependencies are missing thus you need to use lage -> yarn lage generate-api --to <your-package-name>

This is an unfortunate limitation caused by api-extractor.

they implemented path aliases behaviour in buggy way which will bundle inner workspace package definitions, thus getting deterministic dts rollups and api.md is only possible via tight coupling/relying on symlink functionality provided by npm/yarn workspaces.

How to generate api.md on local:

While running yarn lage build -to <your-package-name> works, you can narrow that down for v9 family of packages to yarn lage generate-api --to <your-package-name>.

react-conformance

Migrated to v9 setup -> this change might introduce breaking changes / we ship now rolluped d.ts and transpilation is done via swc.

This was necessary in order to make generate-api task work.

Related Issue(s)

@github-actions github-actions bot added this to the June Project Cycle Q2 2023 milestone Jun 14, 2023
@Hotell Hotell changed the title Hotell/build/api extractor path aliases fix fix(scripts-tasks): make generate-api work in deterministic way Jun 14, 2023
@fabricteam
Copy link
Collaborator

fabricteam commented Jun 14, 2023

🕵 fluentuiv8 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 14, 2023

🕵 fluentuiv9 No visual regressions between this PR and main

@size-auditor
Copy link

size-auditor bot commented Jun 14, 2023

Asset size changes

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

Baseline commit: 02c7384de10ee35cc4db1a2132c32de59db58e1f (build)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 14, 2023

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 6097243:

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

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 14, 2023

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 606 587 5000
Button mount 292 292 5000
Field mount 1039 1051 5000
FluentProvider mount 648 621 5000
FluentProviderWithTheme mount 77 73 10
FluentProviderWithTheme virtual-rerender 66 69 10
FluentProviderWithTheme virtual-rerender-with-unmount 73 73 10
InfoButton mount 10 13 5000
MakeStyles mount 862 831 50000
Persona mount 1653 1622 5000
SpinButton mount 1267 1291 5000

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 14, 2023

Perf Analysis (@fluentui/react-northstar)

⚠️ 1 potential perf regressions detected

Potential regressions comparing to master

Scenario Current PR Ticks Baseline Ticks Ratio Regression Analysis
ButtonMinimalPerf.default 91 99 0.92:1 analysis
Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
ChatDuplicateMessagesPerf.default 159 147 1.08:1
ChatMinimalPerf.default 464 431 1.08:1
ListCommonPerf.default 414 385 1.08:1
CarouselMinimalPerf.default 275 257 1.07:1
PopupMinimalPerf.default 375 351 1.07:1
AttachmentMinimalPerf.default 85 81 1.05:1
RefMinimalPerf.default 111 106 1.05:1
SegmentMinimalPerf.default 207 197 1.05:1
AccordionMinimalPerf.default 83 80 1.04:1
ButtonSlotsPerf.default 322 309 1.04:1
FormMinimalPerf.default 219 211 1.04:1
SkeletonMinimalPerf.default 197 189 1.04:1
SplitButtonMinimalPerf.default 2311 2229 1.04:1
ToolbarMinimalPerf.default 551 530 1.04:1
AvatarMinimalPerf.default 113 110 1.03:1
CheckboxMinimalPerf.default 1167 1128 1.03:1
DialogMinimalPerf.default 466 452 1.03:1
HeaderMinimalPerf.default 212 206 1.03:1
TextAreaMinimalPerf.default 296 287 1.03:1
ButtonOverridesMissPerf.default 668 654 1.02:1
DropdownMinimalPerf.default 1410 1388 1.02:1
EmbedMinimalPerf.default 1874 1837 1.02:1
GridMinimalPerf.default 193 189 1.02:1
StatusMinimalPerf.default 395 387 1.02:1
IconMinimalPerf.default 395 389 1.02:1
DropdownManyItemsPerf.default 391 387 1.01:1
InputMinimalPerf.default 540 537 1.01:1
MenuMinimalPerf.default 501 495 1.01:1
MenuButtonMinimalPerf.default 981 969 1.01:1
TableManyItemsPerf.default 1132 1126 1.01:1
TooltipMinimalPerf.default 1268 1252 1.01:1
AnimationMinimalPerf.default 301 300 1:1
DividerMinimalPerf.default 202 203 1:1
FlexMinimalPerf.default 157 157 1:1
ItemLayoutMinimalPerf.default 712 709 1:1
LabelMinimalPerf.default 230 230 1:1
LayoutMinimalPerf.default 200 201 1:1
ListMinimalPerf.default 312 311 1:1
ReactionMinimalPerf.default 219 218 1:1
SliderMinimalPerf.default 744 746 1:1
CustomToolbarPrototype.default 1485 1482 1:1
TreeMinimalPerf.default 470 468 1:1
AlertMinimalPerf.default 153 154 0.99:1
AttachmentSlotsPerf.default 634 638 0.99:1
DatepickerMinimalPerf.default 3617 3645 0.99:1
ImageMinimalPerf.default 224 226 0.99:1
ListNestedPerf.default 331 333 0.99:1
ListWith60ListItems.default 365 368 0.99:1
RosterPerf.default 1527 1536 0.99:1
ProviderMinimalPerf.default 200 202 0.99:1
TextMinimalPerf.default 193 194 0.99:1
BoxMinimalPerf.default 192 195 0.98:1
CardMinimalPerf.default 307 313 0.98:1
LoaderMinimalPerf.default 181 185 0.98:1
ProviderMergeThemesPerf.default 649 663 0.98:1
RadioGroupMinimalPerf.default 258 263 0.98:1
VideoMinimalPerf.default 428 436 0.98:1
ChatWithPopoverPerf.default 202 208 0.97:1
HeaderSlotsPerf.default 454 467 0.97:1
PortalMinimalPerf.default 88 92 0.96:1
TableMinimalPerf.default 233 242 0.96:1
TreeWith60ListItems.default 83 88 0.94:1

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 14, 2023

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
global-context
createContext
510 B
330 B
global-context
createContextSelector
537 B
342 B
priority-overflow
createOverflowManager
3.194 kB
1.315 kB
react-accordion
Accordion (including children components)
88.064 kB
26.659 kB
react-alert
Alert
82.552 kB
21.771 kB
react-avatar
Avatar
47.7 kB
14.504 kB
react-avatar
AvatarGroup
15.682 kB
6.306 kB
react-avatar
AvatarGroupItem
63.876 kB
18.984 kB
react-badge
Badge
23.591 kB
7.264 kB
react-badge
CounterBadge
24.493 kB
7.565 kB
react-badge
PresenceBadge
22.213 kB
7.872 kB
react-button
Button
36.778 kB
9.51 kB
react-button
CompoundButton
43.932 kB
10.99 kB
react-button
MenuButton
40.965 kB
10.705 kB
react-button
SplitButton
49.197 kB
12.27 kB
react-button
ToggleButton
55.06 kB
11.446 kB
react-card
Card - All
88.752 kB
25.122 kB
react-card
Card
83.687 kB
23.666 kB
react-card
CardFooter
9.229 kB
3.9 kB
react-card
CardHeader
11.125 kB
4.596 kB
react-card
CardPreview
10.034 kB
4.248 kB
react-checkbox
Checkbox
33.164 kB
10.699 kB
react-combobox
Combobox (including child components)
86.98 kB
28.084 kB
react-combobox
Dropdown (including child components)
85.321 kB
27.675 kB
react-components
react-components: Button, FluentProvider & webLightTheme
64.935 kB
17.918 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
210.103 kB
58.624 kB
react-components
react-components: FluentProvider & webLightTheme
36.168 kB
11.964 kB
react-datepicker-compat
DatePicker Compat
221.601 kB
59.012 kB
react-dialog
Dialog (including children components)
91.673 kB
27.385 kB
react-divider
Divider
17.477 kB
6.357 kB
react-field
Field
18.003 kB
6.931 kB
react-image
Image
11.55 kB
4.627 kB
react-infobutton
InfoButton
131.018 kB
40.224 kB
react-infobutton
InfoLabel
134.483 kB
41.291 kB
react-input
Input
24.219 kB
7.781 kB
react-label
Label
10.175 kB
4.243 kB
react-link
Link
12.375 kB
5.113 kB
react-menu
Menu (including children components)
132.175 kB
40.453 kB
react-menu
Menu (including selectable components)
134.939 kB
40.948 kB
react-overflow
hooks only
11.206 kB
4.266 kB
react-persona
Persona
54.621 kB
16.435 kB
react-popover
Popover
119.608 kB
36.799 kB
react-portal
Portal
11.82 kB
4.391 kB
react-portal-compat
PortalCompatProvider
6.473 kB
2.196 kB
react-positioning
usePositioning
24.249 kB
8.856 kB
react-progress
ProgressBar
13.927 kB
5.488 kB
react-provider
FluentProvider
18.115 kB
6.719 kB
react-radio
Radio
26.952 kB
8.608 kB
react-radio
RadioGroup
11.362 kB
4.753 kB
react-select
Select
24.915 kB
8.708 kB
react-slider
Slider
34.358 kB
11.107 kB
react-spinbutton
SpinButton
33.452 kB
10.296 kB
react-spinner
Spinner
21.363 kB
7.021 kB
react-switch
Switch
29.472 kB
9.226 kB
react-table
DataGrid
155.895 kB
42.648 kB
react-table
Table (Primitives only)
44.424 kB
12.421 kB
react-table
Table as DataGrid
131.551 kB
33.673 kB
react-table
Table (Selection only)
77.333 kB
19.11 kB
react-table
Table (Sort only)
76.663 kB
18.921 kB
react-tags
Tag
21.277 kB
7.786 kB
react-text
Text - Default
12.563 kB
4.972 kB
react-text
Text - Wrappers
15.713 kB
5.293 kB
react-textarea
Textarea
27.69 kB
9.125 kB
react-theme
Single theme token import
69 B
89 B
react-theme
Teams: all themes
31.33 kB
6.764 kB
react-theme
Teams: Light theme
17.895 kB
5.162 kB
react-tooltip
Tooltip
47.263 kB
16.585 kB
react-utilities
SSRProvider
180 B
159 B
🤖 This report was generated against 02c7384de10ee35cc4db1a2132c32de59db58e1f

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 14, 2023

🕵 FluentUI-v0 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 14, 2023

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 619 628 5000
Breadcrumb mount 1670 1666 1000
Checkbox mount 1691 1680 5000
CheckboxBase mount 1495 1488 5000
ChoiceGroup mount 2921 2941 5000
ComboBox mount 649 654 1000
CommandBar mount 6203 6223 1000
ContextualMenu mount 12841 12755 1000
DefaultButton mount 741 729 5000
DetailsRow mount 2144 2214 5000
DetailsRowFast mount 2183 2150 5000
DetailsRowNoStyles mount 1985 2030 5000
Dialog mount 2610 2752 1000
DocumentCardTitle mount 229 232 1000
Dropdown mount 1986 1953 5000
FocusTrapZone mount 1123 1148 5000
FocusZone mount 1058 1085 5000
GroupedList mount 41393 41202 2
GroupedList virtual-rerender 17751 19824 2
GroupedList virtual-rerender-with-unmount 50524 50388 2
GroupedListV2 mount 236 226 2
GroupedListV2 virtual-rerender 199 221 2
GroupedListV2 virtual-rerender-with-unmount 229 232 2
IconButton mount 1083 1042 5000
Label mount 321 341 5000
Layer mount 2715 2713 5000
Link mount 388 396 5000
MenuButton mount 949 957 5000
MessageBar mount 21372 21431 5000
Nav mount 1934 1926 1000
OverflowSet mount 793 777 5000
Panel mount 2047 1769 1000
Persona mount 722 737 1000
Pivot mount 865 845 1000
PrimaryButton mount 816 860 5000
Rating mount 4520 4546 5000
SearchBox mount 899 929 5000
Shimmer mount 1874 1838 5000
Slider mount 1380 1325 5000
SpinButton mount 2845 2870 5000
Spinner mount 375 379 5000
SplitButton mount 1870 1808 5000
Stack mount 416 416 5000
StackWithIntrinsicChildren mount 869 869 5000
StackWithTextChildren mount 2626 2582 5000
SwatchColorPicker mount 6152 6130 5000
TagPicker mount 1472 1423 5000
Text mount 384 379 5000
TextField mount 932 931 5000
ThemeProvider mount 829 845 5000
ThemeProvider virtual-rerender 592 578 5000
ThemeProvider virtual-rerender-with-unmount 1263 1257 5000
Toggle mount 609 588 5000
buttonNative mount 181 187 5000

@Hotell Hotell merged commit 402599e into microsoft:master Jun 16, 2023
@Hotell Hotell deleted the hotell/build/api-extractor-path-aliases-fix branch June 16, 2023 08:51
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Jun 20, 2023
* master: (32 commits)
  applying package updates
  feat(react-tags): add styles for size (microsoft#28229)
  docs(react-dialog): update DialogTriggerOutsideDialog to include focus behavior (microsoft#28176)
  bugfix: Ensures dialog actions stretches on breakpoints (microsoft#28258)
  applying package updates
  fix: TableHeaderCell should not render button when not sortable (microsoft#28097)
  fix(react-file-type-icons): Map mhtml extension to html icon (microsoft#28112)
  Fix overlapping axis labels on smaller viewports (microsoft#28239)
  useArrowNavigationGroup grid-linear axis (microsoft#28253)
  applying package updates
  fix: Alert example missing aria-label for icon (microsoft#28234)
  Overflow divider fix (microsoft#28011)
  feat(tools): implement `cypress-component-configuration` generator (microsoft#28115)
  chore: migrate to TS 4.7 (microsoft#28067)
  fix(scripts-tasks): make generate-api work in deterministic way (microsoft#28215)
  feat(react-tags): add overflow story (microsoft#28012)
  Structure and slots for SearchBox, using Input as a slot (microsoft#28090)
  feat(tokens): Add/update theme tokens (microsoft#27791)
  feat(react-tags): add a11y role and best practices guide (microsoft#28075)
  fix: Toast intent should always be present in the context (microsoft#28226)
  ...
@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Api extractor output does not match ci
6 participants