npm-bundled
Advanced tools
Comparing version 1.0.6 to 1.1.0
12
index.js
@@ -95,2 +95,7 @@ 'use strict' | ||
allDepsBundled (pkg) { | ||
return Object.keys(pkg.dependencies || {}).concat( | ||
Object.keys(pkg.optionalDependencies || {})) | ||
} | ||
onPackage (pkg) { | ||
@@ -101,8 +106,9 @@ // all deps are bundled if we got here as a child. | ||
const bdRaw = this.parent | ||
? Object.keys(pkg.dependencies || {}).concat( | ||
Object.keys(pkg.optionalDependencies || {})) | ||
? this.allDepsBundled(pkg) | ||
: pkg.bundleDependencies || pkg.bundledDependencies || [] | ||
const bd = Array.from(new Set( | ||
Array.isArray(bdRaw) ? bdRaw : Object.keys(bdRaw))) | ||
Array.isArray(bdRaw) ? bdRaw | ||
: bdRaw === true ? this.allDepsBundled(pkg) | ||
: Object.keys(bdRaw))) | ||
@@ -109,0 +115,0 @@ if (!bd.length) |
{ | ||
"name": "npm-bundled", | ||
"version": "1.0.6", | ||
"version": "1.1.0", | ||
"description": "list things in node_modules that are bundledDependencies, or transitive dependencies thereof", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
9447
216