rolldown-plugin-dts 0.13.3 → 0.13.5

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.d.ts CHANGED
@@ -7,7 +7,6 @@ declare function createFakeJsPlugin({
7
7
  dtsInput,
8
8
  sourcemap
9
9
  }: Pick<OptionsResolved, "dtsInput" | "sourcemap">): Plugin;
10
-
11
10
  //#endregion
12
11
  //#region src/generate.d.ts
13
12
  declare function createGeneratePlugin({
@@ -19,7 +18,15 @@ declare function createGeneratePlugin({
19
18
  parallel,
20
19
  eager
21
20
  }: Pick<OptionsResolved, "tsconfigRaw" | "tsconfigDir" | "isolatedDeclarations" | "emitDtsOnly" | "vue" | "parallel" | "eager">): Plugin;
22
-
21
+ //#endregion
22
+ //#region src/utils/filename.d.ts
23
+ declare const RE_JS: RegExp;
24
+ declare const RE_TS: RegExp;
25
+ declare const RE_DTS: RegExp;
26
+ declare const RE_DTS_MAP: RegExp;
27
+ declare const RE_NODE_MODULES: RegExp;
28
+ declare const RE_CSS: RegExp;
29
+ declare const RE_VUE: RegExp;
23
30
  //#endregion
24
31
  //#region src/index.d.ts
25
32
  interface Options {
@@ -112,5 +119,6 @@ declare function resolveOptions({
112
119
  vue,
113
120
  parallel,
114
121
  eager
115
- }: Options): OptionsResolved; //#endregion
116
- export { Options, OptionsResolved, createFakeJsPlugin, createGeneratePlugin, dts, resolveOptions };
122
+ }: Options): OptionsResolved;
123
+ //#endregion
124
+ 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
@@ -365,7 +365,7 @@ function createFakeJsPlugin({ dtsInput, sourcemap }) {
365
365
  ...appendStmts
366
366
  ];
367
367
  const result = generate(file, {
368
- comments: true,
368
+ comments: false,
369
369
  sourceMaps: sourcemap,
370
370
  sourceFileName: id
371
371
  });
@@ -616,17 +616,10 @@ function overwriteNode(node, newNode) {
616
616
  }
617
617
  function inheritNodeComments(oldNode, newNode) {
618
618
  newNode.leadingComments ||= [];
619
- newNode.trailingComments ||= [];
620
- const leadingComments = filterHashtag(oldNode.leadingComments);
619
+ const leadingComments = oldNode.leadingComments?.filter((comment) => comment.value.startsWith("#"));
621
620
  if (leadingComments) newNode.leadingComments.unshift(...leadingComments);
622
- const trailingComments = filterHashtag(oldNode.trailingComments);
623
- if (trailingComments) newNode.trailingComments.unshift(...trailingComments);
624
621
  newNode.leadingComments = collectReferenceDirectives(newNode.leadingComments, true);
625
- newNode.trailingComments = collectReferenceDirectives(newNode.trailingComments || [], true);
626
622
  return newNode;
627
- function filterHashtag(comments) {
628
- return comments?.filter((comment) => comment.value.startsWith("#"));
629
- }
630
623
  }
631
624
 
632
625
  //#endregion
@@ -873,4 +866,4 @@ function resolveOptions({ cwd = process.cwd(), tsconfig, compilerOptions = {}, t
873
866
  }
874
867
 
875
868
  //#endregion
876
- export { createFakeJsPlugin, createGeneratePlugin, dts, resolveOptions };
869
+ export { RE_CSS, RE_DTS, RE_DTS_MAP, RE_JS, RE_NODE_MODULES, RE_TS, RE_VUE, createFakeJsPlugin, createGeneratePlugin, dts, resolveOptions };
@@ -15,12 +15,12 @@ interface TscResult {
15
15
  map?: any;
16
16
  error?: string;
17
17
  }
18
- declare function tscEmit(tscOptions: TscOptions): TscResult; //#endregion
18
+ declare function tscEmit(tscOptions: TscOptions): TscResult;
19
+ //#endregion
19
20
  //#region src/utils/tsc-worker.d.ts
20
21
  declare const functions: {
21
22
  tscEmit: typeof tscEmit;
22
23
  };
23
24
  type TscFunctions = typeof functions;
24
-
25
25
  //#endregion
26
26
  export { TscFunctions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown-plugin-dts",
3
- "version": "0.13.3",
3
+ "version": "0.13.5",
4
4
  "description": "A Rolldown plugin to bundle dts files",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -41,14 +41,14 @@
41
41
  }
42
42
  },
43
43
  "dependencies": {
44
- "@babel/generator": "^7.27.1",
45
- "@babel/parser": "^7.27.2",
46
- "@babel/types": "^7.27.1",
44
+ "@babel/generator": "^7.27.3",
45
+ "@babel/parser": "^7.27.3",
46
+ "@babel/types": "^7.27.3",
47
47
  "ast-kit": "^2.0.0",
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,30 +56,27 @@
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.19",
59
+ "@types/node": "^22.15.21",
60
60
  "@volar/typescript": "^2.4.14",
61
61
  "@vue/language-core": "^2.2.10",
62
62
  "bumpp": "^10.1.1",
63
- "diff": "^8.0.1",
63
+ "diff": "^8.0.2",
64
64
  "eslint": "^9.27.0",
65
65
  "estree-walker": "^3.0.3",
66
66
  "prettier": "^3.5.3",
67
67
  "rolldown": "1.0.0-beta.9",
68
68
  "rollup-plugin-dts": "^6.2.1",
69
- "tinyglobby": "^0.2.13",
70
- "tsdown": "^0.11.12",
69
+ "tinyglobby": "^0.2.14",
70
+ "tsdown": "^0.12.3",
71
71
  "tsx": "^4.19.4",
72
72
  "typescript": "^5.8.3",
73
- "vitest": "^3.1.3",
74
- "vue": "^3.5.14",
73
+ "vitest": "^3.1.4",
74
+ "vue": "^3.5.15",
75
75
  "vue-tsc": "^2.2.10"
76
76
  },
77
77
  "engines": {
78
78
  "node": ">=20.18.0"
79
79
  },
80
- "resolutions": {
81
- "rolldown-plugin-dts": "workspace:*"
82
- },
83
80
  "prettier": "@sxzz/prettier-config",
84
81
  "scripts": {
85
82
  "lint": "eslint --cache .",