chore: upgrade TypeScript to 6.0.3 and modernize tsconfig

- typescript 5.9.3 to 6.0.3
- moduleResolution Node to bundler (correct for Vite projects)
- target/lib ES2016 to ES2020 (enables flatMap, Promise.allSettled)
- Fix global to globalThis in initMatrix.ts (browser env)
- Fix EventEmitter default to named import in CallControl.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lotus Bot
2026-05-22 12:52:37 -04:00
parent ac5cd1195d
commit 11346b1dc6
5 changed files with 12 additions and 12 deletions
+4 -4
View File
@@ -109,7 +109,7 @@
"lint-staged": "17.0.5",
"prettier": "3.8.3",
"semantic-release": "25.0.3",
"typescript": "5.9.3",
"typescript": "6.0.3",
"vite": "6.4.2",
"vite-plugin-pwa": "1.3.0",
"vite-plugin-static-copy": "4.1.0"
@@ -18388,9 +18388,9 @@
}
},
"node_modules/typescript": {
"version": "5.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
"integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
"dev": true,
"license": "Apache-2.0",
"bin": {
+1 -1
View File
@@ -162,7 +162,7 @@
"lint-staged": "17.0.5",
"prettier": "3.8.3",
"semantic-release": "25.0.3",
"typescript": "5.9.3",
"typescript": "6.0.3",
"vite": "6.4.2",
"vite-plugin-pwa": "1.3.0",
"vite-plugin-static-copy": "4.1.0"
+1 -1
View File
@@ -1,5 +1,5 @@
import { ClientWidgetApi } from 'matrix-widget-api';
import EventEmitter from 'events';
import { EventEmitter } from 'events';
import { CallControlState } from './CallControlState';
import { ElementMediaStateDetail, ElementMediaStatePayload, ElementWidgetActions } from './types';
+3 -3
View File
@@ -17,12 +17,12 @@ export const IDB_VERSION_CONFLICT = 'IDB_VERSION_CONFLICT';
export const initClient = async (session: Session): Promise<MatrixClient> => {
const indexedDBStore = new IndexedDBStore({
indexedDB: global.indexedDB,
localStorage: global.localStorage,
indexedDB: globalThis.indexedDB,
localStorage: globalThis.localStorage,
dbName: 'web-sync-store',
});
const legacyCryptoStore = new IndexedDBCryptoStore(global.indexedDB, 'crypto-store');
const legacyCryptoStore = new IndexedDBCryptoStore(globalThis.indexedDB, 'crypto-store');
const mx = createClient({
baseUrl: session.baseUrl,
+3 -3
View File
@@ -2,16 +2,16 @@
"compilerOptions": {
"sourceMap": true,
"jsx": "react",
"target": "ES2016",
"target": "ES2020",
"module": "ES2020",
"allowJs": true,
"strict": true,
"esModuleInterop": true,
"moduleResolution": "Node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"outDir": "dist",
"skipLibCheck": true,
"lib": ["ES2016", "DOM"]
"lib": ["ES2020", "DOM"]
},
"exclude": ["node_modules", "dist"],
"include": ["src"]