Skip to content

Commit 2788d58

Browse files
authored
feat: try bundle with tsdown (#135)
resolves #131 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated build and development tooling across multiple packages to use a new bundler. - Adjusted configuration files and scripts to reflect the new tool. - Updated dependencies to remove obsolete packages and add new ones for improved publishing checks. - **Refactor** - Streamlined build configurations for consistency across packages. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 parents f0f1ed8 + 29e5d3d commit 2788d58

17 files changed

Lines changed: 911 additions & 398 deletions

.changeset/twenty-fans-hammer.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@mojis/internal-utils": minor
3+
"@mojis/adapters": minor
4+
"@mojis/versions": minor
5+
"@mojis/parsers": minor
6+
"@mojis/schemas": minor
7+
"@mojis/cli": minor
8+
---
9+
10+
feat: change bundler to tsdown

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ yarn-error.log*
3434
.turbo
3535

3636
dist
37-
tsup.config.bundled_*
3837
.vitest-testdirs
3938
.cache
4039
tsconfig.test.vitest-temp.json

packages/adapters/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"dist"
3030
],
3131
"scripts": {
32-
"build": "tsup --tsconfig tsconfig.build.json",
33-
"dev": "tsup --tsconfig tsconfig.build.json --watch",
32+
"build": "tsdown",
33+
"dev": "tsdown --watch",
3434
"clean": "git clean -xdf dist node_modules",
3535
"lint": "eslint .",
3636
"typecheck": "tsc --noEmit"
@@ -50,7 +50,8 @@
5050
"@mojis/loomicode": "catalog:dev",
5151
"@types/fs-extra": "catalog:dev",
5252
"eslint": "catalog:dev",
53-
"tsup": "catalog:dev",
53+
"publint": "catalog:dev",
54+
"tsdown": "catalog:dev",
5455
"typescript": "catalog:dev",
5556
"vitest-testdirs": "catalog:dev"
5657
},
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { defineConfig } from "tsup";
1+
import { defineConfig } from "tsdown";
22

33
export default defineConfig({
44
entry: ["./src/index.ts"],
55
format: ["esm"],
66
clean: true,
77
dts: true,
88
treeshake: true,
9-
bundle: true,
9+
publint: true,
10+
tsconfig: "./tsconfig.build.json",
1011
});

packages/cli/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"dist"
2727
],
2828
"scripts": {
29-
"build": "tsup --tsconfig tsconfig.build.json",
29+
"build": "tsdown",
3030
"clean": "git clean -xdf dist node_modules",
3131
"lint": "eslint .",
3232
"typecheck": "tsc --noEmit"
@@ -47,7 +47,8 @@
4747
"@types/fs-extra": "catalog:dev",
4848
"@types/yargs-parser": "catalog:dev",
4949
"eslint": "catalog:dev",
50-
"tsup": "catalog:dev",
50+
"publint": "catalog:dev",
51+
"tsdown": "catalog:dev",
5152
"typescript": "catalog:dev",
5253
"vitest-testdirs": "catalog:dev"
5354
},
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { defineConfig } from "tsup";
1+
import { defineConfig } from "tsdown";
22

33
export default defineConfig({
44
entry: ["./src/cli.ts"],
55
format: ["esm"],
66
clean: true,
77
dts: true,
88
treeshake: true,
9-
bundle: true,
9+
publint: true,
10+
tsconfig: "./tsconfig.build.json",
1011
});

packages/internal-utils/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"dist"
3232
],
3333
"scripts": {
34-
"build": "tsup --tsconfig tsconfig.build.json",
35-
"dev": "tsup --tsconfig tsconfig.build.json --watch",
34+
"build": "tsdown",
35+
"dev": "tsdown --watch",
3636
"clean": "git clean -xdf dist node_modules",
3737
"lint": "eslint .",
3838
"typecheck": "tsc --noEmit"
@@ -47,7 +47,8 @@
4747
"@luxass/eslint-config": "catalog:dev",
4848
"@types/fs-extra": "catalog:dev",
4949
"eslint": "catalog:dev",
50-
"tsup": "catalog:dev",
50+
"publint": "catalog:dev",
51+
"tsdown": "catalog:dev",
5152
"typescript": "catalog:dev",
5253
"vitest-testdirs": "catalog:dev"
5354
},
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineConfig } from "tsup";
1+
import { defineConfig } from "tsdown";
22

33
export default defineConfig({
44
entry: [
@@ -10,5 +10,6 @@ export default defineConfig({
1010
clean: true,
1111
dts: true,
1212
treeshake: true,
13-
bundle: true,
13+
publint: true,
14+
tsconfig: "./tsconfig.build.json",
1415
});

packages/parsers/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,17 @@
2929
"dist"
3030
],
3131
"scripts": {
32-
"build": "tsup --tsconfig tsconfig.build.json",
33-
"dev": "tsup --tsconfig tsconfig.build.json --watch",
32+
"build": "tsdown",
33+
"dev": "tsdown --watch",
3434
"clean": "git clean -xdf dist node_modules",
3535
"lint": "eslint .",
3636
"typecheck": "tsc --noEmit"
3737
},
3838
"devDependencies": {
3939
"@luxass/eslint-config": "catalog:dev",
4040
"eslint": "catalog:dev",
41-
"tsup": "catalog:dev",
41+
"publint": "catalog:dev",
42+
"tsdown": "catalog:dev",
4243
"typescript": "catalog:dev",
4344
"vitest-testdirs": "catalog:dev"
4445
},
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineConfig } from "tsup";
1+
import { defineConfig } from "tsdown";
22

33
export default defineConfig({
44
entry: [
@@ -8,5 +8,6 @@ export default defineConfig({
88
clean: true,
99
dts: true,
1010
treeshake: true,
11-
bundle: true,
11+
publint: true,
12+
tsconfig: "./tsconfig.build.json",
1213
});

0 commit comments

Comments
 (0)