Skip to content

Commit 6fe7ecb

Browse files
authored
chore: migrate unbuild to tsdown (#152)
* isolatedDeclarations * bundle chengelogen dts * use chengelogen default config instead of resolve it * remove node-style-text * chore: use tsdown * pref: do not bundle package.json * Revert "use chengelogen default config instead of resolve it" This reverts commit 5c4e3f6. * docs: remove jiti * fix: bin path * fix npmjs url * Revert "isolatedDeclarations" This reverts commit 8739183. * Reapply "isolatedDeclarations" This reverts commit bdef016.
1 parent 334d2df commit 6fe7ecb

46 files changed

Lines changed: 797 additions & 158 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ corepack enable
3030
pnpm install
3131

3232
# Development Mode
33-
# This command creates a typescript runtime using jiti,
34-
# and the modified code does not need to be built again.
3533
pnpm run dev
3634

3735
# link local scaffold to your plugin

bin/zotero-plugin.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env node
22

3-
import cli from "../dist/cli.mjs";
3+
import cli from "../dist/cli.js";
44

55
cli();

build.config.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

package.json

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@
2323
],
2424
"exports": {
2525
".": {
26-
"types": "./dist/index.d.mts",
27-
"import": "./dist/index.mjs"
26+
"types": "./dist/index.d.ts",
27+
"import": "./dist/index.js"
2828
},
2929
"./cli": {
30-
"import": "./dist/cli.mjs"
30+
"import": "./dist/cli.js"
3131
},
3232
"./vendor": {
33-
"types": "./dist/vendor/index.d.mts",
34-
"import": "./dist/vendor/index.mjs"
33+
"types": "./dist/vendor.d.ts",
34+
"import": "./dist/vendor.js"
3535
}
3636
},
37-
"main": "./dist/index.mjs",
38-
"module": "./dist/index.mjs",
39-
"types": "./dist/index.d.mts",
37+
"main": "./dist/index.js",
38+
"module": "./dist/index.js",
39+
"types": "./dist/index.d.ts",
4040
"bin": {
4141
"zotero-plugin": "./bin/zotero-plugin.mjs"
4242
},
@@ -48,8 +48,10 @@
4848
"node": ">=22.8.0"
4949
},
5050
"scripts": {
51-
"dev": "unbuild --stub",
52-
"build": "tsc --noEmit && unbuild",
51+
"dev": "tsdown --watch",
52+
"build": "pnpm build:tsdown && pnpm build:tsc",
53+
"build:tsdown": "tsdown",
54+
"build:tsc": "tsc --noEmit",
5355
"lint:check": "eslint .",
5456
"lint:fix": "eslint . --fix",
5557
"docs:dev": "pnpm -C docs run dev",
@@ -96,6 +98,7 @@
9698
"eslint-plugin-format": "^1.3.1",
9799
"husky": "^9.1.7",
98100
"lint-staged": "^16.2.7",
101+
"tsdown": "^0.16.6",
99102
"tsx": "^4.21.0",
100103
"typescript": "^5.9.3",
101104
"unbuild": "^3.6.1",

0 commit comments

Comments
 (0)