@npmcli/arborist 2.2.5 → 2.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/edge.js +9 -1
  2. package/package.json +1 -1
package/lib/edge.js CHANGED
@@ -87,16 +87,24 @@ class Edge {
87
87
 
88
88
  // return the edge data, and an explanation of how that edge came to be here
89
89
  [_explain] (seen) {
90
- const { error, from } = this
90
+ const { error, from, bundled } = this
91
91
  return {
92
92
  type: this.type,
93
93
  name: this.name,
94
94
  spec: this.spec,
95
+ ...(bundled ? { bundled } : {}),
95
96
  ...(error ? { error } : {}),
96
97
  ...(from ? { from: from.explain(null, seen) } : {}),
97
98
  }
98
99
  }
99
100
 
101
+ get bundled () {
102
+ if (!this.from)
103
+ return false
104
+ const { package: { bundleDependencies = [] } } = this.from
105
+ return bundleDependencies.includes(this.name)
106
+ }
107
+
100
108
  get workspace () {
101
109
  return this[_type] === 'workspace'
102
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/arborist",
3
- "version": "2.2.5",
3
+ "version": "2.2.6",
4
4
  "description": "Manage node_modules trees",
5
5
  "dependencies": {
6
6
  "@npmcli/installed-package-contents": "^1.0.7",