From d6af8e30ddd353c900441eea489b4a5aea0db088 Mon Sep 17 00:00:00 2001 From: Victor Genaev Date: Mon, 4 Nov 2024 14:02:38 +0100 Subject: [PATCH] chore: migrate to ts 5.2.2 (#32859) Co-authored-by: viktorgenaev --- apps/react-18-tests-v8/tsconfig.cy.json | 1 + apps/react-18-tests-v9/tsconfig.cy.json | 1 + apps/vr-tests-web-components/tsconfig.json | 3 +- apps/vr-tests/tsconfig.json | 3 +- ...-28602215-c268-452d-85d9-00ba63d8ed0f.json | 7 +++ ...-d576152d-5ad5-451e-8384-e81fd4d2bb98.json | 7 +++ ...-85d11653-4f77-49c6-83d5-ebe3dc5c969e.json | 7 +++ ...-fd4f3898-30c0-423a-ad87-c68621431b95.json | 7 +++ ...-1f8e1036-8cb1-4b96-9155-16a930f92f54.json | 7 +++ ...-517d614c-0eb1-4019-aa94-a8011d3947a6.json | 7 +++ ...-c6d87bf2-dcd8-488e-a2d2-b57ea74cc51d.json | 7 +++ ...-fe9850c4-ca14-4c22-a7c8-a869c54ad106.json | 7 +++ ...-a54d07d4-b0fd-4b75-8a3e-3d9851d91133.json | 7 +++ ...-fc005c16-f756-4b47-b5e3-f544abbae52c.json | 7 +++ ...-edb16867-7903-49df-9445-e5d40af61f73.json | 7 +++ ...-dc7c6223-4a06-42f1-a6f6-9ddaf488803e.json | 7 +++ ...-f355ed2f-294e-4b0d-8f0c-59f684d61515.json | 7 +++ ...-19683f73-d2c1-441e-87fa-f4ca074e7bd2.json | 7 +++ ...-31f1ddf5-6ce6-424a-a576-8fb4b8336d63.json | 7 +++ ...-1ecb79e8-deb8-4e5e-8be4-341fcbd70ead.json | 7 +++ ...-88fb1633-a8a7-4c6e-827c-f48b97702a3f.json | 7 +++ ...-23093573-92f3-4ac1-9032-894182562d8e.json | 7 +++ ...-fac2b4d7-61f4-4bcb-932e-051821f42377.json | 7 +++ ...-3866ae6e-34e1-45c7-b9a5-66333c6f2e4e.json | 7 +++ ...-dfd62e19-0fab-4f85-8713-15df7f8770cb.json | 7 +++ ...-73a95c93-994c-40ad-8a20-e6b93ce230cc.json | 7 +++ ...-c37fc1e6-1a66-491a-9c29-03eb496caeea.json | 7 +++ ...-91f4933e-8018-4cea-8440-417bbaf4e7d6.json | 7 +++ ...-d4c11b3d-1b54-44e7-8231-c31f5e2eb183.json | 7 +++ ...-868f2a7b-e5f8-4fde-8890-c2d679213403.json | 7 +++ ...-5bd96504-b775-4b48-b161-765a58dab3a4.json | 7 +++ ...-4b796704-0c2a-4529-89fc-7f66f1de0e14.json | 7 +++ ...-a76b7036-25c3-49fa-bf0a-8cab44d8d4eb.json | 7 +++ ...-18bd688f-f330-4fb2-abc6-d70673fe6bc6.json | 7 +++ ...-a0546391-be46-4cec-ba6d-1b268e7f08b0.json | 7 +++ package.json | 5 +- packages/eslint-plugin/tsconfig.json | 4 +- .../fluentui/e2e/cypress/support/index.d.ts | 46 ++++++++++--------- .../tsconfig.cy.json | 1 + .../global-context/tsconfig.cy.json | 1 + .../react-aria/library/tsconfig.cy.json | 1 + .../react-avatar/library/tsconfig.cy.json | 1 + .../react-breadcrumb/library/tsconfig.cy.json | 1 + .../react-card/library/tsconfig.cy.json | 1 + .../react-combobox/library/tsconfig.cy.json | 1 + .../library/tsconfig.cy.json | 1 + .../react-dialog/library/tsconfig.cy.json | 1 + .../react-drawer/library/tsconfig.cy.json | 1 + .../react-infolabel/library/tsconfig.cy.json | 1 + .../library/tsconfig.cy.json | 1 + .../react-menu/library/tsconfig.cy.json | 1 + .../library/etc/react-migration-v0-v9.api.md | 4 +- .../react-motion/library/tsconfig.cy.json | 1 + .../react-overflow/library/tsconfig.cy.json | 1 + .../react-popover/library/tsconfig.cy.json | 1 + .../react-portal-compat/tsconfig.cy.json | 1 + .../library/tsconfig.cy.json | 1 + .../react-table/library/tsconfig.cy.json | 1 + .../react-tabster/tsconfig.cy.json | 1 + .../react-tag-picker/library/tsconfig.cy.json | 1 + .../react-tags/library/tsconfig.cy.json | 1 + .../library/tsconfig.cy.json | 2 + .../react-toast/library/tsconfig.cy.json | 1 + .../react-toolbar/library/tsconfig.cy.json | 1 + .../react-tree/library/tsconfig.cy.json | 3 +- .../react-utilities/tsconfig.cy.json | 1 + packages/react-examples/tsconfig.cy.json | 1 + packages/react-examples/tsconfig.json | 2 +- packages/theme/etc/theme.api.md | 20 ++++---- .../src/menu-item/menu-item.template.ts | 4 +- .../web-components/src/menu-item/menu-item.ts | 7 --- packages/web-components/src/menu/menu.ts | 3 -- packages/web-components/tsconfig.json | 1 + packages/web-components/tsconfig.lib.json | 1 - packages/web-components/tsconfig.spec.json | 3 +- tools/eslint-rules/tsconfig.json | 2 +- .../files/tsconfig.cy.json__tmpl__ | 1 + .../index.spec.ts | 4 ++ .../cypress-component-configuration/index.ts | 4 +- .../lib/add-files.ts | 7 ++- .../migrate-converged-pkg/index.spec.ts | 1 + tsconfig.base.wc.json | 1 - yarn.lock | 8 ++-- 83 files changed, 318 insertions(+), 66 deletions(-) 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/apps/react-18-tests-v8/tsconfig.cy.json b/apps/react-18-tests-v8/tsconfig.cy.json index ceda454a1b7cbf..5ffe323df9d306 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 ceda454a1b7cbf..5ffe323df9d306 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-web-components/tsconfig.json b/apps/vr-tests-web-components/tsconfig.json index 5d883fb3e5d65f..abfc043cd7b049 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/apps/vr-tests/tsconfig.json b/apps/vr-tests/tsconfig.json index e2d8f1cd03b5f7..5fd8d958e77799 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/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 00000000000000..82b7b23539183d --- /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 00000000000000..c5e3c931e1e901 --- /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 00000000000000..9b0f0734e9c420 --- /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 00000000000000..52e158800c86f7 --- /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 00000000000000..3a6f397d840815 --- /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 00000000000000..ea59deec217bd0 --- /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 00000000000000..ca7945188b8c15 --- /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 00000000000000..444163e483c70a --- /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 00000000000000..77f4e6b0b7ff73 --- /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 00000000000000..6cb0e5aa549eb9 --- /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 00000000000000..60e1e9077744cb --- /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 00000000000000..39484dd3146818 --- /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 00000000000000..3f1ed8911dacb5 --- /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 00000000000000..f3969fc6748101 --- /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 00000000000000..f370101f2ac345 --- /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 00000000000000..a104786b3292d3 --- /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 00000000000000..c4d4aadde19ad2 --- /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 00000000000000..38eaca6eec0695 --- /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 00000000000000..6c9e976a3c3c2b --- /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 00000000000000..a4822841d34ae6 --- /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 00000000000000..a7376d423b071a --- /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 00000000000000..7972a33078bb23 --- /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 00000000000000..499548a19f077a --- /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 00000000000000..fe6146cccef208 --- /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 00000000000000..6980678399fb40 --- /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 00000000000000..60f1ba75b10eb0 --- /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 00000000000000..f0812fdfc0695a --- /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 00000000000000..65e14427c49c10 --- /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 00000000000000..19c791a0ca1523 --- /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 00000000000000..92eee2d885d2fc --- /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 00000000000000..b3b94bd2676a75 --- /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" +} diff --git a/package.json b/package.json index 7449a9f951ac34..73e1cdaca2b5c1 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", @@ -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/packages/eslint-plugin/tsconfig.json b/packages/eslint-plugin/tsconfig.json index c64fb9e7c3b8ab..b1b552a86061f8 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/fluentui/e2e/cypress/support/index.d.ts b/packages/fluentui/e2e/cypress/support/index.d.ts index b7631148eebdec..74e2f49ef330e8 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; + } } } 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 d97eb152e03345..1260a0a529617c 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 d97eb152e03345..1260a0a529617c 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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 a308fca822da89..232a935426f7a9 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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-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 7e48e909d5db5a..5414b326c1d7a0 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 { diff --git a/packages/react-components/react-motion/library/tsconfig.cy.json b/packages/react-components/react-motion/library/tsconfig.cy.json index d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..1260a0a529617c 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..1260a0a529617c 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..ea5b8b7ac296dc 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 d97eb152e03345..3cfb39a1086ac0 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 d97eb152e03345..3cfb39a1086ac0 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 7e4c5fba3a4247..90e0e0c7bd6ec7 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 d97eb152e03345..1260a0a529617c 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 226b8575f400a9..a1a78345c4a6e1 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 bbdd6a32e0df53..fe13d94ef30918 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": { diff --git a/packages/theme/etc/theme.api.md b/packages/theme/etc/theme.api.md index b71f2564ce7ab0..4e8afdb7d11755 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/src/menu-item/menu-item.template.ts b/packages/web-components/src/menu-item/menu-item.template.ts index dc85ee5215b48e..0bd42049947180 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 cdae6b3e8f4b9a..98619ea758794d 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 a117e7999514c1..5a3da14a5ca2da 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) { diff --git a/packages/web-components/tsconfig.json b/packages/web-components/tsconfig.json index 5ff1a0e61b3d19..6bb11f9f0d052b 100644 --- a/packages/web-components/tsconfig.json +++ b/packages/web-components/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "target": "ES2019", "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 c4d92fe9792012..13c3609d2e1c95 100644 --- a/packages/web-components/tsconfig.lib.json +++ b/packages/web-components/tsconfig.lib.json @@ -2,7 +2,6 @@ "extends": "./tsconfig.json", "compilerOptions": { "target": "ES2019", - "module": "ESNext", "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 6287b1ce0f8d5c..d365f731b4c263 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/tools/eslint-rules/tsconfig.json b/tools/eslint-rules/tsconfig.json index 7c81409b028357..e7e0be96c033f2 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"], 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 a307d1565f4ae7..d5ad69841a23b7 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 44f97aac0f3edc..5450a811076b14 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 9e0b3467dbe437..2588ada04a7aac 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 e30cd17afdfcb3..09a682e0d6d2b3 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 05fa1678e3b7af..8e3989eabbd793 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'], }); diff --git a/tsconfig.base.wc.json b/tsconfig.base.wc.json index 472f867dd913b0..5c7d220e1c3a6d 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 8c418a5ad40658..63990c4e70db99 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22758,10 +22758,10 @@ 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: - version "5.0.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" - integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== +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.4.2: version "5.4.5"