We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da6edc0 commit 4be705bCopy full SHA for 4be705b
1 file changed
src/providers/javascript_npm.js
@@ -19,6 +19,10 @@ export default class Javascript_npm extends Base_javascript {
19
}
20
21
_buildDependencyTree(includeTransitive, opts = {}) {
22
+ // npm ls --json returns a single tree rooted at the workspace root.
23
+ // When analyzing a workspace member, its deps are nested under the
24
+ // root's dependencies keyed by the member name — extract that subtree
25
+ // so downstream analysis sees only the member's dependencies.
26
const tree = super._buildDependencyTree(includeTransitive, opts);
27
const memberName = this._getManifest().name;
28
if (tree.name === memberName) {
0 commit comments