vite-plugin-dts 1.5.0 → 1.6.0
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 +213 -213
- package/README.zh-CN.md +212 -212
- package/dist/index.d.ts +1 -1
- package/dist/index.js +127 -61
- package/dist/index.mjs +121 -68
- package/package.json +35 -34
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
-
}) : x)(function(x) {
|
|
4
|
-
if (typeof require !== "undefined")
|
|
5
|
-
return require.apply(this, arguments);
|
|
6
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
-
});
|
|
8
|
-
|
|
9
1
|
// src/plugin.ts
|
|
10
2
|
import { resolve as resolve3, dirname as dirname3, relative as relative2, basename } from "path";
|
|
11
3
|
import fs from "fs-extra";
|
|
@@ -163,20 +155,25 @@ var importTypesRE = /import\s?(?:type)?\s?\{(.+)\}\s?from\s?['"].+['"]/;
|
|
|
163
155
|
function transformDynamicImport(content) {
|
|
164
156
|
const importMap = /* @__PURE__ */ new Map();
|
|
165
157
|
content = content.replace(globalDynamicTypeRE, (str) => {
|
|
166
|
-
var _a;
|
|
167
158
|
const matchResult = str.match(dynamicTypeRE);
|
|
168
159
|
const libName = matchResult[1];
|
|
169
|
-
const importSet =
|
|
160
|
+
const importSet = importMap.get(libName) ?? importMap.set(libName, /* @__PURE__ */ new Set()).get(libName);
|
|
170
161
|
const usedType = matchResult[2];
|
|
171
162
|
importSet.add(usedType);
|
|
172
163
|
return usedType + matchResult[3];
|
|
173
164
|
});
|
|
174
165
|
importMap.forEach((importSet, libName) => {
|
|
175
|
-
const importReg = new RegExp(
|
|
166
|
+
const importReg = new RegExp(
|
|
167
|
+
`import\\s?(?:type)?\\s?\\{[^;\\n]+\\}\\s?from\\s?['"]${libName}['"]`,
|
|
168
|
+
"g"
|
|
169
|
+
);
|
|
176
170
|
const matchResult = content.match(importReg);
|
|
177
171
|
if (matchResult == null ? void 0 : matchResult[0]) {
|
|
178
172
|
const importedTypes = matchResult[0].match(importTypesRE)[1].trim().split(",");
|
|
179
|
-
content = content.replace(
|
|
173
|
+
content = content.replace(
|
|
174
|
+
matchResult[0],
|
|
175
|
+
`import type { ${Array.from(importSet).concat(importedTypes).join(", ")} } from '${libName}'`
|
|
176
|
+
);
|
|
180
177
|
} else {
|
|
181
178
|
content = `import type { ${Array.from(importSet).join(", ")} } from '${libName}';
|
|
182
179
|
` + content;
|
|
@@ -215,7 +212,13 @@ function transformAliasImport(filePath, content, aliases, exclude = []) {
|
|
|
215
212
|
return str;
|
|
216
213
|
}
|
|
217
214
|
const truthPath = isAbsolute2(matchedAlias.replacement) ? normalizePath(relative(dirname2(filePath), matchedAlias.replacement)) : normalizePath(matchedAlias.replacement);
|
|
218
|
-
return str.replace(
|
|
215
|
+
return str.replace(
|
|
216
|
+
isDynamic ? simpleDynamicImportRE : simpleStaticImportRE,
|
|
217
|
+
`$1'${matchResult[1].replace(
|
|
218
|
+
matchedAlias.find,
|
|
219
|
+
(truthPath.startsWith(".") ? truthPath : `./${truthPath}`) + (typeof matchedAlias.find === "string" && matchedAlias.find.endsWith("/") ? "/" : "")
|
|
220
|
+
)}'${isDynamic ? ")" : ""}`
|
|
221
|
+
);
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
224
|
return str;
|
|
@@ -236,6 +239,7 @@ function transferSetupPosition(content) {
|
|
|
236
239
|
}
|
|
237
240
|
|
|
238
241
|
// src/compile.ts
|
|
242
|
+
import { createRequire } from "node:module";
|
|
239
243
|
var exportDefaultRE = /export\s+default/;
|
|
240
244
|
var exportDefaultClassRE = /(?:(?:^|\n|;)\s*)export\s+default\s+class\s+([\w$]+)/;
|
|
241
245
|
var noScriptContent = "import { defineComponent } from 'vue'\nexport default defineComponent({})";
|
|
@@ -243,20 +247,21 @@ var index = 1;
|
|
|
243
247
|
var compileRoot = null;
|
|
244
248
|
var compiler;
|
|
245
249
|
var vue;
|
|
250
|
+
var _require = createRequire(import.meta.url);
|
|
246
251
|
function requireCompiler() {
|
|
247
252
|
if (!compiler) {
|
|
248
253
|
if (compileRoot) {
|
|
249
254
|
try {
|
|
250
|
-
compiler =
|
|
255
|
+
compiler = _require(_require.resolve("vue/compiler-sfc", { paths: [compileRoot] }));
|
|
251
256
|
} catch (e) {
|
|
252
257
|
}
|
|
253
258
|
}
|
|
254
259
|
if (!compiler) {
|
|
255
260
|
try {
|
|
256
|
-
compiler =
|
|
261
|
+
compiler = _require("vue/compiler-sfc");
|
|
257
262
|
} catch (e) {
|
|
258
263
|
try {
|
|
259
|
-
compiler =
|
|
264
|
+
compiler = _require("@vue/compiler-sfc");
|
|
260
265
|
} catch (e2) {
|
|
261
266
|
throw new Error("@vue/compiler-sfc is not present in the dependency tree.\n");
|
|
262
267
|
}
|
|
@@ -269,13 +274,13 @@ function isVue3() {
|
|
|
269
274
|
if (!vue) {
|
|
270
275
|
if (compileRoot) {
|
|
271
276
|
try {
|
|
272
|
-
vue =
|
|
277
|
+
vue = _require(_require.resolve("vue", { paths: [compileRoot] }));
|
|
273
278
|
} catch (e) {
|
|
274
279
|
}
|
|
275
280
|
}
|
|
276
281
|
if (!vue) {
|
|
277
282
|
try {
|
|
278
|
-
vue =
|
|
283
|
+
vue = _require("vue");
|
|
279
284
|
} catch (e) {
|
|
280
285
|
throw new Error("vue is not present in the dependency tree.\n");
|
|
281
286
|
}
|
|
@@ -311,7 +316,7 @@ function compileVueCode(code) {
|
|
|
311
316
|
id: `${index++}`
|
|
312
317
|
});
|
|
313
318
|
const classMatch = compiled.content.match(exportDefaultClassRE);
|
|
314
|
-
const plugins = scriptSetup.lang === "ts" ? ["typescript"] : void 0;
|
|
319
|
+
const plugins = scriptSetup.lang === "ts" ? ["typescript", "decorators-legacy"] : void 0;
|
|
315
320
|
if (classMatch) {
|
|
316
321
|
content = compiled.content.replace(exportDefaultClassRE, "\nclass $1") + `
|
|
317
322
|
const _sfc_main = ${classMatch[1]}`;
|
|
@@ -322,10 +327,18 @@ const _sfc_main = ${classMatch[1]}`;
|
|
|
322
327
|
content = rewriteDefault(compiled.content, "_sfc_main", plugins);
|
|
323
328
|
}
|
|
324
329
|
content = transferSetupPosition(content);
|
|
330
|
+
content = content.replace(/(const __returned__\s?=\s?\{[\s\S]+?)(props)(\s?\})/, "$1props: props as any$3").replace(
|
|
331
|
+
/(const __returned__\s?=\s?\{[\s\S]+?)(props,)([\s\S]+?)/,
|
|
332
|
+
"$1props: props as any,$3"
|
|
333
|
+
);
|
|
325
334
|
content += "\nexport default _sfc_main\n";
|
|
326
335
|
ext = scriptSetup.lang || "js";
|
|
327
336
|
} else if (script && script.content) {
|
|
328
|
-
content = rewriteDefault(
|
|
337
|
+
content = rewriteDefault(
|
|
338
|
+
script.content,
|
|
339
|
+
"_sfc_main",
|
|
340
|
+
script.lang === "ts" ? ["typescript"] : void 0
|
|
341
|
+
);
|
|
329
342
|
content += "\nexport default _sfc_main\n";
|
|
330
343
|
ext = script.lang || "js";
|
|
331
344
|
}
|
|
@@ -417,7 +430,12 @@ function rollupDeclarationFiles({
|
|
|
417
430
|
extractorConfig
|
|
418
431
|
});
|
|
419
432
|
collector.analyze();
|
|
420
|
-
DtsRollupGenerator.writeTypingsFile(
|
|
433
|
+
DtsRollupGenerator.writeTypingsFile(
|
|
434
|
+
collector,
|
|
435
|
+
extractorConfig.publicTrimmedFilePath,
|
|
436
|
+
DtsRollupKind.PublicRelease,
|
|
437
|
+
extractorConfig.newlineKind
|
|
438
|
+
);
|
|
421
439
|
}
|
|
422
440
|
|
|
423
441
|
// src/plugin.ts
|
|
@@ -436,7 +454,6 @@ var noop = () => {
|
|
|
436
454
|
var logPrefix = chalk.cyan("[vite:dts]");
|
|
437
455
|
var bundleDebug = debug("vite-plugin-dts:bundle");
|
|
438
456
|
function dtsPlugin(options = {}) {
|
|
439
|
-
var _a, _b;
|
|
440
457
|
const {
|
|
441
458
|
tsConfigFilePath = "tsconfig.json",
|
|
442
459
|
aliasesExclude = [],
|
|
@@ -453,9 +470,9 @@ function dtsPlugin(options = {}) {
|
|
|
453
470
|
beforeWriteFile = noop,
|
|
454
471
|
afterBuild = noop
|
|
455
472
|
} = options;
|
|
456
|
-
const compilerOptions =
|
|
473
|
+
const compilerOptions = options.compilerOptions ?? {};
|
|
457
474
|
let root;
|
|
458
|
-
let entryRoot =
|
|
475
|
+
let entryRoot = options.entryRoot ?? "";
|
|
459
476
|
let libName;
|
|
460
477
|
let indexName;
|
|
461
478
|
let aliases;
|
|
@@ -473,10 +490,10 @@ function dtsPlugin(options = {}) {
|
|
|
473
490
|
apply: "build",
|
|
474
491
|
enforce: "pre",
|
|
475
492
|
config(config) {
|
|
476
|
-
var
|
|
493
|
+
var _a;
|
|
477
494
|
if (isBundle)
|
|
478
495
|
return;
|
|
479
|
-
const aliasOptions = (
|
|
496
|
+
const aliasOptions = ((_a = config == null ? void 0 : config.resolve) == null ? void 0 : _a.alias) ?? [];
|
|
480
497
|
if (isNativeObj(aliasOptions)) {
|
|
481
498
|
aliases = Object.entries(aliasOptions).map(([key, value]) => {
|
|
482
499
|
return { find: key, replacement: value };
|
|
@@ -485,38 +502,53 @@ function dtsPlugin(options = {}) {
|
|
|
485
502
|
aliases = ensureArray(aliasOptions);
|
|
486
503
|
}
|
|
487
504
|
if (aliasesExclude.length > 0) {
|
|
488
|
-
aliases = aliases.filter(
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
505
|
+
aliases = aliases.filter(
|
|
506
|
+
({ find }) => !aliasesExclude.some(
|
|
507
|
+
(alias) => {
|
|
508
|
+
var _a2;
|
|
509
|
+
return alias && (isRegExp(find) ? find.toString() === alias.toString() : isRegExp(alias) ? (_a2 = find.match(alias)) == null ? void 0 : _a2[0] : find === alias);
|
|
510
|
+
}
|
|
511
|
+
)
|
|
512
|
+
);
|
|
492
513
|
}
|
|
493
514
|
},
|
|
494
515
|
configResolved(config) {
|
|
495
|
-
var _a2, _b2, _c;
|
|
496
516
|
if (isBundle)
|
|
497
517
|
return;
|
|
498
518
|
logger = config.logger;
|
|
499
519
|
if (!config.build.lib) {
|
|
500
|
-
logger.warn(
|
|
501
|
-
|
|
502
|
-
`
|
|
520
|
+
logger.warn(
|
|
521
|
+
chalk.yellow(
|
|
522
|
+
`
|
|
523
|
+
${chalk.cyan(
|
|
524
|
+
"[vite:dts]"
|
|
525
|
+
)} You building not a library that may not need to generate declaration files.
|
|
526
|
+
`
|
|
527
|
+
)
|
|
528
|
+
);
|
|
503
529
|
libName = "_default";
|
|
504
530
|
indexName = defaultIndex;
|
|
505
531
|
} else {
|
|
506
|
-
const filename =
|
|
532
|
+
const filename = config.build.lib.fileName ?? defaultIndex;
|
|
507
533
|
libName = config.build.lib.name || "_default";
|
|
508
534
|
indexName = typeof filename === "string" ? filename : filename("es");
|
|
509
535
|
if (!dtsRE2.test(indexName)) {
|
|
510
536
|
indexName = `${tjsRE.test(indexName) ? indexName.replace(tjsRE, "") : indexName}.d.ts`;
|
|
511
537
|
}
|
|
512
538
|
}
|
|
513
|
-
root = ensureAbsolute(
|
|
539
|
+
root = ensureAbsolute(options.root ?? "", config.root);
|
|
514
540
|
tsConfigPath = ensureAbsolute(tsConfigFilePath, root);
|
|
515
541
|
outputDirs = options.outputDir ? ensureArray(options.outputDir).map((d) => ensureAbsolute(d, root)) : [ensureAbsolute(config.build.outDir, root)];
|
|
516
|
-
if (!outputDirs) {
|
|
517
|
-
logger.error(
|
|
518
|
-
|
|
519
|
-
`
|
|
542
|
+
if (!outputDirs[0]) {
|
|
543
|
+
logger.error(
|
|
544
|
+
chalk.red(
|
|
545
|
+
`
|
|
546
|
+
${chalk.cyan(
|
|
547
|
+
"[vite:dts]"
|
|
548
|
+
)} Can not resolve declaration directory, please check your vite config and plugin options.
|
|
549
|
+
`
|
|
550
|
+
)
|
|
551
|
+
);
|
|
520
552
|
return;
|
|
521
553
|
}
|
|
522
554
|
setCompileRoot(root);
|
|
@@ -534,7 +566,7 @@ ${chalk.cyan("[vite:dts]")} Can not resolve declaration directory, please check
|
|
|
534
566
|
tsConfigFilePath: tsConfigPath,
|
|
535
567
|
skipAddingFilesFromTsConfig: true
|
|
536
568
|
});
|
|
537
|
-
allowJs =
|
|
569
|
+
allowJs = project.getCompilerOptions().allowJs ?? false;
|
|
538
570
|
},
|
|
539
571
|
buildStart(inputOptions) {
|
|
540
572
|
if (!isBundle && (insertTypesEntry || rollupTypes)) {
|
|
@@ -567,7 +599,6 @@ ${chalk.cyan("[vite:dts]")} Can not resolve declaration directory, please check
|
|
|
567
599
|
}
|
|
568
600
|
},
|
|
569
601
|
async closeBundle() {
|
|
570
|
-
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
|
|
571
602
|
if (!outputDirs || !project || isBundle)
|
|
572
603
|
return;
|
|
573
604
|
logger.info(chalk.green(`
|
|
@@ -576,11 +607,11 @@ ${logPrefix} Start generate declaration files...`));
|
|
|
576
607
|
isBundle = true;
|
|
577
608
|
sourceDtsFiles.clear();
|
|
578
609
|
const startTime = Date.now();
|
|
579
|
-
const tsConfig =
|
|
610
|
+
const tsConfig = readConfigFile(tsConfigPath, project.getFileSystem().readFileSync).config ?? {};
|
|
580
611
|
const parentTsConfigPath = tsConfig.extends && ensureAbsolute(tsConfig.extends, root);
|
|
581
612
|
const parentTsConfig = parentTsConfigPath ? readConfigFile(parentTsConfigPath, project.getFileSystem().readFileSync).config : {};
|
|
582
|
-
const include =
|
|
583
|
-
const exclude =
|
|
613
|
+
const include = options.include ?? tsConfig.include ?? parentTsConfig.include ?? "**/*";
|
|
614
|
+
const exclude = options.exclude ?? tsConfig.exclude ?? parentTsConfig.exclude ?? "node_modules/**";
|
|
584
615
|
bundleDebug("read config");
|
|
585
616
|
const includedFileSet = /* @__PURE__ */ new Set();
|
|
586
617
|
if (include && include.length) {
|
|
@@ -602,13 +633,18 @@ ${logPrefix} Start generate declaration files...`));
|
|
|
602
633
|
});
|
|
603
634
|
if (hasJsVue) {
|
|
604
635
|
if (!allowJs) {
|
|
605
|
-
logger.warn(
|
|
636
|
+
logger.warn(
|
|
637
|
+
chalk.yellow(
|
|
638
|
+
`${chalk.cyan(
|
|
639
|
+
"[vite:dts]"
|
|
640
|
+
)} Some js files are referenced, but you may not enable the 'allowJs' option.`
|
|
641
|
+
)
|
|
642
|
+
);
|
|
606
643
|
}
|
|
607
644
|
project.compilerOptions.set({ allowJs: true });
|
|
608
645
|
}
|
|
609
646
|
bundleDebug("collect files");
|
|
610
647
|
}
|
|
611
|
-
project.resolveSourceFileDependencies();
|
|
612
648
|
bundleDebug("resolve");
|
|
613
649
|
if (!skipDiagnostics) {
|
|
614
650
|
const diagnostics = project.getPreEmitDiagnostics();
|
|
@@ -626,10 +662,12 @@ ${logPrefix} Start generate declaration files...`));
|
|
|
626
662
|
content: sourceFile.getFullText()
|
|
627
663
|
}));
|
|
628
664
|
const service = project.getLanguageService();
|
|
629
|
-
const outputFiles = project.getSourceFiles().map(
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
665
|
+
const outputFiles = project.getSourceFiles().map(
|
|
666
|
+
(sourceFile) => service.getEmitOutput(sourceFile, true).getOutputFiles().map((outputFile) => ({
|
|
667
|
+
path: normalizePath2(resolve3(root, outputFile.compilerObject.name)),
|
|
668
|
+
content: outputFile.getText()
|
|
669
|
+
}))
|
|
670
|
+
).flat().concat(dtsOutputFiles);
|
|
633
671
|
bundleDebug("emit");
|
|
634
672
|
if (!entryRoot) {
|
|
635
673
|
entryRoot = queryPublicPath(outputFiles.map((file) => file.path));
|
|
@@ -638,7 +676,6 @@ ${logPrefix} Start generate declaration files...`));
|
|
|
638
676
|
const wroteFiles = /* @__PURE__ */ new Set();
|
|
639
677
|
const outputDir = outputDirs[0];
|
|
640
678
|
await runParallel(os.cpus().length, outputFiles, async (outputFile) => {
|
|
641
|
-
var _a3, _b3;
|
|
642
679
|
let filePath = outputFile.path;
|
|
643
680
|
let content = outputFile.content;
|
|
644
681
|
const isMapFile = filePath.endsWith(".map");
|
|
@@ -650,16 +687,25 @@ ${logPrefix} Start generate declaration files...`));
|
|
|
650
687
|
content = transformAliasImport(filePath, content, aliases, aliasesExclude);
|
|
651
688
|
content = staticImport || rollupTypes ? transformDynamicImport(content) : content;
|
|
652
689
|
}
|
|
653
|
-
filePath = resolve3(
|
|
690
|
+
filePath = resolve3(
|
|
691
|
+
outputDir,
|
|
692
|
+
relative2(entryRoot, cleanVueFileName ? filePath.replace(".vue.d.ts", ".d.ts") : filePath)
|
|
693
|
+
);
|
|
654
694
|
if (typeof beforeWriteFile === "function") {
|
|
655
695
|
const result = beforeWriteFile(filePath, content);
|
|
696
|
+
if (result === false)
|
|
697
|
+
return;
|
|
656
698
|
if (result && isNativeObj(result)) {
|
|
657
|
-
filePath =
|
|
658
|
-
content =
|
|
699
|
+
filePath = result.filePath ?? filePath;
|
|
700
|
+
content = result.content ?? content;
|
|
659
701
|
}
|
|
660
702
|
}
|
|
661
703
|
await fs.mkdir(dirname3(filePath), { recursive: true });
|
|
662
|
-
await fs.writeFile(
|
|
704
|
+
await fs.writeFile(
|
|
705
|
+
filePath,
|
|
706
|
+
cleanVueFileName ? content.replace(/['"](.+)\.vue['"]/g, '"$1"') : content,
|
|
707
|
+
"utf-8"
|
|
708
|
+
);
|
|
663
709
|
wroteFiles.add(normalizePath2(filePath));
|
|
664
710
|
});
|
|
665
711
|
bundleDebug("output");
|
|
@@ -684,15 +730,18 @@ export default ${libName}
|
|
|
684
730
|
`;
|
|
685
731
|
}
|
|
686
732
|
}
|
|
733
|
+
let result;
|
|
687
734
|
if (typeof beforeWriteFile === "function") {
|
|
688
|
-
|
|
735
|
+
result = beforeWriteFile(typesPath, content);
|
|
689
736
|
if (result && isNativeObj(result)) {
|
|
690
|
-
typesPath =
|
|
691
|
-
content =
|
|
737
|
+
typesPath = result.filePath ?? typesPath;
|
|
738
|
+
content = result.content ?? content;
|
|
692
739
|
}
|
|
693
740
|
}
|
|
694
|
-
|
|
695
|
-
|
|
741
|
+
if (result !== false) {
|
|
742
|
+
await fs.writeFile(typesPath, content, "utf-8");
|
|
743
|
+
wroteFiles.add(normalizePath2(typesPath));
|
|
744
|
+
}
|
|
696
745
|
}
|
|
697
746
|
bundleDebug("insert index");
|
|
698
747
|
if (rollupTypes) {
|
|
@@ -726,11 +775,13 @@ export default ${libName}
|
|
|
726
775
|
await runParallel(os.cpus().length, Array.from(wroteFiles), async (wroteFile) => {
|
|
727
776
|
const relativePath = relative2(outputDir, wroteFile);
|
|
728
777
|
const content = await fs.readFile(wroteFile, "utf-8");
|
|
729
|
-
await Promise.all(
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
778
|
+
await Promise.all(
|
|
779
|
+
dirs.map(async (dir) => {
|
|
780
|
+
const filePath = resolve3(dir, relativePath);
|
|
781
|
+
await fs.mkdir(dirname3(filePath), { recursive: true });
|
|
782
|
+
await fs.writeFile(filePath, content, "utf-8");
|
|
783
|
+
})
|
|
784
|
+
);
|
|
734
785
|
});
|
|
735
786
|
}
|
|
736
787
|
if (typeof afterBuild === "function") {
|
|
@@ -738,8 +789,10 @@ export default ${libName}
|
|
|
738
789
|
isPromise(result) && await result;
|
|
739
790
|
}
|
|
740
791
|
bundleDebug("finish");
|
|
741
|
-
logger.info(
|
|
742
|
-
|
|
792
|
+
logger.info(
|
|
793
|
+
chalk.green(`${logPrefix} Declaration files built in ${Date.now() - startTime}ms.
|
|
794
|
+
`)
|
|
795
|
+
);
|
|
743
796
|
}
|
|
744
797
|
};
|
|
745
798
|
}
|
package/package.json
CHANGED
|
@@ -6,51 +6,52 @@
|
|
|
6
6
|
"url": "https://github.com/qmhc/vite-plugin-dts/issues"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@microsoft/api-extractor": "^7.
|
|
10
|
-
"@rushstack/node-core-library": "^3.
|
|
9
|
+
"@microsoft/api-extractor": "^7.31.2",
|
|
10
|
+
"@rushstack/node-core-library": "^3.52.0",
|
|
11
11
|
"chalk": "^4.1.2",
|
|
12
12
|
"debug": "^4.3.4",
|
|
13
|
-
"fast-glob": "^3.2.
|
|
14
|
-
"fs-extra": "^10.0
|
|
15
|
-
"ts-morph": "^
|
|
13
|
+
"fast-glob": "^3.2.12",
|
|
14
|
+
"fs-extra": "^10.1.0",
|
|
15
|
+
"ts-morph": "^16.0.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@commitlint/cli": "^
|
|
19
|
-
"@commitlint/config-conventional": "^
|
|
18
|
+
"@commitlint/cli": "^17.1.2",
|
|
19
|
+
"@commitlint/config-conventional": "^17.1.0",
|
|
20
20
|
"@types/debug": "^4.1.7",
|
|
21
21
|
"@types/fs-extra": "^9.0.13",
|
|
22
|
-
"@types/jest": "^
|
|
23
|
-
"@
|
|
24
|
-
"@typescript-eslint/
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
27
|
-
"@vue/eslint-config-
|
|
28
|
-
"
|
|
22
|
+
"@types/jest": "^29.0.3",
|
|
23
|
+
"@types/node": "^18.7.23",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
25
|
+
"@typescript-eslint/parser": "^5.38.1",
|
|
26
|
+
"@vitejs/plugin-vue": "^3.1.0",
|
|
27
|
+
"@vue/eslint-config-standard": "^8.0.1",
|
|
28
|
+
"@vue/eslint-config-typescript": "^11.0.2",
|
|
29
|
+
"commitizen": "^4.2.5",
|
|
29
30
|
"conventional-changelog-cli": "^2.2.2",
|
|
30
31
|
"cross-env": "^7.0.3",
|
|
31
|
-
"cz-customizable": "^
|
|
32
|
+
"cz-customizable": "^7.0.0",
|
|
32
33
|
"enquirer": "^2.3.6",
|
|
33
|
-
"eslint": "^8.
|
|
34
|
-
"eslint-plugin-import": "^2.
|
|
34
|
+
"eslint": "^8.24.0",
|
|
35
|
+
"eslint-plugin-import": "^2.26.0",
|
|
35
36
|
"eslint-plugin-node": "^11.1.0",
|
|
36
|
-
"eslint-plugin-promise": "^6.0.
|
|
37
|
-
"eslint-plugin-vue": "^
|
|
37
|
+
"eslint-plugin-promise": "^6.0.1",
|
|
38
|
+
"eslint-plugin-vue": "^9.5.1",
|
|
38
39
|
"execa": "^5.1.1",
|
|
39
|
-
"husky": "^
|
|
40
|
+
"husky": "^8.0.1",
|
|
40
41
|
"is-ci": "^3.0.1",
|
|
41
|
-
"jest": "^
|
|
42
|
-
"lint-staged": "^
|
|
43
|
-
"minimist": "^1.2.
|
|
42
|
+
"jest": "^29.0.3",
|
|
43
|
+
"lint-staged": "^13.0.3",
|
|
44
|
+
"minimist": "^1.2.6",
|
|
44
45
|
"pinst": "^3.0.0",
|
|
45
|
-
"prettier": "^2.
|
|
46
|
+
"prettier": "^2.7.1",
|
|
46
47
|
"pretty-quick": "^3.1.3",
|
|
47
48
|
"rimraf": "^3.0.2",
|
|
48
|
-
"semver": "^7.3.
|
|
49
|
-
"ts-jest": "^
|
|
50
|
-
"tsup": "^
|
|
51
|
-
"typescript": "4.
|
|
52
|
-
"vite": "^
|
|
53
|
-
"vue": "3.2.
|
|
49
|
+
"semver": "^7.3.7",
|
|
50
|
+
"ts-jest": "^29.0.2",
|
|
51
|
+
"tsup": "^6.2.3",
|
|
52
|
+
"typescript": "4.7.4",
|
|
53
|
+
"vite": "^3.1.3",
|
|
54
|
+
"vue": "3.2.40"
|
|
54
55
|
},
|
|
55
56
|
"engines": {
|
|
56
57
|
"node": ">=12.0.0"
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"module": "dist/index.mjs",
|
|
71
72
|
"name": "vite-plugin-dts",
|
|
72
73
|
"peerDependencies": {
|
|
73
|
-
"vite": ">=
|
|
74
|
+
"vite": ">=3.0.0"
|
|
74
75
|
},
|
|
75
76
|
"repository": {
|
|
76
77
|
"type": "git",
|
|
@@ -85,13 +86,13 @@
|
|
|
85
86
|
"lint:example": "eslint --fix --ext .js,.jsx,.ts,.tsx,.vue example/{src,components}/**",
|
|
86
87
|
"_postinstall": "is-ci || husky install",
|
|
87
88
|
"postpublish": "pinst --enable",
|
|
88
|
-
"precommit": "lint-staged -c ./.husky/.lintstagedrc",
|
|
89
|
+
"precommit": "lint-staged -c ./.husky/.lintstagedrc -q",
|
|
89
90
|
"prepublishOnly": "pinst --disable",
|
|
90
91
|
"prettier": "pretty-quick --staged",
|
|
91
92
|
"release": "node scripts/release.js",
|
|
92
93
|
"test": "jest --runInBand",
|
|
93
|
-
"test:e2e": "
|
|
94
|
+
"test:e2e": "pnpm -C example build"
|
|
94
95
|
},
|
|
95
96
|
"types": "dist/index.d.ts",
|
|
96
|
-
"version": "1.
|
|
97
|
+
"version": "1.6.0"
|
|
97
98
|
}
|