diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2020-09-28 21:50:15 +0300 |
---|---|---|
committer | nlf <quitlahok@gmail.com> | 2020-09-29 21:43:49 +0300 |
commit | 52114b75e83db8a5e08f23889cce41c89af9eb93 (patch) | |
tree | 92e9fbad30354da9cd65fd3b848ecd4ea408fe44 /test | |
parent | 2469ae5153fa4114a72684376a1b226aa07edf81 (diff) |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/ls.js | 13 |
1 files changed, 11 insertions, 2 deletions
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: { |