Skip to content

Commit

Permalink
chore: migrate to ts 5.2.2 (#32859)
Browse files Browse the repository at this point in the history
Co-authored-by: viktorgenaev <viktorgenaev@microsoft.com>
  • Loading branch information
mainframev and viktorgenaev authored Nov 4, 2024
1 parent 69dc72a commit d6af8e3
Show file tree
Hide file tree
Showing 83 changed files with 318 additions and 66 deletions.
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",
"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"
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
"tsconfig-paths": "4.2.0",
"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 Expand Up @@ -377,7 +377,8 @@
"eslint": "8.57.0",
"swc-loader": "^0.2.6",
"prettier": "2.8.8",
"puppeteer": "19.6.0"
"puppeteer": "19.6.0",
"@microsoft/api-extractor/typescript": "5.2.2"
},
"nx": {
"includedScripts": []
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",
"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
1 change: 1 addition & 0 deletions packages/react-components/global-context/tsconfig.cy.json
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

0 comments on commit d6af8e3

Please sign in to comment.