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: migrate to ts 5.2.2 #32859

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/react-18-tests-v8/tsconfig.cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"jsx": "react",
Copy link
Collaborator

@fabricteam fabricteam Sep 19, 2024

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual regressions to review in the fluentuiv8 Visual Regression Report

react-charting-AreaChart 1 screenshots
Image Name Diff(in Pixels) Image Type
react-charting-AreaChart.Custom Accessibility.chromium.png 11 Changed
react-charting-LineChart 1 screenshots
Image Name Diff(in Pixels) Image Type
react-charting-LineChart.Gaps.chromium.png 1 Changed
react-charting-VerticalBarChart 1 screenshots
Image Name Diff(in Pixels) Image Type
react-charting-VerticalBarChart.Basic - Secondary Y Axis.chromium.png 4 Changed

"isolatedModules": false,
"types": ["node", "cypress", "cypress-real-events"],
"typeRoots": ["../../node_modules", "../../node_modules/@types"],
"lib": ["ES2019", "dom"]
},
"include": ["./src/**/*.cy.ts", "./src/**/*.cy.tsx"]
Expand Down
1 change: 1 addition & 0 deletions apps/react-18-tests-v9/tsconfig.cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"jsx": "react",
"isolatedModules": false,
"types": ["node", "cypress", "cypress-real-events"],
"typeRoots": ["../../node_modules", "../../node_modules/@types"],
"lib": ["ES2019", "dom"]
},
"include": ["./src/**/*.cy.ts", "./src/**/*.cy.tsx"]
Expand Down
3 changes: 2 additions & 1 deletion apps/vr-tests-web-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"extends": "../../tsconfig.base.wc.json",
"compilerOptions": {
"target": "ES2019",
"module": "ESNext",
"module": "NodeNext",
"noEmit": true,
"experimentalDecorators": true,
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"allowJs": true,
"jsx": "react",
Expand Down
3 changes: 2 additions & 1 deletion apps/vr-tests/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"experimentalDecorators": true,
"noUnusedLocals": true,
"preserveConstEnums": true,
"types": ["webpack-env", "@storybook/react"]
"types": ["webpack-env", "@storybook/react"],
"typeRoots": ["../../node_modules", "../../node_modules/@types"]
},
"include": ["src"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "added explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/babel-preset-global-context",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update tsconfig after migration to 5.2",
"packageName": "@fluentui/eslint-plugin",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/global-context",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-aria",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-avatar",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-breadcrumb",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-card",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-combobox",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-datepicker-compat",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-dialog",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-drawer",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-infolabel",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-list-preview",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-menu",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update generated api",
"packageName": "@fluentui/react-migration-v0-v9",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-motion",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-overflow",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-popover",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-portal-compat",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-swatch-picker",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-table",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-tabster",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-tag-picker",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-tags",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-timepicker-compat",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-toast",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-toolbar",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-tree",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "add explicit typeRoot to tsconfig.json",
"packageName": "@fluentui/react-utilities",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update api.md",
"packageName": "@fluentui/theme",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update tsconfig to be compatiable with 5.2",
"packageName": "@fluentui/web-components",
"email": "viktorgenaev@microsoft.com",
"dependentChangeType": "none"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
"tsconfig-paths": "4.2.0",
Copy link
Collaborator

@fabricteam fabricteam Sep 18, 2024

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual regressions to review in the fluentuiv9 Visual Regression Report

Avatar Converged 2 screenshots
Image Name Diff(in Pixels) Image Type
Avatar Converged.Badge Mask RTL.chromium.png 4 Changed
Avatar Converged.badgeMask.chromium.png 19 Changed
Drawer 2 screenshots
Image Name Diff(in Pixels) Image Type
Drawer.Full Overlay Dark Mode.chromium.png 2798 Changed
Drawer.overlay drawer full.chromium.png 1161 Changed

"tsconfig-paths-webpack-plugin": "4.1.0",
"tslib": "2.6.3",
"typescript": "5.0.4",
"typescript": "5.2.2",
"vinyl": "2.2.0",
"webpack": "5.94.0",
"webpack-bundle-analyzer": "4.10.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"noEmit": true,
"allowJs": true,
"checkJs": true,
"module": "commonjs",
"moduleResolution": "nodenext",
"module": "NodeNext",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

"moduleResolution": "NodeNext",
"noUnusedLocals": true,
"skipLibCheck": true,
"strict": true,
Expand Down
46 changes: 25 additions & 21 deletions packages/fluentui/e2e/cypress/support/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'cypress-real-events';

type E2EKeys =
| '{downarrow}'
| '{leftarrow}'
Expand All @@ -22,26 +24,28 @@ type CyrillicLetters = 'т';

type modifier = 'Alt' | 'Control' | 'Meta' | 'Shift';

declare namespace Cypress {
interface Chainable {
gotoTestCase(testFilePath: string, waitForSelector: string): Chainable<Element>;
goto(docsUrl: string, waitForSelector: string): Chainable<Element>;
exist(selector: string): Chainable<Element>;
notExist(selector: string): Chainable<Element>;
nothingIsFocused(): Chainable<Element>;
simulatePageMove(): Chainable<Element>;
clickOn(selector: string): Chainable<Element>;
mouseDownOn(selector: string): Chainable<Element>;
focusOn(selector: string): Chainable<Element>;
hoverOn(selector: string): Chainable<Element>;
resizeViewport(width: number): Chainable<Element>;
isFocused(selector: string): Chainable<Element>;
expectTextOf(selector: string, text: string): Chainable<Element>;
expectCount(selector: string, count: number): Chainable<Element>;
notVisible(selector: string): Chainable<Element>;
visible(selector: string): Chainable<Element>;
waitForSelectorAndPressKey(selector: string, key: E2EKeys, modifier?: modifier): Chainable<Element>;
hasComputedStyle(selector: string, property: keyof CSSStyleDeclaration, value: string): Chainable<Element>;
hasPropertyValue(selector: string, property: string, value: string | number): Chainable<Element>;
declare global {
namespace Cypress {
interface Chainable {
gotoTestCase(testFilePath: string, waitForSelector: string): Chainable<Element>;
goto(docsUrl: string, waitForSelector: string): Chainable<Element>;
exist(selector: string): Chainable<Element>;
notExist(selector: string): Chainable<Element>;
nothingIsFocused(): Chainable<Element>;
simulatePageMove(): Chainable<Element>;
clickOn(selector: string): Chainable<Element>;
mouseDownOn(selector: string): Chainable<Element>;
focusOn(selector: string): Chainable<Element>;
hoverOn(selector: string): Chainable<Element>;
resizeViewport(width: number): Chainable<Element>;
isFocused(selector: string): Chainable<Element>;
expectTextOf(selector: string, text: string): Chainable<Element>;
expectCount(selector: string, count: number): Chainable<Element>;
notVisible(selector: string): Chainable<Element>;
visible(selector: string): Chainable<Element>;
waitForSelectorAndPressKey(selector: string, key: E2EKeys, modifier?: modifier): Chainable<Element>;
hasComputedStyle(selector: string, property: keyof CSSStyleDeclaration, value: string): Chainable<Element>;
hasPropertyValue(selector: string, property: string, value: string | number): Chainable<Element>;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"isolatedModules": false,
"types": ["node", "cypress", "cypress-real-events"],
"typeRoots": ["../../../node_modules", "../../../node_modules/@types"],
"lib": ["ES2019", "dom"]
},
"include": ["**/*.cy.ts", "**/*.cy.tsx"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"isolatedModules": false,
"types": ["node", "cypress", "cypress-real-events"],
"typeRoots": ["../../../node_modules", "../../../node_modules/@types"],
"lib": ["ES2019", "dom"]
},
"include": ["**/*.cy.ts", "**/*.cy.tsx"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"isolatedModules": false,
"types": ["node", "cypress", "cypress-real-events"],
"typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"],
"lib": ["ES2019", "dom"]
},
"include": ["**/*.cy.ts", "**/*.cy.tsx"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"isolatedModules": false,
"types": ["node", "cypress", "cypress-real-events"],
"typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"],
"lib": ["ES2019", "dom"]
},
"include": ["**/*.cy.ts", "**/*.cy.tsx"]
Expand Down
Loading
Loading