isotropy-ast-analyzer-keyvaluedb
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -13,10 +13,6 @@ "use strict"; | ||
var moduleName = babelPath.get("source").node.value; | ||
var resolvedName = _path2.default.resolve(_path2.default.dirname(state.file.opts.filename), moduleName); | ||
var absolutePath = null; | ||
var dbProject = state.opts.projects.find(function (project) { | ||
var projectDir = project.dir.startsWith("./") ? project.dir : "./" + project.dir; | ||
absolutePath = _path2.default.resolve(projectDir) + "/"; | ||
return resolvedName.startsWith(absolutePath); | ||
var absolutePath = _path2.default.resolve(projectDir) + "/"; | ||
return state.file.opts.filename.startsWith(absolutePath); | ||
}); | ||
@@ -26,6 +22,10 @@ | ||
if (!dbProject) return false; | ||
dbProject.absolutePath = absolutePath; | ||
var moduleName = babelPath.get("source").node.value; | ||
var resolvedName = _path2.default.resolve(_path2.default.dirname(state.file.opts.filename), moduleName); | ||
var dbModule = dbProject.modules.find(function (m) { | ||
return dbProject.absolutePath + m.source === resolvedName; | ||
var sourceDir = m.source.startsWith("./") ? m.source : "./" + m.source; | ||
var absolutePath = _path2.default.resolve(sourceDir); | ||
return absolutePath === resolvedName; | ||
}); | ||
@@ -37,3 +37,3 @@ | ||
analysisState.importBindings = analysisState.importBindings.concat({ | ||
module: dbModule.locations, | ||
module: dbModule.databases, | ||
binding: babelPath.scope.bindings[specifier] | ||
@@ -40,0 +40,0 @@ }); |
{ | ||
"name": "isotropy-ast-analyzer-keyvaluedb", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"author": "Isotropy Team<isotropy@agilehead.com>", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
145665
1