@teleporthq/teleport-plugin-import-statements
Advanced tools
Comparing version
@@ -67,3 +67,5 @@ "use strict"; | ||
var dependency = importDefinitions_1[dependencyRef]; | ||
if (((_a = dependency.meta) === null || _a === void 0 ? void 0 : _a.useAsReference) || ((_b = dependency.meta) === null || _b === void 0 ? void 0 : _b.importJustPath)) { | ||
if (((_a = dependency.meta) === null || _a === void 0 ? void 0 : _a.useAsReference) || | ||
((_b = dependency.meta) === null || _b === void 0 ? void 0 : _b.importJustPath) || | ||
(dependency === null || dependency === void 0 ? void 0 : dependency.meta.needsWindowObject)) { | ||
return; | ||
@@ -107,2 +109,5 @@ } | ||
} | ||
if ((dep === null || dep === void 0 ? void 0 : dep.meta) && 'needsWindowObject' in dep.meta) { | ||
return; | ||
} | ||
if ((_a = dep === null || dep === void 0 ? void 0 : dep.meta) === null || _a === void 0 ? void 0 : _a.importAlias) { | ||
@@ -109,0 +114,0 @@ result[dep.meta.importAlias] = []; |
@@ -64,3 +64,5 @@ var __assign = (this && this.__assign) || function () { | ||
var dependency = importDefinitions_1[dependencyRef]; | ||
if (((_a = dependency.meta) === null || _a === void 0 ? void 0 : _a.useAsReference) || ((_b = dependency.meta) === null || _b === void 0 ? void 0 : _b.importJustPath)) { | ||
if (((_a = dependency.meta) === null || _a === void 0 ? void 0 : _a.useAsReference) || | ||
((_b = dependency.meta) === null || _b === void 0 ? void 0 : _b.importJustPath) || | ||
(dependency === null || dependency === void 0 ? void 0 : dependency.meta.needsWindowObject)) { | ||
return; | ||
@@ -103,2 +105,5 @@ } | ||
} | ||
if ((dep === null || dep === void 0 ? void 0 : dep.meta) && 'needsWindowObject' in dep.meta) { | ||
return; | ||
} | ||
if ((_a = dep === null || dep === void 0 ? void 0 : dep.meta) === null || _a === void 0 ? void 0 : _a.importAlias) { | ||
@@ -105,0 +110,0 @@ result[dep.meta.importAlias] = []; |
{ | ||
"name": "@teleporthq/teleport-plugin-import-statements", | ||
"version": "0.27.2", | ||
"version": "0.27.3-alpha.0", | ||
"description": "A plugin for handling import statements in JavaScript code", | ||
@@ -27,6 +27,6 @@ "author": "teleportHQ", | ||
"dependencies": { | ||
"@teleporthq/teleport-plugin-common": "^0.27.2", | ||
"@teleporthq/teleport-types": "^0.27.0" | ||
"@teleporthq/teleport-plugin-common": "^0.27.3-alpha.0", | ||
"@teleporthq/teleport-types": "^0.27.3-alpha.0" | ||
}, | ||
"gitHead": "53c7b8a9ffbe8e18341da464580e08f5292c3f00" | ||
"gitHead": "5e89aee4d95121ae24e6909b9b09ccee9918bd2c" | ||
} |
@@ -43,3 +43,7 @@ import { ASTBuilders } from '@teleporthq/teleport-plugin-common' | ||
const dependency = importDefinitions[dependencyRef] | ||
if (dependency.meta?.useAsReference || dependency.meta?.importJustPath) { | ||
if ( | ||
dependency.meta?.useAsReference || | ||
dependency.meta?.importJustPath || | ||
dependency?.meta.needsWindowObject | ||
) { | ||
return | ||
@@ -89,2 +93,6 @@ } | ||
if (dep?.meta && 'needsWindowObject' in dep.meta) { | ||
return | ||
} | ||
if (dep?.meta?.importAlias) { | ||
@@ -91,0 +99,0 @@ result[dep.meta.importAlias] = [] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
75938
1.51%468
3.77%