rolldown-plugin-dts 0.13.10 → 0.13.12

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
@@ -9,7 +9,10 @@ A Rolldown plugin to generate and bundle dts files.
9
9
  Requires **`rolldown@1.0.0-beta.9`** or later.
10
10
 
11
11
  ```bash
12
- npm i rolldown-plugin-dts
12
+ npm i -D rolldown-plugin-dts
13
+
14
+ npm i -D typescript # install TypeScript if isolatedDeclarations is not enabled
15
+ npm i -D @typescript/native-preview # install TypeScript Go if tsgo is enabled
13
16
  ```
14
17
 
15
18
  ## Usage
@@ -149,9 +152,9 @@ This is especially useful when you have a single `tsconfig.json` for multiple pr
149
152
 
150
153
  **[Experimental]** Enables DTS generation using [`tsgo`](https://github.com/microsoft/typescript-go).
151
154
 
152
- - To use this option, ensure that `@typescript/native-preview` is installed as a dependency.
153
- - Set to `true` to enable `tsgo` for the current project.
154
- - If a string is provided, it should be the root path of your source files.
155
+ To use this option, ensure that `@typescript/native-preview` is installed as a dependency.
156
+
157
+ `tsconfigRaw` and `isolatedDeclarations` options will be ignored when this option is enabled.
155
158
 
156
159
  > [!WARNING]
157
160
  > This option is experimental and not yet recommended for production environments.
package/dist/index.d.ts CHANGED
@@ -108,6 +108,7 @@ interface Options {
108
108
  * To use this option, make sure `@typescript/native-preview` is installed as a dependency.
109
109
  *
110
110
  * **Note:** This option is not yet recommended for production environments.
111
+ * `tsconfigRaw` and `isolatedDeclarations` options will be ignored when this option is enabled.
111
112
  */
112
113
  tsgo?: boolean;
113
114
  }
package/dist/index.js CHANGED
@@ -362,6 +362,7 @@ function createFakeJsPlugin({ dtsInput, sourcemap }) {
362
362
  const { program } = file;
363
363
  program.body = patchTsNamespace(program.body);
364
364
  program.body = program.body.map((node) => {
365
+ if (isHelperImport(node)) return null;
365
366
  if (patchImportSource(node)) return node;
366
367
  if (node.type !== "VariableDeclaration") return node;
367
368
  const [decl] = node.declarations;
@@ -502,6 +503,9 @@ function getIdFromTSEntityName(node) {
502
503
  function isReferenceId(node) {
503
504
  return !!node && (node.type === "Identifier" || node.type === "MemberExpression");
504
505
  }
506
+ function isHelperImport(node) {
507
+ return node.type === "ImportDeclaration" && node.specifiers.length === 1 && node.specifiers[0].type === "ImportSpecifier" && node.specifiers[0].imported.type === "Identifier" && node.specifiers[0].imported.name === "__export";
508
+ }
505
509
  function patchImportSource(node) {
506
510
  if (isTypeOf(node, [
507
511
  "ImportDeclaration",
@@ -788,7 +792,8 @@ async function runTsgo(root, tsconfig) {
788
792
  "--outDir",
789
793
  tsgoDist,
790
794
  "--rootDir",
791
- root
795
+ root,
796
+ "--noCheck"
792
797
  ], { stdio: "inherit" });
793
798
  return tsgoDist;
794
799
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown-plugin-dts",
3
- "version": "0.13.10",
3
+ "version": "0.13.12",
4
4
  "description": "A Rolldown plugin to bundle dts files",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -50,41 +50,41 @@
50
50
  "@babel/parser": "^7.27.5",
51
51
  "@babel/types": "^7.27.6",
52
52
  "ast-kit": "^2.1.0",
53
- "birpc": "^2.3.0",
53
+ "birpc": "^2.4.0",
54
54
  "debug": "^4.4.1",
55
55
  "dts-resolver": "^2.1.1",
56
56
  "get-tsconfig": "^4.10.1"
57
57
  },
58
58
  "devDependencies": {
59
- "@sxzz/eslint-config": "^7.0.2",
59
+ "@sxzz/eslint-config": "^7.0.4",
60
60
  "@sxzz/prettier-config": "^2.2.1",
61
61
  "@sxzz/test-utils": "^0.5.6",
62
62
  "@types/babel__generator": "^7.27.0",
63
63
  "@types/debug": "^4.1.12",
64
- "@types/node": "^24.0.0",
65
- "@typescript/native-preview": "7.0.0-dev.20250611.1",
64
+ "@types/node": "^24.0.3",
65
+ "@typescript/native-preview": "7.0.0-dev.20250622.1",
66
66
  "@volar/typescript": "^2.4.14",
67
67
  "@vue/language-core": "^2.2.10",
68
- "bumpp": "^10.1.1",
68
+ "bumpp": "^10.2.0",
69
69
  "diff": "^8.0.2",
70
- "eslint": "^9.28.0",
70
+ "eslint": "^9.29.0",
71
71
  "estree-walker": "^3.0.3",
72
72
  "prettier": "^3.5.3",
73
- "rolldown": "1.0.0-beta.14",
73
+ "rolldown": "1.0.0-beta.19",
74
74
  "rollup-plugin-dts": "^6.2.1",
75
75
  "tinyglobby": "^0.2.14",
76
- "tsdown": "^0.12.7",
77
- "tsx": "^4.20.0",
76
+ "tsdown": "^0.12.8",
77
+ "tsx": "^4.20.3",
78
78
  "typescript": "^5.8.3",
79
- "vitest": "^3.2.3",
80
- "vue": "^3.5.16",
79
+ "vitest": "^3.2.4",
80
+ "vue": "^3.5.17",
81
81
  "vue-tsc": "^2.2.10"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=20.18.0"
85
85
  },
86
86
  "resolutions": {
87
- "rolldown": "1.0.0-beta.14"
87
+ "rolldown": "1.0.0-beta.19"
88
88
  },
89
89
  "prettier": "@sxzz/prettier-config",
90
90
  "scripts": {