rolldown-plugin-dts 0.19.1 → 0.19.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/filename.d.mts +17 -1
- package/dist/filename.mjs +25 -1
- package/dist/{index-BgDOofjd.d.mts → index-DWPGYc3m.d.mts} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{tsc-Cn0kGE1h.mjs → tsc-CG1xgNuJ.mjs} +2 -3
- package/dist/tsc-context.d.mts +1 -1
- package/dist/tsc-context.mjs +1 -1
- package/dist/tsc-worker.d.mts +2 -2
- package/dist/tsc-worker.mjs +2 -2
- package/dist/tsc.d.mts +2 -2
- package/dist/tsc.mjs +2 -2
- package/package.json +7 -7
- package/dist/filename-Cqnsj8Gp.mjs +0 -27
- package/dist/filename-Dn8CLu7g.d.mts +0 -18
- /package/dist/{context-EuY-ImLj.mjs → context-9CkpILzL.mjs} +0 -0
- /package/dist/{context-Cy_-BMX4.d.mts → context-Dt8gPoCq.d.mts} +0 -0
- /package/dist/{resolver-DksQRwY1.mjs → resolver-CyVXxlZv.mjs} +0 -0
package/dist/filename.d.mts
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChunkFileNamesFunction, PreRenderedChunk } from "rolldown";
|
|
2
|
+
|
|
3
|
+
//#region src/filename.d.ts
|
|
4
|
+
declare const RE_JS: RegExp;
|
|
5
|
+
declare const RE_TS: RegExp;
|
|
6
|
+
declare const RE_DTS: RegExp;
|
|
7
|
+
declare const RE_DTS_MAP: RegExp;
|
|
8
|
+
declare const RE_NODE_MODULES: RegExp;
|
|
9
|
+
declare const RE_CSS: RegExp;
|
|
10
|
+
declare const RE_VUE: RegExp;
|
|
11
|
+
declare const RE_JSON: RegExp;
|
|
12
|
+
declare function filename_js_to_dts(id: string): string;
|
|
13
|
+
declare function filename_to_dts(id: string): string;
|
|
14
|
+
declare function filename_dts_to(id: string, ext: "js" | "ts"): string;
|
|
15
|
+
declare function resolveTemplateFn(fn: string | ChunkFileNamesFunction, chunk: PreRenderedChunk): string;
|
|
16
|
+
declare function replaceTemplateName(template: string, name: string): string;
|
|
17
|
+
//#endregion
|
|
2
18
|
export { RE_CSS, RE_DTS, RE_DTS_MAP, RE_JS, RE_JSON, RE_NODE_MODULES, RE_TS, RE_VUE, filename_dts_to, filename_js_to_dts, filename_to_dts, replaceTemplateName, resolveTemplateFn };
|
package/dist/filename.mjs
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/filename.ts
|
|
2
|
+
const RE_JS = /\.([cm]?)jsx?$/;
|
|
3
|
+
const RE_TS = /\.([cm]?)tsx?$/;
|
|
4
|
+
const RE_DTS = /\.d\.([cm]?)ts$/;
|
|
5
|
+
const RE_DTS_MAP = /\.d\.([cm]?)ts\.map$/;
|
|
6
|
+
const RE_NODE_MODULES = /[\\/]node_modules[\\/]/;
|
|
7
|
+
const RE_CSS = /\.css$/;
|
|
8
|
+
const RE_VUE = /\.vue$/;
|
|
9
|
+
const RE_JSON = /\.json$/;
|
|
10
|
+
function filename_js_to_dts(id) {
|
|
11
|
+
return id.replace(RE_JS, ".d.$1ts");
|
|
12
|
+
}
|
|
13
|
+
function filename_to_dts(id) {
|
|
14
|
+
return id.replace(RE_VUE, ".vue.ts").replace(RE_TS, ".d.$1ts").replace(RE_JS, ".d.$1ts").replace(RE_JSON, ".d.ts");
|
|
15
|
+
}
|
|
16
|
+
function filename_dts_to(id, ext) {
|
|
17
|
+
return id.replace(RE_DTS, `.$1${ext}`);
|
|
18
|
+
}
|
|
19
|
+
function resolveTemplateFn(fn, chunk) {
|
|
20
|
+
return typeof fn === "function" ? fn(chunk) : fn;
|
|
21
|
+
}
|
|
22
|
+
function replaceTemplateName(template, name) {
|
|
23
|
+
return template.replaceAll("[name]", name);
|
|
24
|
+
}
|
|
2
25
|
|
|
26
|
+
//#endregion
|
|
3
27
|
export { RE_CSS, RE_DTS, RE_DTS_MAP, RE_JS, RE_JSON, RE_NODE_MODULES, RE_TS, RE_VUE, filename_dts_to, filename_js_to_dts, filename_to_dts, replaceTemplateName, resolveTemplateFn };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RE_CSS, RE_DTS, RE_DTS_MAP, RE_JS, RE_JSON, RE_NODE_MODULES, RE_TS, RE_VUE } from "./filename.mjs";
|
|
2
2
|
import { IsolatedDeclarationsOptions } from "rolldown/experimental";
|
|
3
3
|
import { TsConfigJson } from "get-tsconfig";
|
|
4
4
|
import { Plugin } from "rolldown";
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const __cjs_require = globalThis.process.getBuiltinModule("module").createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
import { n as globalContext, r as invalidateContextFile, t as createContext } from "./context-
|
|
2
|
+
import { RE_CSS, RE_DTS, RE_DTS_MAP, RE_JS, RE_JSON, RE_NODE_MODULES, RE_TS, RE_VUE, filename_dts_to, filename_js_to_dts, filename_to_dts, replaceTemplateName, resolveTemplateFn } from "./filename.mjs";
|
|
3
|
+
import { n as globalContext, r as invalidateContextFile, t as createContext } from "./context-9CkpILzL.mjs";
|
|
4
4
|
import { createDebug } from "obug";
|
|
5
5
|
const {
|
|
6
6
|
generate
|
|
@@ -980,7 +980,7 @@ function createDtsResolvePlugin({ cwd, tsconfig, tsconfigRaw, resolve, resolver,
|
|
|
980
980
|
async function resolveDtsPath(id, importer, rolldownResolution) {
|
|
981
981
|
let dtsPath;
|
|
982
982
|
if (resolver === "tsc") {
|
|
983
|
-
const { tscResolve } = await import("./resolver-
|
|
983
|
+
const { tscResolve } = await import("./resolver-CyVXxlZv.mjs");
|
|
984
984
|
dtsPath = tscResolve(id, importer, cwd, tsconfig, tsconfigRaw);
|
|
985
985
|
} else dtsPath = baseDtsResolver(id, importer);
|
|
986
986
|
debug$1("Using %s for dts import: %O -> %O", resolver, id, dtsPath);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __cjs_require = globalThis.process.getBuiltinModule("module").createRequire(import.meta.url);
|
|
2
|
-
import { n as globalContext } from "./context-
|
|
2
|
+
import { n as globalContext } from "./context-9CkpILzL.mjs";
|
|
3
3
|
const {
|
|
4
4
|
createRequire
|
|
5
5
|
} = globalThis.process.getBuiltinModule("node:module");
|
|
@@ -253,10 +253,9 @@ function loadVueLanguageTools() {
|
|
|
253
253
|
const getLanguagePlugin = (ts$1, options) => {
|
|
254
254
|
const $rootDir = options.options.$rootDir;
|
|
255
255
|
const $configRaw = options.options.$configRaw;
|
|
256
|
-
const resolver = new vue.CompilerOptionsResolver(ts$1.sys.
|
|
256
|
+
const resolver = new vue.CompilerOptionsResolver(ts$1, ts$1.sys.readFile);
|
|
257
257
|
resolver.addConfig($configRaw?.vueCompilerOptions ?? {}, $rootDir);
|
|
258
258
|
const vueOptions = resolver.build();
|
|
259
|
-
vue.writeGlobalTypes(vueOptions, ts$1.sys.writeFile);
|
|
260
259
|
return vue.createVueLanguagePlugin(ts$1, options.options, vueOptions, (id) => id);
|
|
261
260
|
};
|
|
262
261
|
return {
|
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-Dt8gPoCq.mjs";
|
|
2
2
|
export { ParsedProject, SourceFileToProjectMap, TscContext, createContext, globalContext, invalidateContextFile };
|
package/dist/tsc-context.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as globalContext, r as invalidateContextFile, t as createContext } from "./context-
|
|
1
|
+
import { n as globalContext, r as invalidateContextFile, t as createContext } from "./context-9CkpILzL.mjs";
|
|
2
2
|
|
|
3
3
|
export { createContext, globalContext, invalidateContextFile };
|
package/dist/tsc-worker.d.mts
CHANGED
package/dist/tsc-worker.mjs
CHANGED
package/dist/tsc.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./context-
|
|
2
|
-
import { i as TscResult, n as TscModule, r as TscOptions, t as tscEmit } from "./index-
|
|
1
|
+
import "./context-Dt8gPoCq.mjs";
|
|
2
|
+
import { i as TscResult, n as TscModule, r as TscOptions, t as tscEmit } from "./index-DWPGYc3m.mjs";
|
|
3
3
|
export { TscModule, TscOptions, TscResult, tscEmit };
|
package/dist/tsc.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown-plugin-dts",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.2",
|
|
5
5
|
"description": "A Rolldown plugin to generate and bundle dts files.",
|
|
6
6
|
"author": "Kevin Deng <sxzz@sxzz.moe>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@typescript/native-preview": ">=7.0.0-dev.20250601.1",
|
|
48
48
|
"rolldown": "^1.0.0-beta.55",
|
|
49
49
|
"typescript": "^5.0.0",
|
|
50
|
-
"vue-tsc": "~3.
|
|
50
|
+
"vue-tsc": "~3.2.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
53
|
"@ts-macro/tsc": {
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"@sxzz/test-utils": "^0.5.15",
|
|
80
80
|
"@types/babel__generator": "^7.27.0",
|
|
81
81
|
"@types/node": "^25.0.3",
|
|
82
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
82
|
+
"@typescript/native-preview": "7.0.0-dev.20251221.1",
|
|
83
83
|
"@volar/typescript": "^2.4.27",
|
|
84
|
-
"@vue/language-core": "^3.
|
|
84
|
+
"@vue/language-core": "^3.2.0",
|
|
85
85
|
"arktype": "^2.1.29",
|
|
86
86
|
"bumpp": "^10.3.2",
|
|
87
87
|
"diff": "^8.0.2",
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
"rolldown-plugin-require-cjs": "^0.3.3",
|
|
92
92
|
"rollup-plugin-dts": "^6.3.0",
|
|
93
93
|
"tinyglobby": "^0.2.15",
|
|
94
|
-
"tsdown": "^0.18.
|
|
94
|
+
"tsdown": "^0.18.2",
|
|
95
95
|
"typescript": "^5.9.3",
|
|
96
96
|
"vitest": "^4.0.16",
|
|
97
|
-
"vue": "^3.5.
|
|
98
|
-
"vue-tsc": "^3.
|
|
97
|
+
"vue": "^3.5.26",
|
|
98
|
+
"vue-tsc": "^3.2.0"
|
|
99
99
|
},
|
|
100
100
|
"prettier": "@sxzz/prettier-config",
|
|
101
101
|
"scripts": {
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
//#region src/filename.ts
|
|
2
|
-
const RE_JS = /\.([cm]?)jsx?$/;
|
|
3
|
-
const RE_TS = /\.([cm]?)tsx?$/;
|
|
4
|
-
const RE_DTS = /\.d\.([cm]?)ts$/;
|
|
5
|
-
const RE_DTS_MAP = /\.d\.([cm]?)ts\.map$/;
|
|
6
|
-
const RE_NODE_MODULES = /[\\/]node_modules[\\/]/;
|
|
7
|
-
const RE_CSS = /\.css$/;
|
|
8
|
-
const RE_VUE = /\.vue$/;
|
|
9
|
-
const RE_JSON = /\.json$/;
|
|
10
|
-
function filename_js_to_dts(id) {
|
|
11
|
-
return id.replace(RE_JS, ".d.$1ts");
|
|
12
|
-
}
|
|
13
|
-
function filename_to_dts(id) {
|
|
14
|
-
return id.replace(RE_VUE, ".vue.ts").replace(RE_TS, ".d.$1ts").replace(RE_JS, ".d.$1ts").replace(RE_JSON, ".d.ts");
|
|
15
|
-
}
|
|
16
|
-
function filename_dts_to(id, ext) {
|
|
17
|
-
return id.replace(RE_DTS, `.$1${ext}`);
|
|
18
|
-
}
|
|
19
|
-
function resolveTemplateFn(fn, chunk) {
|
|
20
|
-
return typeof fn === "function" ? fn(chunk) : fn;
|
|
21
|
-
}
|
|
22
|
-
function replaceTemplateName(template, name) {
|
|
23
|
-
return template.replaceAll("[name]", name);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
export { RE_JSON as a, RE_VUE as c, filename_to_dts as d, replaceTemplateName as f, RE_JS as i, filename_dts_to as l, RE_DTS as n, RE_NODE_MODULES as o, resolveTemplateFn as p, RE_DTS_MAP as r, RE_TS as s, RE_CSS as t, filename_js_to_dts as u };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ChunkFileNamesFunction, PreRenderedChunk } from "rolldown";
|
|
2
|
-
|
|
3
|
-
//#region src/filename.d.ts
|
|
4
|
-
declare const RE_JS: RegExp;
|
|
5
|
-
declare const RE_TS: RegExp;
|
|
6
|
-
declare const RE_DTS: RegExp;
|
|
7
|
-
declare const RE_DTS_MAP: RegExp;
|
|
8
|
-
declare const RE_NODE_MODULES: RegExp;
|
|
9
|
-
declare const RE_CSS: RegExp;
|
|
10
|
-
declare const RE_VUE: RegExp;
|
|
11
|
-
declare const RE_JSON: RegExp;
|
|
12
|
-
declare function filename_js_to_dts(id: string): string;
|
|
13
|
-
declare function filename_to_dts(id: string): string;
|
|
14
|
-
declare function filename_dts_to(id: string, ext: "js" | "ts"): string;
|
|
15
|
-
declare function resolveTemplateFn(fn: string | ChunkFileNamesFunction, chunk: PreRenderedChunk): string;
|
|
16
|
-
declare function replaceTemplateName(template: string, name: string): string;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { RE_JSON as a, RE_VUE as c, filename_to_dts as d, replaceTemplateName as f, RE_JS as i, filename_dts_to as l, RE_DTS as n, RE_NODE_MODULES as o, resolveTemplateFn as p, RE_DTS_MAP as r, RE_TS as s, RE_CSS as t, filename_js_to_dts as u };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|