vite-plugin-dts 3.5.2 → 3.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -231,7 +231,7 @@ export interface PluginOptions {
231
231
  /**
232
232
  * Override `exclude` glob
233
233
  *
234
- * Defaults to `exclude` property of tsconfig.json or `'node_module/**'` if not supplied.
234
+ * Defaults to `exclude` property of tsconfig.json or `'node_modules/**'` if not supplied.
235
235
  */
236
236
  exclude?: string | string[],
237
237
 
package/README.zh-CN.md CHANGED
@@ -231,7 +231,7 @@ export interface PluginOptions {
231
231
  /**
232
232
  * 手动设置排除路径的 glob
233
233
  *
234
- * 默认基于 tsconfig.json 的 `exclude` 选线,未设置时为 `'node_module/**'`
234
+ * 默认基于 tsconfig.json 的 `exclude` 选线,未设置时为 `'node_modules/**'`
235
235
  */
236
236
  exclude?: string | string[],
237
237
 
package/dist/index.cjs CHANGED
@@ -175,6 +175,16 @@ function toCapitalCase(value) {
175
175
  ""
176
176
  );
177
177
  }
178
+ function fileTypesPath(...pkgs) {
179
+ let path;
180
+ for (const pkg of pkgs) {
181
+ if (typeof pkg !== "object")
182
+ continue;
183
+ path = pkg.types || pkg.typings || pkg.exports?.["."]?.types || pkg.exports?.["./"]?.types;
184
+ if (path)
185
+ return path;
186
+ }
187
+ }
178
188
 
179
189
  const dtsRE$1 = /\.d\.tsx?$/;
180
190
  function rollupDeclarationFiles({
@@ -802,7 +812,7 @@ ${logPrefix} Start generate declaration files...`));
802
812
  } catch (e) {
803
813
  }
804
814
  const entryNames = Object.keys(entries);
805
- const types = pkg.types || pkg.typings || pkg.publishConfig?.types || pkg.publishConfig?.typings || (pkg.exports?.["."] || pkg.exports?.["./"])?.types;
815
+ const types = fileTypesPath(pkg.publishConfig, pkg);
806
816
  const multiple = entryNames.length > 1;
807
817
  let typesPath = types ? resolve(root, types) : resolve(outDir, indexName);
808
818
  if (!multiple && !dtsRE.test(typesPath)) {
package/dist/index.d.ts CHANGED
@@ -123,7 +123,7 @@ interface PluginOptions {
123
123
  /**
124
124
  * Override `exclude` glob
125
125
  *
126
- * Defaults to `exclude` property of tsconfig.json or `'node_module/**'` if not supplied.
126
+ * Defaults to `exclude` property of tsconfig.json or `'node_modules/**'` if not supplied.
127
127
  */
128
128
  exclude?: string | string[];
129
129
  /**
package/dist/index.mjs CHANGED
@@ -175,6 +175,16 @@ function toCapitalCase(value) {
175
175
  ""
176
176
  );
177
177
  }
178
+ function fileTypesPath(...pkgs) {
179
+ let path;
180
+ for (const pkg of pkgs) {
181
+ if (typeof pkg !== "object")
182
+ continue;
183
+ path = pkg.types || pkg.typings || pkg.exports?.["."]?.types || pkg.exports?.["./"]?.types;
184
+ if (path)
185
+ return path;
186
+ }
187
+ }
178
188
 
179
189
  const dtsRE$1 = /\.d\.tsx?$/;
180
190
  function rollupDeclarationFiles({
@@ -802,7 +812,7 @@ ${logPrefix} Start generate declaration files...`));
802
812
  } catch (e) {
803
813
  }
804
814
  const entryNames = Object.keys(entries);
805
- const types = pkg.types || pkg.typings || pkg.publishConfig?.types || pkg.publishConfig?.typings || (pkg.exports?.["."] || pkg.exports?.["./"])?.types;
815
+ const types = fileTypesPath(pkg.publishConfig, pkg);
806
816
  const multiple = entryNames.length > 1;
807
817
  let typesPath = types ? resolve(root, types) : resolve(outDir, indexName);
808
818
  if (!multiple && !dtsRE.test(typesPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-dts",
3
- "version": "3.5.2",
3
+ "version": "3.5.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "qmhc",
@@ -53,7 +53,7 @@
53
53
  "typescript"
54
54
  ],
55
55
  "dependencies": {
56
- "@microsoft/api-extractor": "^7.36.3",
56
+ "@microsoft/api-extractor": "^7.36.4",
57
57
  "@rollup/pluginutils": "^5.0.2",
58
58
  "@vue/language-core": "^1.8.8",
59
59
  "debug": "^4.3.4",
@@ -61,10 +61,10 @@
61
61
  "vue-tsc": "^1.8.8"
62
62
  },
63
63
  "devDependencies": {
64
- "@commitlint/cli": "^17.6.7",
64
+ "@commitlint/cli": "^17.7.1",
65
65
  "@types/debug": "^4.1.8",
66
66
  "@types/minimist": "^1.2.2",
67
- "@types/node": "^20.4.5",
67
+ "@types/node": "^20.4.10",
68
68
  "@types/prompts": "^2.4.4",
69
69
  "@types/semver": "^7.5.0",
70
70
  "@vexip-ui/commitlint-config": "^0.2.0",
@@ -73,7 +73,7 @@
73
73
  "@vue/eslint-config-standard": "^8.0.1",
74
74
  "@vue/eslint-config-typescript": "^11.0.3",
75
75
  "conventional-changelog-cli": "^3.0.0",
76
- "eslint": "^8.46.0",
76
+ "eslint": "^8.47.0",
77
77
  "execa": "^7.2.0",
78
78
  "husky": "^8.0.3",
79
79
  "is-ci": "^3.0.1",
@@ -86,10 +86,10 @@
86
86
  "rimraf": "^5.0.1",
87
87
  "semver": "^7.5.4",
88
88
  "tsx": "^3.12.7",
89
- "typescript": "5.0.4",
89
+ "typescript": "5.1.6",
90
90
  "unbuild": "^1.2.1",
91
- "vite": "^4.4.7",
92
- "vitest": "^0.33.0"
91
+ "vite": "^4.4.9",
92
+ "vitest": "^0.34.1"
93
93
  },
94
94
  "peerDependencies": {
95
95
  "typescript": "*",
@@ -99,5 +99,10 @@
99
99
  "vite": {
100
100
  "optional": true
101
101
  }
102
+ },
103
+ "pnpm": {
104
+ "patchedDependencies": {
105
+ "@microsoft/api-extractor@7.36.4": "patches/@microsoft__api-extractor@7.36.4.patch"
106
+ }
102
107
  }
103
108
  }