From c7a5aea98a6014d5d0dc3c5a3efd449502ad7bbf Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Sun, 10 May 2026 19:27:37 +0200 Subject: [PATCH] =?UTF-8?q?chore(ts):=20bump=20TypeScript=205.8=20?= =?UTF-8?q?=E2=86=92=206.0=20and=20add=20tsgo=20for=20fast=20type-checking?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - typescript: ~5.8.2 → ^6.0.3 (matches Nitro-V3 client) - adds @typescript/native-preview (tsgo) as TypeScript 7 preview - new `compile:fast` script using tsgo (~7× faster: 2.5s vs 17.6s) - tsconfig cleanup ahead of TypeScript 7 deprecations: - removed `baseUrl` (unused: no `paths` mappings on this project) - removed `downlevelIteration` (target ES2022 makes it a no-op) - `moduleResolution`: "Node" → "bundler" (vite consumes the renderer) Compile errors: 28 → 29. Net +1 because TS 6's tightened lib types flag two pre-existing crypto calls (WsSessionCrypto.ts:43,48) and resolves one prior false positive. All errors are in pre-existing code, unrelated to the new event/snapshot APIs from 791b8ad. --- package.json | 4 +++- tsconfig.json | 4 +--- yarn.lock | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ff24624..bdec0b0 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "scripts": { "build": "vite build", "compile": "tsc --project ./tsconfig.json --noEmit false", + "compile:fast": "tsgo --project ./tsconfig.json --noEmit", "eslint": "eslint ./src ./packages/*/src", "eslint-fix": "eslint ./src --fix", "test": "vitest run", @@ -46,8 +47,9 @@ "@vitest/coverage-v8": "^4.0.18", "eslint": "^9.8.0", "jsdom": "^27.4.0", + "@typescript/native-preview": "^7.0.0-dev.20260510.1", "tslib": "^2.6.3", - "typescript": "~5.8.2", + "typescript": "^6.0.3", "typescript-eslint": "^8.26.1", "vite": "^8.0.10", "vitest": "^4.1.5" diff --git a/tsconfig.json b/tsconfig.json index c6b52f8..0463a3c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,17 +1,15 @@ { "compileOnSave": false, "compilerOptions": { - "baseUrl": "./src", "outDir": "./dist", "sourceMap": false, "declaration": true, "experimentalDecorators": true, - "moduleResolution": "Node", + "moduleResolution": "bundler", "esModuleInterop": true, "importHelpers": true, "isolatedModules": true, "resolveJsonModule": true, - "downlevelIteration": true, "allowSyntheticDefaultImports": true, "allowJs": true, "skipLibCheck": true, diff --git a/yarn.lock b/yarn.lock index 19c1a58..00446ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -527,6 +527,54 @@ "@typescript-eslint/types" "8.59.2" eslint-visitor-keys "^5.0.0" +"@typescript/native-preview-darwin-arm64@7.0.0-dev.20260510.1": + version "7.0.0-dev.20260510.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-darwin-arm64/-/native-preview-darwin-arm64-7.0.0-dev.20260510.1.tgz#318a841447a879e9590edf549fbf2b231a109d91" + integrity sha512-YpG99bf/Va1aLGP8SUQy1ClUvi4c6uTFrEQ0B5KzZb9TsOwH1RIrc/2n8UO3IAuilvwEA0EU4q8fEO3otVP2Sw== + +"@typescript/native-preview-darwin-x64@7.0.0-dev.20260510.1": + version "7.0.0-dev.20260510.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-darwin-x64/-/native-preview-darwin-x64-7.0.0-dev.20260510.1.tgz#6ca57655a39f13acc7f868c3e44aff2edaa4b02b" + integrity sha512-NUwhwHpQn7aSX2GGBuY2bjec+hFnIz2DAna4ksVneexVE20h2U0MFzBvWrqH2C0PzPxVvGOMg4fGCvhTs93nlw== + +"@typescript/native-preview-linux-arm64@7.0.0-dev.20260510.1": + version "7.0.0-dev.20260510.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-linux-arm64/-/native-preview-linux-arm64-7.0.0-dev.20260510.1.tgz#2ad2edc4ca931d9697956093d63f32970ce10fed" + integrity sha512-T7Zuy6h0sU+38w+N3A+YgW0XVqxIMjeHyu+945rJkiP9zk52Mwp663t1ndyeAE/N2zV+q0SWQmHNuFSXl99wJw== + +"@typescript/native-preview-linux-arm@7.0.0-dev.20260510.1": + version "7.0.0-dev.20260510.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-linux-arm/-/native-preview-linux-arm-7.0.0-dev.20260510.1.tgz#e01d73e1bf9fd5780326b35ab7cc97a3f9836d01" + integrity sha512-UE+PIWWg7vvszSU0gS9rzgIIHCWexz3hMZDHpHRSLAleAvULCNI3EzwTRFOA4BHyQ8eReD1KZ8e76BuStEPspw== + +"@typescript/native-preview-linux-x64@7.0.0-dev.20260510.1": + version "7.0.0-dev.20260510.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-linux-x64/-/native-preview-linux-x64-7.0.0-dev.20260510.1.tgz#9a1ff6947c184fcb548856e1b480adc106de1a5b" + integrity sha512-gJu4q4YREvjR2Lx1jUaCd/bRbTuyKf2r3rJ4tReuHyAvNse23HdGI0a9w4Z3wUbvRznxYt640IIItWsr/f3LEQ== + +"@typescript/native-preview-win32-arm64@7.0.0-dev.20260510.1": + version "7.0.0-dev.20260510.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-win32-arm64/-/native-preview-win32-arm64-7.0.0-dev.20260510.1.tgz#d517af09f7ff86b9e7104714f975880c56ad4de9" + integrity sha512-00DtjrtkdAHOU/soYr8ncrjUvIsple8nvb29ZUATnLraNnzUgv5AS3yMve/pG/N7rVLlKy2FrXlVyVW7WAx29w== + +"@typescript/native-preview-win32-x64@7.0.0-dev.20260510.1": + version "7.0.0-dev.20260510.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-win32-x64/-/native-preview-win32-x64-7.0.0-dev.20260510.1.tgz#1896d9112a99dbf24cc90814d8b6e0fd76b98d6b" + integrity sha512-27UeujQTEPFxhfkZL7aHnA1TlNol3nwDVFp5d6jFoP14yTXMe47kBnAJLEU2ta3REZE5PzLCs7HLV8H4VdxGgA== + +"@typescript/native-preview@^7.0.0-dev.20260510.1": + version "7.0.0-dev.20260510.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview/-/native-preview-7.0.0-dev.20260510.1.tgz#983a6d94d132b34d916b95bb1e3d0e687525d12a" + integrity sha512-05U6/Im+vmqGrFAVrHSeuoXBCwShhbiA+93VpSwEBYP4LMWk2JW9q87MydamL5g6ISEjIVlwQ4Dx35CauPAwpA== + optionalDependencies: + "@typescript/native-preview-darwin-arm64" "7.0.0-dev.20260510.1" + "@typescript/native-preview-darwin-x64" "7.0.0-dev.20260510.1" + "@typescript/native-preview-linux-arm" "7.0.0-dev.20260510.1" + "@typescript/native-preview-linux-arm64" "7.0.0-dev.20260510.1" + "@typescript/native-preview-linux-x64" "7.0.0-dev.20260510.1" + "@typescript/native-preview-win32-arm64" "7.0.0-dev.20260510.1" + "@typescript/native-preview-win32-x64" "7.0.0-dev.20260510.1" + "@vitest/coverage-v8@^4.0.18": version "4.1.5" resolved "https://registry.yarnpkg.com/@vitest/coverage-v8/-/coverage-v8-4.1.5.tgz#26bbdbebecd66be77fa1b63a9ed985dd86a3ba85" @@ -1676,6 +1724,11 @@ typescript-eslint@^8.26.1: "@typescript-eslint/typescript-estree" "8.59.2" "@typescript-eslint/utils" "8.59.2" +typescript@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.3.tgz#90251dc007916e972786cb94d74d15b185577d21" + integrity sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw== + typescript@~5.5.4: version "5.5.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"