mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat: build with TypeScript 7 and run sources with plain node
Replace the tsgo native preview with typescript@7.0.2 and port the check scripts to the TS 7 API. Target ES2024, drop useDefineForClassFields: false and unused decorator options, and enable verbatimModuleSyntax. Replace tsx with node plus the source resolver hook, passed to --import as a file URL. closes #9965
This commit is contained in:
parent
49681e1b71
commit
ca7460d16b
46 changed files with 543 additions and 240 deletions
|
|
@ -20,15 +20,16 @@ interface AllocationProfileResult {
|
|||
const execFileAsync = promisify(execFile);
|
||||
const packageRoot = fileURLToPath(new URL("../..", import.meta.url));
|
||||
const workerPath = fileURLToPath(new URL("./allocation-profile-worker.ts", import.meta.url));
|
||||
const tsconfigPath = fileURLToPath(new URL("../tsconfig.json", import.meta.url));
|
||||
// Resolve workspace packages to their sources, matching the root tsconfig paths.
|
||||
const sourceResolverUrl = new URL("../../../coding-agent/src/experimental/source-resolver.ts", import.meta.url).href;
|
||||
const results: AllocationProfileResult[] = [];
|
||||
|
||||
for (const target of storageBenchmarkTargets) {
|
||||
for (const dataset of STORAGE_BENCHMARK_DATASETS) {
|
||||
const { stdout } = await execFileAsync(
|
||||
process.execPath,
|
||||
["--import", "tsx", workerPath, target.name, dataset.name],
|
||||
{ cwd: packageRoot, env: { ...process.env, TSX_TSCONFIG_PATH: tsconfigPath } },
|
||||
["--import", sourceResolverUrl, workerPath, target.name, dataset.name],
|
||||
{ cwd: packageRoot },
|
||||
);
|
||||
results.push(JSON.parse(stdout) as AllocationProfileResult);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue