Socket
Socket
Sign inDemoInstall

dependency-parse-plugin

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.6 to 0.0.7

14

index.js

@@ -26,2 +26,5 @@ let PluginTitle = 'DependencyParsePlugin';

// 循环依赖
circyleDeps = [];
options = {

@@ -46,3 +49,3 @@ includes: [],

parseOneFileAllDependency = (filePath) => {
const dfs = (filePath) => {
const dfs = (filePath, importPaths = [filePath]) => {
const temp = this.directDeps[filePath] || [];

@@ -52,6 +55,11 @@ const deps = [];

temp.forEach((_) => {
// 循环依赖
if (importPaths.includes(_) ) {
this.circyleDeps.push([...importPaths, _]);
return;
}
if (this.allDeps[_]) {
deps.push(...this.allDeps[_]);
} else {
deps.push(...dfs(_));
deps.push(...dfs(_, [...importPaths, _]));
}

@@ -209,6 +217,6 @@ });

}
// 执行完-清空数据
this.allDeps = {};
this.directDeps = {};
this.circyleDeps = {};
});

@@ -215,0 +223,0 @@ }

{
"name": "dependency-parse-plugin",
"version": "0.0.6",
"version": "0.0.7",
"description": "Detect dependencies of each file in modules compiled with Webpack",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc