feat: use tsgo where capable (#16984)

This commit is contained in:
anatawa12 2025-12-22 16:52:05 +09:00 committed by GitHub
parent 5c5e965151
commit 06657c81d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
28 changed files with 108 additions and 83 deletions

View File

@ -64,8 +64,7 @@
"js-yaml": "4.1.1",
"postcss": "8.5.6",
"tar": "7.5.2",
"terser": "5.44.1",
"typescript": "5.9.3"
"terser": "5.44.1"
},
"devDependencies": {
"@eslint/js": "9.39.1",
@ -74,12 +73,14 @@
"@types/node": "24.10.2",
"@typescript-eslint/eslint-plugin": "8.49.0",
"@typescript-eslint/parser": "8.49.0",
"@typescript/native-preview": "7.0.0-dev.20251206.1",
"cross-env": "10.1.0",
"cypress": "15.7.1",
"eslint": "9.39.1",
"globals": "16.5.0",
"ncp": "2.0.0",
"pnpm": "10.25.0",
"typescript": "5.9.3",
"start-server-and-test": "2.1.3"
},
"optionalDependencies": {

View File

@ -18,11 +18,11 @@
"build": "swc src -d built -D --strip-leading-paths",
"build:test": "swc test-server -d built-test -D --config-file test-server/.swcrc --strip-leading-paths",
"watch:swc": "swc src -d built -D -w --strip-leading-paths",
"build:tsc": "tsc -p tsconfig.json && tsc-alias -p tsconfig.json",
"build:tsc": "tsgo -p tsconfig.json && tsc-alias -p tsconfig.json",
"watch": "pnpm compile-config && node ./scripts/watch.mjs",
"restart": "pnpm build && pnpm start",
"dev": "pnpm compile-config && node ./scripts/dev.mjs",
"typecheck": "tsc --noEmit && tsc -p test --noEmit && tsc -p test-federation --noEmit",
"typecheck": "tsgo --noEmit && tsgo -p test --noEmit && tsgo -p test-federation --noEmit",
"eslint": "eslint --quiet \"{src,test-federation}/**/*.ts\"",
"lint": "pnpm typecheck && pnpm eslint",
"jest": "cross-env NODE_ENV=test pnpm compile-config && cross-env NODE_ENV=test node ./jest.js --forceExit --config jest.config.unit.cjs",
@ -171,7 +171,6 @@
"tmp": "0.2.5",
"tsc-alias": "1.8.16",
"typeorm": "0.3.28",
"typescript": "5.9.3",
"ulid": "3.0.2",
"vary": "1.1.2",
"web-push": "3.6.7",

View File

@ -21,7 +21,7 @@ import { execa } from 'execa';
});
}, 3000);
execa('tsc', ['-w', '-p', 'tsconfig.json'], {
execa('tsgo', ['-w', '-p', 'tsconfig.json'], {
stdout: process.stdout,
stderr: process.stderr,
});

View File

@ -143,7 +143,7 @@ services:
bash -c "
npm install -g pnpm
pnpm -F backend i --frozen-lockfile
pnpm exec tsc -p ./packages/backend/test-federation
pnpm exec tsgo -p ./packages/backend/test-federation
node ./packages/backend/test-federation/built/daemon.js
"

View File

@ -25,7 +25,6 @@
"isolatedModules": true,
"jsx": "react-jsx",
"jsxImportSource": "@kitajs/html",
"baseUrl": "./",
"paths": {
"@/*": ["../src/*"]
},

View File

@ -26,7 +26,6 @@
"jsx": "react-jsx",
"jsxImportSource": "@kitajs/html",
"rootDir": "./src",
"baseUrl": "./",
"paths": {
"@/*": ["./src/*"]
},

View File

@ -3,7 +3,7 @@
"type": "module",
"scripts": {
"eslint": "eslint './**/*.{js,jsx,ts,tsx}'",
"typecheck": "tsc --noEmit",
"typecheck": "tsgo --noEmit",
"lint": "pnpm typecheck && pnpm eslint"
},
"exports": {
@ -14,8 +14,7 @@
"@types/node": "24.10.2",
"@typescript-eslint/eslint-plugin": "8.49.0",
"@typescript-eslint/parser": "8.49.0",
"rollup": "4.53.3",
"typescript": "5.9.3"
"rollup": "4.53.3"
},
"dependencies": {
"i18n": "workspace:*",

View File

@ -17,7 +17,6 @@
"noImplicitReturns": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"baseUrl": ".",
"typeRoots": [
"./@types",
"./node_modules/@types"

View File

@ -59,7 +59,6 @@
"prettier": "3.7.4",
"start-server-and-test": "2.1.3",
"tsx": "4.21.0",
"typescript": "5.9.3",
"vite-plugin-turbosnap": "1.0.3",
"vue-component-type-helpers": "3.1.8",
"vue-eslint-parser": "10.2.0",

View File

@ -22,7 +22,6 @@
"isolatedModules": true,
"useDefineForClassFields": true,
"verbatimModuleSyntax": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@@/*": ["../frontend-shared/*"]

View File

@ -60,7 +60,7 @@ async function buildSrc() {
function buildDts() {
return execa(
'tsc',
'tsgo',
[
'--project', 'tsconfig.json',
'--outDir', 'js-built',

View File

@ -17,7 +17,7 @@
"build": "node ./build.js",
"watch": "nodemon -w package.json -e json --exec \"node ./build.js --watch\"",
"eslint": "eslint './**/*.{js,jsx,ts,tsx}'",
"typecheck": "tsc --noEmit",
"typecheck": "tsgo --noEmit",
"lint": "pnpm typecheck && pnpm eslint"
},
"devDependencies": {
@ -27,7 +27,6 @@
"esbuild": "0.27.1",
"eslint-plugin-vue": "10.6.2",
"nodemon": "3.1.11",
"typescript": "5.9.3",
"vue-eslint-parser": "10.2.0"
},
"files": [

View File

@ -17,7 +17,6 @@
"noImplicitReturns": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"baseUrl": ".",
"paths": {
"@/*": ["./*"],
"@@/*": ["./*"]

View File

@ -6,7 +6,7 @@
"watch": "vite",
"build": "tsx build.ts",
"storybook-dev": "nodemon --verbose --watch src --ext \"mdx,ts,vue\" --ignore \"*.stories.ts\" --exec \"pnpm build-storybook-pre && pnpm exec storybook dev -p 6006 --ci\"",
"build-storybook-pre": "(tsc -p .storybook || echo done.) && node .storybook/generate.js && node .storybook/preload-locale.js && node .storybook/preload-theme.js",
"build-storybook-pre": "(tsgo -p .storybook || echo done.) && node .storybook/generate.js && node .storybook/preload-locale.js && node .storybook/preload-theme.js",
"build-storybook": "pnpm build-storybook-pre && storybook build --webpack-stats-json storybook-static",
"chromatic": "chromatic",
"test": "vitest --run --globals",
@ -136,7 +136,6 @@
"storybook": "10.1.5",
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
"tsx": "4.21.0",
"typescript": "5.9.3",
"vite-plugin-glsl": "1.5.5",
"vite-plugin-turbosnap": "1.0.3",
"vitest": "4.0.15",

View File

@ -23,7 +23,6 @@
"useDefineForClassFields": true,
"verbatimModuleSyntax": true,
"skipLibCheck": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@@/*": ["../frontend-shared/*"]

View File

@ -100,7 +100,7 @@ async function buildSrc(): Promise<void> {
function buildDts(): Promise<unknown> {
return execa(
'tsc',
'tsgo',
[
'--project', 'tsconfig.json',
'--rootDir', 'src',

View File

@ -20,7 +20,7 @@
"build": "tsx ./build.ts",
"watch": "nodemon -w package.json -e json --exec \"tsx ./build.ts --watch\"",
"tsd": "tsd",
"typecheck": "tsc --noEmit",
"typecheck": "tsgo --noEmit",
"lint": "pnpm typecheck && pnpm eslint",
"lint:fix": "pnpm eslint --fix"
},
@ -36,8 +36,7 @@
"esbuild": "0.27.1",
"execa": "9.6.1",
"nodemon": "3.1.11",
"tsx": "4.21.0",
"typescript": "5.9.3"
"tsx": "4.21.0"
},
"dependencies": {
"js-yaml": "4.1.1"

View File

@ -7,7 +7,7 @@
"scripts": {
"build": "tsx src/generator.ts",
"eslint": "eslint src/**/*.ts",
"typecheck": "tsc --noEmit",
"typecheck": "tsgo --noEmit",
"lint": "pnpm typecheck && pnpm eslint"
},
"devDependencies": {
@ -20,7 +20,6 @@
"@tabler/icons-webfont": "3.35.0",
"harfbuzzjs": "0.4.13",
"tsx": "4.21.0",
"typescript": "5.9.3",
"wawoff2": "2.0.1"
},
"files": [

View File

@ -58,7 +58,7 @@ async function buildSrc() {
function buildDts() {
return execa(
'tsc',
'tsgo',
[
'--project', 'tsconfig.json',
'--outDir', 'built',

View File

@ -20,7 +20,7 @@
"build": "node ./build.js",
"watch": "nodemon -w package.json -e json --exec \"node ./build.js --watch\"",
"eslint": "eslint './**/*.{js,jsx,ts,tsx}'",
"typecheck": "tsc --noEmit",
"typecheck": "tsgo --noEmit",
"lint": "pnpm typecheck && pnpm eslint"
},
"devDependencies": {
@ -31,8 +31,7 @@
"@typescript-eslint/parser": "8.49.0",
"esbuild": "0.27.1",
"execa": "9.6.1",
"nodemon": "3.1.11",
"typescript": "5.9.3"
"nodemon": "3.1.11"
},
"files": [
"built"

View File

@ -59,7 +59,7 @@ async function buildSrc() {
function buildDts() {
return execa(
'tsc',
'tsgo',
[
'--project', 'tsconfig.json',
'--outDir', 'built',

View File

@ -15,7 +15,6 @@
"openapi-typescript": "7.10.1",
"ts-case-convert": "2.1.0",
"tsx": "4.21.0",
"typescript": "5.9.3",
"eslint": "9.39.1"
},
"files": [

View File

@ -25,7 +25,7 @@
"api": "pnpm api-extractor run --local --verbose",
"api-prod": "pnpm api-extractor run --verbose",
"eslint": "eslint './**/*.{js,jsx,ts,tsx}'",
"typecheck": "tsc --noEmit",
"typecheck": "tsgo --noEmit",
"lint": "pnpm typecheck && pnpm eslint",
"vitest": "vitest run --coverage",
"test": "pnpm vitest && pnpm tsd",
@ -47,7 +47,6 @@
"ncp": "2.0.0",
"nodemon": "3.1.11",
"tsd": "0.33.0",
"typescript": "5.9.3",
"vitest": "4.0.15",
"vitest-websocket-mock": "0.5.0"
},

View File

@ -58,7 +58,7 @@ async function buildSrc() {
function buildDts() {
return execa(
'tsc',
'tsgo',
[
'--project', 'tsconfig.json',
'--outDir', 'built',

View File

@ -20,7 +20,7 @@
"build": "node ./build.js",
"watch": "nodemon -w package.json -e json --exec \"node ./build.js --watch\"",
"eslint": "eslint './**/*.{js,jsx,ts,tsx}'",
"typecheck": "tsc --noEmit",
"typecheck": "tsgo --noEmit",
"lint": "pnpm typecheck && pnpm eslint"
},
"devDependencies": {
@ -29,8 +29,7 @@
"@typescript-eslint/parser": "8.49.0",
"esbuild": "0.27.1",
"execa": "9.6.1",
"nodemon": "3.1.11",
"typescript": "5.9.3"
"nodemon": "3.1.11"
},
"files": [
"built"

View File

@ -4,7 +4,7 @@
"scripts": {
"watch": "nodemon -w ../../package.json -e json --exec \"node build.js watch\"",
"build": "node build.js",
"typecheck": "tsc --noEmit",
"typecheck": "tsgo --noEmit",
"eslint": "eslint --quiet src/**/*.ts",
"lint": "pnpm typecheck && pnpm eslint"
},
@ -18,8 +18,7 @@
"@typescript-eslint/parser": "8.49.0",
"@typescript/lib-webworker": "npm:@types/serviceworker@0.0.74",
"eslint-plugin-import": "2.32.0",
"nodemon": "3.1.11",
"typescript": "5.9.3"
"nodemon": "3.1.11"
},
"type": "module"
}

View File

@ -19,7 +19,6 @@
"experimentalDecorators": true,
"resolveJsonModule": true,
"isolatedModules": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@@/*": ["../frontend-shared/*"]
@ -28,6 +27,7 @@
"./node_modules/@types",
"./src/@types"
],
"libReplacement": true,
"lib": [
"esnext",
"webworker"

View File

@ -37,9 +37,6 @@ importers:
terser:
specifier: 5.44.1
version: 5.44.1
typescript:
specifier: 5.9.3
version: 5.9.3
devDependencies:
'@eslint/js':
specifier: 9.39.1
@ -59,6 +56,9 @@ importers:
'@typescript-eslint/parser':
specifier: 8.49.0
version: 8.49.0(eslint@9.39.1)(typescript@5.9.3)
'@typescript/native-preview':
specifier: 7.0.0-dev.20251206.1
version: 7.0.0-dev.20251206.1
cross-env:
specifier: 10.1.0
version: 10.1.0
@ -80,6 +80,9 @@ importers:
start-server-and-test:
specifier: 2.1.3
version: 2.1.3
typescript:
specifier: 5.9.3
version: 5.9.3
optionalDependencies:
'@tensorflow/tfjs-core':
specifier: 4.22.0
@ -387,9 +390,6 @@ importers:
typeorm:
specifier: 0.3.28
version: 0.3.28(ioredis@5.8.2)(pg@8.16.3)
typescript:
specifier: 5.9.3
version: 5.9.3
ulid:
specifier: 3.0.2
version: 3.0.2
@ -1008,9 +1008,6 @@ importers:
tsx:
specifier: 4.21.0
version: 4.21.0
typescript:
specifier: 5.9.3
version: 5.9.3
vite-plugin-glsl:
specifier: 1.5.5
version: 1.5.5(@rollup/pluginutils@5.3.0(rollup@4.53.3))(esbuild@0.27.1)(vite@7.2.7(@types/node@24.10.2)(sass@1.95.1)(terser@5.44.1)(tsx@4.21.0))
@ -1063,9 +1060,6 @@ importers:
rollup:
specifier: 4.53.3
version: 4.53.3
typescript:
specifier: 5.9.3
version: 5.9.3
packages/frontend-embed:
dependencies:
@ -1211,9 +1205,6 @@ importers:
tsx:
specifier: 4.21.0
version: 4.21.0
typescript:
specifier: 5.9.3
version: 5.9.3
vite-plugin-turbosnap:
specifier: 1.0.3
version: 1.0.3
@ -1257,9 +1248,6 @@ importers:
nodemon:
specifier: 3.1.11
version: 3.1.11
typescript:
specifier: 5.9.3
version: 5.9.3
vue-eslint-parser:
specifier: 10.2.0
version: 10.2.0(eslint@9.39.1)
@ -1297,9 +1285,6 @@ importers:
tsx:
specifier: 4.21.0
version: 4.21.0
typescript:
specifier: 5.9.3
version: 5.9.3
packages/icons-subsetter:
dependencies:
@ -1312,9 +1297,6 @@ importers:
tsx:
specifier: 4.21.0
version: 4.21.0
typescript:
specifier: 5.9.3
version: 5.9.3
wawoff2:
specifier: 2.0.1
version: 2.0.1
@ -1368,9 +1350,6 @@ importers:
nodemon:
specifier: 3.1.11
version: 3.1.11
typescript:
specifier: 5.9.3
version: 5.9.3
packages/misskey-js:
dependencies:
@ -1414,9 +1393,6 @@ importers:
tsd:
specifier: 0.33.0
version: 0.33.0
typescript:
specifier: 5.9.3
version: 5.9.3
vitest:
specifier: 4.0.15
version: 4.0.15(@opentelemetry/api@1.9.0)(@types/node@24.10.2)(happy-dom@20.0.11)(jsdom@27.2.0(bufferutil@4.0.9)(utf-8-validate@6.0.5))(msw@2.12.4(@types/node@24.10.2)(typescript@5.9.3))(sass@1.95.1)(terser@5.44.1)(tsx@4.21.0)
@ -1453,9 +1429,6 @@ importers:
tsx:
specifier: 4.21.0
version: 4.21.0
typescript:
specifier: 5.9.3
version: 5.9.3
packages/misskey-reversi:
dependencies:
@ -1481,9 +1454,6 @@ importers:
nodemon:
specifier: 3.1.11
version: 3.1.11
typescript:
specifier: 5.9.3
version: 5.9.3
packages/sw:
dependencies:
@ -1512,9 +1482,6 @@ importers:
nodemon:
specifier: 3.1.11
version: 3.1.11
typescript:
specifier: 5.9.3
version: 5.9.3
packages:
@ -4985,6 +4952,45 @@ packages:
resolution: {integrity: sha512-LlKaciDe3GmZFphXIc79THF/YYBugZ7FS1pO581E/edlVVNbZKDy93evqmrfQ9/Y4uN0vVhX4iuchq26mK/iiA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript/native-preview-darwin-arm64@7.0.0-dev.20251206.1':
resolution: {integrity: sha512-Lcm+cO/0d+iUNzpequh8v8rm7FKLLxnMv4cg59jkmeMNm6zLe8UHFJVKd4KSUeTBp6DrF1BBXkahIwecR21YXA==}
cpu: [arm64]
os: [darwin]
'@typescript/native-preview-darwin-x64@7.0.0-dev.20251206.1':
resolution: {integrity: sha512-RR3flM+2oRZP8HMh8mfUzOitUVBE3kbXBT1qqjQvU5GkFGKEU0DH2OZ35YV/ufVHBsRygXNbahw2heE08Jvk6A==}
cpu: [x64]
os: [darwin]
'@typescript/native-preview-linux-arm64@7.0.0-dev.20251206.1':
resolution: {integrity: sha512-/KXFbcTuW/2k+CspZjraCVLNBnoDGFARYYaydKj/OrZwcGb1HgCT8X52ICzf0lHnc7W0slKAIzEtq8vonyCrAw==}
cpu: [arm64]
os: [linux]
'@typescript/native-preview-linux-arm@7.0.0-dev.20251206.1':
resolution: {integrity: sha512-NMndfbNZiYALizEJ6+5RJl5vp7TMjVa0mW4sBFP/W+AECf1D0NZ1jffHBdwRgHr6inehw93cL78XcNWm+l89QA==}
cpu: [arm]
os: [linux]
'@typescript/native-preview-linux-x64@7.0.0-dev.20251206.1':
resolution: {integrity: sha512-qOKTazp43tE6imN/+y+s8MdtaJLnH98YILdr6V5pLVUxY1fiFnAX/LXv/zDd6ree6rEn102kLuaMGih7PNJqHw==}
cpu: [x64]
os: [linux]
'@typescript/native-preview-win32-arm64@7.0.0-dev.20251206.1':
resolution: {integrity: sha512-6p2aDhxDr5lBGetFlZMNs3+W5lzUnAIR6BVnoPBc/oiNqWY929Sh2kA0poTx2piUvpi8xUs6k1MWjonZP5UbgQ==}
cpu: [arm64]
os: [win32]
'@typescript/native-preview-win32-x64@7.0.0-dev.20251206.1':
resolution: {integrity: sha512-fsLQ21YABSaIrtuHLs+9fL2s3kc8bHF7UB4TatMwnFCzGvQJ7L1b5snfSjnSZeh3ETTeING8f9YHjiIf0h4jpA==}
cpu: [x64]
os: [win32]
'@typescript/native-preview@7.0.0-dev.20251206.1':
resolution: {integrity: sha512-wog5hWVS+bYjFTpxtr+8qxqjhTKpAvlDCivvW592zctOcO+e9iLbBBLU3nDZdXW06rEA2zwjOqEPbsUcM/mcEw==}
hasBin: true
'@ungap/structured-clone@1.3.0':
resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==}
@ -11012,6 +11018,9 @@ packages:
vue-component-type-helpers@3.1.8:
resolution: {integrity: sha512-oaowlmEM6BaYY+8o+9D9cuzxpWQWHqHTMKakMxXu0E+UCIOMTljyIPO15jcnaCwJtZu/zWDotK7mOIHvWD9mcw==}
vue-component-type-helpers@3.1.6:
resolution: {integrity: sha512-lqPXjac98uz7zh8fxHxJPJDP4SKeaYn2Fx4kQLCBthMXm9VsmPdzUWOGWMcXN7reJ9IkcBiOFxsFS/Po7dARiw==}
vue-demi@0.14.10:
resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==}
engines: {node: '>=12'}
@ -15757,6 +15766,37 @@ snapshots:
'@typescript-eslint/types': 8.49.0
eslint-visitor-keys: 4.2.1
'@typescript/native-preview-darwin-arm64@7.0.0-dev.20251206.1':
optional: true
'@typescript/native-preview-darwin-x64@7.0.0-dev.20251206.1':
optional: true
'@typescript/native-preview-linux-arm64@7.0.0-dev.20251206.1':
optional: true
'@typescript/native-preview-linux-arm@7.0.0-dev.20251206.1':
optional: true
'@typescript/native-preview-linux-x64@7.0.0-dev.20251206.1':
optional: true
'@typescript/native-preview-win32-arm64@7.0.0-dev.20251206.1':
optional: true
'@typescript/native-preview-win32-x64@7.0.0-dev.20251206.1':
optional: true
'@typescript/native-preview@7.0.0-dev.20251206.1':
optionalDependencies:
'@typescript/native-preview-darwin-arm64': 7.0.0-dev.20251206.1
'@typescript/native-preview-darwin-x64': 7.0.0-dev.20251206.1
'@typescript/native-preview-linux-arm': 7.0.0-dev.20251206.1
'@typescript/native-preview-linux-arm64': 7.0.0-dev.20251206.1
'@typescript/native-preview-linux-x64': 7.0.0-dev.20251206.1
'@typescript/native-preview-win32-arm64': 7.0.0-dev.20251206.1
'@typescript/native-preview-win32-x64': 7.0.0-dev.20251206.1
'@ungap/structured-clone@1.3.0': {}
'@vitejs/plugin-vue@6.0.2(vite@7.2.7(@types/node@24.10.2)(sass@1.95.1)(terser@5.44.1)(tsx@4.21.0))(vue@3.5.25(typescript@5.9.3))':
@ -22890,6 +22930,8 @@ snapshots:
vue-component-type-helpers@3.1.8: {}
vue-component-type-helpers@3.1.6: {}
vue-demi@0.14.10(vue@3.5.25(typescript@5.9.3)):
dependencies:
vue: 3.5.25(typescript@5.9.3)