-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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: migrate to TS 4.5 #27936
chore: migrate to TS 4.5 #27936
Conversation
📊 Bundle size reportUnchanged fixtures
|
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 554 | 571 | 5000 | |
Button | mount | 288 | 288 | 5000 | |
Field | mount | 1026 | 1008 | 5000 | |
FluentProvider | mount | 641 | 649 | 5000 | |
FluentProviderWithTheme | mount | 74 | 84 | 10 | |
FluentProviderWithTheme | virtual-rerender | 69 | 72 | 10 | |
FluentProviderWithTheme | virtual-rerender-with-unmount | 79 | 77 | 10 | |
InfoButton | mount | 17 | 14 | 5000 | |
MakeStyles | mount | 840 | 845 | 50000 | |
Persona | mount | 1577 | 1534 | 5000 | |
SpinButton | mount | 1267 | 1252 | 5000 |
🕵 fluentuiv8 No visual regressions between this PR and main |
Perf Analysis (
|
Scenario | Current PR Ticks | Baseline Ticks | Ratio | Regression Analysis |
---|---|---|---|---|
AccordionMinimalPerf.default | 74 | 70 | 1.06:1 | analysis |
Perf tests with no regressions
Scenario | Current PR Ticks | Baseline Ticks | Ratio |
---|---|---|---|
AvatarMinimalPerf.default | 113 | 103 | 1.1:1 |
TreeWith60ListItems.default | 85 | 77 | 1.1:1 |
LoaderMinimalPerf.default | 196 | 182 | 1.08:1 |
ProviderMergeThemesPerf.default | 704 | 659 | 1.07:1 |
AlertMinimalPerf.default | 164 | 156 | 1.05:1 |
AttachmentSlotsPerf.default | 658 | 626 | 1.05:1 |
FormMinimalPerf.default | 215 | 204 | 1.05:1 |
GridMinimalPerf.default | 197 | 188 | 1.05:1 |
ItemLayoutMinimalPerf.default | 727 | 692 | 1.05:1 |
ListNestedPerf.default | 333 | 316 | 1.05:1 |
ButtonSlotsPerf.default | 308 | 295 | 1.04:1 |
EmbedMinimalPerf.default | 1761 | 1696 | 1.04:1 |
HeaderSlotsPerf.default | 467 | 451 | 1.04:1 |
ListCommonPerf.default | 402 | 388 | 1.04:1 |
RadioGroupMinimalPerf.default | 262 | 251 | 1.04:1 |
CarouselMinimalPerf.default | 266 | 258 | 1.03:1 |
SliderMinimalPerf.default | 711 | 688 | 1.03:1 |
IconMinimalPerf.default | 385 | 372 | 1.03:1 |
ChatWithPopoverPerf.default | 189 | 185 | 1.02:1 |
DropdownMinimalPerf.default | 1402 | 1372 | 1.02:1 |
LayoutMinimalPerf.default | 200 | 197 | 1.02:1 |
ListWith60ListItems.default | 359 | 352 | 1.02:1 |
PortalMinimalPerf.default | 88 | 86 | 1.02:1 |
ButtonOverridesMissPerf.default | 622 | 614 | 1.01:1 |
CardMinimalPerf.default | 315 | 311 | 1.01:1 |
DropdownManyItemsPerf.default | 385 | 380 | 1.01:1 |
FlexMinimalPerf.default | 152 | 151 | 1.01:1 |
ImageMinimalPerf.default | 220 | 217 | 1.01:1 |
InputMinimalPerf.default | 547 | 539 | 1.01:1 |
ListMinimalPerf.default | 309 | 306 | 1.01:1 |
MenuButtonMinimalPerf.default | 952 | 943 | 1.01:1 |
ReactionMinimalPerf.default | 211 | 209 | 1.01:1 |
RefMinimalPerf.default | 109 | 108 | 1.01:1 |
StatusMinimalPerf.default | 379 | 377 | 1.01:1 |
VideoMinimalPerf.default | 442 | 437 | 1.01:1 |
CheckboxMinimalPerf.default | 1154 | 1159 | 1:1 |
HeaderMinimalPerf.default | 202 | 203 | 1:1 |
MenuMinimalPerf.default | 499 | 498 | 1:1 |
PopupMinimalPerf.default | 353 | 353 | 1:1 |
ProviderMinimalPerf.default | 202 | 202 | 1:1 |
TableManyItemsPerf.default | 1123 | 1127 | 1:1 |
TableMinimalPerf.default | 229 | 229 | 1:1 |
CustomToolbarPrototype.default | 1454 | 1451 | 1:1 |
ToolbarMinimalPerf.default | 525 | 525 | 1:1 |
ChatDuplicateMessagesPerf.default | 151 | 153 | 0.99:1 |
ChatMinimalPerf.default | 439 | 442 | 0.99:1 |
DialogMinimalPerf.default | 446 | 451 | 0.99:1 |
SplitButtonMinimalPerf.default | 2214 | 2240 | 0.99:1 |
TreeMinimalPerf.default | 478 | 484 | 0.99:1 |
BoxMinimalPerf.default | 194 | 197 | 0.98:1 |
ButtonMinimalPerf.default | 88 | 90 | 0.98:1 |
RosterPerf.default | 1535 | 1565 | 0.98:1 |
SegmentMinimalPerf.default | 189 | 193 | 0.98:1 |
TooltipMinimalPerf.default | 1238 | 1263 | 0.98:1 |
DatepickerMinimalPerf.default | 3634 | 3730 | 0.97:1 |
DividerMinimalPerf.default | 204 | 211 | 0.97:1 |
TextMinimalPerf.default | 187 | 192 | 0.97:1 |
TextAreaMinimalPerf.default | 284 | 294 | 0.97:1 |
AnimationMinimalPerf.default | 288 | 299 | 0.96:1 |
LabelMinimalPerf.default | 212 | 221 | 0.96:1 |
SkeletonMinimalPerf.default | 194 | 204 | 0.95:1 |
AttachmentMinimalPerf.default | 76 | 82 | 0.93:1 |
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
BaseButton | mount | 609 | 636 | 5000 | |
Breadcrumb | mount | 1678 | 1650 | 1000 | |
Checkbox | mount | 1702 | 1682 | 5000 | |
CheckboxBase | mount | 1504 | 1472 | 5000 | |
ChoiceGroup | mount | 2920 | 2908 | 5000 | |
ComboBox | mount | 661 | 646 | 1000 | |
CommandBar | mount | 6141 | 6205 | 1000 | |
ContextualMenu | mount | 12034 | 12088 | 1000 | |
DefaultButton | mount | 737 | 737 | 5000 | |
DetailsRow | mount | 2187 | 2174 | 5000 | |
DetailsRowFast | mount | 2190 | 2196 | 5000 | |
DetailsRowNoStyles | mount | 2017 | 2037 | 5000 | |
Dialog | mount | 2599 | 2645 | 1000 | |
DocumentCardTitle | mount | 225 | 222 | 1000 | |
Dropdown | mount | 1980 | 1956 | 5000 | |
FocusTrapZone | mount | 1099 | 1103 | 5000 | |
FocusZone | mount | 1033 | 1039 | 5000 | |
GroupedList | mount | 41199 | 41364 | 2 | |
GroupedList | virtual-rerender | 19868 | 19773 | 2 | |
GroupedList | virtual-rerender-with-unmount | 50618 | 50279 | 2 | |
GroupedListV2 | mount | 225 | 222 | 2 | |
GroupedListV2 | virtual-rerender | 219 | 203 | 2 | |
GroupedListV2 | virtual-rerender-with-unmount | 222 | 232 | 2 | |
IconButton | mount | 1071 | 1083 | 5000 | |
Label | mount | 349 | 333 | 5000 | |
Layer | mount | 2630 | 2707 | 5000 | |
Link | mount | 391 | 384 | 5000 | |
MenuButton | mount | 925 | 936 | 5000 | |
MessageBar | mount | 21252 | 21261 | 5000 | |
Nav | mount | 1923 | 1924 | 1000 | |
OverflowSet | mount | 767 | 768 | 5000 | |
Panel | mount | 1736 | 1757 | 1000 | |
Persona | mount | 736 | 727 | 1000 | |
Pivot | mount | 880 | 887 | 1000 | |
PrimaryButton | mount | 833 | 835 | 5000 | |
Rating | mount | 4634 | 4623 | 5000 | |
SearchBox | mount | 895 | 909 | 5000 | |
Shimmer | mount | 1874 | 1883 | 5000 | |
Slider | mount | 1328 | 1311 | 5000 | |
SpinButton | mount | 2830 | 2868 | 5000 | |
Spinner | mount | 382 | 389 | 5000 | |
SplitButton | mount | 1774 | 1795 | 5000 | |
Stack | mount | 409 | 397 | 5000 | |
StackWithIntrinsicChildren | mount | 840 | 870 | 5000 | |
StackWithTextChildren | mount | 2631 | 2648 | 5000 | |
SwatchColorPicker | mount | 6011 | 6107 | 5000 | |
TagPicker | mount | 1423 | 1441 | 5000 | |
Text | mount | 378 | 376 | 5000 | |
TextField | mount | 934 | 908 | 5000 | |
ThemeProvider | mount | 833 | 839 | 5000 | |
ThemeProvider | virtual-rerender | 591 | 580 | 5000 | |
ThemeProvider | virtual-rerender-with-unmount | 1284 | 1277 | 5000 | |
Toggle | mount | 596 | 600 | 5000 | |
buttonNative | mount | 191 | 187 | 5000 |
🕵 FluentUI-v0 No visual regressions between this PR and main |
🕵 fluentuiv9 No visual regressions between this PR and main |
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 b4c0273:
|
Asset size changes
Baseline commit: 8f385591d246aa1f640e65a9e61149dd49512f5d (build) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this workaround is no longer needed as api-extractor moved to enum
instead const enum
@@ -255,6 +255,7 @@ function tryInsertExistingDecomposedProp(oldProp: string, statement: VariableSta | |||
const decompObject = statement.getFirstDescendantByKind(SyntaxKind.ObjectBindingPattern); | |||
if (decompObject) { | |||
let objectText = decompObject.getText(); | |||
// eslint-disable-next-line deprecation/deprecation | |||
objectText = objectText.substr(0, 1) + ` ${oldProp},` + objectText.substr(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated lib.d.ts
exposed @deprecated
apis used in our code
// eslint-disable-next-line @fluentui/no-context-default-value | ||
globalObject[sym] = baseCreateContext(defaultValue); | ||
globalObject[sym] = baseCreateContext<unknown>(defaultValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generic without default value is set to unknown
type, after bump this was exposed here and triggered errors
@@ -4,7 +4,7 @@ import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts | |||
import { applyFocusVisiblePolyfill } from '../focus/focusVisiblePolyfill'; | |||
|
|||
type UseFocusVisibleOptions = { | |||
targetDocument?: HTMLDocument; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated lib.d.ts
exposed @deprecated
apis used in our code
|
||
type NonUndefined<T> = T extends undefined ? never : T; | ||
// TS Error: Property 'as' does not exist on type 'UnknownSlotProps | undefined'.ts(2339) | ||
const { as: asProp, ...propsWithoutAs } = props as NonUndefined<typeof props>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explicit of removal of undefined
- I dont have proper context to all these type gymnastics created here. feel free to propose better solution @bsunderhus
@@ -13,6 +13,7 @@ describe('EventGroup', () => { | |||
let ev = document.createEvent('HTMLEvents'); | |||
|
|||
eg.on(sourceButton, 'click', parent.cb); | |||
// eslint-disable-next-line deprecation/deprecation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated lib.d.ts
exposed @deprecated
apis used in our code
350f11e
to
abed567
Compare
…thout pacakgeName
bf59ebd
to
b4c0273
Compare
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
* master: Added truncation and tooltips to the Breadcrumb (microsoft#27859) applying package updates applying package updates Export selection types from combobox (microsoft#28054) fix(react-datepicker-compat): Remove focus function from the deps to avoid constant move of focus (microsoft#28053) Updated poster for new stable components (microsoft#28051) Griffel/bump to 1.5.7 (microsoft#27925) feat(scripts): replace use of SWC CLI with SWC transform api (microsoft#27380) chore: Add positioning test for scroll jumps (microsoft#28043) chore: migrate to TS 4.5 (microsoft#27936) Fix toolbar divider styles (microsoft#28044) fix: createFocusOutlineStyle don't work with CSS variables (microsoft#27966) feat(react-tags): use simple button for TagButton content instead of aria button (microsoft#28033)
New Behavior
typescript bump to 4.5 + api-extractor family of packages which is compatible with TS 4.5
TS release notes (affecting our codebase):
Most affected features:
unknown
concat
for template strings - https://devblogs.microsoft.com/typescript/announcing-typescript-4-5/#template-strings-concattarget: es5
theme
andmerge-styles
packages - affectingImage.styles.js
Misc:
api-docs
package dependencies have been propagated to root package.json to follow single version policy approach and to streamline future TS bumpsRemarks
After v-build and core teams approval this will be admin merged ( PR is blocked because size auditor bundle size issues - which is caused by TS ).
Related Issue(s)
react-utilities
ships incompatible types for TS version 4.4 - 4.6 #27951