Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornlf <quitlahok@gmail.com>2022-01-20 23:37:43 +0300
committerGitHub <noreply@github.com>2022-01-20 23:37:43 +0300
commitc99c2151a868672c017f64ff0ecb12149a2fb095 (patch)
treef69903b0ea2523637e106d8191880a17cfd260f4 /workspaces/arborist/tap-snapshots
parentcfd59b8c81078f842328b13a23a234150842cd58 (diff)
fix(arborist): prioritize valid workspace nodes (#4230)
closes #3637
Diffstat (limited to 'workspaces/arborist/tap-snapshots')
-rw-r--r--workspaces/arborist/tap-snapshots/test/arborist/build-ideal-tree.js.test.cjs100
1 files changed, 100 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 d8f4fc4d5..93ea45862 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
@@ -159209,6 +159209,106 @@ ArboristNode {
}
`
+exports[`test/arborist/build-ideal-tree.js TAP workspaces should allow adding a workspace as a dep to a workspace > must match snapshot 1`] = `
+ArboristNode {
+ "children": Map {
+ "workspace-a" => ArboristLink {
+ "edgesIn": Set {
+ EdgeIn {
+ "from": "",
+ "name": "workspace-a",
+ "spec": "file:{CWD}/test/arborist/tap-testdir-build-ideal-tree-workspaces-should-allow-adding-a-workspace-as-a-dep-to-a-workspace/workspace-a",
+ "type": "workspace",
+ },
+ },
+ "isWorkspace": true,
+ "location": "node_modules/workspace-a",
+ "name": "workspace-a",
+ "path": "{CWD}/test/arborist/tap-testdir-build-ideal-tree-workspaces-should-allow-adding-a-workspace-as-a-dep-to-a-workspace/node_modules/workspace-a",
+ "realpath": "{CWD}/test/arborist/tap-testdir-build-ideal-tree-workspaces-should-allow-adding-a-workspace-as-a-dep-to-a-workspace/workspace-a",
+ "resolved": "file:../workspace-a",
+ "target": ArboristNode {
+ "location": "workspace-a",
+ },
+ "version": "1.0.0",
+ },
+ "workspace-b" => ArboristLink {
+ "edgesIn": Set {
+ EdgeIn {
+ "from": "",
+ "name": "workspace-b",
+ "spec": "file:{CWD}/test/arborist/tap-testdir-build-ideal-tree-workspaces-should-allow-adding-a-workspace-as-a-dep-to-a-workspace/workspace-b",
+ "type": "workspace",
+ },
+ EdgeIn {
+ "from": "workspace-a",
+ "name": "workspace-b",
+ "spec": "*",
+ "type": "prod",
+ },
+ },
+ "isWorkspace": true,
+ "location": "node_modules/workspace-b",
+ "name": "workspace-b",
+ "path": "{CWD}/test/arborist/tap-testdir-build-ideal-tree-workspaces-should-allow-adding-a-workspace-as-a-dep-to-a-workspace/node_modules/workspace-b",
+ "realpath": "{CWD}/test/arborist/tap-testdir-build-ideal-tree-workspaces-should-allow-adding-a-workspace-as-a-dep-to-a-workspace/workspace-b",
+ "resolved": "file:../workspace-b",
+ "target": ArboristNode {
+ "location": "workspace-b",
+ },
+ "version": "1.0.0",
+ },
+ },
+ "edgesOut": Map {
+ "workspace-a" => EdgeOut {
+ "name": "workspace-a",
+ "spec": "file:{CWD}/test/arborist/tap-testdir-build-ideal-tree-workspaces-should-allow-adding-a-workspace-as-a-dep-to-a-workspace/workspace-a",
+ "to": "node_modules/workspace-a",
+ "type": "workspace",
+ },
+ "workspace-b" => EdgeOut {
+ "name": "workspace-b",
+ "spec": "file:{CWD}/test/arborist/tap-testdir-build-ideal-tree-workspaces-should-allow-adding-a-workspace-as-a-dep-to-a-workspace/workspace-b",
+ "to": "node_modules/workspace-b",
+ "type": "workspace",
+ },
+ },
+ "fsChildren": Set {
+ ArboristNode {
+ "edgesOut": Map {
+ "workspace-b" => EdgeOut {
+ "name": "workspace-b",
+ "spec": "*",
+ "to": "node_modules/workspace-b",
+ "type": "prod",
+ },
+ },
+ "isWorkspace": true,
+ "location": "workspace-a",
+ "name": "workspace-a",
+ "path": "{CWD}/test/arborist/tap-testdir-build-ideal-tree-workspaces-should-allow-adding-a-workspace-as-a-dep-to-a-workspace/workspace-a",
+ "version": "1.0.0",
+ },
+ ArboristNode {
+ "isWorkspace": true,
+ "location": "workspace-b",
+ "name": "workspace-b",
+ "path": "{CWD}/test/arborist/tap-testdir-build-ideal-tree-workspaces-should-allow-adding-a-workspace-as-a-dep-to-a-workspace/workspace-b",
+ "version": "1.0.0",
+ },
+ },
+ "isProjectRoot": true,
+ "location": "",
+ "name": "tap-testdir-build-ideal-tree-workspaces-should-allow-adding-a-workspace-as-a-dep-to-a-workspace",
+ "packageName": "root",
+ "path": "{CWD}/test/arborist/tap-testdir-build-ideal-tree-workspaces-should-allow-adding-a-workspace-as-a-dep-to-a-workspace",
+ "workspaces": Map {
+ "workspace-a" => "workspace-a",
+ "workspace-b" => "workspace-b",
+ },
+}
+`
+
exports[`test/arborist/build-ideal-tree.js TAP workspaces should ignore nested node_modules folders > expect resolving Promise 1`] = `
ArboristNode {
"children": Map {