rolldown-plugin-dts 0.13.0 → 0.13.1
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.js
CHANGED
|
@@ -658,7 +658,7 @@ function createGeneratePlugin({ tsconfigRaw, tsconfigDir, isolatedDeclarations,
|
|
|
658
658
|
return {
|
|
659
659
|
name: "rolldown-plugin-dts:generate",
|
|
660
660
|
async buildStart(options) {
|
|
661
|
-
if (!parallel && (!isolatedDeclarations || vue)) ({tscEmit} = await import("./tsc-
|
|
661
|
+
if (!parallel && (!isolatedDeclarations || vue)) ({tscEmit} = await import("./tsc-JgclC8th.js"));
|
|
662
662
|
if (!Array.isArray(options.input)) for (const [name, id] of Object.entries(options.input)) {
|
|
663
663
|
debug$1("resolving input alias %s -> %s", name, id);
|
|
664
664
|
let resolved = await this.resolve(id);
|
|
@@ -718,7 +718,7 @@ function createGeneratePlugin({ tsconfigRaw, tsconfigDir, isolatedDeclarations,
|
|
|
718
718
|
} },
|
|
719
719
|
async handler(dtsId) {
|
|
720
720
|
if (!dtsMap.has(dtsId)) return;
|
|
721
|
-
const { code, id
|
|
721
|
+
const { code, id } = dtsMap.get(dtsId);
|
|
722
722
|
let dtsCode;
|
|
723
723
|
let map;
|
|
724
724
|
debug$1("generate dts %s from %s", dtsId, id);
|
|
@@ -743,7 +743,6 @@ function createGeneratePlugin({ tsconfigRaw, tsconfigDir, isolatedDeclarations,
|
|
|
743
743
|
tsconfigDir,
|
|
744
744
|
entries,
|
|
745
745
|
id,
|
|
746
|
-
isEntry,
|
|
747
746
|
vue
|
|
748
747
|
};
|
|
749
748
|
let result;
|
|
@@ -55,10 +55,11 @@ const defaultCompilerOptions = {
|
|
|
55
55
|
moduleResolution: ts.ModuleResolutionKind.Bundler
|
|
56
56
|
};
|
|
57
57
|
function createOrGetTsModule(options) {
|
|
58
|
-
const { id,
|
|
58
|
+
const { id, entries } = options;
|
|
59
59
|
const program = programs.find((program$1) => {
|
|
60
|
-
|
|
61
|
-
return
|
|
60
|
+
const roots = program$1.getRootFileNames();
|
|
61
|
+
if (entries) return entries.every((entry) => roots.includes(entry));
|
|
62
|
+
return roots.includes(id);
|
|
62
63
|
});
|
|
63
64
|
if (program) {
|
|
64
65
|
const sourceFile = program.getSourceFile(id);
|
|
@@ -79,7 +80,7 @@ function createTsProgram({ entries, id, tsconfigRaw, tsconfigDir, vue }) {
|
|
|
79
80
|
...defaultCompilerOptions,
|
|
80
81
|
...parsedCmd.options
|
|
81
82
|
};
|
|
82
|
-
const rootNames =
|
|
83
|
+
const rootNames = [...new Set([id, ...entries || parsedCmd.fileNames])];
|
|
83
84
|
const host = ts.createCompilerHost(compilerOptions, true);
|
|
84
85
|
const createProgram = vue ? createVueProgramFactory(ts) : ts.createProgram;
|
|
85
86
|
const program = createProgram({
|
package/dist/utils/tsc-worker.js
CHANGED
package/package.json
CHANGED
package/dist/tsc-CeRgkVKp.js
DELETED