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(version-bump): Generator to bump versions in the monorepo #19753

Merged
merged 6 commits into from
Sep 22, 2021

Conversation

ling1726
Copy link
Member

@ling1726 ling1726 commented Sep 10, 2021

Pull request checklist

Description of changes

Example output bumping all alpha packages to beta in #19886

Adds a new version-bump to bump specific packages or all packages to the next available version. The important part of the generator is that it will also bump all the dependency versions in dependendents too. Can make the same kinds of bumps as the official NPM semver package

  • major
  • premajor
  • minor
  • preminor
  • patch
  • prepatch
  • prerelease

Usage examples of the generator in README.md

Focus areas to test

(optional)

Adds a new `version-string-replace` generator to match parts of a
version string for a package and replace it with someone else.

Any version string changes will be applied to all dependent packages'
`package.json` dependencies and dev dependencies`

Tested to be able to:
- Migrate `9.0.0-alpha.x` -> `9.0.0-beta.0`
- Remove prerelease tags `9.0.0-beta.69` -> `9.0.0`
@fabricteam
Copy link
Collaborator

fabricteam commented Sep 10, 2021

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-accordion
Accordion (including children components)
55.248 kB
17.403 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
22.932 kB
6.984 kB
react-button
CompoundButton
28.215 kB
7.834 kB
react-button
MenuButton
24.784 kB
7.569 kB
react-button
Button
30.537 kB
8.796 kB
react-button
ToggleButton
32.527 kB
7.601 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
164.296 kB
46.863 kB
react-components
react-components: FluentProvider & webLightTheme
35.754 kB
11.393 kB
react-divider
Divider
15.889 kB
5.747 kB
react-image
Image
9.804 kB
3.942 kB
react-input
Input
31.636 kB
11.312 kB
react-label
Label
9.397 kB
3.839 kB
react-link
Link
11.633 kB
4.582 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)
103.402 kB
31.415 kB
react-menu
Menu (including selectable components)
105.678 kB
31.769 kB
react-popover
Popover
100.411 kB
30.075 kB
react-portal
Portal
6.725 kB
2.237 kB
react-positioning
usePopper
23.145 kB
7.942 kB
react-provider
FluentProvider
15.748 kB
5.773 kB
react-slider
Slider
32.056 kB
10.087 kB
react-switch
Switch
18.816 kB
6.277 kB
react-text
Text - Default
11.722 kB
4.437 kB
react-text
Text - Wrappers
15.344 kB
4.733 kB
react-theme
Teams: all themes
32.945 kB
6.677 kB
react-theme
Teams: Light theme
20.251 kB
5.665 kB
react-tooltip
Tooltip
46.02 kB
15.663 kB
react-utilities
SSRProvider
213 B
170 B
🤖 This report was generated against 1efd41e2ec1086eba6d970c05202845b75b5cc22

@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 4271b48:

Sandbox Source
Fluent UI React Starter Configuration

@size-auditor
Copy link

size-auditor bot commented Sep 10, 2021

Asset size changes

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

Baseline commit: 1efd41e2ec1086eba6d970c05202845b75b5cc22 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 10, 2021

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 937 925 5000
BaseButton mount 940 944 5000
Breadcrumb mount 2610 2583 1000
ButtonNext mount 467 462 5000
Checkbox mount 1565 1715 5000
CheckboxBase mount 1347 1356 5000
ChoiceGroup mount 4857 5026 5000
ComboBox mount 1013 950 1000
CommandBar mount 10145 10054 1000
ContextualMenu mount 6517 6550 1000
DefaultButton mount 1139 1152 5000
DetailsRow mount 3800 3842 5000
DetailsRowFast mount 3792 3845 5000
DetailsRowNoStyles mount 3582 3657 5000
Dialog mount 2452 2455 1000
DocumentCardTitle mount 149 138 1000
Dropdown mount 3329 3359 5000
FluentProviderNext mount 6946 6965 5000
FluentProviderWithTheme mount 327 325 10
FluentProviderWithTheme virtual-rerender 90 92 10
FluentProviderWithTheme virtual-rerender-with-unmount 451 454 10
FocusTrapZone mount 1801 1738 5000
FocusZone mount 1785 1750 5000
IconButton mount 1808 1819 5000
Label mount 344 319 5000
Layer mount 3028 3082 5000
Link mount 472 465 5000
MakeStyles mount 1798 1776 50000
MenuButton mount 1513 1507 5000
MessageBar mount 1971 2014 5000
Nav mount 3345 3349 1000
OverflowSet mount 1074 1116 5000
Panel mount 2346 2381 1000
Persona mount 845 842 1000
Pivot mount 1465 1441 1000
PrimaryButton mount 1303 1310 5000
Rating mount 8000 8163 5000
SearchBox mount 1388 1371 5000
Shimmer mount 2665 2765 5000
Slider mount 1967 1975 5000
SpinButton mount 5055 5016 5000
Spinner mount 401 402 5000
SplitButton mount 3173 3252 5000
Stack mount 536 508 5000
StackWithIntrinsicChildren mount 1657 1633 5000
StackWithTextChildren mount 4825 4783 5000
SwatchColorPicker mount 10353 10568 5000
Tabs mount 1441 1430 1000
TagPicker mount 2614 2629 5000
TeachingBubble mount 13103 13126 5000
Text mount 435 436 5000
TextField mount 1399 1455 5000
ThemeProvider mount 1175 1185 5000
ThemeProvider virtual-rerender 600 596 5000
ThemeProvider virtual-rerender-with-unmount 1944 1962 5000
Toggle mount 842 850 5000
buttonNative mount 103 110 5000

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
AttachmentMinimalPerf.default 175 152 1.15:1
ButtonMinimalPerf.default 185 167 1.11:1
IconMinimalPerf.default 720 650 1.11:1
ButtonSlotsPerf.default 593 549 1.08:1
ChatWithPopoverPerf.default 389 360 1.08:1
FlexMinimalPerf.default 296 275 1.08:1
BoxMinimalPerf.default 365 342 1.07:1
SkeletonMinimalPerf.default 384 360 1.07:1
ReactionMinimalPerf.default 411 387 1.06:1
ChatDuplicateMessagesPerf.default 298 284 1.05:1
DividerMinimalPerf.default 379 361 1.05:1
LabelMinimalPerf.default 409 390 1.05:1
SegmentMinimalPerf.default 362 346 1.05:1
TreeWith60ListItems.default 183 175 1.05:1
ListMinimalPerf.default 550 529 1.04:1
ListWith60ListItems.default 677 648 1.04:1
PopupMinimalPerf.default 610 587 1.04:1
ToolbarMinimalPerf.default 991 952 1.04:1
AlertMinimalPerf.default 285 278 1.03:1
AttachmentSlotsPerf.default 1135 1103 1.03:1
CardMinimalPerf.default 586 568 1.03:1
ChatMinimalPerf.default 675 655 1.03:1
FormMinimalPerf.default 435 424 1.03:1
HeaderMinimalPerf.default 392 380 1.03:1
ListNestedPerf.default 591 575 1.03:1
PortalMinimalPerf.default 171 166 1.03:1
StatusMinimalPerf.default 736 716 1.03:1
TextAreaMinimalPerf.default 544 526 1.03:1
DropdownMinimalPerf.default 3105 3052 1.02:1
ImageMinimalPerf.default 398 391 1.02:1
ListCommonPerf.default 657 645 1.02:1
TableManyItemsPerf.default 2016 1977 1.02:1
TextMinimalPerf.default 368 360 1.02:1
VideoMinimalPerf.default 668 657 1.02:1
DialogMinimalPerf.default 778 772 1.01:1
LayoutMinimalPerf.default 379 377 1.01:1
MenuButtonMinimalPerf.default 1728 1716 1.01:1
RadioGroupMinimalPerf.default 472 469 1.01:1
SplitButtonMinimalPerf.default 4301 4275 1.01:1
TableMinimalPerf.default 426 422 1.01:1
TreeMinimalPerf.default 839 828 1.01:1
ButtonOverridesMissPerf.default 1742 1747 1:1
CheckboxMinimalPerf.default 2781 2777 1:1
DatepickerMinimalPerf.default 5460 5477 1:1
EmbedMinimalPerf.default 4184 4191 1:1
GridMinimalPerf.default 349 349 1:1
HeaderSlotsPerf.default 805 807 1:1
InputMinimalPerf.default 1269 1273 1:1
LoaderMinimalPerf.default 693 690 1:1
MenuMinimalPerf.default 869 868 1:1
ProviderMergeThemesPerf.default 1594 1602 1:1
RefMinimalPerf.default 226 227 1:1
CustomToolbarPrototype.default 3864 3861 1:1
TooltipMinimalPerf.default 1044 1039 1:1
CarouselMinimalPerf.default 468 472 0.99:1
ItemLayoutMinimalPerf.default 1313 1328 0.99:1
ProviderMinimalPerf.default 996 1005 0.99:1
SliderMinimalPerf.default 1580 1596 0.99:1
AnimationMinimalPerf.default 415 424 0.98:1
AvatarMinimalPerf.default 206 210 0.98:1
DropdownManyItemsPerf.default 723 738 0.98:1
RosterPerf.default 1252 1296 0.97:1
AccordionMinimalPerf.default 155 162 0.96:1

Copy link
Contributor

@andrefcdias andrefcdias left a comment

Choose a reason for hiding this comment

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

LGTM, I would just add the following examples to the doc file to standardize stuff in the future:

  • prerelease -> beta
  • beta -> alpha
  • any -> no tag
  • (any other example you find pertinent)

@ling1726 ling1726 changed the title chore(version-string-replace): Generator to update version strings chore(version-bump): Generator to bump versions in the monorepo Sep 21, 2021
@ling1726 ling1726 merged commit e512953 into microsoft:master Sep 22, 2021
mlp73 pushed a commit to mlp73/fluentui that referenced this pull request Jan 17, 2022
…osoft#19753)

* chore(version-string-replace): Generator to update version strings

Adds a new `version-string-replace` generator to match parts of a
version string for a package and replace it with someone else.

Any version string changes will be applied to all dependent packages'
`package.json` dependencies and dev dependencies`

Tested to be able to:
- Migrate `9.0.0-alpha.x` -> `9.0.0-beta.0`
- Remove prerelease tags `9.0.0-beta.69` -> `9.0.0`

* make name optional

* use semver and bump semantics

* remove old params

* Rename to version bump
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