Skip to content

Commit 85528e1

Browse files
authored
chore: add tsdown (#428)
1 parent 88a787e commit 85528e1

3 files changed

Lines changed: 652 additions & 28 deletions

File tree

‎.lefthook.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ pre-commit:
55
stage_fixed: true
66
- run: mise exec -- yarn lint
77
- run: mise exec -- yarn build
8-
- run: mise exec -- yarn install --mode=update-lockfile && git add yarn.lock
9-
- run: mise exec -- yarn test/ install --mode=update-lockfile && git add test/yarn.lock
8+
- run: mise exec -- yarn install --mode=update-lockfile && yarn dedupe --mode=update-lockfile && git add yarn.lock
9+
- run: mise exec -- yarn test/ install --mode=update-lockfile && yarn test/ dedupe --mode=update-lockfile && git add test/yarn.lock
1010
- run: mise exec -- yarn knip

‎package.json‎

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
"description": "Transforms module resolution paths using TypeScript path mapping and/or custom paths",
55
"type": "module",
66
"exports": {
7-
".": {
8-
"types": "./dist/index.d.ts",
9-
"default": "./dist/index.js"
10-
},
11-
"./plugins/nx": "./dist/plugins/nx.js"
7+
".": "./dist/index.mjs",
8+
"./plugins/nx": "./dist/plugins/nx.mjs",
9+
"./package.json": "./package.json"
1210
},
1311
"files": [
1412
"dist",
@@ -17,7 +15,7 @@
1715
],
1816
"scripts": {
1917
"compile": "tsc",
20-
"build": "yarn clean && yarn compile",
18+
"build": "tsdown",
2119
"test": "yarn test/ test",
2220
"release": "changelogen --release --push",
2321
"--------------": "",
@@ -32,6 +30,17 @@
3230
"prepack": "yarn build",
3331
"knip": "knip"
3432
},
33+
"tsdown": {
34+
"entry": [
35+
"src/index.ts",
36+
"src/plugins/*.ts"
37+
],
38+
"exports": true,
39+
"unbundle": false,
40+
"dts": true,
41+
"format": "esm",
42+
"clean": true
43+
},
3544
"keywords": [
3645
"typescript",
3746
"transform",
@@ -65,6 +74,7 @@
6574
"oxfmt": "^0.60.0",
6675
"oxlint": "^1.75.0",
6776
"ts-patch": "^3.3.0",
77+
"tsdown": "^0.22.14",
6878
"typescript": "^5.9.3"
6979
},
7080
"peerDependencies": {
@@ -76,5 +86,8 @@
7686
"engines": {
7787
"node": ">=22"
7888
},
79-
"packageManager": "yarn@4.17.1+sha512.ccbfabf7d7b6b32075088be9386fb9a2e00bb6887ef07fa56effabc890a56d53da1ccc4128d62db245fcbd3961b236d75335bdf7d5320ed6eafb7588b7ad4697"
89+
"packageManager": "yarn@4.17.1+sha512.ccbfabf7d7b6b32075088be9386fb9a2e00bb6887ef07fa56effabc890a56d53da1ccc4128d62db245fcbd3961b236d75335bdf7d5320ed6eafb7588b7ad4697",
90+
"inlinedDependencies": {
91+
"ts-patch": "3.3.0"
92+
}
8093
}

0 commit comments

Comments
 (0)