Skip to content

Commit b1d24bd

Browse files
committed
refactor: migrate build system from tsc to tsup for improved performance
1 parent d904607 commit b1d24bd

24 files changed

Lines changed: 83 additions & 38 deletions

File tree

.changeset/migrate-to-tsup.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
"@objectstack/spec-monorepo": patch
3+
"@objectstack/core": patch
4+
"@objectstack/objectql": patch
5+
"@objectstack/runtime": patch
6+
"@objectstack/plugin-hono-server": patch
7+
"@objectstack/driver-memory": patch
8+
"@objectstack/plugin-msw": patch
9+
"@objectstack/hono": patch
10+
"@objectstack/nextjs": patch
11+
"@objectstack/nestjs": patch
12+
"@objectstack/client": patch
13+
"@objectstack/client-react": patch
14+
"@objectstack/metadata": patch
15+
"@objectstack/types": patch
16+
"@objectstack/spec": patch
17+
---
18+
19+
refactor: migrate build system from tsc to tsup for faster builds
20+
- Replaced `tsc` with `tsup` (using esbuild) across all packages
21+
- Added shared `tsup.config.ts` in workspace root
22+
- Added `tsup` as workspace dev dependency
23+
- significantly improved build performance

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"devDependencies": {
3030
"@changesets/cli": "^2.27.1",
3131
"@types/node": "^25.1.0",
32+
"tsup": "^8.0.2",
3233
"tsx": "^4.21.0",
3334
"typescript": "^5.3.0"
3435
},

packages/adapters/hono/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
},
1414
"scripts": {
15-
"build": "tsc"
15+
"build": "tsup --config ../../../tsup.config.ts"
1616
},
1717
"peerDependencies": {
1818
"@objectstack/runtime": "workspace:*",

packages/adapters/nestjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"scripts": {
8-
"build": "tsc"
8+
"build": "tsup --config ../../../tsup.config.ts"
99
},
1010
"peerDependencies": {
1111
"@nestjs/common": "^10.0.0",

packages/adapters/nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"scripts": {
8-
"build": "tsc"
8+
"build": "tsup --config ../../../tsup.config.ts"
99
},
1010
"peerDependencies": {
1111
"@objectstack/runtime": "workspace:*",

packages/client-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"main": "dist/index.js",
77
"types": "dist/index.d.ts",
88
"scripts": {
9-
"build": "tsc"
9+
"build": "tsup --config ../../tsup.config.ts"
1010
},
1111
"peerDependencies": {
1212
"react": ">=18.0.0"

packages/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"main": "dist/index.js",
77
"types": "dist/index.d.ts",
88
"scripts": {
9-
"build": "tsc",
9+
"build": "tsup --config ../../tsup.config.ts",
1010
"test": "vitest run"
1111
},
1212
"dependencies": {

packages/client/tsconfig.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
{
2+
"extends": "../../tsconfig.json",
23
"compilerOptions": {
3-
"target": "ES2020",
4-
"module": "ES2020",
5-
"moduleResolution": "bundler",
6-
"declaration": true,
74
"outDir": "./dist",
8-
"strict": true,
9-
"esModuleInterop": true,
10-
"skipLibCheck": true
5+
"rootDir": "./src"
116
},
127
"include": ["src/**/*"],
138
"exclude": ["node_modules", "dist", "**/*.test.ts"]

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"main": "dist/index.js",
88
"types": "dist/index.d.ts",
99
"scripts": {
10-
"build": "tsc",
10+
"build": "tsup --config ../../tsup.config.ts",
1111
"test": "vitest run",
1212
"test:watch": "vitest"
1313
},

packages/core/tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "./dist",
5-
"rootDir": "./src",
6-
"moduleResolution": "bundler",
7-
"module": "esnext"
5+
"rootDir": "./src"
86
},
97
"include": ["src/**/*"],
108
"exclude": []

0 commit comments

Comments
 (0)