From 52114b75e83db8a5e08f23889cce41c89af9eb93 Mon Sep 17 00:00:00 2001 From: Ruy Adorno Date: Mon, 28 Sep 2020 14:50:15 -0400 Subject: fix: listing deps of a linked dep npm ls was failing to properly follow symlink targets in order to find its dependencies to get printed output. PR-URL: https://github.com/npm/cli/pull/1871 Credit: @ruyadorno Close: #1871 Reviewed-by: @nlf --- test/lib/ls.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/lib/ls.js b/test/lib/ls.js index f968f406f..db4ba81ee 100644 --- a/test/lib/ls.js +++ b/test/lib/ls.js @@ -1396,12 +1396,21 @@ t.test('ls', (t) => { }), node_modules: { a: t.fixture('symlink', '../a'), - b: t.fixture('symlink', '../b') + b: t.fixture('symlink', '../b'), + c: { + 'package.json': JSON.stringify({ + name: 'c', + version: '1.0.0' + }) + } }, a: { 'package.json': JSON.stringify({ name: 'a', - version: '1.0.0' + version: '1.0.0', + dependencies: { + c: '^1.0.0' + } }) }, b: { -- cgit v1.2.3