From 97062ed04ae7c10ea6505b1f9edc5aee99723b7f Mon Sep 17 00:00:00 2001 From: bluwy Date: Mon, 25 May 2026 23:54:16 +0800 Subject: [PATCH] Update to typescript v6 --- package.json | 3 ++- pnpm-lock.yaml | 18 +++++++++++++----- tsconfig.json | 11 ++++------- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index e73bdf51..6d560e55 100644 --- a/package.json +++ b/package.json @@ -38,12 +38,13 @@ "@changesets/cli": "^2.31.0", "@changesets/types": "^6.1.0", "@changesets/write": "^0.4.0", + "@tsconfig/node24": "^24.0.4", "@types/node": "^24.12.4", "@types/semver": "^7.7.1", "fs-fixture": "^2.13.0", "oxfmt": "^0.48.0", "rolldown": "^1.0.1", - "typescript": "^5.9.3", + "typescript": "^6.0.3", "vitest": "^4.1.6" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f5951ac4..66bdfc56 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,6 +71,9 @@ importers: '@changesets/write': specifier: ^0.4.0 version: 0.4.0 + '@tsconfig/node24': + specifier: ^24.0.4 + version: 24.0.4 '@types/node': specifier: ^24.12.4 version: 24.12.4 @@ -87,8 +90,8 @@ importers: specifier: ^1.0.1 version: 1.0.1 typescript: - specifier: ^5.9.3 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 vitest: specifier: ^4.1.6 version: 4.1.6(@types/node@24.12.4)(vite@8.0.13) @@ -500,6 +503,9 @@ packages: '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + '@tsconfig/node24@24.0.4': + resolution: {integrity: sha512-2A933l5P5oCbv6qSxHs7ckKwobs8BDAe9SJ/Xr2Hy+nDlwmLE1GhFh/g/vXGRZWgxBg9nX/5piDtHR9Dkw/XuA==} + '@tybys/wasm-util@0.10.2': resolution: {integrity: sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==} @@ -1248,8 +1254,8 @@ packages: resolution: {integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==} engines: {node: '>= 0.4'} - typescript@5.9.3: - resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} hasBin: true @@ -1836,6 +1842,8 @@ snapshots: '@standard-schema/spec@1.1.0': {} + '@tsconfig/node24@24.0.4': {} + '@tybys/wasm-util@0.10.2': dependencies: tslib: 2.8.1 @@ -2572,7 +2580,7 @@ snapshots: es-errors: 1.3.0 is-typed-array: 1.1.15 - typescript@5.9.3: {} + typescript@6.0.3: {} undici-types@7.16.0: {} diff --git a/tsconfig.json b/tsconfig.json index 22ada81b..77da9ed9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,11 @@ { + "extends": "@tsconfig/node24/tsconfig.json", "compilerOptions": { "allowImportingTsExtensions": true, "erasableSyntaxOnly": true, - "isolatedModules": true, - "module": "node18", - "moduleResolution": "node16", - "noEmit": true, - "resolveJsonModule": true, + "verbatimModuleSyntax": true, "strict": true, - "target": "esnext", - "verbatimModuleSyntax": true + "noEmit": true, + "types": ["node"] } }