build: switch full build pipeline to TypeScript 7 native (tsgo)
Replace tsc with tsgo in all build scripts — 5.6x faster emit. tsgo has full emit parity for this codebase (NodeNext, ES2022, strict). - build:core: tsc → tsgo (root tsconfig.json) - copy-resources.cjs: typescript/bin/tsc → @typescript/native-preview/bin/tsgo.js - All workspace packages (agent-core, ai, coding-agent, daemon, google-gemini-cli-provider, native, rpc-client, tui): tsc → tsgo Benchmarks (root project): tsc --project tsconfig.json: 7.7s tsgo --project tsconfig.json: 1.4s (5.6x faster) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
e09eb8f899
commit
d447095bd7
10 changed files with 11 additions and 11 deletions
|
|
@ -51,7 +51,7 @@
|
||||||
"build:google-gemini-cli-provider": "npm --workspace @singularity-forge/google-gemini-cli-provider run build",
|
"build:google-gemini-cli-provider": "npm --workspace @singularity-forge/google-gemini-cli-provider run build",
|
||||||
"build:pi": "npm run build:native-pkg && npm run build:pi-tui && npm run build:google-gemini-cli-provider && npm run build:pi-ai && npm run build:pi-agent-core && npm run build:pi-coding-agent",
|
"build:pi": "npm run build:native-pkg && npm run build:pi-tui && npm run build:google-gemini-cli-provider && npm run build:pi-ai && npm run build:pi-agent-core && npm run build:pi-coding-agent",
|
||||||
"build:daemon": "npm --workspace @singularity-forge/daemon run build",
|
"build:daemon": "npm --workspace @singularity-forge/daemon run build",
|
||||||
"build:core": "npm run build:pi && npm run build:rpc-client && npm run build:daemon && npm run check:versioned-json && tsc && npm run copy-resources && npm run copy-themes && npm run copy-export-html",
|
"build:core": "npm run build:pi && npm run build:rpc-client && npm run build:daemon && npm run check:versioned-json && tsgo && npm run copy-resources && npm run copy-themes && npm run copy-export-html",
|
||||||
"build": "npm run build:core && node scripts/build-web-if-stale.cjs",
|
"build": "npm run build:core && node scripts/build-web-if-stale.cjs",
|
||||||
"stage:web-host": "node scripts/stage-web-standalone.cjs",
|
"stage:web-host": "node scripts/stage-web-standalone.cjs",
|
||||||
"build:web-host": "npm --prefix web run build && npm run stage:web-host",
|
"build:web-host": "npm --prefix web run build && npm run stage:web-host",
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -p tsconfig.json"
|
"build": "tsgo -p tsconfig.json"
|
||||||
},
|
},
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -p tsconfig.json"
|
"build": "tsgo -p tsconfig.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@anthropic-ai/sdk": "^0.95.1",
|
"@anthropic-ai/sdk": "^0.95.1",
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -p tsconfig.json && npm run copy-assets",
|
"build": "tsgo -p tsconfig.json && npm run copy-assets",
|
||||||
"copy-assets": "node scripts/copy-assets.cjs"
|
"copy-assets": "node scripts/copy-assets.cjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
"sf-server": "./dist/cli.js"
|
"sf-server": "./dist/cli.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsgo",
|
||||||
"test": "vitest run packages/daemon/src --root ../.. --config vitest.config.ts"
|
"test": "vitest run packages/daemon/src --root ../.. --config vitest.config.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -p tsconfig.json"
|
"build": "tsgo -p tsconfig.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@google/gemini-cli-core": "0.41.2"
|
"@google/gemini-cli-core": "0.41.2"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsgo -p tsconfig.json",
|
||||||
"build:native": "node ../../rust-engine/scripts/build.js",
|
"build:native": "node ../../rust-engine/scripts/build.js",
|
||||||
"build:native:dev": "node ../../rust-engine/scripts/build.js --dev",
|
"build:native:dev": "node ../../rust-engine/scripts/build.js --dev",
|
||||||
"test": "npm run build:native:dev && node --test src/__tests__/grep.test.mjs src/__tests__/ps.test.mjs src/__tests__/glob.test.mjs src/__tests__/clipboard.test.mjs src/__tests__/highlight.test.mjs src/__tests__/html.test.mjs src/__tests__/text.test.mjs src/__tests__/fd.test.mjs src/__tests__/image.test.mjs src/__tests__/edit.test.mjs src/__tests__/symbol.test.mjs src/__tests__/watch.test.mjs"
|
"test": "npm run build:native:dev && node --test src/__tests__/grep.test.mjs src/__tests__/ps.test.mjs src/__tests__/glob.test.mjs src/__tests__/clipboard.test.mjs src/__tests__/highlight.test.mjs src/__tests__/html.test.mjs src/__tests__/text.test.mjs src/__tests__/fd.test.mjs src/__tests__/image.test.mjs src/__tests__/edit.test.mjs src/__tests__/symbol.test.mjs src/__tests__/watch.test.mjs"
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
"!dist/**/*.test.*"
|
"!dist/**/*.test.*"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -p tsconfig.json",
|
"build": "tsgo -p tsconfig.json",
|
||||||
"test": "node --test dist/rpc-client.test.js"
|
"test": "node --test dist/rpc-client.test.js"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -p tsconfig.json"
|
"build": "tsgo -p tsconfig.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^5.6.2",
|
"chalk": "^5.6.2",
|
||||||
|
|
|
||||||
|
|
@ -75,10 +75,10 @@ function hasTsFilesRecursive(dir) {
|
||||||
const hasTsFiles = hasTsFilesRecursive(srcResources);
|
const hasTsFiles = hasTsFilesRecursive(srcResources);
|
||||||
|
|
||||||
if (hasTsFiles) {
|
if (hasTsFiles) {
|
||||||
const tscBin = require.resolve("typescript/bin/tsc");
|
const tsgoBin = require.resolve("@typescript/native-preview/bin/tsgo.js");
|
||||||
const compile = spawnSync(
|
const compile = spawnSync(
|
||||||
process.execPath,
|
process.execPath,
|
||||||
[tscBin, "--project", resourcesTsconfig],
|
[tsgoBin, "--project", resourcesTsconfig],
|
||||||
{
|
{
|
||||||
cwd: root,
|
cwd: root,
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue