rolldown-plugin-dts 0.16.2 → 0.16.3
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.js +3 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -385,7 +385,7 @@ function createFakeJsPlugin({ sourcemap, cjsDefault }) {
|
|
|
385
385
|
if (isHelperImport(node)) return null;
|
|
386
386
|
if (node.type === "ExpressionStatement") return null;
|
|
387
387
|
const newNode = patchImportExport(node, typeOnlyIds, cjsDefault);
|
|
388
|
-
if (newNode) return newNode;
|
|
388
|
+
if (newNode || newNode === false) return newNode;
|
|
389
389
|
if (node.type !== "VariableDeclaration") return node;
|
|
390
390
|
const [decl] = node.declarations;
|
|
391
391
|
if (decl.init?.type !== "ArrayExpression" || !decl.init.elements[0]) return null;
|
|
@@ -528,12 +528,13 @@ function isHelperImport(node) {
|
|
|
528
528
|
return node.type === "ImportDeclaration" && node.specifiers.length === 1 && node.specifiers.every((spec) => spec.type === "ImportSpecifier" && spec.imported.type === "Identifier" && ["__export", "__reExport"].includes(spec.imported.name));
|
|
529
529
|
}
|
|
530
530
|
function patchImportExport(node, typeOnlyIds, cjsDefault) {
|
|
531
|
+
if (node.type === "ExportNamedDeclaration" && !node.declaration && !node.source && !node.specifiers.length && !node.attributes?.length) return false;
|
|
531
532
|
if (isTypeOf(node, [
|
|
532
533
|
"ImportDeclaration",
|
|
533
534
|
"ExportAllDeclaration",
|
|
534
535
|
"ExportNamedDeclaration"
|
|
535
536
|
])) {
|
|
536
|
-
if (
|
|
537
|
+
if (node.type === "ExportNamedDeclaration" && typeOnlyIds.length) for (const spec of node.specifiers) {
|
|
537
538
|
const name = resolveString(spec.exported);
|
|
538
539
|
if (typeOnlyIds.includes(name)) if (spec.type === "ExportSpecifier") spec.exportKind = "type";
|
|
539
540
|
else node.exportKind = "type";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown-plugin-dts",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.3",
|
|
4
4
|
"description": "A Rolldown plugin to generate and bundle dts files.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@types/babel__generator": "^7.27.0",
|
|
74
74
|
"@types/debug": "^4.1.12",
|
|
75
75
|
"@types/node": "^24.3.1",
|
|
76
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
76
|
+
"@typescript/native-preview": "7.0.0-dev.20250911.1",
|
|
77
77
|
"@volar/typescript": "^2.4.23",
|
|
78
78
|
"@vue/language-core": "^3.0.6",
|
|
79
79
|
"bumpp": "^10.2.3",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"eslint": "^9.35.0",
|
|
82
82
|
"estree-walker": "^3.0.3",
|
|
83
83
|
"prettier": "^3.6.2",
|
|
84
|
-
"rolldown": "^1.0.0-beta.
|
|
84
|
+
"rolldown": "^1.0.0-beta.37",
|
|
85
85
|
"rollup-plugin-dts": "^6.2.3",
|
|
86
86
|
"tinyglobby": "^0.2.15",
|
|
87
87
|
"tsdown": "^0.15.0",
|