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 CHANGED
@@ -6,7 +6,7 @@ A Rolldown plugin to generate and bundle dts files.
6
6
 
7
7
  ## Install
8
8
 
9
- ⚠️ Requires `rolldown@1.0.0-beta.8-commit.2a5c6a6` (which is canary) or later.
9
+ ⚠️ Requires `rolldown@1.0.0-beta.9` or later.
10
10
 
11
11
  ```bash
12
12
  npm i rolldown-plugin-dts
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; //#endregion
116
- export { Options, OptionsResolved, createFakeJsPlugin, createGeneratePlugin, dts, resolveOptions };
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-DdDznNNO.js"));
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 };
@@ -0,0 +1,3 @@
1
+ import { tscEmit } from "./tsc-yr4fe8f_.js";
2
+
3
+ export { tscEmit };
@@ -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
- file,
106
- (fileName, code) => {
107
- if (fileName.endsWith(".map")) {
108
- debug(`emit dts sourcemap: ${fileName}`);
109
- map = JSON.parse(code);
110
- } else {
111
- debug(`emit dts: ${fileName}`);
112
- dtsCode = code;
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,
@@ -1,4 +1,4 @@
1
- import { tscEmit } from "../tsc-X8bZ3_Mk.js";
1
+ import { tscEmit } from "../tsc-yr4fe8f_.js";
2
2
  import process from "node:process";
3
3
  import { createBirpc } from "birpc";
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown-plugin-dts",
3
- "version": "0.13.2",
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.8-commit.2a5c6a6",
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.0"
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.17",
60
- "@volar/typescript": "^2.4.13",
59
+ "@types/node": "^22.15.21",
60
+ "@volar/typescript": "^2.4.14",
61
61
  "@vue/language-core": "^2.2.10",
62
- "bumpp": "^10.1.0",
62
+ "bumpp": "^10.1.1",
63
63
  "diff": "^8.0.1",
64
- "eslint": "^9.26.0",
64
+ "eslint": "^9.27.0",
65
65
  "estree-walker": "^3.0.3",
66
66
  "prettier": "^3.5.3",
67
- "rolldown": "canary",
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.9",
70
+ "tsdown": "^0.11.12",
71
71
  "tsx": "^4.19.4",
72
72
  "typescript": "^5.8.3",
73
- "vitest": "^3.1.3",
74
- "vue": "^3.5.13",
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",
@@ -1,3 +0,0 @@
1
- import { tscEmit } from "./tsc-X8bZ3_Mk.js";
2
-
3
- export { tscEmit };