@volar/vue-code-gen
Advanced tools
Comparing version 0.31.0 to 0.31.1
@@ -7,2 +7,3 @@ import type * as ts from 'typescript/lib/tsserverlibrary'; | ||
importSectionEndOffset: number; | ||
notOnTopTypeExports: TextRange[]; | ||
bindings: TextRange[]; | ||
@@ -9,0 +10,0 @@ typeBindings: TextRange[]; |
@@ -5,3 +5,4 @@ "use strict"; | ||
function parseScriptSetupRanges(ts, ast) { | ||
let foundNonImportNode = false; | ||
let foundNonImportExportNode = false; | ||
let notOnTopTypeExports = []; | ||
let importSectionEndOffset = 0; | ||
@@ -18,6 +19,14 @@ let withDefaultsArg; | ||
ast.forEachChild(node => { | ||
if (!foundNonImportNode && !ts.isImportDeclaration(node)) { | ||
var _a; | ||
const isTypeExport = (ts.isTypeAliasDeclaration(node) || ts.isInterfaceDeclaration(node)) && ((_a = node.modifiers) === null || _a === void 0 ? void 0 : _a.some(mod => mod.kind === ts.SyntaxKind.ExportKeyword)); | ||
if (!foundNonImportExportNode | ||
&& !ts.isImportDeclaration(node) | ||
&& !isTypeExport | ||
&& !ts.isEmptyStatement(node)) { | ||
importSectionEndOffset = node.getStart(ast); | ||
foundNonImportNode = true; | ||
foundNonImportExportNode = true; | ||
} | ||
else if (isTypeExport && foundNonImportExportNode) { | ||
notOnTopTypeExports.push(_getStartEnd(node)); | ||
} | ||
}); | ||
@@ -27,2 +36,3 @@ ast.forEachChild(visitNode); | ||
importSectionEndOffset, | ||
notOnTopTypeExports, | ||
bindings, | ||
@@ -29,0 +39,0 @@ typeBindings, |
{ | ||
"name": "@volar/vue-code-gen", | ||
"version": "0.31.0", | ||
"version": "0.31.1", | ||
"main": "out/index.js", | ||
@@ -19,5 +19,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"@volar/code-gen": "0.31.0", | ||
"@volar/shared": "0.31.0", | ||
"@volar/source-map": "0.31.0", | ||
"@volar/code-gen": "0.31.1", | ||
"@volar/shared": "0.31.1", | ||
"@volar/source-map": "0.31.1", | ||
"@vue/compiler-core": "^3.2.27", | ||
@@ -28,3 +28,3 @@ "@vue/compiler-dom": "^3.2.27", | ||
}, | ||
"gitHead": "6716c29b7e9737f0e17da8b0f4cead66076926e1" | ||
"gitHead": "bcaff9a2571d4618a6fb858a0bc605d88fc35a8c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
139049
3131
+ Added@volar/code-gen@0.31.1(transitive)
+ Added@volar/shared@0.31.1(transitive)
+ Added@volar/source-map@0.31.1(transitive)
- Removed@volar/code-gen@0.31.0(transitive)
- Removed@volar/shared@0.31.0(transitive)
- Removed@volar/source-map@0.31.0(transitive)
Updated@volar/code-gen@0.31.1
Updated@volar/shared@0.31.1
Updated@volar/source-map@0.31.1