From b7fa54ab56b38e99f3abd7fff5127d66f4ea2520 Mon Sep 17 00:00:00 2001 From: NianJiuZst <3235467914@qq.com> Date: Sat, 9 May 2026 23:21:30 +0800 Subject: [PATCH] chore: upgrade typecheck to tsgo native preview --- bun.lock | 20 +++++++++++++++++--- package.json | 8 +++----- src/orchestration/doctor.ts | 17 ++++++++++++++++- 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/bun.lock b/bun.lock index 1a23472..1ddebfd 100644 --- a/bun.lock +++ b/bun.lock @@ -21,9 +21,7 @@ "devDependencies": { "@types/bun": "latest", "@types/crypto-js": "^4.2.2", - }, - "peerDependencies": { - "typescript": "^5", + "@typescript/native-preview": "^7.0.0-dev", }, }, }, @@ -76,6 +74,22 @@ "@types/tinycolor2": ["@types/tinycolor2@1.4.6", "", {}, "sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw=="], + "@typescript/native-preview": ["@typescript/native-preview@7.0.0-dev.20260509.2", "", { "optionalDependencies": { "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260509.2", "@typescript/native-preview-darwin-x64": "7.0.0-dev.20260509.2", "@typescript/native-preview-linux-arm": "7.0.0-dev.20260509.2", "@typescript/native-preview-linux-arm64": "7.0.0-dev.20260509.2", "@typescript/native-preview-linux-x64": "7.0.0-dev.20260509.2", "@typescript/native-preview-win32-arm64": "7.0.0-dev.20260509.2", "@typescript/native-preview-win32-x64": "7.0.0-dev.20260509.2" }, "bin": { "tsgo": "bin/tsgo.js" } }, "sha512-JAJpEX0yBaEle2zzbX5z9QAhmEfML1SyQafLwbKCdcOtnkGdk5xD8NKIVxq+nTwYjRwuV7kKnQ+fqU3gpWY0qQ=="], + + "@typescript/native-preview-darwin-arm64": ["@typescript/native-preview-darwin-arm64@7.0.0-dev.20260509.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-oG9KahiCpx4q70Ood/rRJhYio4oIMHEHfX0g0LhfenlSIjIonitZWjUmUVG9N9q1ev9QWcM8pWpDrGGP0Osp3Q=="], + + "@typescript/native-preview-darwin-x64": ["@typescript/native-preview-darwin-x64@7.0.0-dev.20260509.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-xdEkp23Gu8I7PJCMmSMYtSLX76NKODWj74AoWFPi6MM59ICsjnTSqZf/HmXKSvuNZ5MGb4CMpP3c40dLjGB2PQ=="], + + "@typescript/native-preview-linux-arm": ["@typescript/native-preview-linux-arm@7.0.0-dev.20260509.2", "", { "os": "linux", "cpu": "arm" }, "sha512-ar5HN/V/4HLF4FZCoVVFj+ET1Soi758hb4WhhzYQfSUXQ/bpVGUGP86JAy8EhVMoeN6qxqWet93MkLSszJOIVg=="], + + "@typescript/native-preview-linux-arm64": ["@typescript/native-preview-linux-arm64@7.0.0-dev.20260509.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-rd+bMRtUAFBClOAKi9p2rOu6jPmnrjZVljoFyxHw+6bIRLerEQlxP+nIH1olC3HOZPyZ6/x75WtfzTHYeqffiQ=="], + + "@typescript/native-preview-linux-x64": ["@typescript/native-preview-linux-x64@7.0.0-dev.20260509.2", "", { "os": "linux", "cpu": "x64" }, "sha512-lB26mGzdolYIZiOdBII8roVJCxCUR8zkYszvvHyjB1IPs7d5fmOhT6OzI1zYPYujiSRJi4HVYM1iXTcIfp7KDg=="], + + "@typescript/native-preview-win32-arm64": ["@typescript/native-preview-win32-arm64@7.0.0-dev.20260509.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-gH3UmtyxHiRNEP0LgQXCVlB5+ZN/U+/Z7jM/zULQtTOxIIFK3Y4b8gbGLvP7uW3u2cqYOg2hc2nuN8OdsCmOig=="], + + "@typescript/native-preview-win32-x64": ["@typescript/native-preview-win32-x64@7.0.0-dev.20260509.2", "", { "os": "win32", "cpu": "x64" }, "sha512-kZV0Vh64hp10saOghPlFZE1qahonqvRgU3iubt8pUY4XLe8IQIofwWCN5vzNNeULE4W4mRtAJbHuvP/muOFomw=="], + "ansi-align": ["ansi-align@3.0.1", "", { "dependencies": { "string-width": "^4.1.0" } }, "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w=="], "ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], diff --git a/package.json b/package.json index a21ab44..7c69ca1 100644 --- a/package.json +++ b/package.json @@ -11,15 +11,13 @@ "build": "bun build --target=bun --outfile=bin/openmeta.js ./src/cli.ts", "dev": "bun run ./src/cli.ts", "start": "bun run ./src/cli.ts", - "typecheck": "bunx tsc --noEmit", + "typecheck": "tsgo --noEmit", "test": "bun test" }, "devDependencies": { "@types/bun": "latest", - "@types/crypto-js": "^4.2.2" - }, - "peerDependencies": { - "typescript": "^5" + "@types/crypto-js": "^4.2.2", + "@typescript/native-preview": "^7.0.0-dev" }, "dependencies": { "@clack/prompts": "^1.2.0", diff --git a/src/orchestration/doctor.ts b/src/orchestration/doctor.ts index d6f03ac..911148b 100644 --- a/src/orchestration/doctor.ts +++ b/src/orchestration/doctor.ts @@ -79,7 +79,7 @@ export class DoctorOrchestrator { this.checkDirectory('openmeta-home', 'OpenMeta home', homePath, 'Run "openmeta agent" or create the directory manually with write permissions.'), this.checkDirectory('workspace-root', 'Workspace root', getOpenMetaWorkspaceRoot(), 'Run "openmeta agent" after configuration is complete.'), this.checkDirectory('artifact-root', 'Artifact root', getOpenMetaArtifactRoot(), 'Run "openmeta agent" after configuration is complete.'), - this.checkCommand('runtime-bun', 'Bun runtime', 'bun', ['--version'], 'Install Bun 1.0+ and ensure it is available on PATH.'), + this.checkBunRuntime(), this.checkCommand('runtime-git', 'Git runtime', 'git', ['--version'], 'Install Git and ensure it is available on PATH.'), this.checkGitHubConfig(resolvedConfig), this.checkLlmConfig(resolvedConfig), @@ -214,6 +214,21 @@ export class DoctorOrchestrator { }; } + private checkBunRuntime(): DoctorCheck { + const bunVersion = process.versions.bun; + if (bunVersion) { + return { + id: 'runtime-bun', + label: 'Bun runtime', + status: 'pass', + summary: 'bun is available.', + detail: bunVersion, + }; + } + + return this.checkCommand('runtime-bun', 'Bun runtime', 'bun', ['--version'], 'Install Bun 1.0+ and ensure it is available on PATH.'); + } + private checkGitHubConfig(config: AppConfig): DoctorCheck { const missing = [ !config.github.username ? 'username' : '',