Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

chore: add support for optional chaining and coalescing operator #2317

Merged
merged 4 commits into from Feb 5, 2020

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Feb 4, 2020

This PR adds support for Optional chaining and Nullish coalescing operator for Babel. These features are already supported by our TypeScript version.

@DustyTheBot
Copy link
Collaborator

DustyTheBot commented Feb 4, 2020

Warnings
⚠️ There are no updates provided to CHANGELOG. Ensure there are no publicly visible changes introduced by this PR.
⚠️ Package (or peer) dependencies changed. Make sure you have approval before merging!

Changed dependencies are detected.

Changed dependencies in packages/react-component-ref/package.json

package before after
@babel/runtime ^7.1.2 ^7.7.6

Changed dependencies are detected.

Changed dependencies in packages/react-proptypes/package.json

package before after
@babel/runtime ^7.1.2 ^7.7.6

Changed dependencies are detected.

Changed dependencies in packages/docs-components/package.json

package before after
@babel/runtime ^7.1.2 ^7.7.6

Changed dependencies are detected.

Changed dependencies in packages/react-bindings/package.json

package before after
@babel/runtime ^7.1.2 ^7.7.6

Changed dependencies are detected.

Changed dependencies in packages/react/package.json

package before after
@babel/runtime ^7.1.2 ^7.7.6

Changed dependencies are detected.

Changed dependencies in packages/accessibility/package.json

package before after
@babel/runtime ^7.1.2 ^7.7.6

Changed dependencies are detected.

Changed dependencies in scripts/package.json

package before after
@babel/core ^7.6.4 ^7.7.7

Changed dependencies are detected.

Changed dependencies in packages/state/package.json

package before after
@babel/runtime ^7.1.2 ^7.7.6

Changed dependencies are detected.

Changed dependencies in build/package.json

package before after
@babel/core ^7.6.4 ^7.7.7
@babel/plugin-proposal-class-properties ^7.5.5 ^7.7.4
@babel/plugin-syntax-dynamic-import ^7.2.0 ^7.7.4
@babel/plugin-transform-runtime ^7.6.2 ^7.7.6
@babel/preset-env ^7.6.3 ^7.7.6
@babel/preset-react ^7.6.3 ^7.7.4
@babel/preset-typescript ^7.6.0 ^7.7.7
@babel/register ^7.4.4 ^7.7.7
@babel/standalone ^7.3.2 ^7.7.7
@babel/plugin-proposal-nullish-coalescing-operator - ^7.7.4
@babel/plugin-proposal-optional-chaining - ^7.7.5

Changed dependencies are detected.

Changed dependencies in packages/styles/package.json

package before after
@babel/runtime ^7.1.2 ^7.7.6

Perf comparison

Status Scenario Fluent TPI Fabric TPI Ratio Iterations Ticks
🔧 Avatar.Fluent 0.54 0.39 1.38:1 2000 1074
🔧 Button.Fluent 1.34 0.17 7.88:1 1000 1337
🔧 Checkbox.Fluent 1.4 0.32 4.38:1 1000 1395
🔧 Dialog.Fluent 0.32 0.16 2:1 5000 1585
🔧 Dropdown.Fluent 3.44 0.34 10.12:1 1000 3435
🔧 Icon.Fluent 0.28 0.03 9.33:1 5000 1378
🔧 Image.Fluent 0.09 0.08 1.13:1 5000 473
🔧 Slider.Fluent 1.87 0.31 6.03:1 1000 1871
🔧 Text.Fluent 0.05 0.02 2.5:1 5000 260
🦄 Tooltip.Fluent 0.38 16.82 0.02:1 5000 1887

🔧 Needs work     🎯 On target     🦄 Amazing

Changed dependencies are detected.

Changed dependencies in packages/react-component-event-listener/package.json

package before after
@babel/runtime ^7.1.2 ^7.7.6
Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
ProviderMergeThemesPerf.default 1305 1051 1.24:1
Icon.Fluent 1378 1196 1.15:1
AvatarMinimalPerf.default 645 592 1.09:1
LayoutMinimalPerf.default 512 471 1.09:1
ToolbarMinimalPerf.default 760 696 1.09:1
TreeMinimalPerf.default 881 818 1.08:1
HeaderSlotsPerf.default 1294 1207 1.07:1
AccordionMinimalPerf.default 196 185 1.06:1
ButtonMinimalPerf.default 1308 1232 1.06:1
Text.Fluent 260 245 1.06:1
FlexMinimalPerf.default 334 317 1.05:1
AlertMinimalPerf.default 546 523 1.04:1
ItemLayoutMinimalPerf.default 1616 1555 1.04:1
DividerMinimalPerf.default 851 830 1.03:1
DropdownMinimalPerf.default 3318 3236 1.03:1
ProviderMinimalPerf.default 577 559 1.03:1
ButtonSlotsPerf.default 1767 1739 1.02:1
ChatDuplicateMessagesPerf.default 522 512 1.02:1
CheckboxMinimalPerf.default 6542 6442 1.02:1
TextAreaMinimalPerf.default 2915 2862 1.02:1
EmbedMinimalPerf.default 5891 5839 1.01:1
IconMinimalPerf.default 1002 997 1.01:1
ImageMinimalPerf.default 474 468 1.01:1
RadioGroupMinimalPerf.default 371 367 1.01:1
Button.Fluent 1337 1327 1.01:1
AttachmentMinimalPerf.default 993 997 1:1
ChatMinimalPerf.default 1660 1659 1:1
DialogMinimalPerf.default 1557 1556 1:1
FormMinimalPerf.default 685 683 1:1
GridMinimalPerf.default 753 751 1:1
InputMinimalPerf.default 938 937 1:1
ListMinimalPerf.default 615 616 1:1
MenuMinimalPerf.default 1763 1764 1:1
Checkbox.Fluent 1395 1399 1:1
CarouselMinimalPerf.default 1767 1779 0.99:1
DropdownManyItemsPerf.default 437 443 0.99:1
LabelMinimalPerf.default 1612 1631 0.99:1
MenuButtonMinimalPerf.default 1379 1387 0.99:1
SegmentMinimalPerf.default 1150 1156 0.99:1
SplitButtonMinimalPerf.default 11022 11127 0.99:1
TextMinimalPerf.default 243 245 0.99:1
PopupMinimalPerf.default 350 357 0.98:1
PortalMinimalPerf.default 241 246 0.98:1
ReactionMinimalPerf.default 2354 2406 0.98:1
StatusMinimalPerf.default 849 867 0.98:1
TooltipMinimalPerf.default 2273 2343 0.97:1
Slider.Fluent 1871 1929 0.97:1
ChatWithPopoverPerf.default 529 552 0.96:1
HierarchicalTreeMinimalPerf.default 744 777 0.96:1
LoaderMinimalPerf.default 2308 2398 0.96:1
SliderMinimalPerf.default 1818 1888 0.96:1
TableMinimalPerf.default 551 574 0.96:1
AttachmentSlotsPerf.default 3182 3367 0.95:1
ListCommonPerf.default 1036 1093 0.95:1
CustomToolbarPrototype.default 3613 3793 0.95:1
Tooltip.Fluent 1887 1984 0.95:1
Dialog.Fluent 1585 1693 0.94:1
Image.Fluent 473 519 0.91:1
HeaderMinimalPerf.default 395 441 0.9:1
VideoMinimalPerf.default 642 740 0.87:1
Avatar.Fluent 1074 1228 0.87:1
BoxMinimalPerf.default 201 234 0.86:1
Dropdown.Fluent 3435 3976 0.86:1
AnimationMinimalPerf.default 417 528 0.79:1
RefMinimalPerf.default 140 185 0.76:1

Changed dependencies are detected.

Changed dependencies in packages/react-component-nesting-registry/package.json

package before after
@babel/runtime ^7.1.2 ^7.7.6

Generated by 🚫 dangerJS

Copy link
Contributor

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Love it! ❤️

…ub.com/stardust-ui/react into chore/add-babel-plugins

� Conflicts:
�	build/package.json
�	packages/react-bindings/package.json
�	packages/react/package.json
�	packages/styles/package.json
@layershifter layershifter merged commit c8959a7 into master Feb 5, 2020
@layershifter layershifter deleted the chore/add-babel-plugins branch February 5, 2020 16:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants