@vue-macros/api
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -469,3 +469,3 @@ "use strict"; | ||
const body = isFile ? scope.ast : scope.ast.body; | ||
const exports2 = scope.exports; | ||
const exports3 = scope.exports; | ||
const declarations = isFile ? scope.declarations : { ...resolveTSScope(scope.scope).declarations, ...scope.declarations }; | ||
@@ -477,3 +477,3 @@ return { | ||
declarations, | ||
exports: exports2 | ||
exports: exports3 | ||
}; | ||
@@ -559,6 +559,6 @@ } | ||
return; | ||
const exports2 = { | ||
const exports3 = { | ||
[namespaceSymbol]: true | ||
}; | ||
scope.exports = exports2; | ||
scope.exports = exports3; | ||
const declarations = { | ||
@@ -572,3 +572,3 @@ [namespaceSymbol]: true, | ||
if (stmt.type === "ExportDefaultDeclaration" && isTSDeclaration(stmt.declaration)) { | ||
exports2.default = await resolveTSReferencedType({ | ||
exports3.default = await resolveTSReferencedType({ | ||
scope, | ||
@@ -583,3 +583,3 @@ type: stmt.declaration | ||
await resolveTSNamespace(sourceScope); | ||
Object.assign(exports2, sourceScope.exports); | ||
Object.assign(exports3, sourceScope.exports); | ||
} else if (stmt.type === "ExportNamedDeclaration") { | ||
@@ -609,3 +609,3 @@ let sourceExports; | ||
const name = specifier.exported.type === "Identifier" ? specifier.exported.name : specifier.exported.value; | ||
exports2[name] = exported; | ||
exports3[name] = exported; | ||
} | ||
@@ -616,3 +616,3 @@ if (isTSDeclaration(stmt.declaration)) { | ||
const exportedName = decl.id.name; | ||
declarations[exportedName] = exports2[exportedName] = await resolveTSReferencedType({ | ||
declarations[exportedName] = exports3[exportedName] = await resolveTSReferencedType({ | ||
scope, | ||
@@ -636,3 +636,3 @@ type: decl | ||
await resolveTSNamespace(importScope); | ||
const exports3 = importScope.exports; | ||
const exports4 = importScope.exports; | ||
for (const specifier of stmt.specifiers) { | ||
@@ -642,8 +642,8 @@ const local = specifier.local.name; | ||
if (specifier.type === "ImportDefaultSpecifier") { | ||
imported = exports3.default; | ||
imported = exports4.default; | ||
} else if (specifier.type === "ImportNamespaceSpecifier") { | ||
imported = exports3; | ||
imported = exports4; | ||
} else if (specifier.type === "ImportSpecifier") { | ||
const name = specifier.imported.type === "Identifier" ? specifier.imported.name : specifier.imported.value; | ||
imported = exports3[name]; | ||
imported = exports4[name]; | ||
} else { | ||
@@ -650,0 +650,0 @@ throw new Error(`Unknown import type: ${specifier.type}`); |
{ | ||
"name": "@vue-macros/api", | ||
"version": "0.9.2", | ||
"packageManager": "pnpm@8.12.0", | ||
"version": "0.9.3", | ||
"packageManager": "pnpm@8.14.1", | ||
"description": "General API for Vue Macros.", | ||
@@ -46,3 +46,3 @@ "keywords": [ | ||
"resolve.exports": "^2.0.2", | ||
"@vue-macros/common": "1.10.0" | ||
"@vue-macros/common": "1.10.1" | ||
}, | ||
@@ -49,0 +49,0 @@ "engines": { |
+ Added@vue-macros/common@1.10.1(transitive)
- Removed@vue-macros/common@1.10.0(transitive)
Updated@vue-macros/common@1.10.1