Skip to content

Commit 3cc693c

Browse files
committed
build: type-check via tsgo project references, decoupled from bundler
- replace the three inline `tsc --noemit` calls (build:dev, build:dev:fast, lint) with one `tsgo -b` over project references; swc/rolldown stay transpile-only - wire references: apex-log-parser becomes composite (emitDeclarationOnly), log-viewer/lana reference it, new root solution tsconfig — enables incremental caching - gate prod `build` on `typecheck` and run it in `lint` (preserves CI PR gate); add @typescript/native-preview (tsgo), ~7.7x faster cold than tsc
1 parent c2ad0ee commit 3cc693c

7 files changed

Lines changed: 103 additions & 11 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ dist/
88
build/
99
out/
1010
coverage/
11+
*.tsbuildinfo

apex-log-parser/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919

2020
"moduleResolution": "Bundler",
2121
"module": "ESNext",
22-
"noEmit": true,
22+
"composite": true,
23+
"emitDeclarationOnly": true,
2324
"declaration": true,
2425
"declarationMap": true,
2526

lana/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"removeComments": true,
4040
"sourceMap": false
4141
},
42-
"include": ["./src/**/*.ts", "../apex-log-parser/src/**/*.ts"],
43-
"exclude": ["**/node_modules", "**/.*/"]
42+
"include": ["./src/**/*.ts"],
43+
"exclude": ["**/node_modules", "**/.*/"],
44+
"references": [{ "path": "../apex-log-parser" }]
4445
}

log-viewer/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"removeComments": true,
4141
"sourceMap": false
4242
},
43-
"include": ["./src/**/*.ts", "declarations.d.ts", "../apex-log-parser/src/**/*.ts"],
44-
"exclude": ["**/node_modules", "**/.*/"]
43+
"include": ["./src/**/*.ts", "declarations.d.ts"],
44+
"exclude": ["**/node_modules", "**/.*/"],
45+
"references": [{ "path": "../apex-log-parser" }]
4546
}

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"@swc/jest": "^0.2.39",
1414
"@types/jest": "^30.0.0",
1515
"@typescript-eslint/parser": "^8.60.0",
16+
"@typescript/native-preview": "7.0.0-dev.20260527.2",
1617
"concurrently": "^9.2.1",
1718
"eslint": "^10.4.1",
1819
"eslint-config-prettier": "^10.1.8",
@@ -36,13 +37,15 @@
3637
"preinstall": "npx only-allow pnpm",
3738
"prepare": "husky",
3839
"bump-prerelease": "node ./scripts/pre-release.js",
39-
"build": "NODE_ENV=production pnpm run build:dev",
40-
"build:fast": "NODE_ENV=production pnpm run build:dev:fast",
41-
"build:dev": "rm -rf lana/out && concurrently -r -g 'rollup -c rollup.config.mjs' 'tsc --noemit --skipLibCheck -p apex-log-parser/tsconfig.json' 'tsc --noemit --skipLibCheck -p log-viewer/tsconfig.json' 'tsc --noemit --skipLibCheck -p lana/tsconfig.json'",
42-
"build:dev:fast": "rm -rf lana/out && concurrently -r -g 'rolldown -c rolldown.config.ts' 'tsc --noemit --skipLibCheck -p apex-log-parser/tsconfig.json' 'tsc --noemit --skipLibCheck -p log-viewer/tsconfig.json' 'tsc --noemit --skipLibCheck -p lana/tsconfig.json'",
40+
"build": "pnpm run typecheck && NODE_ENV=production pnpm run build:dev",
41+
"build:fast": "pnpm run typecheck && NODE_ENV=production pnpm run build:dev:fast",
42+
"build:dev": "rm -rf lana/out && rollup -c rollup.config.mjs",
43+
"build:dev:fast": "rm -rf lana/out && rolldown -c rolldown.config.ts",
4344
"watch": "rm -rf lana/out && rollup -w -c rollup.config.mjs",
4445
"watch:fast": "rm -rf lana/out && rolldown -w -c rolldown.config.ts",
45-
"lint": "concurrently -r -g 'eslint **/*.ts' 'prettier --cache **/*.{ts,css,md,scss} --check --experimental-cli' 'tsc --noemit --skipLibCheck -p apex-log-parser/tsconfig.json' 'tsc --noemit --skipLibCheck -p log-viewer/tsconfig.json' 'tsc --noemit --skipLibCheck -p lana/tsconfig.json'",
46+
"typecheck": "tsgo -b",
47+
"typecheck:tsc": "tsc -b",
48+
"lint": "concurrently -r -g 'eslint **/*.ts' 'prettier --cache **/*.{ts,css,md,scss} --check --experimental-cli' 'pnpm run typecheck'",
4649
"test": "jest",
4750
"test:ci": "jest --runInBand",
4851
"prettier-format": "prettier '**/*.ts' --cache --write --experimental-cli"

pnpm-lock.yaml

Lines changed: 82 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"files": [],
3+
"references": [{ "path": "./apex-log-parser" }, { "path": "./log-viewer" }, { "path": "./lana" }]
4+
}

0 commit comments

Comments
 (0)