diff --git a/components/password-input/tsconfig.json b/components/password-input/tsconfig.json index bd94441a..722feb8c 100644 --- a/components/password-input/tsconfig.json +++ b/components/password-input/tsconfig.json @@ -4,5 +4,5 @@ "outDir": "lib", "types": ["vitest/globals"] }, - "exclude": ["**/*.spec.*", "vitest.config.ts"] + "exclude": ["vitest.config.ts"] } diff --git a/components/slider/package.json b/components/slider/package.json index 583ef6e0..bbafb726 100644 --- a/components/slider/package.json +++ b/components/slider/package.json @@ -26,7 +26,7 @@ }, "devDependencies": { "@testing-library/jest-dom": "^6.4.2", - "@testing-library/react": "^12.1.5", + "@testing-library/react": "^14.2.1", "@testing-library/user-event": "^14.5.2", "@types/react": "^18.2.65", "@types/react-dom": "^18.2.8", diff --git a/components/slider/src/range-slider.spec.tsx b/components/slider/src/range-slider.spec.tsx index 4b110f6c..32c13b3e 100644 --- a/components/slider/src/range-slider.spec.tsx +++ b/components/slider/src/range-slider.spec.tsx @@ -3,7 +3,7 @@ import userEvent from "@testing-library/user-event"; import { RangeSlider } from "./range-slider"; import React from "react"; import { getControlRoot } from "./test-helpers"; -import { vi } from "vitest"; +import { expect, vi } from "vitest"; const expectSliderValues = (elements: HTMLElement[], values: number[]) => { expect(elements).toHaveLength(values.length); diff --git a/components/slider/src/slider.spec.tsx b/components/slider/src/slider.spec.tsx index b40ccf30..f1a68dcf 100644 --- a/components/slider/src/slider.spec.tsx +++ b/components/slider/src/slider.spec.tsx @@ -5,7 +5,7 @@ import { sliderClassNames } from "./use-slider-styles"; import { FluentProvider } from "@fluentui/react-components"; import { Slider } from "./slider"; import { getControlRoot } from "./test-helpers"; -import { vi } from "vitest"; +import { expect, vi } from "vitest"; const expectSliderValue = (element: HTMLElement, value: number) => { expect(element.getAttribute("value")).toEqual(value.toString()); diff --git a/components/slider/src/thumb/thumb.types.ts b/components/slider/src/thumb/thumb.types.ts index c62784d1..cbf4fbc1 100644 --- a/components/slider/src/thumb/thumb.types.ts +++ b/components/slider/src/thumb/thumb.types.ts @@ -7,7 +7,7 @@ import { ChangeEvent } from "react"; export type ThumbSlots = { root: Slot<"div">; - input: NonNullable>; + input: NonNullable> & { children?: never }; label: NonNullable>; }; @@ -17,6 +17,7 @@ export type ThumbProps = "value" > & { + children?: never; value: number; handleFocus: () => void; handleBlur: () => void; diff --git a/components/slider/tsconfig.json b/components/slider/tsconfig.json index 266f4a4e..a6651298 100644 --- a/components/slider/tsconfig.json +++ b/components/slider/tsconfig.json @@ -2,8 +2,9 @@ "extends": "./tsconfig.src.json", "compilerOptions": { "outDir": "lib", + "types": ["vitest/globals"], "lib": ["es5", "es6", "dom", "dom.iterable"] }, "include": ["src"], - "exclude": ["**/*.spec.*", "vitest.config.ts"] + "exclude": ["vitest.config.ts"] } diff --git a/components/stepper/package.json b/components/stepper/package.json index ef8d74f9..0fa48a53 100644 --- a/components/stepper/package.json +++ b/components/stepper/package.json @@ -25,7 +25,7 @@ }, "devDependencies": { "@testing-library/jest-dom": "^6.4.2", - "@testing-library/react": "^12.1.5", + "@testing-library/react": "^14.2.1", "@types/react": "^18.2.65", "@types/react-dom": "^18.2.8", "@vitest/coverage-c8": "^0.33.0", diff --git a/components/stepper/tsconfig.json b/components/stepper/tsconfig.json index b60b49ec..722feb8c 100644 --- a/components/stepper/tsconfig.json +++ b/components/stepper/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "./tsconfig.src.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib", + "types": ["vitest/globals"] }, - "exclude": ["**/*.spec.*", "vitest.config.ts"] + "exclude": ["vitest.config.ts"] } diff --git a/components/topbar/package.json b/components/topbar/package.json index 2570c98f..86343f17 100644 --- a/components/topbar/package.json +++ b/components/topbar/package.json @@ -34,7 +34,7 @@ }, "devDependencies": { "@testing-library/jest-dom": "^6.4.2", - "@testing-library/react": "^12.1.5", + "@testing-library/react": "^14.2.1", "@types/react": "^18.2.65", "@types/react-dom": "^18.2.8", "@vitest/coverage-c8": "^0.33.0", diff --git a/components/topbar/tsconfig.json b/components/topbar/tsconfig.json index 92863d84..33dc745d 100644 --- a/components/topbar/tsconfig.json +++ b/components/topbar/tsconfig.json @@ -1,8 +1,11 @@ { "extends": "./tsconfig.src.json", "compilerOptions": { - "outDir": "lib" + "types": ["vitest/globals"], + "outDir": "lib", + "declaration": false, + "declarationMap": false }, "include": ["src"], - "exclude": ["**/*.spec.*", "vitest.config.ts"] + "exclude": ["vitest.config.ts"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe6a7c55..bacff3e9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -114,8 +114,8 @@ importers: specifier: ^6.4.2 version: 6.4.2(vitest@0.34.6) '@testing-library/react': - specifier: ^12.1.5 - version: 12.1.5(react-dom@18.2.0)(react@18.2.0) + specifier: ^14.2.1 + version: 14.2.1(react-dom@18.2.0)(react@18.2.0) '@testing-library/user-event': specifier: ^14.5.2 version: 14.5.2(@testing-library/dom@9.3.4) @@ -166,8 +166,8 @@ importers: specifier: ^6.4.2 version: 6.4.2(vitest@0.34.6) '@testing-library/react': - specifier: ^12.1.5 - version: 12.1.5(react-dom@18.2.0)(react@18.2.0) + specifier: ^14.2.1 + version: 14.2.1(react-dom@18.2.0)(react@18.2.0) '@types/react': specifier: ^18.2.65 version: 18.2.65 @@ -218,8 +218,8 @@ importers: specifier: ^6.4.2 version: 6.4.2(vitest@0.34.6) '@testing-library/react': - specifier: ^12.1.5 - version: 12.1.5(react-dom@18.2.0)(react@18.2.0) + specifier: ^14.2.1 + version: 14.2.1(react-dom@18.2.0)(react@18.2.0) '@types/react': specifier: ^18.2.65 version: 18.2.65 @@ -733,13 +733,6 @@ packages: '@babel/types': 7.23.6 dev: false - /@babel/runtime@7.23.6: - resolution: {integrity: sha512-zHd0eUrf5GZoOWVCXp6koAKQTfZV07eit6bGPmJgnZdnSAvvZee6zniW2XMF7Cmc4ISOOnPy3QaSiIJGJkVEDQ==} - engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.14.1 - dev: true - /@babel/runtime@7.23.8: resolution: {integrity: sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==} engines: {node: '>=6.9.0'} @@ -5381,20 +5374,6 @@ packages: tslib: 2.6.2 dev: false - /@testing-library/dom@8.20.1: - resolution: {integrity: sha512-/DiOQ5xBxgdYRC8LNk7U+RWat0S3qRLeIw3ZIkMQ9kkVlRmwD/Eg8k8CqIpD6GW7u20JIUOfMKbxtiLutpjQ4g==} - engines: {node: '>=12'} - dependencies: - '@babel/code-frame': 7.23.5 - '@babel/runtime': 7.23.8 - '@types/aria-query': 5.0.4 - aria-query: 5.1.3 - chalk: 4.1.2 - dom-accessibility-api: 0.5.16 - lz-string: 1.5.0 - pretty-format: 27.5.1 - dev: true - /@testing-library/dom@9.3.4: resolution: {integrity: sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==} engines: {node: '>=14'} @@ -5441,16 +5420,16 @@ packages: vitest: 0.34.6(jsdom@22.1.0) dev: true - /@testing-library/react@12.1.5(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-OfTXCJUFgjd/digLUuPxa0+/3ZxsQmE7ub9kcbW/wi96Bh3o/p5vrETcBGfP17NWPGqeYYl5LTRpwyGoMC4ysg==} - engines: {node: '>=12'} + /@testing-library/react@14.2.1(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-sGdjws32ai5TLerhvzThYFbpnF9XtL65Cjf+gB0Dhr29BGqK+mAeN7SURSdu+eqgET4ANcWoC7FQpkaiGvBr+A==} + engines: {node: '>=14'} peerDependencies: - react: <18.0.0 - react-dom: <18.0.0 + react: ^18.0.0 + react-dom: ^18.0.0 dependencies: - '@babel/runtime': 7.23.6 - '@testing-library/dom': 8.20.1 - '@types/react-dom': 17.0.21 + '@babel/runtime': 7.23.8 + '@testing-library/dom': 9.3.4 + '@types/react-dom': 18.2.22 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: true @@ -5554,17 +5533,10 @@ packages: resolution: {integrity: sha512-hroOstUScF6zhIi+5+x0dzqrHA1EJi+Irri6b1fxolMTqqHIV/Cg77EtnQcZqZCu8hR3mX2BzIxN4/GzI68Kfw==} dev: true - /@types/react-dom@17.0.21: - resolution: {integrity: sha512-3rQEFUNUUz2MYiRwJJj6UekcW7rFLOtmK7ajQP7qJpjNdggInl3I/xM4I3Hq1yYPdCGVMgax1gZsB7BBTtayXg==} - dependencies: - '@types/react': 17.0.67 - dev: true - /@types/react-dom@18.2.22: resolution: {integrity: sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ==} dependencies: '@types/react': 18.2.65 - dev: false /@types/react-dom@18.2.8: resolution: {integrity: sha512-bAIvO5lN/U8sPGvs1Xm61rlRHHaq5rp5N3kp9C+NJ/Q41P8iqjkXSu0+/qu8POsjH9pNWb0OYabFez7taP7omw==} @@ -5577,14 +5549,6 @@ packages: '@types/react': 18.2.65 dev: true - /@types/react@17.0.67: - resolution: {integrity: sha512-zE76EIJ0Y58Oy9yDX/9csb/NuKjt0Eq2YgWb/8Wxo91YmuLzzbyiRoaqJE9h8iDlsT7n35GdpoLomHlaB1kFbg==} - dependencies: - '@types/prop-types': 15.7.11 - '@types/scheduler': 0.16.8 - csstype: 3.1.3 - dev: true - /@types/react@18.2.65: resolution: {integrity: sha512-98TsY0aW4jqx/3RqsUXwMDZSWR1Z4CUlJNue8ueS2/wcxZOsz4xmW1X8ieaWVRHcmmQM3R8xVA4XWB3dJnWwDQ==} dependencies: