rolldown-plugin-dts 0.26.0 → 0.27.0-beta.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/{context-_3g_7Eca.d.mts → context-CcXGRVeM.d.mts} +0 -1
- package/dist/{index-DFO9SbW-.d.mts → index-Pfhuikcq.d.mts} +1 -2
- package/dist/index.d.mts +149 -193
- package/dist/index.mjs +173 -301
- package/dist/internal.d.mts +0 -1
- package/dist/{tsc-DBLgyoBn.mjs → tsc-CgJ-ct_1.mjs} +12 -4
- package/dist/tsc-context.d.mts +1 -1
- package/dist/tsc-worker.d.mts +1 -2
- package/dist/tsc-worker.mjs +1 -1
- package/dist/tsc.d.mts +1 -1
- package/dist/tsc.mjs +1 -1
- package/package.json +17 -19
package/dist/internal.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ import path from "node:path";
|
|
|
8
8
|
const ts = __cjs_require("typescript");
|
|
9
9
|
import { pathToFileURL } from "node:url";
|
|
10
10
|
//#region \0rolldown/runtime.js
|
|
11
|
-
var __require = /*
|
|
11
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/tsc/system.ts
|
|
14
14
|
const debug$4 = createDebug("rolldown-plugin-dts:tsc-system");
|
|
@@ -67,9 +67,16 @@ const formatHost = {
|
|
|
67
67
|
getCanonicalFileName: ts.sys.useCaseSensitiveFileNames ? (f) => f : (f) => f.toLowerCase()
|
|
68
68
|
};
|
|
69
69
|
const stripPrivateFields = (ctx) => {
|
|
70
|
+
const recurseCtx = {
|
|
71
|
+
...ctx,
|
|
72
|
+
startLexicalEnvironment: () => {},
|
|
73
|
+
suspendLexicalEnvironment: () => {},
|
|
74
|
+
resumeLexicalEnvironment: () => {},
|
|
75
|
+
endLexicalEnvironment: () => void 0
|
|
76
|
+
};
|
|
70
77
|
const visitor = (node) => {
|
|
71
78
|
if (ts.isPropertySignature(node) && ts.isPrivateIdentifier(node.name)) return ctx.factory.updatePropertySignature(node, node.modifiers, ctx.factory.createStringLiteral(node.name.text), node.questionToken, node.type);
|
|
72
|
-
return ts.visitEachChild(node, visitor,
|
|
79
|
+
return ts.visitEachChild(node, visitor, recurseCtx);
|
|
73
80
|
};
|
|
74
81
|
return (sourceFile) => ts.visitNode(sourceFile, visitor, ts.isSourceFile) ?? sourceFile;
|
|
75
82
|
};
|
|
@@ -154,13 +161,14 @@ function buildProjects(fsSystem, tsconfig, force, sourcemap) {
|
|
|
154
161
|
const projects = collectProjectGraph(tsconfig, fsSystem, force, sourcemap);
|
|
155
162
|
debug$3("collected %d projects: %j", projects.length, projects.map((project) => project.tsconfigPath));
|
|
156
163
|
const host = ts.createSolutionBuilderHost(fsSystem, createProgramWithPatchedCompilerOptions);
|
|
157
|
-
|
|
164
|
+
const exitStatus = ts.createSolutionBuilder(host, [tsconfig], {
|
|
158
165
|
force,
|
|
159
166
|
verbose: true
|
|
160
167
|
}).build(void 0, void 0, void 0, (project) => {
|
|
161
168
|
debug$3(`transforming project ${project}`);
|
|
162
169
|
return customTransformers;
|
|
163
|
-
})
|
|
170
|
+
});
|
|
171
|
+
debug$3(`built solution for ${tsconfig} with exit status ${exitStatus}`);
|
|
164
172
|
const sourceFileToProjectMap = /* @__PURE__ */ new Map();
|
|
165
173
|
for (const project of projects) for (const fileName of project.parsedConfig.fileNames) sourceFileToProjectMap.set(fsSystem.resolvePath(fileName), project);
|
|
166
174
|
return sourceFileToProjectMap;
|
package/dist/tsc-context.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as globalContext, i as createContext, n as SourceFileToProjectMap, o as invalidateContextFile, r as TscContext, t as ParsedProject } from "./context-
|
|
1
|
+
import { a as globalContext, i as createContext, n as SourceFileToProjectMap, o as invalidateContextFile, r as TscContext, t as ParsedProject } from "./context-CcXGRVeM.mjs";
|
|
2
2
|
export { ParsedProject, SourceFileToProjectMap, TscContext, createContext, globalContext, invalidateContextFile };
|
package/dist/tsc-worker.d.mts
CHANGED
package/dist/tsc-worker.mjs
CHANGED
package/dist/tsc.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as TscResult, n as TscModule, r as TscOptions, t as tscEmit } from "./index-
|
|
1
|
+
import { i as TscResult, n as TscModule, r as TscOptions, t as tscEmit } from "./index-Pfhuikcq.mjs";
|
|
2
2
|
export { type TscModule, type TscOptions, type TscResult, tscEmit };
|
package/dist/tsc.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as tscEmit } from "./tsc-
|
|
1
|
+
import { t as tscEmit } from "./tsc-CgJ-ct_1.mjs";
|
|
2
2
|
export { tscEmit };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown-plugin-dts",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.27.0-beta.1",
|
|
5
5
|
"description": "A Rolldown plugin to generate and bundle dts files.",
|
|
6
6
|
"author": "Kevin Deng <sxzz@sxzz.moe>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -62,39 +62,37 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@babel/generator": "^8.0.0",
|
|
66
|
-
"@babel/helper-validator-identifier": "^8.0.0",
|
|
67
|
-
"@babel/parser": "^8.0.0",
|
|
68
|
-
"ast-kit": "^3.0.0",
|
|
69
65
|
"birpc": "^4.0.0",
|
|
70
66
|
"dts-resolver": "^3.0.0",
|
|
71
67
|
"get-tsconfig": "5.0.0-beta.5",
|
|
72
|
-
"obug": "^2.1.3"
|
|
68
|
+
"obug": "^2.1.3",
|
|
69
|
+
"yuku-ast": "^0.1.5",
|
|
70
|
+
"yuku-codegen": "^0.5.43",
|
|
71
|
+
"yuku-parser": "^0.5.43"
|
|
73
72
|
},
|
|
74
73
|
"devDependencies": {
|
|
75
|
-
"@babel/types": "^8.0.0",
|
|
76
74
|
"@jridgewell/source-map": "^0.3.11",
|
|
77
|
-
"@sxzz/eslint-config": "^8.2.
|
|
75
|
+
"@sxzz/eslint-config": "^8.2.1",
|
|
78
76
|
"@sxzz/prettier-config": "^2.3.1",
|
|
79
77
|
"@sxzz/test-utils": "^0.5.18",
|
|
80
|
-
"@types/node": "^
|
|
81
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
78
|
+
"@types/node": "^26.1.0",
|
|
79
|
+
"@typescript/native-preview": "7.0.0-dev.20260704.1",
|
|
82
80
|
"@volar/typescript": "^2.4.28",
|
|
83
|
-
"@vue/language-core": "^3.3.
|
|
84
|
-
"arktype": "^2.2.
|
|
81
|
+
"@vue/language-core": "^3.3.6",
|
|
82
|
+
"arktype": "^2.2.2",
|
|
85
83
|
"bumpp": "^11.1.0",
|
|
86
84
|
"diff": "^9.0.0",
|
|
87
|
-
"eslint": "^10.
|
|
88
|
-
"prettier": "^3.
|
|
89
|
-
"rolldown": "^1.1.
|
|
85
|
+
"eslint": "^10.6.0",
|
|
86
|
+
"prettier": "^3.9.4",
|
|
87
|
+
"rolldown": "^1.1.4",
|
|
90
88
|
"rolldown-plugin-require-cjs": "^0.4.1",
|
|
91
89
|
"rollup-plugin-dts": "^6.4.1",
|
|
92
|
-
"tsdown": "^0.22.
|
|
93
|
-
"tsnapi": "^0.
|
|
90
|
+
"tsdown": "^0.22.3",
|
|
91
|
+
"tsnapi": "^1.0.0",
|
|
94
92
|
"typescript": "^6.0.3",
|
|
95
93
|
"vitest": "^4.1.9",
|
|
96
|
-
"vue": "^3.5.
|
|
97
|
-
"vue-tsc": "^3.3.
|
|
94
|
+
"vue": "^3.5.39",
|
|
95
|
+
"vue-tsc": "^3.3.6",
|
|
98
96
|
"zod": "^4.4.3"
|
|
99
97
|
},
|
|
100
98
|
"prettier": "@sxzz/prettier-config",
|