Skip to content

Update .npmignore files for converged packages#19441

Merged
ecraig12345 merged 2 commits intomicrosoft:masterfrom
ecraig12345:npmignore-converged
Aug 19, 2021
Merged

Update .npmignore files for converged packages#19441
ecraig12345 merged 2 commits intomicrosoft:masterfrom
ecraig12345:npmignore-converged

Conversation

@ecraig12345
Copy link
Member

@ecraig12345 ecraig12345 commented Aug 18, 2021

Pull request checklist

Description of changes

A lot of unnecessary files are being published with converged packages (example), which makes the packages unusable with codesandbox in some cases and is not good for our early-adopter partners.

#19066 proposed changes to the .npmignore files to address this, which it looks like was supposed to be implemented as part of the "run migration generator with --all flag" task in #19103, but to mitigate the problems described above, I think it makes sense to go ahead and do this fix separately.

I also sorted all the entries and added a couple new ones (up for discussion; the RFC and migration generator have been updated to include these):

  • etc/ -- this has the API report markdown file which probably isn't needed? (also in react-menu this contains images from the spec for some reason)
  • __mocks__/ -- standard jest mock location, not used in converged today but theoretically could be in the future
  • Not added to ignores currently but up for discussion: should Spec.md be published?

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 18, 2021

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-accordion
Accordion (including children components)
75.787 kB
22.366 kB
react-avatar
Avatar
56.558 kB
15.66 kB
react-badge
Badge
24.343 kB
7.165 kB
react-badge
CounterBadge
27.156 kB
7.851 kB
react-badge
PresenseBadge
237 B
177 B
react-button
Button
25.016 kB
8.035 kB
react-button
CompoundButton
30.308 kB
8.911 kB
react-button
MenuButton
26.603 kB
8.543 kB
react-button
ToggleButton
34.613 kB
8.671 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
177.666 kB
50.281 kB
react-components
react-components: FluentProvider & webLightTheme
36.288 kB
11.615 kB
react-divider
Divider
15.889 kB
5.747 kB
react-image
Image
10.642 kB
4.264 kB
react-label
Label
9.397 kB
3.839 kB
react-link
Link
14.715 kB
6.012 kB
react-make-styles
makeStaticStyles (runtime)
7.59 kB
3.321 kB
react-make-styles
makeStyles + mergeClasses (runtime)
22.135 kB
8.356 kB
react-make-styles
makeStyles + mergeClasses (build time)
2.557 kB
1.202 kB
react-menu
Menu (including children components)
115.15 kB
34.665 kB
react-menu
Menu (including selectable components)
117.88 kB
35.217 kB
react-popover
Popover
124.599 kB
36.198 kB
react-portal
Portal
7.78 kB
2.672 kB
react-positioning
usePopper
23.145 kB
7.942 kB
react-provider
FluentProvider
16.286 kB
5.991 kB
react-text
Text - Default
11.798 kB
4.452 kB
react-text
Text - Wrappers
15.414 kB
4.734 kB
react-theme
Teams: all themes
32.941 kB
6.674 kB
react-theme
Teams: Light theme
20.247 kB
5.662 kB
react-tooltip
Tooltip
46.054 kB
15.658 kB
react-utilities
SSRProvider
213 B
170 B
🤖 This report was generated against 22316c6a87239b6646c98f8f7f603bb069d55bad

@codesandbox-ci
Copy link

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 0127bee:

Sandbox Source
Fluent UI React Starter Configuration

@size-auditor
Copy link

size-auditor bot commented Aug 18, 2021

Asset size changes

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

Baseline commit: 22316c6a87239b6646c98f8f7f603bb069d55bad (build)

@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 937 952 5000
BaseButton mount 927 933 5000
Breadcrumb mount 2563 2587 1000
ButtonNext mount 438 457 5000
Checkbox mount 1590 1585 5000
CheckboxBase mount 1338 1358 5000
ChoiceGroup mount 4918 4938 5000
ComboBox mount 1009 973 1000
CommandBar mount 10048 10041 1000
ContextualMenu mount 6180 6141 1000
DefaultButton mount 1183 1155 5000
DetailsRow mount 3789 3792 5000
DetailsRowFast mount 3814 3825 5000
DetailsRowNoStyles mount 3603 3601 5000
Dialog mount 2144 2118 1000
DocumentCardTitle mount 153 143 1000
Dropdown mount 3359 3313 5000
FluentProviderNext mount 6990 6947 5000
FocusTrapZone mount 1802 1864 5000
FocusZone mount 1827 1782 5000
IconButton mount 1806 1855 5000
Label mount 326 342 5000
Layer mount 1882 1821 5000
Link mount 462 472 5000
MakeStyles mount 1766 1803 50000
MenuButton mount 1511 1570 5000
MessageBar mount 2047 1969 5000
Nav mount 3402 3389 1000
OverflowSet mount 1098 1134 5000
Panel mount 2100 2100 1000
Persona mount 850 874 1000
Pivot mount 1411 1464 1000
PrimaryButton mount 1300 1302 5000
Rating mount 8106 8093 5000
SearchBox mount 1486 1379 5000
Shimmer mount 2651 2673 5000
Slider mount 2010 2001 5000
SpinButton mount 5085 5106 5000
Spinner mount 414 422 5000
SplitButton mount 3268 3201 5000
Stack mount 522 530 5000
StackWithIntrinsicChildren mount 1651 1645 5000
StackWithTextChildren mount 4877 4756 5000
SwatchColorPicker mount 10448 10563 5000
Tabs mount 1450 1432 1000
TagPicker mount 2631 2630 5000
TeachingBubble mount 11982 11924 5000
Text mount 457 439 5000
TextField mount 1437 1483 5000
ThemeProvider mount 1261 1238 5000
ThemeProvider virtual-rerender 657 640 5000
Toggle mount 852 908 5000
buttonNative mount 114 129 5000

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
AnimationMinimalPerf.default 451 401 1.12:1
PortalMinimalPerf.default 180 163 1.1:1
TreeWith60ListItems.default 188 173 1.09:1
GridMinimalPerf.default 370 343 1.08:1
AccordionMinimalPerf.default 159 148 1.07:1
IconMinimalPerf.default 651 611 1.07:1
CarouselMinimalPerf.default 492 462 1.06:1
AttachmentMinimalPerf.default 175 167 1.05:1
TooltipMinimalPerf.default 1098 1041 1.05:1
BoxMinimalPerf.default 373 357 1.04:1
ButtonSlotsPerf.default 593 570 1.04:1
ChatDuplicateMessagesPerf.default 310 298 1.04:1
DialogMinimalPerf.default 795 766 1.04:1
DropdownManyItemsPerf.default 740 710 1.04:1
FormMinimalPerf.default 444 428 1.04:1
ListCommonPerf.default 680 656 1.04:1
ListMinimalPerf.default 553 532 1.04:1
RosterPerf.default 1283 1228 1.04:1
ProviderMinimalPerf.default 1074 1039 1.03:1
TableMinimalPerf.default 426 415 1.03:1
TextAreaMinimalPerf.default 552 537 1.03:1
TreeMinimalPerf.default 828 803 1.03:1
VideoMinimalPerf.default 664 646 1.03:1
AlertMinimalPerf.default 285 279 1.02:1
AttachmentSlotsPerf.default 1118 1095 1.02:1
ButtonMinimalPerf.default 178 174 1.02:1
CardMinimalPerf.default 595 583 1.02:1
ChatWithPopoverPerf.default 388 379 1.02:1
DatepickerMinimalPerf.default 5571 5463 1.02:1
DropdownMinimalPerf.default 3102 3052 1.02:1
ImageMinimalPerf.default 397 390 1.02:1
ItemLayoutMinimalPerf.default 1281 1261 1.02:1
PopupMinimalPerf.default 599 587 1.02:1
TextMinimalPerf.default 367 361 1.02:1
InputMinimalPerf.default 1287 1269 1.01:1
LayoutMinimalPerf.default 375 373 1.01:1
ListNestedPerf.default 584 579 1.01:1
LoaderMinimalPerf.default 705 700 1.01:1
RefMinimalPerf.default 224 221 1.01:1
SegmentMinimalPerf.default 363 360 1.01:1
SkeletonMinimalPerf.default 377 374 1.01:1
SplitButtonMinimalPerf.default 3968 3928 1.01:1
TableManyItemsPerf.default 2025 2011 1.01:1
CustomToolbarPrototype.default 3927 3875 1.01:1
ButtonOverridesMissPerf.default 1761 1753 1:1
ChatMinimalPerf.default 681 682 1:1
DividerMinimalPerf.default 381 381 1:1
EmbedMinimalPerf.default 4212 4228 1:1
FlexMinimalPerf.default 291 290 1:1
HeaderMinimalPerf.default 375 376 1:1
HeaderSlotsPerf.default 794 796 1:1
ListWith60ListItems.default 655 655 1:1
MenuMinimalPerf.default 870 871 1:1
MenuButtonMinimalPerf.default 1748 1748 1:1
ProviderMergeThemesPerf.default 1626 1630 1:1
RadioGroupMinimalPerf.default 476 477 1:1
ReactionMinimalPerf.default 404 403 1:1
SliderMinimalPerf.default 1585 1598 0.99:1
StatusMinimalPerf.default 703 707 0.99:1
ToolbarMinimalPerf.default 985 999 0.99:1
AvatarMinimalPerf.default 200 207 0.97:1
CheckboxMinimalPerf.default 2747 2820 0.97:1
LabelMinimalPerf.default 393 405 0.97:1

Copy link
Member

@layershifter layershifter left a comment

Choose a reason for hiding this comment

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

@Hotell
Copy link
Contributor

Hotell commented Aug 19, 2021

#19066 proposed changes to the .npmignore files to address this, which it looks like was supposed to be implemented as part of the "run migration generator with --all flag" task in #19103, but to mitigate the problems described above, I think it makes sense to go ahead and do this fix separately.

note that you could have already ran the migration (that npmignore is already present) instead of doing this manually heh (that the main purpose of --all flag )

@Hotell
Copy link
Contributor

Hotell commented Aug 19, 2021

I also sorted all the entries and added a couple new ones (up for discussion):

etc/ -- this has the API report markdown file which probably isn't needed? (also in react-menu this contains images from the spec for some reason)
mocks/ -- standard jest mock location, not used in converged today but theoretically could be in the future
Not added to ignores currently but up for discussion: should Spec.md be published?

can you please do following as a followup?:

@ecraig12345
Copy link
Member Author

can you please do following as a followup?:

Both of those are already included in this PR.

@ecraig12345
Copy link
Member Author

note that you could have already ran the migration (that npmignore is already present) instead of doing this manually heh (that the main purpose of --all flag )

That's what I did, though I had to revert a bunch of changes to other config files that I didn't want to modify (in some instances it didn't seem like the migration was doing the right thing, plus more generally to keep this scoped).

@Hotell
Copy link
Contributor

Hotell commented Aug 19, 2021

Both of those are already included in this PR.

oh sorry I missed that. I'd definitely not miss this if it was chunked into smaller ones (one of reason why I'm always asking folks to separate work into smaller tasks whenever possible 🙏).

@Hotell
Copy link
Contributor

Hotell commented Aug 19, 2021

Not added to ignores currently but up for discussion: should Spec.md be published?

I'd say this should be discussed in separate PR that updates the original RFC

Copy link
Contributor

@Hotell Hotell left a comment

Choose a reason for hiding this comment

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

  • agree with updates to original RFC and their implementation in this PR ( to ignore mocks and etc )
  • going forward I'd like us to follow standard RFC approach when proposing changes to existing ones.

@ecraig12345 ecraig12345 merged commit 8078e69 into microsoft:master Aug 19, 2021
@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-tooltip@v9.0.0-alpha.70 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-text@v9.0.0-alpha.4 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-theme@v9.0.0-alpha.21 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-tabster@v9.0.0-alpha.52 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-link@v9.0.0-alpha.70 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-badge@v9.0.0-alpha.69 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-utilities@v9.0.0-alpha.40 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-positioning@v9.0.0-alpha.45 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-label@v9.0.0-alpha.28 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-avatar@v9.0.0-alpha.69 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-image@v9.0.0-alpha.67 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-portal@v9.0.0-alpha.39 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-shared-contexts@v9.0.0-alpha.22 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-button@v9.0.0-alpha.73 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-accordion@v9.0.0-alpha.64 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-divider@v9.0.0-alpha.57 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-popover@v9.0.0-alpha.30 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-provider@v9.0.0-alpha.66 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-aria@v9.0.0-alpha.22 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/make-styles-webpack-loader@v9.0.0-alpha.11 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-components@v9.0.0-alpha.95 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/make-styles@v9.0.0-alpha.31 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/jest-serializer-make-styles@v9.0.0-alpha.34 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-context-selector@v9.0.0-alpha.24 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/keyboard-keys@v9.0.0-alpha.3 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-menu@v9.0.0-alpha.65 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-checkbox@v9.0.0-alpha.24 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-make-styles@v9.0.0-alpha.58 has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/babel-make-styles@v9.0.0-alpha.38 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants