rolldown-plugin-dts 0.13.2 → 0.13.4
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 +1 -1
- package/dist/index.d.ts +14 -2
- package/dist/index.js +2 -2
- package/dist/tsc-BKvojRml.js +3 -0
- package/dist/{tsc-X8bZ3_Mk.js → tsc-yr4fe8f_.js} +9 -17
- package/dist/utils/tsc-worker.js +1 -1
- package/package.json +11 -12
- package/dist/tsc-DdDznNNO.js +0 -3
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,16 @@ declare function createGeneratePlugin({
|
|
|
20
20
|
eager
|
|
21
21
|
}: Pick<OptionsResolved, "tsconfigRaw" | "tsconfigDir" | "isolatedDeclarations" | "emitDtsOnly" | "vue" | "parallel" | "eager">): Plugin;
|
|
22
22
|
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/utils/filename.d.ts
|
|
25
|
+
declare const RE_JS: RegExp;
|
|
26
|
+
declare const RE_TS: RegExp;
|
|
27
|
+
declare const RE_DTS: RegExp;
|
|
28
|
+
declare const RE_DTS_MAP: RegExp;
|
|
29
|
+
declare const RE_NODE_MODULES: RegExp;
|
|
30
|
+
declare const RE_CSS: RegExp;
|
|
31
|
+
declare const RE_VUE: RegExp;
|
|
32
|
+
|
|
23
33
|
//#endregion
|
|
24
34
|
//#region src/index.d.ts
|
|
25
35
|
interface Options {
|
|
@@ -112,5 +122,7 @@ declare function resolveOptions({
|
|
|
112
122
|
vue,
|
|
113
123
|
parallel,
|
|
114
124
|
eager
|
|
115
|
-
}: Options): OptionsResolved;
|
|
116
|
-
|
|
125
|
+
}: Options): OptionsResolved;
|
|
126
|
+
|
|
127
|
+
//#endregion
|
|
128
|
+
export { Options, OptionsResolved, RE_CSS, RE_DTS, RE_DTS_MAP, RE_JS, RE_NODE_MODULES, RE_TS, RE_VUE, createFakeJsPlugin, createGeneratePlugin, dts, resolveOptions };
|
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-BKvojRml.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);
|
|
@@ -873,4 +873,4 @@ function resolveOptions({ cwd = process.cwd(), tsconfig, compilerOptions = {}, t
|
|
|
873
873
|
}
|
|
874
874
|
|
|
875
875
|
//#endregion
|
|
876
|
-
export { createFakeJsPlugin, createGeneratePlugin, dts, resolveOptions };
|
|
876
|
+
export { RE_CSS, RE_DTS, RE_DTS_MAP, RE_JS, RE_NODE_MODULES, RE_TS, RE_VUE, createFakeJsPlugin, createGeneratePlugin, dts, resolveOptions };
|
|
@@ -101,23 +101,15 @@ function tscEmit(tscOptions) {
|
|
|
101
101
|
const { program, file } = module;
|
|
102
102
|
let dtsCode;
|
|
103
103
|
let map;
|
|
104
|
-
const { emitSkipped, diagnostics } = program.emit(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
void 0,
|
|
116
|
-
true,
|
|
117
|
-
void 0,
|
|
118
|
-
// @ts-expect-error private API: forceDtsEmit
|
|
119
|
-
true
|
|
120
|
-
);
|
|
104
|
+
const { emitSkipped, diagnostics } = program.emit(file, (fileName, code) => {
|
|
105
|
+
if (fileName.endsWith(".map")) {
|
|
106
|
+
debug(`emit dts sourcemap: ${fileName}`);
|
|
107
|
+
map = JSON.parse(code);
|
|
108
|
+
} else {
|
|
109
|
+
debug(`emit dts: ${fileName}`);
|
|
110
|
+
dtsCode = code;
|
|
111
|
+
}
|
|
112
|
+
}, void 0, true, void 0, true);
|
|
121
113
|
if (emitSkipped && diagnostics.length) return { error: ts.formatDiagnostics(diagnostics, formatHost) };
|
|
122
114
|
return {
|
|
123
115
|
code: dtsCode,
|
package/dist/utils/tsc-worker.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown-plugin-dts",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.4",
|
|
4
4
|
"description": "A Rolldown plugin to bundle dts files",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"rolldown": "^1.0.0-beta.
|
|
31
|
+
"rolldown": "^1.0.0-beta.9",
|
|
32
32
|
"typescript": "^5.0.0",
|
|
33
33
|
"vue-tsc": "~2.2.0"
|
|
34
34
|
},
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"birpc": "^2.3.0",
|
|
49
49
|
"debug": "^4.4.1",
|
|
50
50
|
"dts-resolver": "^2.0.1",
|
|
51
|
-
"get-tsconfig": "^4.10.
|
|
51
|
+
"get-tsconfig": "^4.10.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@sxzz/eslint-config": "^7.0.1",
|
|
@@ -56,29 +56,28 @@
|
|
|
56
56
|
"@sxzz/test-utils": "^0.5.6",
|
|
57
57
|
"@types/babel__generator": "^7.27.0",
|
|
58
58
|
"@types/debug": "^4.1.12",
|
|
59
|
-
"@types/node": "^22.15.
|
|
60
|
-
"@volar/typescript": "^2.4.
|
|
59
|
+
"@types/node": "^22.15.21",
|
|
60
|
+
"@volar/typescript": "^2.4.14",
|
|
61
61
|
"@vue/language-core": "^2.2.10",
|
|
62
|
-
"bumpp": "^10.1.
|
|
62
|
+
"bumpp": "^10.1.1",
|
|
63
63
|
"diff": "^8.0.1",
|
|
64
|
-
"eslint": "^9.
|
|
64
|
+
"eslint": "^9.27.0",
|
|
65
65
|
"estree-walker": "^3.0.3",
|
|
66
66
|
"prettier": "^3.5.3",
|
|
67
|
-
"rolldown": "
|
|
67
|
+
"rolldown": "1.0.0-beta.9",
|
|
68
68
|
"rollup-plugin-dts": "^6.2.1",
|
|
69
69
|
"tinyglobby": "^0.2.13",
|
|
70
|
-
"tsdown": "^0.11.
|
|
70
|
+
"tsdown": "^0.11.12",
|
|
71
71
|
"tsx": "^4.19.4",
|
|
72
72
|
"typescript": "^5.8.3",
|
|
73
|
-
"vitest": "^3.1.
|
|
74
|
-
"vue": "^3.5.
|
|
73
|
+
"vitest": "^3.1.4",
|
|
74
|
+
"vue": "^3.5.14",
|
|
75
75
|
"vue-tsc": "^2.2.10"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": ">=20.18.0"
|
|
79
79
|
},
|
|
80
80
|
"resolutions": {
|
|
81
|
-
"rolldown": "canary",
|
|
82
81
|
"rolldown-plugin-dts": "workspace:*"
|
|
83
82
|
},
|
|
84
83
|
"prettier": "@sxzz/prettier-config",
|
package/dist/tsc-DdDznNNO.js
DELETED