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/.
This commit is contained in:
nicktrn
2026-03-31 13:23:46 +01:00
committed by GitHub
parent 1307d97f7a
commit 2ba77d89dd
3 changed files with 45 additions and 12 deletions
+17 -3
View File
@@ -2,13 +2,27 @@
"name": "@internal/compute",
"private": true,
"version": "0.0.1",
"main": "./src/index.ts",
"types": "./src/index.ts",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"type": "module",
"exports": {
".": {
"@triggerdotdev/source": "./src/index.ts",
"import": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"default": "./dist/src/index.js"
}
},
"dependencies": {
"zod": "3.25.76"
},
"devDependencies": {
"rimraf": "6.0.1"
},
"scripts": {
"typecheck": "tsc --noEmit"
"clean": "rimraf dist",
"typecheck": "tsc --noEmit",
"build": "pnpm run clean && tsc -p tsconfig.build.json",
"dev": "tsc --watch -p tsconfig.build.json"
}
}
@@ -0,0 +1,21 @@
{
"include": ["src/**/*.ts"],
"exclude": ["src/**/*.test.ts"],
"compilerOptions": {
"composite": true,
"target": "ES2020",
"lib": ["ES2020", "DOM", "DOM.Iterable", "DOM.AsyncIterable"],
"outDir": "dist",
"module": "Node16",
"moduleResolution": "Node16",
"moduleDetection": "force",
"verbatimModuleSyntax": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"preserveWatchOutput": true,
"skipLibCheck": true,
"strict": true,
"declaration": true
}
}
+7 -9
View File
@@ -1095,6 +1095,10 @@ importers:
zod:
specifier: 3.25.76
version: 3.25.76
devDependencies:
rimraf:
specifier: 6.0.1
version: 6.0.1
internal-packages/database:
dependencies:
@@ -15592,10 +15596,6 @@ packages:
lru-cache@10.4.3:
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
lru-cache@11.0.0:
resolution: {integrity: sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==}
engines: {node: 20 || >=22}
lru-cache@11.2.4:
resolution: {integrity: sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==}
engines: {node: 20 || >=22}
@@ -23269,7 +23269,7 @@ snapshots:
'@epic-web/test-server@0.1.0(bufferutil@4.0.9)':
dependencies:
'@hono/node-server': 1.12.2(hono@4.5.11)
'@hono/node-ws': 1.0.4(@hono/node-server@1.12.2(hono@4.11.8))(bufferutil@4.0.9)
'@hono/node-ws': 1.0.4(@hono/node-server@1.12.2(hono@4.5.11))(bufferutil@4.0.9)
'@open-draft/deferred-promise': 2.2.0
'@types/ws': 8.5.12
hono: 4.5.11
@@ -24024,7 +24024,7 @@ snapshots:
dependencies:
hono: 4.11.8
'@hono/node-ws@1.0.4(@hono/node-server@1.12.2(hono@4.11.8))(bufferutil@4.0.9)':
'@hono/node-ws@1.0.4(@hono/node-server@1.12.2(hono@4.5.11))(bufferutil@4.0.9)':
dependencies:
'@hono/node-server': 1.12.2(hono@4.5.11)
ws: 8.18.3(bufferutil@4.0.9)
@@ -36714,8 +36714,6 @@ snapshots:
lru-cache@10.4.3: {}
lru-cache@11.0.0: {}
lru-cache@11.2.4: {}
lru-cache@4.1.5:
@@ -38546,7 +38544,7 @@ snapshots:
path-scurry@2.0.0:
dependencies:
lru-cache: 11.0.0
lru-cache: 11.2.4
minipass: 7.1.2
path-to-regexp@0.1.10: {}