mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-05 22:00:17 +00:00
Update dependency typescript to v6 (#32927)
* Update dependency typescript to v6 * Switch to unplugin-vts Workaround for https://github.com/qmhc/unplugin-dts/issues/467 And tweak tsconfigs * tweak tsconfig * Make tsc happy --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -40,9 +40,9 @@
|
||||
"matrix-widget-api": "^1.17.0",
|
||||
"rollup-plugin-external-globals": "^0.13.0",
|
||||
"semver": "^7.6.3",
|
||||
"typescript": "^5.7.3",
|
||||
"typescript": "^6.0.0",
|
||||
"unplugin-dts": "1.0.0-beta.6",
|
||||
"vite": "^8.0.0",
|
||||
"vite-plugin-dts": "^4.5.0",
|
||||
"vitest": "^4.0.0",
|
||||
"vitest-sonar-reporter": "^3.0.0"
|
||||
},
|
||||
@@ -50,8 +50,8 @@
|
||||
"@matrix-org/react-sdk-module-api": "*",
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"matrix-widget-api": "*",
|
||||
"matrix-web-i18n": "*",
|
||||
"matrix-widget-api": "*",
|
||||
"react": "^19"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
@@ -64,6 +64,5 @@
|
||||
"matrix-web-i18n": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"target": "esnext",
|
||||
"lib": ["dom", "es2022", "esnext"],
|
||||
"esModuleInterop": true,
|
||||
|
||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { defineConfig } from "vite";
|
||||
import dts from "vite-plugin-dts";
|
||||
import dts from "unplugin-dts/vite";
|
||||
import externalGlobals from "rollup-plugin-external-globals";
|
||||
|
||||
import packageJson from "./package.json" with { type: "json" };
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"devDependencies": {
|
||||
"@element-hq/element-web-module-api": "workspace:*",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"typescript": "^5.8.2",
|
||||
"typescript": "^6.0.0",
|
||||
"wait-on": "^9.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -53,6 +53,8 @@ class Toasts {
|
||||
* @returns the Locator for the matching toast, or null if it is not
|
||||
* visible. (null will only be returned if `required` is false.)
|
||||
*/
|
||||
public async getToast(title: string, timeout?: number, required?: true): Promise<Locator>;
|
||||
public async getToast(title: string, timeout: number | undefined, required: false): Promise<Locator | null>;
|
||||
public async getToast(title: string, timeout?: number, required = true): Promise<Locator | null> {
|
||||
const toast = this.page.locator(".mx_Toast_toast", { hasText: title }).first();
|
||||
|
||||
@@ -148,7 +150,12 @@ async function clickToastButton(
|
||||
timeout?: number,
|
||||
required = true,
|
||||
): Promise<void> {
|
||||
const toast = await toasts.getToast(title, timeout, required);
|
||||
let toast: Locator | null;
|
||||
if (required) {
|
||||
toast = await toasts.getToast(title, timeout, true);
|
||||
} else {
|
||||
toast = await toasts.getToast(title, timeout, false);
|
||||
}
|
||||
|
||||
if (toast) {
|
||||
await toast.locator(`.mx_Toast_buttons button[data-kind="${button}"]`).click();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"target": "esnext",
|
||||
"lib": ["dom", "es2022", "esnext"],
|
||||
"esModuleInterop": true,
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
"@fetch-mock/vitest": "^0.2.18",
|
||||
"@fontsource/inter": "catalog:",
|
||||
"@matrix-org/react-sdk-module-api": "^2.5.0",
|
||||
"@microsoft/api-extractor": "^7.56.0",
|
||||
"@playwright/test": "catalog:",
|
||||
"@storybook/addon-a11y": "^10.0.7",
|
||||
"@storybook/addon-designs": "^11.0.1",
|
||||
@@ -113,8 +114,8 @@
|
||||
"typedoc-plugin-markdown": "^4.9.0",
|
||||
"typedoc-plugin-missing-exports": "^4.1.2",
|
||||
"typescript": "catalog:",
|
||||
"unplugin-dts": "1.0.0-beta.6",
|
||||
"vite": "^8.0.0",
|
||||
"vite-plugin-dts": "^4.5.4",
|
||||
"vite-plugin-node-polyfills": "^0.26.0",
|
||||
"vitest": "^4.0.18",
|
||||
"vitest-sonar-reporter": "^3.0.0"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { defineConfig, esmExternalRequirePlugin } from "vite";
|
||||
import dts from "vite-plugin-dts";
|
||||
import dts from "unplugin-dts/vite";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
@@ -51,10 +51,10 @@ export default defineConfig({
|
||||
},
|
||||
plugins: [
|
||||
dts({
|
||||
rollupTypes: true,
|
||||
bundleTypes: true,
|
||||
include: ["src/**/*.{ts,tsx}"],
|
||||
exclude: ["src/**/*.test.{ts,tsx}", "src/**/*.stories.{ts,tsx}"],
|
||||
copyDtsFiles: true,
|
||||
copyDtsFiles: false,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user