vite-plugin-dts 3.6.1 → 3.6.2

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/dist/index.cjs CHANGED
@@ -175,7 +175,7 @@ function toCapitalCase(value) {
175
175
  ""
176
176
  );
177
177
  }
178
- function fileTypesPath(...pkgs) {
178
+ function findTypesPath(...pkgs) {
179
179
  let path;
180
180
  for (const pkg of pkgs) {
181
181
  if (typeof pkg !== "object")
@@ -546,10 +546,13 @@ function dtsPlugin(options = {}) {
546
546
  if (config.build.lib) {
547
547
  const input = typeof config.build.lib.entry === "string" ? [config.build.lib.entry] : config.build.lib.entry;
548
548
  if (Array.isArray(input)) {
549
- entries = input.reduce((prev, current) => {
550
- prev[node_path.basename(current)] = current;
551
- return prev;
552
- }, {});
549
+ entries = input.reduce(
550
+ (prev, current) => {
551
+ prev[node_path.basename(current)] = current;
552
+ return prev;
553
+ },
554
+ {}
555
+ );
553
556
  } else {
554
557
  entries = { ...input };
555
558
  }
@@ -581,10 +584,13 @@ ${logPrefix} ${kolorist.yellow(
581
584
  return;
582
585
  const input = typeof options2.input === "string" ? [options2.input] : options2.input;
583
586
  if (Array.isArray(input)) {
584
- entries = input.reduce((prev, current) => {
585
- prev[node_path.basename(current)] = current;
586
- return prev;
587
- }, {});
587
+ entries = input.reduce(
588
+ (prev, current) => {
589
+ prev[node_path.basename(current)] = current;
590
+ return prev;
591
+ },
592
+ {}
593
+ );
588
594
  } else {
589
595
  entries = { ...input };
590
596
  }
@@ -652,7 +658,6 @@ ${logPrefix} ${kolorist.yellow(
652
658
  program = vueTsc.createProgram({
653
659
  host,
654
660
  rootNames,
655
- projectReferences: content?.projectReferences,
656
661
  options: compilerOptions
657
662
  });
658
663
  libName = toCapitalCase(libName || "_default");
@@ -834,7 +839,7 @@ ${logPrefix} Start generate declaration files...`));
834
839
  } catch (e) {
835
840
  }
836
841
  const entryNames = Object.keys(entries);
837
- const types = fileTypesPath(pkg.publishConfig, pkg);
842
+ const types = findTypesPath(pkg.publishConfig, pkg);
838
843
  const multiple = entryNames.length > 1;
839
844
  const cleanPath = (path) => {
840
845
  return cleanVueFileName ? path.replace(".vue.d.ts", ".d.ts") : path;
package/dist/index.mjs CHANGED
@@ -175,7 +175,7 @@ function toCapitalCase(value) {
175
175
  ""
176
176
  );
177
177
  }
178
- function fileTypesPath(...pkgs) {
178
+ function findTypesPath(...pkgs) {
179
179
  let path;
180
180
  for (const pkg of pkgs) {
181
181
  if (typeof pkg !== "object")
@@ -546,10 +546,13 @@ function dtsPlugin(options = {}) {
546
546
  if (config.build.lib) {
547
547
  const input = typeof config.build.lib.entry === "string" ? [config.build.lib.entry] : config.build.lib.entry;
548
548
  if (Array.isArray(input)) {
549
- entries = input.reduce((prev, current) => {
550
- prev[basename(current)] = current;
551
- return prev;
552
- }, {});
549
+ entries = input.reduce(
550
+ (prev, current) => {
551
+ prev[basename(current)] = current;
552
+ return prev;
553
+ },
554
+ {}
555
+ );
553
556
  } else {
554
557
  entries = { ...input };
555
558
  }
@@ -581,10 +584,13 @@ ${logPrefix} ${yellow(
581
584
  return;
582
585
  const input = typeof options2.input === "string" ? [options2.input] : options2.input;
583
586
  if (Array.isArray(input)) {
584
- entries = input.reduce((prev, current) => {
585
- prev[basename(current)] = current;
586
- return prev;
587
- }, {});
587
+ entries = input.reduce(
588
+ (prev, current) => {
589
+ prev[basename(current)] = current;
590
+ return prev;
591
+ },
592
+ {}
593
+ );
588
594
  } else {
589
595
  entries = { ...input };
590
596
  }
@@ -652,7 +658,6 @@ ${logPrefix} ${yellow(
652
658
  program = createProgram({
653
659
  host,
654
660
  rootNames,
655
- projectReferences: content?.projectReferences,
656
661
  options: compilerOptions
657
662
  });
658
663
  libName = toCapitalCase(libName || "_default");
@@ -834,7 +839,7 @@ ${logPrefix} Start generate declaration files...`));
834
839
  } catch (e) {
835
840
  }
836
841
  const entryNames = Object.keys(entries);
837
- const types = fileTypesPath(pkg.publishConfig, pkg);
842
+ const types = findTypesPath(pkg.publishConfig, pkg);
838
843
  const multiple = entryNames.length > 1;
839
844
  const cleanPath = (path) => {
840
845
  return cleanVueFileName ? path.replace(".vue.d.ts", ".d.ts") : path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-dts",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "qmhc",