diff options
author | nlf <quitlahok@gmail.com> | 2022-03-24 21:18:21 +0300 |
---|---|---|
committer | Luke Karrys <luke@lukekarrys.com> | 2022-03-28 23:19:27 +0300 |
commit | 6f9cb490e7299976c43c6a118036c130671fe188 (patch) | |
tree | 0320e3f944219959e61f314fb16350a993779626 /workspaces/arborist/tap-snapshots | |
parent | 6a4c8ff89acc98409060f5aa55b2f1a795a6b66c (diff) |
fix(arborist): handle link nodes in old lockfiles correctly
Diffstat (limited to 'workspaces/arborist/tap-snapshots')
-rw-r--r-- | workspaces/arborist/tap-snapshots/test/arborist/build-ideal-tree.js.test.cjs | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/workspaces/arborist/tap-snapshots/test/arborist/build-ideal-tree.js.test.cjs b/workspaces/arborist/tap-snapshots/test/arborist/build-ideal-tree.js.test.cjs index b743dab95..17aee505c 100644 --- a/workspaces/arborist/tap-snapshots/test/arborist/build-ideal-tree.js.test.cjs +++ b/workspaces/arborist/tap-snapshots/test/arborist/build-ideal-tree.js.test.cjs @@ -36919,6 +36919,53 @@ ArboristNode { } ` +exports[`test/arborist/build-ideal-tree.js TAP inflating a link node in an old lockfile skips registry > must match snapshot 1`] = ` +ArboristNode { + "children": Map { + "link-dep" => ArboristLink { + "edgesIn": Set { + EdgeIn { + "from": "", + "name": "link-dep", + "spec": "file:./link-dep", + "type": "prod", + }, + }, + "location": "node_modules/link-dep", + "name": "link-dep", + "path": "{CWD}/test/fixtures/old-lock-with-link/node_modules/link-dep", + "realpath": "{CWD}/test/fixtures/old-lock-with-link/link-dep", + "resolved": "file:../link-dep", + "target": ArboristNode { + "location": "link-dep", + }, + "version": "1.0.0", + }, + }, + "edgesOut": Map { + "link-dep" => EdgeOut { + "name": "link-dep", + "spec": "file:./link-dep", + "to": "node_modules/link-dep", + "type": "prod", + }, + }, + "fsChildren": Set { + ArboristNode { + "location": "link-dep", + "name": "link-dep", + "path": "{CWD}/test/fixtures/old-lock-with-link/link-dep", + "version": "1.0.0", + }, + }, + "isProjectRoot": true, + "location": "", + "name": "old-lock-with-link", + "path": "{CWD}/test/fixtures/old-lock-with-link", + "version": "1.0.0", +} +` + exports[`test/arborist/build-ideal-tree.js TAP link dep with a link dep > link metadeps with lockfile 1`] = ` ArboristNode { "children": Map { |