Socket
Socket
Sign inDemoInstall

circular-dependency-plugin

Package Overview
Dependencies
77
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.1.0 to 5.2.0

16

index.js

@@ -38,3 +38,3 @@ let path = require('path')

let maybeCyclicalPathsList = this.isCyclic(module, module, {})
let maybeCyclicalPathsList = this.isCyclic(module, module, {}, compilation)
if (maybeCyclicalPathsList) {

@@ -71,3 +71,3 @@ // allow consumers to override all behavior with onDetected

isCyclic(initialModule, currentModule, seenModules) {
isCyclic(initialModule, currentModule, seenModules, compilation) {
let cwd = this.options.cwd

@@ -86,3 +86,11 @@

for (let dependency of currentModule.dependencies) {
let depModule = dependency.module
let depModule = null
if (compilation.moduleGraph) {
// handle getting a module for webpack 5
depModule = compilation.moduleGraph.getModule(dependency)
} else {
// handle getting a module for webpack 4
depModule = dependency.module
}
if (!depModule) { continue }

@@ -106,3 +114,3 @@ // ignore dependencies that don't have an associated resource

let maybeCyclicalPathsList = this.isCyclic(initialModule, depModule, seenModules)
let maybeCyclicalPathsList = this.isCyclic(initialModule, depModule, seenModules, compilation)
if (maybeCyclicalPathsList) {

@@ -109,0 +117,0 @@ maybeCyclicalPathsList.unshift(path.relative(cwd, currentModule.resource))

@@ -7,3 +7,4 @@ {

"memory-fs": "^0.4.1",
"webpack": "^4.0.1"
"webpack": "^4.0.1",
"webpack-next": "npm:webpack@^5.0.0-alpha.19"
},

@@ -14,3 +15,3 @@ "peerDependencies": {

"description": "Detect modules with circular dependencies when bundling with webpack.",
"version": "5.1.0",
"version": "5.2.0",
"engines": {

@@ -17,0 +18,0 @@ "node": ">=6.0.0"

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