Upgrade to TypeScript 7 (#34208)
* Upgrade to TypeScript 7 for massive tsc speed gains Those on WebStorm will want to upgrade to EAP to reap the benefits of the new TSGo compiler Some things (module-api & shared-components) which utilise unplugin-dts (and api-extractor) need to hold a copy of ts6 for its conventional lib format and API. TS7 ships with no API until TS7.1. Other things which use eslint also need ts6 for typescript-eslint. Some type changes were necessary as TS7 caught some issues. * Add knip exception * Fix bad merge
This commit is contained in:
@@ -78,6 +78,7 @@
|
|||||||
"@types/minimist": "^1.2.1",
|
"@types/minimist": "^1.2.1",
|
||||||
"@types/node": "catalog:",
|
"@types/node": "catalog:",
|
||||||
"@types/pacote": "^11.1.1",
|
"@types/pacote": "^11.1.1",
|
||||||
|
"@typescript/native": "catalog:",
|
||||||
"app-builder-lib": "26.15.3",
|
"app-builder-lib": "26.15.3",
|
||||||
"chokidar": "^5.0.0",
|
"chokidar": "^5.0.0",
|
||||||
"detect-libc": "^2.0.0",
|
"detect-libc": "^2.0.0",
|
||||||
@@ -93,7 +94,7 @@
|
|||||||
"rimraf": "^6.0.0",
|
"rimraf": "^6.0.0",
|
||||||
"shared-types": "workspace:*",
|
"shared-types": "workspace:*",
|
||||||
"tar": "^7.5.8",
|
"tar": "^7.5.8",
|
||||||
"typescript": "catalog:",
|
"typescript": "catalog:ts6",
|
||||||
"vitest": "catalog:"
|
"vitest": "catalog:"
|
||||||
},
|
},
|
||||||
"hakDependencies": {
|
"hakDependencies": {
|
||||||
|
|||||||
@@ -159,6 +159,7 @@
|
|||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@types/tar-js": "^0.3.5",
|
"@types/tar-js": "^0.3.5",
|
||||||
"@types/ua-parser-js": "^0.7.36",
|
"@types/ua-parser-js": "^0.7.36",
|
||||||
|
"@typescript/native": "catalog:",
|
||||||
"@vitest/spy": "catalog:",
|
"@vitest/spy": "catalog:",
|
||||||
"babel-jest": "^30.0.0",
|
"babel-jest": "^30.0.0",
|
||||||
"babel-loader": "^10.0.0",
|
"babel-loader": "^10.0.0",
|
||||||
@@ -206,7 +207,7 @@
|
|||||||
"stylelint-value-no-unknown-custom-properties": "^6.0.1",
|
"stylelint-value-no-unknown-custom-properties": "^6.0.1",
|
||||||
"terser-webpack-plugin": "^5.3.9",
|
"terser-webpack-plugin": "^5.3.9",
|
||||||
"testcontainers": "^12.0.0",
|
"testcontainers": "^12.0.0",
|
||||||
"typescript": "catalog:",
|
"typescript": "catalog:ts6",
|
||||||
"util": "^0.12.5",
|
"util": "^0.12.5",
|
||||||
"vitest": "catalog:",
|
"vitest": "catalog:",
|
||||||
"vitest-canvas-mock": "^1.1.4",
|
"vitest-canvas-mock": "^1.1.4",
|
||||||
|
|||||||
@@ -12,15 +12,15 @@ import React, { type Ref, type JSX } from "react";
|
|||||||
|
|
||||||
import AccessibleButton, { type ButtonProps } from "../../components/views/elements/AccessibleButton";
|
import AccessibleButton, { type ButtonProps } from "../../components/views/elements/AccessibleButton";
|
||||||
|
|
||||||
type Props<T extends keyof HTMLElementTagNameMap> = ButtonProps<T> & {
|
type Props = Omit<ButtonProps<"div">, "element" | "ref"> & {
|
||||||
label?: string;
|
label?: string;
|
||||||
// whether the context menu is currently open
|
// whether the context menu is currently open
|
||||||
isExpanded: boolean;
|
isExpanded: boolean;
|
||||||
ref?: Ref<HTMLElementTagNameMap[T]>;
|
ref?: Ref<HTMLElement>;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Semantic component for representing the AccessibleButton which launches a <ContextMenu />
|
// Semantic component for representing the AccessibleButton which launches a <ContextMenu />
|
||||||
export const ContextMenuButton = function <T extends keyof HTMLElementTagNameMap>({
|
export const ContextMenuButton = function ({
|
||||||
label,
|
label,
|
||||||
isExpanded,
|
isExpanded,
|
||||||
children,
|
children,
|
||||||
@@ -28,7 +28,7 @@ export const ContextMenuButton = function <T extends keyof HTMLElementTagNameMap
|
|||||||
onContextMenu,
|
onContextMenu,
|
||||||
ref,
|
ref,
|
||||||
...props
|
...props
|
||||||
}: Props<T>): JSX.Element {
|
}: Props): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<AccessibleButton
|
<AccessibleButton
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
@@ -8,24 +8,25 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
|||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { type JSX } from "react";
|
import React, { type JSX, type Ref } from "react";
|
||||||
|
|
||||||
import AccessibleButton, { type ButtonProps } from "../../components/views/elements/AccessibleButton";
|
import AccessibleButton, { type ButtonProps } from "../../components/views/elements/AccessibleButton";
|
||||||
|
|
||||||
type Props<T extends keyof HTMLElementTagNameMap> = ButtonProps<T> & {
|
type Props = Omit<ButtonProps<"div">, "element" | "ref"> & {
|
||||||
// whether the context menu is currently open
|
// whether the context menu is currently open
|
||||||
isExpanded: boolean;
|
isExpanded: boolean;
|
||||||
|
ref?: Ref<HTMLElement>;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Semantic component for representing the AccessibleButton which launches a <ContextMenu />
|
// Semantic component for representing the AccessibleButton which launches a <ContextMenu />
|
||||||
export const ContextMenuTooltipButton = function <T extends keyof HTMLElementTagNameMap>({
|
export const ContextMenuTooltipButton = function ({
|
||||||
isExpanded,
|
isExpanded,
|
||||||
children,
|
children,
|
||||||
onClick,
|
onClick,
|
||||||
onContextMenu,
|
onContextMenu,
|
||||||
ref,
|
ref,
|
||||||
...props
|
...props
|
||||||
}: Props<T>): JSX.Element {
|
}: Props): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<AccessibleButton
|
<AccessibleButton
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
@@ -15,17 +15,17 @@ import { logger } from "matrix-js-sdk/src/logger";
|
|||||||
import SettingsStore from "../../../settings/SettingsStore";
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
import { _t } from "../../../languageHandler";
|
import { _t } from "../../../languageHandler";
|
||||||
import { type SettingLevel } from "../../../settings/SettingLevel";
|
import { type SettingLevel } from "../../../settings/SettingLevel";
|
||||||
import { type BooleanSettingKey, defaultWatchManager } from "../../../settings/Settings";
|
import { type NullableBooleanSettingKey, defaultWatchManager } from "../../../settings/Settings";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
// The setting must be a boolean
|
// The setting must be a boolean
|
||||||
name: BooleanSettingKey;
|
name: NullableBooleanSettingKey;
|
||||||
level: SettingLevel;
|
level: SettingLevel;
|
||||||
roomId?: string; // for per-room settings
|
roomId?: string; // for per-room settings
|
||||||
label?: string;
|
label?: string;
|
||||||
isExplicit?: boolean;
|
isExplicit?: boolean;
|
||||||
hideIfCannotSet?: boolean;
|
hideIfCannotSet?: boolean;
|
||||||
requires?: BooleanSettingKey[];
|
requires?: NullableBooleanSettingKey[];
|
||||||
onChange?(checked: boolean): void;
|
onChange?(checked: boolean): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -372,9 +372,16 @@ export interface Settings {
|
|||||||
export type SettingKey = keyof Settings;
|
export type SettingKey = keyof Settings;
|
||||||
export type FeatureSettingKey = Assignable<Settings, IFeature>;
|
export type FeatureSettingKey = Assignable<Settings, IFeature>;
|
||||||
export type BooleanSettingKey = Assignable<Settings, IBaseSetting<boolean>> | FeatureSettingKey;
|
export type BooleanSettingKey = Assignable<Settings, IBaseSetting<boolean>> | FeatureSettingKey;
|
||||||
|
export type NullableBooleanSettingKey = Assignable<Settings, IBaseSetting<boolean | null>> | FeatureSettingKey;
|
||||||
export type StringSettingKey = Assignable<Settings, IBaseSetting<string>>;
|
export type StringSettingKey = Assignable<Settings, IBaseSetting<string>>;
|
||||||
|
|
||||||
export const SETTINGS: Settings = {
|
export const SETTINGS: Settings = {
|
||||||
|
// Used in tests only
|
||||||
|
"test_setting": {
|
||||||
|
supportedLevels: [],
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
|
||||||
"feature_video_rooms": {
|
"feature_video_rooms": {
|
||||||
isFeature: true,
|
isFeature: true,
|
||||||
labsGroup: LabGroup.VoiceAndVideo,
|
labsGroup: LabGroup.VoiceAndVideo,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
|
|
||||||
import SettingController from "./SettingController";
|
import SettingController from "./SettingController";
|
||||||
import { type SettingLevel } from "../SettingLevel";
|
import { type SettingLevel } from "../SettingLevel";
|
||||||
import { type BooleanSettingKey } from "../Settings.tsx";
|
import { type SettingKey, type Settings } from "../Settings.tsx";
|
||||||
import PlatformPeg from "../../PlatformPeg.ts";
|
import PlatformPeg from "../../PlatformPeg.ts";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -16,11 +16,16 @@ import PlatformPeg from "../../PlatformPeg.ts";
|
|||||||
* is also enabled, to prevent cascading undefined behaviour between conflicting
|
* is also enabled, to prevent cascading undefined behaviour between conflicting
|
||||||
* labs flags.
|
* labs flags.
|
||||||
*/
|
*/
|
||||||
export default class IncompatibleController extends SettingController {
|
export default class IncompatibleController<
|
||||||
|
ControlledSetting extends SettingKey,
|
||||||
|
WatchedSetting extends SettingKey,
|
||||||
|
> extends SettingController {
|
||||||
public constructor(
|
public constructor(
|
||||||
private settingName: BooleanSettingKey,
|
private settingName: WatchedSetting,
|
||||||
private forcedValue: any = false,
|
private forcedValue: Settings[ControlledSetting]["default"] = false,
|
||||||
private incompatibleValue: any | ((v: any) => boolean) = true,
|
private incompatibleValue:
|
||||||
|
| Settings[WatchedSetting]["default"]
|
||||||
|
| ((v: Settings[WatchedSetting]["default"]) => boolean) = true,
|
||||||
private readonly disabledMessage?: string,
|
private readonly disabledMessage?: string,
|
||||||
private readonly forceReload = false,
|
private readonly forceReload = false,
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -9,7 +9,12 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
import IncompatibleController from "../../../../src/settings/controllers/IncompatibleController";
|
import IncompatibleController from "../../../../src/settings/controllers/IncompatibleController";
|
||||||
import { SettingLevel } from "../../../../src/settings/SettingLevel";
|
import { SettingLevel } from "../../../../src/settings/SettingLevel";
|
||||||
import SettingsStore from "../../../../src/settings/SettingsStore";
|
import SettingsStore from "../../../../src/settings/SettingsStore";
|
||||||
import { type FeatureSettingKey } from "../../../../src/settings/Settings.tsx";
|
|
||||||
|
declare module "../../../../src/settings/Settings.tsx" {
|
||||||
|
interface Settings {
|
||||||
|
test_setting: IBaseSetting<string>;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
describe("IncompatibleController", () => {
|
describe("IncompatibleController", () => {
|
||||||
const settingsGetValueSpy = jest.spyOn(SettingsStore, "getValue");
|
const settingsGetValueSpy = jest.spyOn(SettingsStore, "getValue");
|
||||||
@@ -21,17 +26,17 @@ describe("IncompatibleController", () => {
|
|||||||
describe("when incompatibleValue is not set", () => {
|
describe("when incompatibleValue is not set", () => {
|
||||||
it("returns true when setting value is true", () => {
|
it("returns true when setting value is true", () => {
|
||||||
// no incompatible value set, defaulted to true
|
// no incompatible value set, defaulted to true
|
||||||
const controller = new IncompatibleController("feature_spotlight" as FeatureSettingKey, { key: null });
|
const controller = new IncompatibleController("test_setting", { key: null });
|
||||||
settingsGetValueSpy.mockReturnValue(true);
|
settingsGetValueSpy.mockReturnValue(true);
|
||||||
// true === true
|
// true === true
|
||||||
expect(controller.incompatibleSetting).toBe(true);
|
expect(controller.incompatibleSetting).toBe(true);
|
||||||
expect(controller.settingDisabled).toEqual(true);
|
expect(controller.settingDisabled).toEqual(true);
|
||||||
expect(settingsGetValueSpy).toHaveBeenCalledWith("feature_spotlight");
|
expect(settingsGetValueSpy).toHaveBeenCalledWith("test_setting");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("returns false when setting value is not true", () => {
|
it("returns false when setting value is not true", () => {
|
||||||
// no incompatible value set, defaulted to true
|
// no incompatible value set, defaulted to true
|
||||||
const controller = new IncompatibleController("feature_spotlight" as FeatureSettingKey, { key: null });
|
const controller = new IncompatibleController("test_setting", { key: null });
|
||||||
settingsGetValueSpy.mockReturnValue("test");
|
settingsGetValueSpy.mockReturnValue("test");
|
||||||
expect(controller.incompatibleSetting).toBe(false);
|
expect(controller.incompatibleSetting).toBe(false);
|
||||||
});
|
});
|
||||||
@@ -39,21 +44,13 @@ describe("IncompatibleController", () => {
|
|||||||
|
|
||||||
describe("when incompatibleValue is set to a value", () => {
|
describe("when incompatibleValue is set to a value", () => {
|
||||||
it("returns true when setting value matches incompatible value", () => {
|
it("returns true when setting value matches incompatible value", () => {
|
||||||
const controller = new IncompatibleController(
|
const controller = new IncompatibleController("test_setting", { key: null }, "test");
|
||||||
"feature_spotlight" as FeatureSettingKey,
|
|
||||||
{ key: null },
|
|
||||||
"test",
|
|
||||||
);
|
|
||||||
settingsGetValueSpy.mockReturnValue("test");
|
settingsGetValueSpy.mockReturnValue("test");
|
||||||
expect(controller.incompatibleSetting).toBe(true);
|
expect(controller.incompatibleSetting).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("returns false when setting value is not true", () => {
|
it("returns false when setting value is not true", () => {
|
||||||
const controller = new IncompatibleController(
|
const controller = new IncompatibleController("test_setting", { key: null }, "test");
|
||||||
"feature_spotlight" as FeatureSettingKey,
|
|
||||||
{ key: null },
|
|
||||||
"test",
|
|
||||||
);
|
|
||||||
settingsGetValueSpy.mockReturnValue("not test");
|
settingsGetValueSpy.mockReturnValue("not test");
|
||||||
expect(controller.incompatibleSetting).toBe(false);
|
expect(controller.incompatibleSetting).toBe(false);
|
||||||
});
|
});
|
||||||
@@ -62,11 +59,7 @@ describe("IncompatibleController", () => {
|
|||||||
describe("when incompatibleValue is set to a function", () => {
|
describe("when incompatibleValue is set to a function", () => {
|
||||||
it("returns result from incompatibleValue function", () => {
|
it("returns result from incompatibleValue function", () => {
|
||||||
const incompatibleValueFn = jest.fn().mockReturnValue(false);
|
const incompatibleValueFn = jest.fn().mockReturnValue(false);
|
||||||
const controller = new IncompatibleController(
|
const controller = new IncompatibleController("test_setting", { key: null }, incompatibleValueFn);
|
||||||
"feature_spotlight" as FeatureSettingKey,
|
|
||||||
{ key: null },
|
|
||||||
incompatibleValueFn,
|
|
||||||
);
|
|
||||||
settingsGetValueSpy.mockReturnValue("test");
|
settingsGetValueSpy.mockReturnValue("test");
|
||||||
expect(controller.incompatibleSetting).toBe(false);
|
expect(controller.incompatibleSetting).toBe(false);
|
||||||
expect(incompatibleValueFn).toHaveBeenCalledWith("test");
|
expect(incompatibleValueFn).toHaveBeenCalledWith("test");
|
||||||
@@ -77,7 +70,7 @@ describe("IncompatibleController", () => {
|
|||||||
describe("getValueOverride()", () => {
|
describe("getValueOverride()", () => {
|
||||||
it("returns forced value when setting is incompatible", () => {
|
it("returns forced value when setting is incompatible", () => {
|
||||||
settingsGetValueSpy.mockReturnValue(true);
|
settingsGetValueSpy.mockReturnValue(true);
|
||||||
const controller = new IncompatibleController("feature_spotlight" as FeatureSettingKey, { key: null });
|
const controller = new IncompatibleController("test_setting", { key: null });
|
||||||
expect(
|
expect(
|
||||||
controller.getValueOverride(SettingLevel.ACCOUNT, "$room:server", true, SettingLevel.ACCOUNT),
|
controller.getValueOverride(SettingLevel.ACCOUNT, "$room:server", true, SettingLevel.ACCOUNT),
|
||||||
).toEqual({ key: null });
|
).toEqual({ key: null });
|
||||||
@@ -85,7 +78,7 @@ describe("IncompatibleController", () => {
|
|||||||
|
|
||||||
it("returns null when setting is not incompatible", () => {
|
it("returns null when setting is not incompatible", () => {
|
||||||
settingsGetValueSpy.mockReturnValue(false);
|
settingsGetValueSpy.mockReturnValue(false);
|
||||||
const controller = new IncompatibleController("feature_spotlight" as FeatureSettingKey, { key: null });
|
const controller = new IncompatibleController("test_setting", { key: null });
|
||||||
expect(
|
expect(
|
||||||
controller.getValueOverride(SettingLevel.ACCOUNT, "$room:server", true, SettingLevel.ACCOUNT),
|
controller.getValueOverride(SettingLevel.ACCOUNT, "$room:server", true, SettingLevel.ACCOUNT),
|
||||||
).toEqual(null);
|
).toEqual(null);
|
||||||
|
|||||||
@@ -23,7 +23,8 @@
|
|||||||
"test-utils": ["./test/test-utils"],
|
"test-utils": ["./test/test-utils"],
|
||||||
"test-utils/*": ["./test/test-utils/*"],
|
"test-utils/*": ["./test/test-utils/*"],
|
||||||
"jest-mock-vitest-adapter": ["./test/setup/adapter.ts"]
|
"jest-mock-vitest-adapter": ["./test/setup/adapter.ts"]
|
||||||
}
|
},
|
||||||
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./node_modules/matrix-js-sdk/src/@types/*.d.ts",
|
"./node_modules/matrix-js-sdk/src/@types/*.d.ts",
|
||||||
|
|||||||
@@ -113,6 +113,8 @@ export default {
|
|||||||
ignoreDependencies: [
|
ignoreDependencies: [
|
||||||
// Used by multiple packages, raises a false positive for some reason
|
// Used by multiple packages, raises a false positive for some reason
|
||||||
"events",
|
"events",
|
||||||
|
// Used as a workaround for api-extractor not supporting typescript 7.0
|
||||||
|
"@typescript/old",
|
||||||
],
|
],
|
||||||
ignoreExportsUsedInFile: true,
|
ignoreExportsUsedInFile: true,
|
||||||
ignoreBinaries: [
|
ignoreBinaries: [
|
||||||
|
|||||||
+2
-1
@@ -35,6 +35,7 @@
|
|||||||
"@nx-tools/nx-container": "^7.2.1",
|
"@nx-tools/nx-container": "^7.2.1",
|
||||||
"@playwright/test": "catalog:",
|
"@playwright/test": "catalog:",
|
||||||
"@types/node": "25",
|
"@types/node": "25",
|
||||||
|
"@typescript/native": "catalog:",
|
||||||
"@vitest/coverage-v8": "catalog:",
|
"@vitest/coverage-v8": "catalog:",
|
||||||
"cronstrue": "^3.0.0",
|
"cronstrue": "^3.0.0",
|
||||||
"eslint-plugin-element-call": "github:element-hq/element-call#livekit&path:/eslint",
|
"eslint-plugin-element-call": "github:element-hq/element-call#livekit&path:/eslint",
|
||||||
@@ -49,7 +50,7 @@
|
|||||||
"oxfmt": "0.56.0",
|
"oxfmt": "0.56.0",
|
||||||
"oxlint": "^1.70.0",
|
"oxlint": "^1.70.0",
|
||||||
"oxlint-tsgolint": "^0.23.0",
|
"oxlint-tsgolint": "^0.23.0",
|
||||||
"typescript": "catalog:",
|
"typescript": "catalog:ts6",
|
||||||
"vitepress": "^1.6.4",
|
"vitepress": "^1.6.4",
|
||||||
"vitepress-plugin-mermaid": "^2.0.17",
|
"vitepress-plugin-mermaid": "^2.0.17",
|
||||||
"vitest": "catalog:",
|
"vitest": "catalog:",
|
||||||
|
|||||||
@@ -39,15 +39,16 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@matrix-org/react-sdk-module-api": "^2.5.0",
|
"@matrix-org/react-sdk-module-api": "^2.5.0",
|
||||||
"@microsoft/api-extractor": "^7.49.1",
|
"@microsoft/api-extractor": "^7.49.1",
|
||||||
"@types/node": "catalog:",
|
"@types/node": "catalog:ts6",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"@types/react-dom": "catalog:",
|
"@types/react-dom": "catalog:",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
|
"@typescript/native": "catalog:",
|
||||||
"matrix-widget-api": "^1.17.0",
|
"matrix-widget-api": "^1.17.0",
|
||||||
"rollup-plugin-external-globals": "^0.13.0",
|
"rollup-plugin-external-globals": "^0.13.0",
|
||||||
"semver": "^7.6.3",
|
"semver": "^7.6.3",
|
||||||
"shared-types": "workspace:*",
|
"shared-types": "workspace:*",
|
||||||
"typescript": "catalog:",
|
"typescript": "catalog:ts6",
|
||||||
"unplugin-dts": "catalog:",
|
"unplugin-dts": "catalog:",
|
||||||
"vite": "catalog:",
|
"vite": "catalog:",
|
||||||
"vitest": "catalog:"
|
"vitest": "catalog:"
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ export default defineConfig({
|
|||||||
dts({
|
dts({
|
||||||
bundleTypes: {
|
bundleTypes: {
|
||||||
configPath: "./api-extractor.json",
|
configPath: "./api-extractor.json",
|
||||||
|
invokeOptions: {
|
||||||
|
localBuild: !!process.env.CI,
|
||||||
|
typescriptCompilerFolder: resolve(require.resolve("@typescript/old"), "../.."),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
externalGlobals({
|
externalGlobals({
|
||||||
|
|||||||
@@ -104,6 +104,7 @@
|
|||||||
"@types/lodash": "^4.17.20",
|
"@types/lodash": "^4.17.20",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"@types/react-dom": "catalog:",
|
"@types/react-dom": "catalog:",
|
||||||
|
"@typescript/native": "catalog:",
|
||||||
"@vector-im/compound-web": "catalog:",
|
"@vector-im/compound-web": "catalog:",
|
||||||
"@vitejs/plugin-react": "catalog:",
|
"@vitejs/plugin-react": "catalog:",
|
||||||
"@vitest/browser-playwright": "catalog:",
|
"@vitest/browser-playwright": "catalog:",
|
||||||
@@ -113,7 +114,7 @@
|
|||||||
"typedoc": "^0.28.16",
|
"typedoc": "^0.28.16",
|
||||||
"typedoc-plugin-markdown": "^4.9.0",
|
"typedoc-plugin-markdown": "^4.9.0",
|
||||||
"typedoc-plugin-missing-exports": "^4.1.2",
|
"typedoc-plugin-missing-exports": "^4.1.2",
|
||||||
"typescript": "catalog:",
|
"typescript": "catalog:ts6",
|
||||||
"unplugin-dts": "catalog:",
|
"unplugin-dts": "catalog:",
|
||||||
"vite": "catalog:",
|
"vite": "catalog:",
|
||||||
"vite-plugin-node-polyfills": "^0.28.0",
|
"vite-plugin-node-polyfills": "^0.28.0",
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"types": [],
|
"types": [],
|
||||||
"allowSyntheticDefaultImports": true
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"include": ["vite.config.ts", "vitest.config.ts", "../../vitest.config.ts"]
|
"include": ["vite.config.ts", "vitest.config.ts", "../../vitest.config.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,12 @@ export default defineConfig({
|
|||||||
react(),
|
react(),
|
||||||
layerCssAssets(),
|
layerCssAssets(),
|
||||||
dts({
|
dts({
|
||||||
bundleTypes: true,
|
bundleTypes: {
|
||||||
|
invokeOptions: {
|
||||||
|
localBuild: !!process.env.CI,
|
||||||
|
typescriptCompilerFolder: resolve(require.resolve("@typescript/old"), "../.."),
|
||||||
|
},
|
||||||
|
},
|
||||||
include: ["src/**/*.{ts,tsx}"],
|
include: ["src/**/*.{ts,tsx}"],
|
||||||
exclude: ["src/**/*.test.{ts,tsx}", "src/**/*.stories.{ts,tsx}"],
|
exclude: ["src/**/*.test.{ts,tsx}", "src/**/*.stories.{ts,tsx}"],
|
||||||
copyDtsFiles: false,
|
copyDtsFiles: false,
|
||||||
|
|||||||
Generated
+436
-194
File diff suppressed because it is too large
Load Diff
+17
-4
@@ -12,8 +12,9 @@ packages:
|
|||||||
|
|
||||||
catalog:
|
catalog:
|
||||||
# typescript
|
# typescript
|
||||||
typescript: 6.0.3
|
"typescript": 7.0.2
|
||||||
"@types/node": ts6.0
|
"@typescript/native": npm:typescript@7.0.2
|
||||||
|
"@types/node": ts7.0
|
||||||
# react
|
# react
|
||||||
react: ^19.0.0
|
react: ^19.0.0
|
||||||
react-dom: ^19.0.0
|
react-dom: ^19.0.0
|
||||||
@@ -40,6 +41,11 @@ catalog:
|
|||||||
"@vitejs/plugin-react": 6.0.2
|
"@vitejs/plugin-react": 6.0.2
|
||||||
unplugin-dts: 1.0.1
|
unplugin-dts: 1.0.1
|
||||||
|
|
||||||
|
catalogs:
|
||||||
|
ts6:
|
||||||
|
typescript: npm:@typescript/typescript6@6.0.2
|
||||||
|
"@types/node": ts6.0
|
||||||
|
|
||||||
packageExtensions:
|
packageExtensions:
|
||||||
fdir:
|
fdir:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -147,11 +153,18 @@ overrides:
|
|||||||
vite@6 <6.4.3: ^6.4.3
|
vite@6 <6.4.3: ^6.4.3
|
||||||
# Workaround for https://github.com/electron/electron/issues/51619
|
# Workaround for https://github.com/electron/electron/issues/51619
|
||||||
yauzl: "^3.3.1"
|
yauzl: "^3.3.1"
|
||||||
# Convince api-extractor to use an up to date Typescript version
|
# Convince api-extractor to use a newer Typescript version
|
||||||
typescript: "catalog:"
|
"unplugin-dts>typescript": "catalog:ts6"
|
||||||
|
"@microsoft/api-extractor>typescript": "catalog:ts6"
|
||||||
|
# Hold some things back from ts7
|
||||||
|
"@arcmantle/vite-plugin-import-css-sheet>typescript": "catalog:ts6"
|
||||||
|
"react-docgen-typescript>typescript": "catalog:ts6"
|
||||||
|
|
||||||
minimumReleaseAgeExclude:
|
minimumReleaseAgeExclude:
|
||||||
- "matrix-js-sdk"
|
- "matrix-js-sdk"
|
||||||
- "@matrix-org/*"
|
- "@matrix-org/*"
|
||||||
- "@vector-im/*"
|
- "@vector-im/*"
|
||||||
- "@element-hq/*"
|
- "@element-hq/*"
|
||||||
|
# Temporary for testing purposes
|
||||||
|
- "@typescript/*"
|
||||||
|
- typescript@7.0.2
|
||||||
|
|||||||
Reference in New Issue
Block a user