From 5a537ebd1af701d572482e34e8c280a72e1d8646 Mon Sep 17 00:00:00 2001 From: mainframev Date: Wed, 28 Aug 2024 15:51:09 +0200 Subject: [PATCH 01/10] chore: upgrade typescript to v5 --- apps/vr-tests-web-components/tsconfig.json | 3 ++- package.json | 2 +- packages/eslint-plugin/tsconfig.json | 4 ++-- packages/theme/etc/theme.api.md | 20 ++++++++++---------- packages/web-components/tsconfig.json | 3 ++- packages/web-components/tsconfig.lib.json | 1 + packages/web-components/tsconfig.spec.json | 3 ++- tsconfig.base.wc.json | 1 - yarn.lock | 7 ++++++- 9 files changed, 26 insertions(+), 18 deletions(-) diff --git a/apps/vr-tests-web-components/tsconfig.json b/apps/vr-tests-web-components/tsconfig.json index 5d883fb3e5d65..abfc043cd7b04 100644 --- a/apps/vr-tests-web-components/tsconfig.json +++ b/apps/vr-tests-web-components/tsconfig.json @@ -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", diff --git a/package.json b/package.json index 7449a9f951ac3..772b6556fd9d8 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/eslint-plugin/tsconfig.json b/packages/eslint-plugin/tsconfig.json index c64fb9e7c3b8a..b1b552a86061f 100644 --- a/packages/eslint-plugin/tsconfig.json +++ b/packages/eslint-plugin/tsconfig.json @@ -3,8 +3,8 @@ "noEmit": true, "allowJs": true, "checkJs": true, - "module": "commonjs", - "moduleResolution": "nodenext", + "module": "NodeNext", + "moduleResolution": "NodeNext", "noUnusedLocals": true, "skipLibCheck": true, "strict": true, diff --git a/packages/theme/etc/theme.api.md b/packages/theme/etc/theme.api.md index b71f2564ce7ab..4e8afdb7d1175 100644 --- a/packages/theme/etc/theme.api.md +++ b/packages/theme/etc/theme.api.md @@ -520,19 +520,19 @@ export interface ITheme extends Theme { // @public (undocumented) export namespace LocalizedFontFamilies { const // (undocumented) - Arabic: string; + Arabic = "'Segoe UI Web (Arabic)'"; const // (undocumented) ChineseSimplified = "'Microsoft Yahei UI', Verdana, Simsun"; const // (undocumented) ChineseTraditional = "'Microsoft Jhenghei UI', Pmingliu"; const // (undocumented) - Cyrillic: string; + Cyrillic = "'Segoe UI Web (Cyrillic)'"; const // (undocumented) - EastEuropean: string; + EastEuropean = "'Segoe UI Web (East European)'"; const // (undocumented) - Greek: string; + Greek = "'Segoe UI Web (Greek)'"; const // (undocumented) - Hebrew: string; + Hebrew = "'Segoe UI Web (Hebrew)'"; const // (undocumented) Hindi = "'Nirmala UI'"; const // (undocumented) @@ -540,17 +540,17 @@ export namespace LocalizedFontFamilies { const // (undocumented) Korean = "'Malgun Gothic', Gulim"; const // (undocumented) - Selawik: string; + Selawik = "'Selawik Web'"; const // (undocumented) Thai = "'Leelawadee UI Web', 'Kmer UI'"; const // (undocumented) - Vietnamese: string; + Vietnamese = "'Segoe UI Web (Vietnamese)'"; const // (undocumented) - WestEuropean: string; + WestEuropean = "'Segoe UI Web (West European)'"; const // (undocumented) - Armenian: string; + Armenian = "'Segoe UI Web (Armenian)'"; const // (undocumented) - Georgian: string; + Georgian = "'Segoe UI Web (Georgian)'"; } // @public (undocumented) diff --git a/packages/web-components/tsconfig.json b/packages/web-components/tsconfig.json index 5ff1a0e61b3d1..842071c3e35d1 100644 --- a/packages/web-components/tsconfig.json +++ b/packages/web-components/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.base.wc.json", "compilerOptions": { "target": "ES2019", - "module": "ESNext", + "module": "NodeNext", + "moduleResolution": "Node16", "experimentalDecorators": true, "resolveJsonModule": true, "allowJs": true diff --git a/packages/web-components/tsconfig.lib.json b/packages/web-components/tsconfig.lib.json index c4d92fe979201..5ea997a4f63cd 100644 --- a/packages/web-components/tsconfig.lib.json +++ b/packages/web-components/tsconfig.lib.json @@ -3,6 +3,7 @@ "compilerOptions": { "target": "ES2019", "module": "ESNext", + "moduleResolution": "bundler", "lib": ["ESNext", "DOM"], "declaration": true, "declarationDir": "dist/dts", diff --git a/packages/web-components/tsconfig.spec.json b/packages/web-components/tsconfig.spec.json index 6287b1ce0f8d5..d365f731b4c26 100644 --- a/packages/web-components/tsconfig.spec.json +++ b/packages/web-components/tsconfig.spec.json @@ -1,7 +1,8 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "module": "ESNext", + "module": "NodeNext", + "moduleResolution": "NodeNext", "outDir": "dist/esm", "types": ["node"] }, diff --git a/tsconfig.base.wc.json b/tsconfig.base.wc.json index 472f867dd913b..5c7d220e1c3a6 100644 --- a/tsconfig.base.wc.json +++ b/tsconfig.base.wc.json @@ -2,7 +2,6 @@ "compilerOptions": { "target": "ES2019", "module": "ESNext", - "moduleResolution": "Node16", "esModuleInterop": true, "sourceMap": true, "strict": true, diff --git a/yarn.lock b/yarn.lock index 8c418a5ad4065..962f70beafec4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22758,7 +22758,12 @@ typescript-eslint@^8.0.0: "@typescript-eslint/parser" "8.8.1" "@typescript-eslint/utils" "8.8.1" -typescript@5.0.4, typescript@~5.0.4: +typescript@5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== + +typescript@~5.0.4: version "5.0.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== From 8238075fec80afd584ea8210609fdb5a8a006bd3 Mon Sep 17 00:00:00 2001 From: viktorgenaev Date: Wed, 18 Sep 2024 11:57:15 +0200 Subject: [PATCH 02/10] chore(web-components): remove redundant ts suppressions --- .../web-components/src/menu-item/menu-item.template.ts | 4 +--- packages/web-components/src/menu-item/menu-item.ts | 7 ------- packages/web-components/src/menu/menu.ts | 3 --- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/web-components/src/menu-item/menu-item.template.ts b/packages/web-components/src/menu-item/menu-item.template.ts index dc85ee5215b48..0bd4204994718 100644 --- a/packages/web-components/src/menu-item/menu-item.template.ts +++ b/packages/web-components/src/menu-item/menu-item.template.ts @@ -18,9 +18,7 @@ export function menuItemTemplate(options: MenuItemOptions = @click="${(x, c) => x.handleMenuItemClick(c.event as MouseEvent)}" @mouseover="${(x, c) => x.handleMouseOver(c.event as MouseEvent)}" @mouseout="${(x, c) => x.handleMouseOut(c.event as MouseEvent)}" - @toggle="${(x, c) => - // @ts-expect-error - Baseline 2024 - x.toggleHandler(c.event as ToggleEvent)}" + @toggle="${(x, c) => x.toggleHandler(c.event as ToggleEvent)}" > ${staticallyCompose(options.indicator)} ${startSlotTemplate(options)} diff --git a/packages/web-components/src/menu-item/menu-item.ts b/packages/web-components/src/menu-item/menu-item.ts index cdae6b3e8f4b9..98619ea758794 100644 --- a/packages/web-components/src/menu-item/menu-item.ts +++ b/packages/web-components/src/menu-item/menu-item.ts @@ -183,7 +183,6 @@ export class MenuItem extends FASTElement { case keyArrowRight: //open/focus on submenu if (!this.disabled) { - // @ts-expect-error - Baseline 2024 this.submenu?.togglePopover(true); this.submenu?.focus(); } @@ -193,7 +192,6 @@ export class MenuItem extends FASTElement { case keyArrowLeft: //close submenu if (this.parentElement?.hasAttribute('popover')) { - // @ts-expect-error - Baseline 2024 this.parentElement.togglePopover(false); // focus the menu item containing the submenu this.parentElement.parentElement?.focus(); @@ -224,7 +222,6 @@ export class MenuItem extends FASTElement { if (this.disabled) { return false; } - // @ts-expect-error - Baseline 2024 this.submenu?.togglePopover(true); return false; }; @@ -236,7 +233,6 @@ export class MenuItem extends FASTElement { if (this.contains(document.activeElement)) { return false; } - // @ts-expect-error - Baseline 2024 this.submenu?.togglePopover(false); return false; @@ -247,13 +243,11 @@ export class MenuItem extends FASTElement { * @internal */ public toggleHandler = (e: Event): void => { - // @ts-expect-error - Baseline 2024 if (e instanceof ToggleEvent && e.newState === 'open') { this.setAttribute('tabindex', '-1'); this.elementInternals.ariaExpanded = 'true'; this.setSubmenuPosition(); } - // @ts-expect-error - Baseline 2024 if (e instanceof ToggleEvent && e.newState === 'closed') { this.elementInternals.ariaExpanded = 'false'; this.setAttribute('tabindex', '0'); @@ -275,7 +269,6 @@ export class MenuItem extends FASTElement { case MenuItemRole.menuitem: if (!!this.submenu) { - // @ts-expect-error - Baseline 2024 this.submenu.togglePopover(true); this.submenu.focus(); break; diff --git a/packages/web-components/src/menu/menu.ts b/packages/web-components/src/menu/menu.ts index a117e7999514c..5a3da14a5ca2d 100644 --- a/packages/web-components/src/menu/menu.ts +++ b/packages/web-components/src/menu/menu.ts @@ -161,7 +161,6 @@ export class Menu extends FASTElement { * @public */ public toggleMenu = () => { - // @ts-expect-error - Baseline 2024 this._menuList?.togglePopover(!this._open); }; @@ -178,7 +177,6 @@ export class Menu extends FASTElement { ) { return; } - // @ts-expect-error - Baseline 2024 this._menuList?.togglePopover(false); if (this.closeOnScroll) { @@ -191,7 +189,6 @@ export class Menu extends FASTElement { * @public */ public openMenu = (e?: Event) => { - // @ts-expect-error - Baseline 2024 this._menuList?.togglePopover(true); if (e && this.openOnContext) { From 3eba8b2be065d9ef208715b5a9b6849a9a7ead2b Mon Sep 17 00:00:00 2001 From: viktorgenaev Date: Wed, 18 Sep 2024 16:38:58 +0200 Subject: [PATCH 03/10] fix(e2e): adjust typings for cypress --- .../fluentui/e2e/cypress/support/index.d.ts | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/packages/fluentui/e2e/cypress/support/index.d.ts b/packages/fluentui/e2e/cypress/support/index.d.ts index b7631148eebde..74e2f49ef330e 100644 --- a/packages/fluentui/e2e/cypress/support/index.d.ts +++ b/packages/fluentui/e2e/cypress/support/index.d.ts @@ -1,3 +1,5 @@ +import 'cypress-real-events'; + type E2EKeys = | '{downarrow}' | '{leftarrow}' @@ -22,26 +24,28 @@ type CyrillicLetters = 'т'; type modifier = 'Alt' | 'Control' | 'Meta' | 'Shift'; -declare namespace Cypress { - interface Chainable { - gotoTestCase(testFilePath: string, waitForSelector: string): Chainable; - goto(docsUrl: string, waitForSelector: string): Chainable; - exist(selector: string): Chainable; - notExist(selector: string): Chainable; - nothingIsFocused(): Chainable; - simulatePageMove(): Chainable; - clickOn(selector: string): Chainable; - mouseDownOn(selector: string): Chainable; - focusOn(selector: string): Chainable; - hoverOn(selector: string): Chainable; - resizeViewport(width: number): Chainable; - isFocused(selector: string): Chainable; - expectTextOf(selector: string, text: string): Chainable; - expectCount(selector: string, count: number): Chainable; - notVisible(selector: string): Chainable; - visible(selector: string): Chainable; - waitForSelectorAndPressKey(selector: string, key: E2EKeys, modifier?: modifier): Chainable; - hasComputedStyle(selector: string, property: keyof CSSStyleDeclaration, value: string): Chainable; - hasPropertyValue(selector: string, property: string, value: string | number): Chainable; +declare global { + namespace Cypress { + interface Chainable { + gotoTestCase(testFilePath: string, waitForSelector: string): Chainable; + goto(docsUrl: string, waitForSelector: string): Chainable; + exist(selector: string): Chainable; + notExist(selector: string): Chainable; + nothingIsFocused(): Chainable; + simulatePageMove(): Chainable; + clickOn(selector: string): Chainable; + mouseDownOn(selector: string): Chainable; + focusOn(selector: string): Chainable; + hoverOn(selector: string): Chainable; + resizeViewport(width: number): Chainable; + isFocused(selector: string): Chainable; + expectTextOf(selector: string, text: string): Chainable; + expectCount(selector: string, count: number): Chainable; + notVisible(selector: string): Chainable; + visible(selector: string): Chainable; + waitForSelectorAndPressKey(selector: string, key: E2EKeys, modifier?: modifier): Chainable; + hasComputedStyle(selector: string, property: keyof CSSStyleDeclaration, value: string): Chainable; + hasPropertyValue(selector: string, property: string, value: string | number): Chainable; + } } } From 4a14850ca9d0798c7c8e554f64b9ab3003b82d2e Mon Sep 17 00:00:00 2001 From: viktorgenaev Date: Wed, 18 Sep 2024 16:57:27 +0200 Subject: [PATCH 04/10] chore(react-migration-v0-v9): update api.md --- .../library/etc/react-migration-v0-v9.api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-components/react-migration-v0-v9/library/etc/react-migration-v0-v9.api.md b/packages/react-components/react-migration-v0-v9/library/etc/react-migration-v0-v9.api.md index 7e48e909d5db5..5414b326c1d7a 100644 --- a/packages/react-components/react-migration-v0-v9/library/etc/react-migration-v0-v9.api.md +++ b/packages/react-components/react-migration-v0-v9/library/etc/react-migration-v0-v9.api.md @@ -79,10 +79,10 @@ export interface AttachmentIconProps extends React_2.HTMLAttributes { From 5a87b0143525beac84bfe3d67fd729ac8bba691f Mon Sep 17 00:00:00 2001 From: viktorgenaev Date: Thu, 19 Sep 2024 16:04:44 +0200 Subject: [PATCH 05/10] chore: add explicit typeRoots --- apps/react-18-tests-v8/tsconfig.cy.json | 1 + apps/react-18-tests-v9/tsconfig.cy.json | 1 + apps/vr-tests/tsconfig.json | 3 ++- .../babel-preset-global-context/tsconfig.cy.json | 1 + packages/react-components/global-context/tsconfig.cy.json | 1 + packages/react-components/react-aria/library/tsconfig.cy.json | 1 + .../react-components/react-avatar/library/tsconfig.cy.json | 1 + .../react-components/react-breadcrumb/library/tsconfig.cy.json | 1 + packages/react-components/react-card/library/tsconfig.cy.json | 1 + .../react-components/react-combobox/library/tsconfig.cy.json | 1 + .../react-datepicker-compat/library/tsconfig.cy.json | 1 + .../react-components/react-dialog/library/tsconfig.cy.json | 1 + .../react-components/react-drawer/library/tsconfig.cy.json | 1 + .../react-components/react-infolabel/library/tsconfig.cy.json | 1 + .../react-list-preview/library/tsconfig.cy.json | 1 + packages/react-components/react-menu/library/tsconfig.cy.json | 1 + .../react-components/react-motion/library/tsconfig.cy.json | 1 + .../react-components/react-overflow/library/tsconfig.cy.json | 1 + .../react-components/react-popover/library/tsconfig.cy.json | 1 + packages/react-components/react-portal-compat/tsconfig.cy.json | 1 + .../react-swatch-picker/library/tsconfig.cy.json | 1 + packages/react-components/react-table/library/tsconfig.cy.json | 1 + packages/react-components/react-tabster/tsconfig.cy.json | 1 + .../react-components/react-tag-picker/library/tsconfig.cy.json | 1 + packages/react-components/react-tags/library/tsconfig.cy.json | 1 + .../react-timepicker-compat/library/tsconfig.cy.json | 2 ++ packages/react-components/react-toast/library/tsconfig.cy.json | 1 + .../react-components/react-toolbar/library/tsconfig.cy.json | 1 + packages/react-components/react-tree/library/tsconfig.cy.json | 3 ++- packages/react-components/react-utilities/tsconfig.cy.json | 1 + packages/react-examples/tsconfig.cy.json | 1 + packages/react-examples/tsconfig.json | 2 +- 32 files changed, 35 insertions(+), 3 deletions(-) diff --git a/apps/react-18-tests-v8/tsconfig.cy.json b/apps/react-18-tests-v8/tsconfig.cy.json index ceda454a1b7cb..5ffe323df9d30 100644 --- a/apps/react-18-tests-v8/tsconfig.cy.json +++ b/apps/react-18-tests-v8/tsconfig.cy.json @@ -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"] diff --git a/apps/react-18-tests-v9/tsconfig.cy.json b/apps/react-18-tests-v9/tsconfig.cy.json index ceda454a1b7cb..5ffe323df9d30 100644 --- a/apps/react-18-tests-v9/tsconfig.cy.json +++ b/apps/react-18-tests-v9/tsconfig.cy.json @@ -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"] diff --git a/apps/vr-tests/tsconfig.json b/apps/vr-tests/tsconfig.json index e2d8f1cd03b5f..5fd8d958e7779 100644 --- a/apps/vr-tests/tsconfig.json +++ b/apps/vr-tests/tsconfig.json @@ -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"] } diff --git a/packages/react-components/babel-preset-global-context/tsconfig.cy.json b/packages/react-components/babel-preset-global-context/tsconfig.cy.json index d97eb152e0334..1260a0a529617 100644 --- a/packages/react-components/babel-preset-global-context/tsconfig.cy.json +++ b/packages/react-components/babel-preset-global-context/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/global-context/tsconfig.cy.json b/packages/react-components/global-context/tsconfig.cy.json index d97eb152e0334..1260a0a529617 100644 --- a/packages/react-components/global-context/tsconfig.cy.json +++ b/packages/react-components/global-context/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-aria/library/tsconfig.cy.json b/packages/react-components/react-aria/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-aria/library/tsconfig.cy.json +++ b/packages/react-components/react-aria/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-avatar/library/tsconfig.cy.json b/packages/react-components/react-avatar/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-avatar/library/tsconfig.cy.json +++ b/packages/react-components/react-avatar/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-breadcrumb/library/tsconfig.cy.json b/packages/react-components/react-breadcrumb/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-breadcrumb/library/tsconfig.cy.json +++ b/packages/react-components/react-breadcrumb/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-card/library/tsconfig.cy.json b/packages/react-components/react-card/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-card/library/tsconfig.cy.json +++ b/packages/react-components/react-card/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-combobox/library/tsconfig.cy.json b/packages/react-components/react-combobox/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-combobox/library/tsconfig.cy.json +++ b/packages/react-components/react-combobox/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-datepicker-compat/library/tsconfig.cy.json b/packages/react-components/react-datepicker-compat/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-datepicker-compat/library/tsconfig.cy.json +++ b/packages/react-components/react-datepicker-compat/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-dialog/library/tsconfig.cy.json b/packages/react-components/react-dialog/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-dialog/library/tsconfig.cy.json +++ b/packages/react-components/react-dialog/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-drawer/library/tsconfig.cy.json b/packages/react-components/react-drawer/library/tsconfig.cy.json index a308fca822da8..232a935426f7a 100644 --- a/packages/react-components/react-drawer/library/tsconfig.cy.json +++ b/packages/react-components/react-drawer/library/tsconfig.cy.json @@ -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", "./src/e2e/*.tsx"] diff --git a/packages/react-components/react-infolabel/library/tsconfig.cy.json b/packages/react-components/react-infolabel/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-infolabel/library/tsconfig.cy.json +++ b/packages/react-components/react-infolabel/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-list-preview/library/tsconfig.cy.json b/packages/react-components/react-list-preview/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-list-preview/library/tsconfig.cy.json +++ b/packages/react-components/react-list-preview/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-menu/library/tsconfig.cy.json b/packages/react-components/react-menu/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-menu/library/tsconfig.cy.json +++ b/packages/react-components/react-menu/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-motion/library/tsconfig.cy.json b/packages/react-components/react-motion/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-motion/library/tsconfig.cy.json +++ b/packages/react-components/react-motion/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-overflow/library/tsconfig.cy.json b/packages/react-components/react-overflow/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-overflow/library/tsconfig.cy.json +++ b/packages/react-components/react-overflow/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-popover/library/tsconfig.cy.json b/packages/react-components/react-popover/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-popover/library/tsconfig.cy.json +++ b/packages/react-components/react-popover/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-portal-compat/tsconfig.cy.json b/packages/react-components/react-portal-compat/tsconfig.cy.json index d97eb152e0334..1260a0a529617 100644 --- a/packages/react-components/react-portal-compat/tsconfig.cy.json +++ b/packages/react-components/react-portal-compat/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-swatch-picker/library/tsconfig.cy.json b/packages/react-components/react-swatch-picker/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-swatch-picker/library/tsconfig.cy.json +++ b/packages/react-components/react-swatch-picker/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-table/library/tsconfig.cy.json b/packages/react-components/react-table/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-table/library/tsconfig.cy.json +++ b/packages/react-components/react-table/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-tabster/tsconfig.cy.json b/packages/react-components/react-tabster/tsconfig.cy.json index d97eb152e0334..1260a0a529617 100644 --- a/packages/react-components/react-tabster/tsconfig.cy.json +++ b/packages/react-components/react-tabster/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-tag-picker/library/tsconfig.cy.json b/packages/react-components/react-tag-picker/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-tag-picker/library/tsconfig.cy.json +++ b/packages/react-components/react-tag-picker/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-tags/library/tsconfig.cy.json b/packages/react-components/react-tags/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-tags/library/tsconfig.cy.json +++ b/packages/react-components/react-tags/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-timepicker-compat/library/tsconfig.cy.json b/packages/react-components/react-timepicker-compat/library/tsconfig.cy.json index d97eb152e0334..ea5b8b7ac296d 100644 --- a/packages/react-components/react-timepicker-compat/library/tsconfig.cy.json +++ b/packages/react-components/react-timepicker-compat/library/tsconfig.cy.json @@ -3,6 +3,8 @@ "compilerOptions": { "isolatedModules": false, "types": ["node", "cypress", "cypress-real-events"], + "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], + "lib": ["ES2019", "dom"] }, "include": ["**/*.cy.ts", "**/*.cy.tsx"] diff --git a/packages/react-components/react-toast/library/tsconfig.cy.json b/packages/react-components/react-toast/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-toast/library/tsconfig.cy.json +++ b/packages/react-components/react-toast/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-toolbar/library/tsconfig.cy.json b/packages/react-components/react-toolbar/library/tsconfig.cy.json index d97eb152e0334..3cfb39a1086ac 100644 --- a/packages/react-components/react-toolbar/library/tsconfig.cy.json +++ b/packages/react-components/react-toolbar/library/tsconfig.cy.json @@ -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"] diff --git a/packages/react-components/react-tree/library/tsconfig.cy.json b/packages/react-components/react-tree/library/tsconfig.cy.json index 7e4c5fba3a424..90e0e0c7bd6ec 100644 --- a/packages/react-components/react-tree/library/tsconfig.cy.json +++ b/packages/react-components/react-tree/library/tsconfig.cy.json @@ -2,7 +2,8 @@ "extends": "./tsconfig.json", "compilerOptions": { "isolatedModules": false, - "types": ["node", "cypress", "cypress-real-events"] + "types": ["node", "cypress", "cypress-real-events"], + "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"] }, "include": ["**/*.cy.ts", "**/*.cy.tsx"] } diff --git a/packages/react-components/react-utilities/tsconfig.cy.json b/packages/react-components/react-utilities/tsconfig.cy.json index d97eb152e0334..1260a0a529617 100644 --- a/packages/react-components/react-utilities/tsconfig.cy.json +++ b/packages/react-components/react-utilities/tsconfig.cy.json @@ -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"] diff --git a/packages/react-examples/tsconfig.cy.json b/packages/react-examples/tsconfig.cy.json index 226b8575f400a..a1a78345c4a6e 100644 --- a/packages/react-examples/tsconfig.cy.json +++ b/packages/react-examples/tsconfig.cy.json @@ -3,6 +3,7 @@ "compilerOptions": { "isolatedModules": false, "types": ["node", "cypress", "cypress-real-events"], + "typeRoots": ["../../../node_modules", "../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, "include": ["src/**/*.cy.ts", "src/**/*.cy.tsx"] diff --git a/packages/react-examples/tsconfig.json b/packages/react-examples/tsconfig.json index bbdd6a32e0df5..fe13d94ef3091 100644 --- a/packages/react-examples/tsconfig.json +++ b/packages/react-examples/tsconfig.json @@ -16,7 +16,7 @@ "preserveConstEnums": true, "skipLibCheck": true, "lib": ["es5", "dom", "es2015.promise"], - "typeRoots": ["../../node_modules/@types", "../../typings"], + "typeRoots": ["../../node_modules", "../../node_modules/@types", "../../typings"], "types": ["webpack-env", "custom-global", "node", "cypress", "cypress-real-events"], "isolatedModules": true, "paths": { From 81dd6527df0750e14d37e369f1bb39aeddaeb000 Mon Sep 17 00:00:00 2001 From: viktorgenaev Date: Wed, 18 Sep 2024 12:21:50 +0200 Subject: [PATCH 06/10] chore: update change files --- ...lobal-context-28602215-c268-452d-85d9-00ba63d8ed0f.json | 7 +++++++ ...eslint-plugin-d576152d-5ad5-451e-8384-e81fd4d2bb98.json | 7 +++++++ ...lobal-context-85d11653-4f77-49c6-83d5-ebe3dc5c969e.json | 7 +++++++ ...ui-react-aria-fd4f3898-30c0-423a-ad87-c68621431b95.json | 7 +++++++ ...-react-avatar-1f8e1036-8cb1-4b96-9155-16a930f92f54.json | 7 +++++++ ...ct-breadcrumb-517d614c-0eb1-4019-aa94-a8011d3947a6.json | 7 +++++++ ...ui-react-card-c6d87bf2-dcd8-488e-a2d2-b57ea74cc51d.json | 7 +++++++ ...eact-combobox-fe9850c4-ca14-4c22-a7c8-a869c54ad106.json | 7 +++++++ ...picker-compat-a54d07d4-b0fd-4b75-8a3e-3d9851d91133.json | 7 +++++++ ...-react-dialog-fc005c16-f756-4b47-b5e3-f544abbae52c.json | 7 +++++++ ...-react-drawer-edb16867-7903-49df-9445-e5d40af61f73.json | 7 +++++++ ...act-infolabel-dc7c6223-4a06-42f1-a6f6-9ddaf488803e.json | 7 +++++++ ...-list-preview-f355ed2f-294e-4b0d-8f0c-59f684d61515.json | 7 +++++++ ...ui-react-menu-19683f73-d2c1-441e-87fa-f4ca074e7bd2.json | 7 +++++++ ...gration-v0-v9-31f1ddf5-6ce6-424a-a576-8fb4b8336d63.json | 7 +++++++ ...-react-motion-1ecb79e8-deb8-4e5e-8be4-341fcbd70ead.json | 7 +++++++ ...eact-overflow-88fb1633-a8a7-4c6e-827c-f48b97702a3f.json | 7 +++++++ ...react-popover-23093573-92f3-4ac1-9032-894182562d8e.json | 7 +++++++ ...portal-compat-fac2b4d7-61f4-4bcb-932e-051821f42377.json | 7 +++++++ ...swatch-picker-3866ae6e-34e1-45c7-b9a5-66333c6f2e4e.json | 7 +++++++ ...i-react-table-dfd62e19-0fab-4f85-8713-15df7f8770cb.json | 7 +++++++ ...react-tabster-73a95c93-994c-40ad-8a20-e6b93ce230cc.json | 7 +++++++ ...ct-tag-picker-c37fc1e6-1a66-491a-9c29-03eb496caeea.json | 7 +++++++ ...ui-react-tags-91f4933e-8018-4cea-8440-417bbaf4e7d6.json | 7 +++++++ ...picker-compat-d4c11b3d-1b54-44e7-8231-c31f5e2eb183.json | 7 +++++++ ...i-react-toast-868f2a7b-e5f8-4fde-8890-c2d679213403.json | 7 +++++++ ...react-toolbar-5bd96504-b775-4b48-b161-765a58dab3a4.json | 7 +++++++ ...ui-react-tree-4b796704-0c2a-4529-89fc-7f66f1de0e14.json | 7 +++++++ ...act-utilities-a76b7036-25c3-49fa-bf0a-8cab44d8d4eb.json | 7 +++++++ ...luentui-theme-18bd688f-f330-4fb2-abc6-d70673fe6bc6.json | 7 +++++++ ...eb-components-a0546391-be46-4cec-ba6d-1b268e7f08b0.json | 7 +++++++ 31 files changed, 217 insertions(+) create mode 100644 change/@fluentui-babel-preset-global-context-28602215-c268-452d-85d9-00ba63d8ed0f.json create mode 100644 change/@fluentui-eslint-plugin-d576152d-5ad5-451e-8384-e81fd4d2bb98.json create mode 100644 change/@fluentui-global-context-85d11653-4f77-49c6-83d5-ebe3dc5c969e.json create mode 100644 change/@fluentui-react-aria-fd4f3898-30c0-423a-ad87-c68621431b95.json create mode 100644 change/@fluentui-react-avatar-1f8e1036-8cb1-4b96-9155-16a930f92f54.json create mode 100644 change/@fluentui-react-breadcrumb-517d614c-0eb1-4019-aa94-a8011d3947a6.json create mode 100644 change/@fluentui-react-card-c6d87bf2-dcd8-488e-a2d2-b57ea74cc51d.json create mode 100644 change/@fluentui-react-combobox-fe9850c4-ca14-4c22-a7c8-a869c54ad106.json create mode 100644 change/@fluentui-react-datepicker-compat-a54d07d4-b0fd-4b75-8a3e-3d9851d91133.json create mode 100644 change/@fluentui-react-dialog-fc005c16-f756-4b47-b5e3-f544abbae52c.json create mode 100644 change/@fluentui-react-drawer-edb16867-7903-49df-9445-e5d40af61f73.json create mode 100644 change/@fluentui-react-infolabel-dc7c6223-4a06-42f1-a6f6-9ddaf488803e.json create mode 100644 change/@fluentui-react-list-preview-f355ed2f-294e-4b0d-8f0c-59f684d61515.json create mode 100644 change/@fluentui-react-menu-19683f73-d2c1-441e-87fa-f4ca074e7bd2.json create mode 100644 change/@fluentui-react-migration-v0-v9-31f1ddf5-6ce6-424a-a576-8fb4b8336d63.json create mode 100644 change/@fluentui-react-motion-1ecb79e8-deb8-4e5e-8be4-341fcbd70ead.json create mode 100644 change/@fluentui-react-overflow-88fb1633-a8a7-4c6e-827c-f48b97702a3f.json create mode 100644 change/@fluentui-react-popover-23093573-92f3-4ac1-9032-894182562d8e.json create mode 100644 change/@fluentui-react-portal-compat-fac2b4d7-61f4-4bcb-932e-051821f42377.json create mode 100644 change/@fluentui-react-swatch-picker-3866ae6e-34e1-45c7-b9a5-66333c6f2e4e.json create mode 100644 change/@fluentui-react-table-dfd62e19-0fab-4f85-8713-15df7f8770cb.json create mode 100644 change/@fluentui-react-tabster-73a95c93-994c-40ad-8a20-e6b93ce230cc.json create mode 100644 change/@fluentui-react-tag-picker-c37fc1e6-1a66-491a-9c29-03eb496caeea.json create mode 100644 change/@fluentui-react-tags-91f4933e-8018-4cea-8440-417bbaf4e7d6.json create mode 100644 change/@fluentui-react-timepicker-compat-d4c11b3d-1b54-44e7-8231-c31f5e2eb183.json create mode 100644 change/@fluentui-react-toast-868f2a7b-e5f8-4fde-8890-c2d679213403.json create mode 100644 change/@fluentui-react-toolbar-5bd96504-b775-4b48-b161-765a58dab3a4.json create mode 100644 change/@fluentui-react-tree-4b796704-0c2a-4529-89fc-7f66f1de0e14.json create mode 100644 change/@fluentui-react-utilities-a76b7036-25c3-49fa-bf0a-8cab44d8d4eb.json create mode 100644 change/@fluentui-theme-18bd688f-f330-4fb2-abc6-d70673fe6bc6.json create mode 100644 change/@fluentui-web-components-a0546391-be46-4cec-ba6d-1b268e7f08b0.json diff --git a/change/@fluentui-babel-preset-global-context-28602215-c268-452d-85d9-00ba63d8ed0f.json b/change/@fluentui-babel-preset-global-context-28602215-c268-452d-85d9-00ba63d8ed0f.json new file mode 100644 index 0000000000000..82b7b23539183 --- /dev/null +++ b/change/@fluentui-babel-preset-global-context-28602215-c268-452d-85d9-00ba63d8ed0f.json @@ -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" +} diff --git a/change/@fluentui-eslint-plugin-d576152d-5ad5-451e-8384-e81fd4d2bb98.json b/change/@fluentui-eslint-plugin-d576152d-5ad5-451e-8384-e81fd4d2bb98.json new file mode 100644 index 0000000000000..c5e3c931e1e90 --- /dev/null +++ b/change/@fluentui-eslint-plugin-d576152d-5ad5-451e-8384-e81fd4d2bb98.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "update tsconfig after migration to 5.2", + "packageName": "@fluentui/eslint-plugin", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-global-context-85d11653-4f77-49c6-83d5-ebe3dc5c969e.json b/change/@fluentui-global-context-85d11653-4f77-49c6-83d5-ebe3dc5c969e.json new file mode 100644 index 0000000000000..9b0f0734e9c42 --- /dev/null +++ b/change/@fluentui-global-context-85d11653-4f77-49c6-83d5-ebe3dc5c969e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/global-context", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-aria-fd4f3898-30c0-423a-ad87-c68621431b95.json b/change/@fluentui-react-aria-fd4f3898-30c0-423a-ad87-c68621431b95.json new file mode 100644 index 0000000000000..52e158800c86f --- /dev/null +++ b/change/@fluentui-react-aria-fd4f3898-30c0-423a-ad87-c68621431b95.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-aria", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-avatar-1f8e1036-8cb1-4b96-9155-16a930f92f54.json b/change/@fluentui-react-avatar-1f8e1036-8cb1-4b96-9155-16a930f92f54.json new file mode 100644 index 0000000000000..3a6f397d84081 --- /dev/null +++ b/change/@fluentui-react-avatar-1f8e1036-8cb1-4b96-9155-16a930f92f54.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-avatar", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-breadcrumb-517d614c-0eb1-4019-aa94-a8011d3947a6.json b/change/@fluentui-react-breadcrumb-517d614c-0eb1-4019-aa94-a8011d3947a6.json new file mode 100644 index 0000000000000..ea59deec217bd --- /dev/null +++ b/change/@fluentui-react-breadcrumb-517d614c-0eb1-4019-aa94-a8011d3947a6.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-breadcrumb", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-card-c6d87bf2-dcd8-488e-a2d2-b57ea74cc51d.json b/change/@fluentui-react-card-c6d87bf2-dcd8-488e-a2d2-b57ea74cc51d.json new file mode 100644 index 0000000000000..ca7945188b8c1 --- /dev/null +++ b/change/@fluentui-react-card-c6d87bf2-dcd8-488e-a2d2-b57ea74cc51d.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-card", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-combobox-fe9850c4-ca14-4c22-a7c8-a869c54ad106.json b/change/@fluentui-react-combobox-fe9850c4-ca14-4c22-a7c8-a869c54ad106.json new file mode 100644 index 0000000000000..444163e483c70 --- /dev/null +++ b/change/@fluentui-react-combobox-fe9850c4-ca14-4c22-a7c8-a869c54ad106.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-combobox", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-datepicker-compat-a54d07d4-b0fd-4b75-8a3e-3d9851d91133.json b/change/@fluentui-react-datepicker-compat-a54d07d4-b0fd-4b75-8a3e-3d9851d91133.json new file mode 100644 index 0000000000000..77f4e6b0b7ff7 --- /dev/null +++ b/change/@fluentui-react-datepicker-compat-a54d07d4-b0fd-4b75-8a3e-3d9851d91133.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-datepicker-compat", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-dialog-fc005c16-f756-4b47-b5e3-f544abbae52c.json b/change/@fluentui-react-dialog-fc005c16-f756-4b47-b5e3-f544abbae52c.json new file mode 100644 index 0000000000000..6cb0e5aa549eb --- /dev/null +++ b/change/@fluentui-react-dialog-fc005c16-f756-4b47-b5e3-f544abbae52c.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-dialog", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-drawer-edb16867-7903-49df-9445-e5d40af61f73.json b/change/@fluentui-react-drawer-edb16867-7903-49df-9445-e5d40af61f73.json new file mode 100644 index 0000000000000..60e1e9077744c --- /dev/null +++ b/change/@fluentui-react-drawer-edb16867-7903-49df-9445-e5d40af61f73.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-drawer", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-infolabel-dc7c6223-4a06-42f1-a6f6-9ddaf488803e.json b/change/@fluentui-react-infolabel-dc7c6223-4a06-42f1-a6f6-9ddaf488803e.json new file mode 100644 index 0000000000000..39484dd314681 --- /dev/null +++ b/change/@fluentui-react-infolabel-dc7c6223-4a06-42f1-a6f6-9ddaf488803e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-infolabel", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-list-preview-f355ed2f-294e-4b0d-8f0c-59f684d61515.json b/change/@fluentui-react-list-preview-f355ed2f-294e-4b0d-8f0c-59f684d61515.json new file mode 100644 index 0000000000000..3f1ed8911dacb --- /dev/null +++ b/change/@fluentui-react-list-preview-f355ed2f-294e-4b0d-8f0c-59f684d61515.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-list-preview", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-menu-19683f73-d2c1-441e-87fa-f4ca074e7bd2.json b/change/@fluentui-react-menu-19683f73-d2c1-441e-87fa-f4ca074e7bd2.json new file mode 100644 index 0000000000000..f3969fc674810 --- /dev/null +++ b/change/@fluentui-react-menu-19683f73-d2c1-441e-87fa-f4ca074e7bd2.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-menu", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-migration-v0-v9-31f1ddf5-6ce6-424a-a576-8fb4b8336d63.json b/change/@fluentui-react-migration-v0-v9-31f1ddf5-6ce6-424a-a576-8fb4b8336d63.json new file mode 100644 index 0000000000000..f370101f2ac34 --- /dev/null +++ b/change/@fluentui-react-migration-v0-v9-31f1ddf5-6ce6-424a-a576-8fb4b8336d63.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "update generated api", + "packageName": "@fluentui/react-migration-v0-v9", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-motion-1ecb79e8-deb8-4e5e-8be4-341fcbd70ead.json b/change/@fluentui-react-motion-1ecb79e8-deb8-4e5e-8be4-341fcbd70ead.json new file mode 100644 index 0000000000000..a104786b3292d --- /dev/null +++ b/change/@fluentui-react-motion-1ecb79e8-deb8-4e5e-8be4-341fcbd70ead.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-motion", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-overflow-88fb1633-a8a7-4c6e-827c-f48b97702a3f.json b/change/@fluentui-react-overflow-88fb1633-a8a7-4c6e-827c-f48b97702a3f.json new file mode 100644 index 0000000000000..c4d4aadde19ad --- /dev/null +++ b/change/@fluentui-react-overflow-88fb1633-a8a7-4c6e-827c-f48b97702a3f.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-overflow", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-popover-23093573-92f3-4ac1-9032-894182562d8e.json b/change/@fluentui-react-popover-23093573-92f3-4ac1-9032-894182562d8e.json new file mode 100644 index 0000000000000..38eaca6eec069 --- /dev/null +++ b/change/@fluentui-react-popover-23093573-92f3-4ac1-9032-894182562d8e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-popover", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-portal-compat-fac2b4d7-61f4-4bcb-932e-051821f42377.json b/change/@fluentui-react-portal-compat-fac2b4d7-61f4-4bcb-932e-051821f42377.json new file mode 100644 index 0000000000000..6c9e976a3c3c2 --- /dev/null +++ b/change/@fluentui-react-portal-compat-fac2b4d7-61f4-4bcb-932e-051821f42377.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-portal-compat", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-swatch-picker-3866ae6e-34e1-45c7-b9a5-66333c6f2e4e.json b/change/@fluentui-react-swatch-picker-3866ae6e-34e1-45c7-b9a5-66333c6f2e4e.json new file mode 100644 index 0000000000000..a4822841d34ae --- /dev/null +++ b/change/@fluentui-react-swatch-picker-3866ae6e-34e1-45c7-b9a5-66333c6f2e4e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-swatch-picker", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-table-dfd62e19-0fab-4f85-8713-15df7f8770cb.json b/change/@fluentui-react-table-dfd62e19-0fab-4f85-8713-15df7f8770cb.json new file mode 100644 index 0000000000000..a7376d423b071 --- /dev/null +++ b/change/@fluentui-react-table-dfd62e19-0fab-4f85-8713-15df7f8770cb.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-table", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tabster-73a95c93-994c-40ad-8a20-e6b93ce230cc.json b/change/@fluentui-react-tabster-73a95c93-994c-40ad-8a20-e6b93ce230cc.json new file mode 100644 index 0000000000000..7972a33078bb2 --- /dev/null +++ b/change/@fluentui-react-tabster-73a95c93-994c-40ad-8a20-e6b93ce230cc.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-tabster", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tag-picker-c37fc1e6-1a66-491a-9c29-03eb496caeea.json b/change/@fluentui-react-tag-picker-c37fc1e6-1a66-491a-9c29-03eb496caeea.json new file mode 100644 index 0000000000000..499548a19f077 --- /dev/null +++ b/change/@fluentui-react-tag-picker-c37fc1e6-1a66-491a-9c29-03eb496caeea.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-tag-picker", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tags-91f4933e-8018-4cea-8440-417bbaf4e7d6.json b/change/@fluentui-react-tags-91f4933e-8018-4cea-8440-417bbaf4e7d6.json new file mode 100644 index 0000000000000..fe6146cccef20 --- /dev/null +++ b/change/@fluentui-react-tags-91f4933e-8018-4cea-8440-417bbaf4e7d6.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-tags", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-timepicker-compat-d4c11b3d-1b54-44e7-8231-c31f5e2eb183.json b/change/@fluentui-react-timepicker-compat-d4c11b3d-1b54-44e7-8231-c31f5e2eb183.json new file mode 100644 index 0000000000000..6980678399fb4 --- /dev/null +++ b/change/@fluentui-react-timepicker-compat-d4c11b3d-1b54-44e7-8231-c31f5e2eb183.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-timepicker-compat", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-toast-868f2a7b-e5f8-4fde-8890-c2d679213403.json b/change/@fluentui-react-toast-868f2a7b-e5f8-4fde-8890-c2d679213403.json new file mode 100644 index 0000000000000..60f1ba75b10eb --- /dev/null +++ b/change/@fluentui-react-toast-868f2a7b-e5f8-4fde-8890-c2d679213403.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-toast", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-toolbar-5bd96504-b775-4b48-b161-765a58dab3a4.json b/change/@fluentui-react-toolbar-5bd96504-b775-4b48-b161-765a58dab3a4.json new file mode 100644 index 0000000000000..f0812fdfc0695 --- /dev/null +++ b/change/@fluentui-react-toolbar-5bd96504-b775-4b48-b161-765a58dab3a4.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-toolbar", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tree-4b796704-0c2a-4529-89fc-7f66f1de0e14.json b/change/@fluentui-react-tree-4b796704-0c2a-4529-89fc-7f66f1de0e14.json new file mode 100644 index 0000000000000..65e14427c49c1 --- /dev/null +++ b/change/@fluentui-react-tree-4b796704-0c2a-4529-89fc-7f66f1de0e14.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-tree", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-utilities-a76b7036-25c3-49fa-bf0a-8cab44d8d4eb.json b/change/@fluentui-react-utilities-a76b7036-25c3-49fa-bf0a-8cab44d8d4eb.json new file mode 100644 index 0000000000000..19c791a0ca152 --- /dev/null +++ b/change/@fluentui-react-utilities-a76b7036-25c3-49fa-bf0a-8cab44d8d4eb.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "add explicit typeRoot to tsconfig.json", + "packageName": "@fluentui/react-utilities", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-theme-18bd688f-f330-4fb2-abc6-d70673fe6bc6.json b/change/@fluentui-theme-18bd688f-f330-4fb2-abc6-d70673fe6bc6.json new file mode 100644 index 0000000000000..92eee2d885d2f --- /dev/null +++ b/change/@fluentui-theme-18bd688f-f330-4fb2-abc6-d70673fe6bc6.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "update api.md", + "packageName": "@fluentui/theme", + "email": "viktorgenaev@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-web-components-a0546391-be46-4cec-ba6d-1b268e7f08b0.json b/change/@fluentui-web-components-a0546391-be46-4cec-ba6d-1b268e7f08b0.json new file mode 100644 index 0000000000000..b3b94bd2676a7 --- /dev/null +++ b/change/@fluentui-web-components-a0546391-be46-4cec-ba6d-1b268e7f08b0.json @@ -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" +} From 634e026fd2249980a0df449aede7ba908e132e86 Mon Sep 17 00:00:00 2001 From: mainframev Date: Thu, 17 Oct 2024 16:32:10 +0200 Subject: [PATCH 07/10] chore(eslint-rules): update module to NodeNext --- tools/eslint-rules/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/eslint-rules/tsconfig.json b/tools/eslint-rules/tsconfig.json index 7c81409b02835..e7e0be96c033f 100644 --- a/tools/eslint-rules/tsconfig.json +++ b/tools/eslint-rules/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "module": "ESNext", + "module": "NodeNext", "moduleResolution": "NodeNext", "target": "ES2022", "lib": ["ES2022"], From 440af75899cd46e48873a404f6e2b59f7562dd91 Mon Sep 17 00:00:00 2001 From: mainframev Date: Fri, 25 Oct 2024 11:23:51 +0200 Subject: [PATCH 08/10] chore: dedupe ts 5.0.4 --- package.json | 3 ++- yarn.lock | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 772b6556fd9d8..73e1cdaca2b5c 100644 --- a/package.json +++ b/package.json @@ -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": [] diff --git a/yarn.lock b/yarn.lock index 962f70beafec4..63990c4e70db9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22758,16 +22758,11 @@ typescript-eslint@^8.0.0: "@typescript-eslint/parser" "8.8.1" "@typescript-eslint/utils" "8.8.1" -typescript@5.2.2: +typescript@5.2.2, typescript@~5.0.4: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== -typescript@~5.0.4: - version "5.0.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" - integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== - typescript@~5.4.2: version "5.4.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" From a8398b38584e493c43d3157d5271ea9151bc0747 Mon Sep 17 00:00:00 2001 From: mainframev Date: Fri, 25 Oct 2024 12:52:42 +0200 Subject: [PATCH 09/10] chore(workspace-plguin): update cypress-component configuration to have typeRoots --- .../files/tsconfig.cy.json__tmpl__ | 1 + .../cypress-component-configuration/index.spec.ts | 4 ++++ .../generators/cypress-component-configuration/index.ts | 4 ++-- .../cypress-component-configuration/lib/add-files.ts | 7 +++++-- .../src/generators/migrate-converged-pkg/index.spec.ts | 1 + 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/workspace-plugin/src/generators/cypress-component-configuration/files/tsconfig.cy.json__tmpl__ b/tools/workspace-plugin/src/generators/cypress-component-configuration/files/tsconfig.cy.json__tmpl__ index a307d1565f4ae..d5ad69841a23b 100644 --- a/tools/workspace-plugin/src/generators/cypress-component-configuration/files/tsconfig.cy.json__tmpl__ +++ b/tools/workspace-plugin/src/generators/cypress-component-configuration/files/tsconfig.cy.json__tmpl__ @@ -3,6 +3,7 @@ "compilerOptions":{ "isolatedModules":false, "types":["node", "cypress", "cypress-real-events"], + "typeRoots":["<%= options.rootOffset %>node_modules", "<%= options.rootOffset %>node_modules/@types"], "lib":["ES2019", "dom"] }, "include":["**/*.cy.ts", "**/*.cy.tsx"] diff --git a/tools/workspace-plugin/src/generators/cypress-component-configuration/index.spec.ts b/tools/workspace-plugin/src/generators/cypress-component-configuration/index.spec.ts index 44f97aac0f3ed..5450a811076b1 100644 --- a/tools/workspace-plugin/src/generators/cypress-component-configuration/index.spec.ts +++ b/tools/workspace-plugin/src/generators/cypress-component-configuration/index.spec.ts @@ -56,6 +56,10 @@ describe(`cypress-component-configuration`, () => { "ES2019", "dom", ], + "typeRoots": Array [ + "../node_modules", + "../node_modules/@types", + ], "types": Array [ "node", "cypress", diff --git a/tools/workspace-plugin/src/generators/cypress-component-configuration/index.ts b/tools/workspace-plugin/src/generators/cypress-component-configuration/index.ts index 9e0b3467dbe43..2588ada04a7aa 100644 --- a/tools/workspace-plugin/src/generators/cypress-component-configuration/index.ts +++ b/tools/workspace-plugin/src/generators/cypress-component-configuration/index.ts @@ -1,4 +1,4 @@ -import { Tree, formatFiles, names, joinPathFragments } from '@nx/devkit'; +import { Tree, formatFiles, names, joinPathFragments, offsetFromRoot } from '@nx/devkit'; import { getProjectConfig, printUserLogs, UserLog } from '../../utils'; @@ -22,7 +22,7 @@ export default async function (tree: Tree, schema: CypressComponentConfiguration return; } - addFiles(tree, normalizedOptions); + addFiles(tree, { ...normalizedOptions, rootOffset: offsetFromRoot(tree.root) }); await formatFiles(tree); } diff --git a/tools/workspace-plugin/src/generators/cypress-component-configuration/lib/add-files.ts b/tools/workspace-plugin/src/generators/cypress-component-configuration/lib/add-files.ts index e30cd17afdfcb..09a682e0d6d2b 100644 --- a/tools/workspace-plugin/src/generators/cypress-component-configuration/lib/add-files.ts +++ b/tools/workspace-plugin/src/generators/cypress-component-configuration/lib/add-files.ts @@ -5,10 +5,13 @@ import { PackageJson, TsConfig } from '../../../types'; import { getProjectConfig } from '../../../utils'; import { uniqueArray } from './utils'; -type Options = ReturnType; +type Options = ReturnType & { rootOffset: string }; export function addFiles(tree: Tree, options: Options) { - generateFiles(tree, joinPathFragments(__dirname, '../files'), options.projectConfig.root, { tmpl: '' }); + generateFiles(tree, joinPathFragments(__dirname, '../files'), options.projectConfig.root, { + tmpl: '', + options, + }); updateJson(tree, options.paths.tsconfig.main, (json: TsConfig) => { json.references?.push({ diff --git a/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts b/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts index 05fa1678e3b7a..8e3989eabbd79 100644 --- a/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts +++ b/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts @@ -781,6 +781,7 @@ describe('migrate-converged-pkg generator', () => { isolatedModules: false, lib: ['ES2019', 'dom'], types: ['node', 'cypress', 'cypress-real-events'], + typeRoots: ['../node_modules', '../node_modules/@types'], }, include: ['**/*.cy.ts', '**/*.cy.tsx'], }); From 1dfe2b1b4433a4278604d7492eef55e2f6500e85 Mon Sep 17 00:00:00 2001 From: mainframev Date: Wed, 30 Oct 2024 13:57:38 +0100 Subject: [PATCH 10/10] chore(web-components): adapt tsconfig to ts 5.2 --- packages/web-components/tsconfig.json | 4 ++-- packages/web-components/tsconfig.lib.json | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/web-components/tsconfig.json b/packages/web-components/tsconfig.json index 842071c3e35d1..6bb11f9f0d052 100644 --- a/packages/web-components/tsconfig.json +++ b/packages/web-components/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../../tsconfig.base.wc.json", "compilerOptions": { "target": "ES2019", - "module": "NodeNext", - "moduleResolution": "Node16", + "module": "ESNext", + "moduleResolution": "bundler", "experimentalDecorators": true, "resolveJsonModule": true, "allowJs": true diff --git a/packages/web-components/tsconfig.lib.json b/packages/web-components/tsconfig.lib.json index 5ea997a4f63cd..13c3609d2e1c9 100644 --- a/packages/web-components/tsconfig.lib.json +++ b/packages/web-components/tsconfig.lib.json @@ -2,8 +2,6 @@ "extends": "./tsconfig.json", "compilerOptions": { "target": "ES2019", - "module": "ESNext", - "moduleResolution": "bundler", "lib": ["ESNext", "DOM"], "declaration": true, "declarationDir": "dist/dts",