Skip to content

Commit 2ba77d8

Browse files
authored
fix: add build step to @internal/compute package (#3303)
The @internal/compute package had its main/types pointing to ./src/index.ts with no build step. This works in dev (tsc resolves .ts at compile time) but fails at runtime in Docker because Node.js can't load .ts files directly. Added tsconfig.build.json and build/clean/dev scripts matching the pattern used by schedule-engine and other internal packages. Exports now point to dist/.
1 parent 1307d97 commit 2ba77d8

File tree

3 files changed

+45
-12
lines changed

3 files changed

+45
-12
lines changed

internal-packages/compute/package.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,27 @@
22
"name": "@internal/compute",
33
"private": true,
44
"version": "0.0.1",
5-
"main": "./src/index.ts",
6-
"types": "./src/index.ts",
5+
"main": "./dist/src/index.js",
6+
"types": "./dist/src/index.d.ts",
77
"type": "module",
8+
"exports": {
9+
".": {
10+
"@triggerdotdev/source": "./src/index.ts",
11+
"import": "./dist/src/index.js",
12+
"types": "./dist/src/index.d.ts",
13+
"default": "./dist/src/index.js"
14+
}
15+
},
816
"dependencies": {
917
"zod": "3.25.76"
1018
},
19+
"devDependencies": {
20+
"rimraf": "6.0.1"
21+
},
1122
"scripts": {
12-
"typecheck": "tsc --noEmit"
23+
"clean": "rimraf dist",
24+
"typecheck": "tsc --noEmit",
25+
"build": "pnpm run clean && tsc -p tsconfig.build.json",
26+
"dev": "tsc --watch -p tsconfig.build.json"
1327
}
1428
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"include": ["src/**/*.ts"],
3+
"exclude": ["src/**/*.test.ts"],
4+
"compilerOptions": {
5+
"composite": true,
6+
"target": "ES2020",
7+
"lib": ["ES2020", "DOM", "DOM.Iterable", "DOM.AsyncIterable"],
8+
"outDir": "dist",
9+
"module": "Node16",
10+
"moduleResolution": "Node16",
11+
"moduleDetection": "force",
12+
"verbatimModuleSyntax": false,
13+
"esModuleInterop": true,
14+
"forceConsistentCasingInFileNames": true,
15+
"isolatedModules": true,
16+
"preserveWatchOutput": true,
17+
"skipLibCheck": true,
18+
"strict": true,
19+
"declaration": true
20+
}
21+
}

pnpm-lock.yaml

Lines changed: 7 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)