Skip to content

Commit 037074e

Browse files
authored
chore: migrate to tsdown (#1230)
1 parent 60aa0e1 commit 037074e

File tree

31 files changed

+737
-671
lines changed

31 files changed

+737
-671
lines changed

.changeset/warm-tigers-double.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
"@pluv/persistence-cloudflare-transactional-storage": minor
3+
"@pluv/platform-cloudflare": minor
4+
"@pluv/persistence-redis": minor
5+
"@pluv/addon-indexeddb": minor
6+
"@pluv/platform-node": minor
7+
"@pluv/platform-pluv": minor
8+
"@pluv/pubsub-redis": minor
9+
"@pluv/crdt-loro": minor
10+
"@pluv/crdt-yjs": minor
11+
"@pluv/client": minor
12+
"@pluv/react": minor
13+
"@pluv/types": minor
14+
"@pluv/crdt": minor
15+
"@pluv/io": minor
16+
---
17+
18+
Migrated build process from tsup to tsdown.

packages/addon-indexeddb/package.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
"url": "git+https://github.com/pluv-io/pluv.git",
1515
"directory": "packages/addon-indexeddb"
1616
},
17-
"main": "./dist/index.js",
17+
"main": "./dist/index.cjs",
1818
"module": "./dist/index.mjs",
19-
"types": "./dist/index.d.ts",
19+
"types": "./dist/index.d.cts",
2020
"publishConfig": {
2121
"access": "public"
2222
},
2323
"scripts": {
24-
"build": "tsup src/index.ts --format esm,cjs --dts",
25-
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
24+
"build": "tsdown",
25+
"dev": "tsdown --watch",
2626
"lint": "eslint \"src/**/*.ts*\" --fix --max-warnings 0",
2727
"typecheck": "tsc --noEmit",
2828
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
@@ -37,7 +37,14 @@
3737
"@pluv/types": "workspace:^",
3838
"eslint": "^9.39.1",
3939
"eslint-config-pluv": "workspace:^",
40-
"tsup": "^8.5.0",
40+
"tsdown": "^0.17.0-beta.5",
4141
"typescript": "^5.9.3"
42+
},
43+
"exports": {
44+
".": {
45+
"require": "./dist/index.cjs",
46+
"import": "./dist/index.mjs"
47+
},
48+
"./*": "./*"
4249
}
4350
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from "tsdown";
2+
3+
export default defineConfig({
4+
format: ["esm", "cjs"],
5+
dts: true,
6+
outDir: "dist",
7+
entry: "src/index.ts",
8+
target: "esnext",
9+
sourcemap: true,
10+
clean: true,
11+
exports: {
12+
all: true,
13+
},
14+
});

packages/client/package.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
"url": "git+https://github.com/pluv-io/pluv.git",
1515
"directory": "packages/client"
1616
},
17-
"main": "./dist/index.js",
17+
"main": "./dist/index.cjs",
1818
"module": "./dist/index.mjs",
19-
"types": "./dist/index.d.ts",
19+
"types": "./dist/index.d.cts",
2020
"publishConfig": {
2121
"access": "public"
2222
},
2323
"scripts": {
24-
"build": "tsup src/index.ts --format esm,cjs --dts",
25-
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
24+
"build": "tsdown",
25+
"dev": "tsdown --watch",
2626
"lint": "eslint \"src/**/*.ts*\" --fix --max-warnings 0",
2727
"typecheck": "tsc --noEmit",
2828
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
@@ -36,7 +36,14 @@
3636
"@pluv/tsconfig": "workspace:^",
3737
"eslint": "^9.39.1",
3838
"eslint-config-pluv": "workspace:^",
39-
"tsup": "^8.5.0",
39+
"tsdown": "^0.17.0-beta.5",
4040
"typescript": "^5.9.3"
41+
},
42+
"exports": {
43+
".": {
44+
"require": "./dist/index.cjs",
45+
"import": "./dist/index.mjs"
46+
},
47+
"./*": "./*"
4148
}
4249
}

packages/client/tsdown.config.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from "tsdown";
2+
3+
export default defineConfig({
4+
format: ["esm", "cjs"],
5+
dts: true,
6+
outDir: "dist",
7+
entry: "src/index.ts",
8+
target: "esnext",
9+
sourcemap: true,
10+
clean: true,
11+
exports: {
12+
all: true,
13+
},
14+
});

packages/crdt-loro/package.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
"url": "git+https://github.com/pluv-io/pluv.git",
1515
"directory": "packages/crdt-loro"
1616
},
17-
"main": "./dist/index.js",
17+
"main": "./dist/index.cjs",
1818
"module": "./dist/index.mjs",
19-
"types": "./dist/index.d.ts",
19+
"types": "./dist/index.d.cts",
2020
"publishConfig": {
2121
"access": "public"
2222
},
2323
"scripts": {
24-
"build": "tsup src/index.ts --format esm,cjs --dts",
25-
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
24+
"build": "tsdown",
25+
"dev": "tsdown --watch",
2626
"lint": "eslint \"src/**/*.ts*\" --fix --max-warnings 0",
2727
"typecheck": "tsc --noEmit",
2828
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
@@ -41,7 +41,14 @@
4141
"eslint": "^9.39.1",
4242
"eslint-config-pluv": "workspace:^",
4343
"loro-crdt": "^1.10.2",
44-
"tsup": "^8.5.0",
44+
"tsdown": "^0.17.0-beta.5",
4545
"typescript": "^5.9.3"
46+
},
47+
"exports": {
48+
".": {
49+
"require": "./dist/index.cjs",
50+
"import": "./dist/index.mjs"
51+
},
52+
"./*": "./*"
4653
}
4754
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from "tsdown";
2+
3+
export default defineConfig({
4+
format: ["esm", "cjs"],
5+
dts: true,
6+
outDir: "dist",
7+
entry: "src/index.ts",
8+
target: "esnext",
9+
sourcemap: true,
10+
clean: true,
11+
exports: {
12+
all: true,
13+
},
14+
});

packages/crdt-yjs/package.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
"url": "git+https://github.com/pluv-io/pluv.git",
1515
"directory": "packages/crdt-yjs"
1616
},
17-
"main": "./dist/index.js",
17+
"main": "./dist/index.cjs",
1818
"module": "./dist/index.mjs",
19-
"types": "./dist/index.d.ts",
19+
"types": "./dist/index.d.cts",
2020
"publishConfig": {
2121
"access": "public"
2222
},
2323
"scripts": {
24-
"build": "tsup src/index.ts --format esm,cjs --dts",
25-
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
24+
"build": "tsdown",
25+
"dev": "tsdown --watch",
2626
"lint": "eslint \"src/**/*.ts*\" --fix --max-warnings 0",
2727
"typecheck": "tsc --noEmit",
2828
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
@@ -41,8 +41,15 @@
4141
"@pluv/tsconfig": "workspace:^",
4242
"eslint": "^9.39.1",
4343
"eslint-config-pluv": "workspace:^",
44-
"tsup": "^8.5.0",
44+
"tsdown": "^0.17.0-beta.5",
4545
"typescript": "^5.9.3",
4646
"yjs": "^13.6.27"
47+
},
48+
"exports": {
49+
".": {
50+
"require": "./dist/index.cjs",
51+
"import": "./dist/index.mjs"
52+
},
53+
"./*": "./*"
4754
}
4855
}

packages/crdt-yjs/tsdown.config.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from "tsdown";
2+
3+
export default defineConfig({
4+
format: ["esm", "cjs"],
5+
dts: true,
6+
outDir: "dist",
7+
entry: "src/index.ts",
8+
target: "esnext",
9+
sourcemap: true,
10+
clean: true,
11+
exports: {
12+
all: true,
13+
},
14+
});

packages/crdt/package.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
"url": "git+https://github.com/pluv-io/pluv.git",
1515
"directory": "packages/crdt"
1616
},
17-
"main": "./dist/index.js",
17+
"main": "./dist/index.cjs",
1818
"module": "./dist/index.mjs",
19-
"types": "./dist/index.d.ts",
19+
"types": "./dist/index.d.cts",
2020
"publishConfig": {
2121
"access": "public"
2222
},
2323
"scripts": {
24-
"build": "tsup src/index.ts --format esm,cjs --dts",
25-
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
24+
"build": "tsdown",
25+
"dev": "tsdown --watch",
2626
"lint": "eslint \"src/**/*.ts*\" --fix --max-warnings 0",
2727
"typecheck": "tsc --noEmit",
2828
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
@@ -34,7 +34,14 @@
3434
"@pluv/tsconfig": "workspace:^",
3535
"eslint": "^9.39.1",
3636
"eslint-config-pluv": "workspace:^",
37-
"tsup": "^8.5.0",
37+
"tsdown": "^0.17.0-beta.5",
3838
"typescript": "^5.9.3"
39+
},
40+
"exports": {
41+
".": {
42+
"require": "./dist/index.cjs",
43+
"import": "./dist/index.mjs"
44+
},
45+
"./*": "./*"
3946
}
4047
}

0 commit comments

Comments
 (0)