From de45a46709e165bcfca80955fa8ea50c30c96c2d Mon Sep 17 00:00:00 2001 From: Ruy Adorno Date: Tue, 8 Dec 2020 14:33:01 -0500 Subject: [PATCH] fix: arborist inventory change update Update `lib/utils/completion/installed-deep.js` to ignore root nodes in the arborist update. PR-URL: https://github.com/npm/cli/pull/2301 Credit: @ruyadorno Close: #2301 Reviewed-by: @isaacs --- lib/utils/completion/installed-deep.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/utils/completion/installed-deep.js b/lib/utils/completion/installed-deep.js index 0513ef9f83872..803b223ea5782 100644 --- a/lib/utils/completion/installed-deep.js +++ b/lib/utils/completion/installed-deep.js @@ -13,6 +13,7 @@ const readNames = async () => { const getValues = (tree) => [...tree.inventory.values()] + .filter(i => i.location !== '' && !i.isRoot) .map(i => { return i })