-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: migrate v8 to v9 TypeScript DX (no build needed) #22604
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
base: master
Are you sure you want to change the base?
feat: migrate v8 to v9 TypeScript DX (no build needed) #22604
Conversation
cf3f172 to
5b552aa
Compare
📊 Bundle size reportUnchanged fixtures
|
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1255 | 1274 | 5000 | |
| Button | mount | 762 | 764 | 5000 | |
| FluentProvider | mount | 2141 | 2166 | 5000 | |
| FluentProviderWithTheme | mount | 412 | 380 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 389 | 366 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 429 | 451 | 10 | |
| MakeStyles | mount | 1991 | 1937 | 50000 |
506d0da to
4bea154
Compare
|
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 61e4df4:
|
| const tsConfig = JSON.parse(fs.readFileSync(resolveCwd(tsConfigProjectRoot), 'utf-8')); | ||
| const isUsingV8pathAliases = tsConfig.extends && tsConfig.extends.includes('tsconfig.base.v8.json'); | ||
|
|
||
| if (isUsingTsSolutionConfigs || isUsingV8pathAliases) { |
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.
TODO: polish this
| LAGE_PACKAGE_NAME?: string; | ||
| CI?: string; | ||
| TF_BUILD?: string; | ||
| LOCAL?: string; |
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.
add docs that this is used only in v8
Perf Analysis (
|
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| CheckboxMinimalPerf.default | 3727 | 2253 | 1.65:1 |
| LayoutMinimalPerf.default | 306 | 255 | 1.2:1 |
| DividerMinimalPerf.default | 290 | 253 | 1.15:1 |
| SkeletonMinimalPerf.default | 285 | 247 | 1.15:1 |
| TreeWith60ListItems.default | 137 | 120 | 1.14:1 |
| AlertMinimalPerf.default | 223 | 198 | 1.13:1 |
| AccordionMinimalPerf.default | 114 | 103 | 1.11:1 |
| ProviderMergeThemesPerf.default | 1055 | 949 | 1.11:1 |
| AvatarMinimalPerf.default | 167 | 154 | 1.08:1 |
| GridMinimalPerf.default | 289 | 271 | 1.07:1 |
| AttachmentMinimalPerf.default | 125 | 118 | 1.06:1 |
| ChatDuplicateMessagesPerf.default | 255 | 241 | 1.06:1 |
| HeaderSlotsPerf.default | 612 | 576 | 1.06:1 |
| MenuMinimalPerf.default | 684 | 644 | 1.06:1 |
| FormMinimalPerf.default | 337 | 321 | 1.05:1 |
| PortalMinimalPerf.default | 144 | 137 | 1.05:1 |
| SplitButtonMinimalPerf.default | 3703 | 3529 | 1.05:1 |
| BoxMinimalPerf.default | 257 | 246 | 1.04:1 |
| LabelMinimalPerf.default | 317 | 306 | 1.04:1 |
| RefMinimalPerf.default | 175 | 168 | 1.04:1 |
| TreeMinimalPerf.default | 657 | 631 | 1.04:1 |
| ButtonOverridesMissPerf.default | 1231 | 1196 | 1.03:1 |
| DropdownMinimalPerf.default | 2567 | 2491 | 1.03:1 |
| TextAreaMinimalPerf.default | 400 | 388 | 1.03:1 |
| ToolbarMinimalPerf.default | 801 | 774 | 1.03:1 |
| TooltipMinimalPerf.default | 860 | 838 | 1.03:1 |
| DialogMinimalPerf.default | 645 | 634 | 1.02:1 |
| ImageMinimalPerf.default | 312 | 306 | 1.02:1 |
| RadioGroupMinimalPerf.default | 368 | 362 | 1.02:1 |
| TextMinimalPerf.default | 278 | 273 | 1.02:1 |
| CardMinimalPerf.default | 463 | 460 | 1.01:1 |
| DatepickerMinimalPerf.default | 4893 | 4822 | 1.01:1 |
| LoaderMinimalPerf.default | 574 | 566 | 1.01:1 |
| TableMinimalPerf.default | 330 | 327 | 1.01:1 |
| AttachmentSlotsPerf.default | 854 | 852 | 1:1 |
| ChatMinimalPerf.default | 586 | 587 | 1:1 |
| DropdownManyItemsPerf.default | 557 | 556 | 1:1 |
| InputMinimalPerf.default | 1074 | 1069 | 1:1 |
| ListCommonPerf.default | 521 | 522 | 1:1 |
| SegmentMinimalPerf.default | 289 | 289 | 1:1 |
| CustomToolbarPrototype.default | 2238 | 2240 | 1:1 |
| VideoMinimalPerf.default | 551 | 550 | 1:1 |
| AnimationMinimalPerf.default | 402 | 405 | 0.99:1 |
| EmbedMinimalPerf.default | 3381 | 3405 | 0.99:1 |
| FlexMinimalPerf.default | 234 | 236 | 0.99:1 |
| ItemLayoutMinimalPerf.default | 929 | 952 | 0.98:1 |
| RosterPerf.default | 905 | 925 | 0.98:1 |
| IconMinimalPerf.default | 507 | 515 | 0.98:1 |
| TableManyItemsPerf.default | 1558 | 1582 | 0.98:1 |
| ListWith60ListItems.default | 530 | 546 | 0.97:1 |
| SliderMinimalPerf.default | 1291 | 1336 | 0.97:1 |
| ButtonSlotsPerf.default | 432 | 452 | 0.96:1 |
| ProviderMinimalPerf.default | 319 | 333 | 0.96:1 |
| ListNestedPerf.default | 406 | 427 | 0.95:1 |
| ChatWithPopoverPerf.default | 275 | 295 | 0.93:1 |
| CarouselMinimalPerf.default | 348 | 380 | 0.92:1 |
| HeaderMinimalPerf.default | 261 | 285 | 0.92:1 |
| MenuButtonMinimalPerf.default | 1265 | 1376 | 0.92:1 |
| PopupMinimalPerf.default | 472 | 514 | 0.92:1 |
| StatusMinimalPerf.default | 502 | 546 | 0.92:1 |
| ListMinimalPerf.default | 373 | 427 | 0.87:1 |
| ReactionMinimalPerf.default | 310 | 924 | 0.34:1 |
| ButtonMinimalPerf.default | 132 | 405 | 0.33:1 |
|
Because this pull request has not had activity for over 150 days, we're automatically closing it for house-keeping purposes. The pull request will still be available for reference. If it's still relevant to merge at some point, you can reopen or make a new version based on the latest code. |
|
Because this pull request has not had activity for over 150 days, we're automatically closing it for house-keeping purposes. The pull request will still be available for reference. If it's still relevant to merge at some point, you can reopen or make a new version based on the latest code. |
We will implement packages grouping within our monorepo so it's easier to navigate and understand from consumers what library lives where.
Based on this decision we decided to not branch out v9. There has been various reasonings but one of them was to migrate v9 DX to v8 packages.
This PR is the 1st (most difficult) step 🔥.
Current Behavior
New Behavior
Demo:
Following demo showcases immediate TS feedback between
react-examplesandreactwithout any manual builds 🍿.react-examples-v9-ts-dx.mov
public-docsiteapplication which contains around 250 TS errors, that are not easily fixable. This is caused mainly by not having turned on most crucial TS compiler flag "strictNullChecks" in the project.strictTS mode 🙌tsconfig.base.v8.jsonneeds to turn offstrictFunctionTypeswhich triggers around 400 TS errors inreactpackageisolatedModuleswhich enforces leveragingtypefor exports thus improving tree-shakeabilityes2015compile target instead ofes5. Until now it was not exposed by global leaking types that v8 packages leverage features beyondE5. The ECMA features used goes up toES2017in some packages !Object.valuesString.prototype.includesSetMapWeakMap3. just scripts build update
just task
tswill now apply same behaviour like for v9 when runningbuildRelated Issue(s)
Fixes partially #TODO