Skip to content

Commit a99fa4c

Browse files
committed
types: fix exports error
1 parent 1c03030 commit a99fa4c

File tree

6 files changed

+539
-37
lines changed

6 files changed

+539
-37
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ stats.html
1313
*.local
1414
*.log
1515
*.zip
16+
*.tgz

dependency-licenses.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
├─ MIT: 85
1+
├─ MIT: 87
22
├─ Apache-2.0: 7
33
├─ BSD-2-Clause: 3
44
├─ BSD-3-Clause: 2

package.json

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,14 @@
3434
],
3535
"exports": {
3636
".": {
37-
"types": "./dist/json-editor-vue.d.ts",
38-
"import": "./dist/json-editor-vue.mjs",
39-
"require": "./dist/json-editor-vue.umd.js"
37+
"import": {
38+
"types": "./dist/json-editor-vue.d.mts",
39+
"default": "./dist/json-editor-vue.mjs"
40+
},
41+
"require": {
42+
"types": "./dist/json-editor-vue.d.ts",
43+
"default": "./dist/json-editor-vue.umd.js"
44+
}
4045
},
4146
"./*": "./*"
4247
},
@@ -57,7 +62,9 @@
5762
"test:coverage": "vitest run --coverage",
5863
"test:ui": "vitest --ui",
5964
"doc": "vitepress dev --open /README",
60-
"build": "vite build",
65+
"build": "vite build && pnpm typegen",
66+
"typegen": "npx tsup --entry.json-editor-vue src/index.ts --format esm,cjs --cjsInterop --clean --dts-only",
67+
"check-exports": "pnpm build && npx attw $(npm pack)",
6168
"release": "esno ./scripts/release.mts",
6269
"license-scan": "license-checker --summary --out ./dependency-licenses.txt",
6370
"lint": "eslint \"**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue,json,md,html,css,scss,sass}\" --ignore-pattern stats.html",
@@ -80,17 +87,18 @@
8087
},
8188
"devDependencies": {
8289
"@antfu/eslint-config": "^3.7.3",
90+
"@arethetypeswrong/cli": "^0.16.4",
8391
"@commitlint/cli": "^19.5.0",
8492
"@commitlint/config-conventional": "^19.5.0",
8593
"@types/cross-spawn": "^6.0.6",
8694
"@types/lodash-es": "^4.17.12",
8795
"@types/node": "^22.7.5",
8896
"@types/prompts": "^2.4.9",
8997
"@types/semver": "^7.5.8",
90-
"@vitejs/plugin-vue": "^5.1.4",
98+
"@vitejs/plugin-vue": "latest",
9199
"@vitest/ui": "^2.1.2",
92-
"@vue/compiler-sfc": "^3.5.11",
93-
"@vue/test-utils": "^2.4.6",
100+
"@vue/compiler-sfc": "latest",
101+
"@vue/test-utils": "latest",
94102
"axios": "^1.7.7",
95103
"case-police": "^0.7.0",
96104
"cross-spawn": "^7.0.3",
@@ -112,14 +120,15 @@
112120
"rollup-plugin-visualizer": "^5.12.0",
113121
"semver": "^7.6.3",
114122
"simple-git-hooks": "^2.11.1",
123+
"tsup": "^8.3.0",
115124
"typescript": "^5.6.2",
116125
"unplugin-auto-import": "^0.18.3",
117126
"unplugin-vue-components": "^0.27.4",
118127
"vite": "^5.4.8",
119128
"vite-plugin-dts": "4.2.3",
120129
"vitepress": "^1.4.0",
121130
"vitest": "^2.1.2",
122-
"vue": "^3.5.11",
131+
"vue": "latest",
123132
"vue-global-config": "^0.6.2",
124133
"zhlint": "^0.8.2"
125134
},

0 commit comments

Comments
 (0)