@@ -1470,6 +1470,207 @@ ArboristNode {
14701470}
14711471`
14721472
1473+ exports[`test/arborist/build-ideal-tree.js TAP add one workspace to another > tree with workspace a added to workspace c 1`] = `
1474+ ArboristNode {
1475+ "children": Map {
1476+ "a" => ArboristLink {
1477+ "edgesIn": Set {
1478+ EdgeIn {
1479+ "from": "",
1480+ "name": "a",
1481+ "spec": "file:{CWD}/test/fixtures/workspaces-not-root/packages/a",
1482+ "type": "workspace",
1483+ },
1484+ EdgeIn {
1485+ "from": "packages/c",
1486+ "name": "a",
1487+ "spec": "file:../a",
1488+ "type": "prod",
1489+ },
1490+ },
1491+ "isWorkspace": true,
1492+ "location": "node_modules/a",
1493+ "name": "a",
1494+ "path": "{CWD}/test/fixtures/workspaces-not-root/node_modules/a",
1495+ "realpath": "{CWD}/test/fixtures/workspaces-not-root/packages/a",
1496+ "resolved": "file:../packages/a",
1497+ "target": ArboristNode {
1498+ "location": "packages/a",
1499+ },
1500+ "version": "1.2.3",
1501+ },
1502+ "abbrev" => ArboristNode {
1503+ "edgesIn": Set {
1504+ EdgeIn {
1505+ "from": "",
1506+ "name": "abbrev",
1507+ "spec": "*",
1508+ "type": "prod",
1509+ },
1510+ EdgeIn {
1511+ "from": "packages/b",
1512+ "name": "abbrev",
1513+ "spec": "*",
1514+ "type": "prod",
1515+ },
1516+ EdgeIn {
1517+ "from": "packages/c",
1518+ "name": "abbrev",
1519+ "spec": "*",
1520+ "type": "prod",
1521+ },
1522+ },
1523+ "location": "node_modules/abbrev",
1524+ "name": "abbrev",
1525+ "path": "{CWD}/test/fixtures/workspaces-not-root/node_modules/abbrev",
1526+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
1527+ "version": "1.1.1",
1528+ },
1529+ "b" => ArboristLink {
1530+ "edgesIn": Set {
1531+ EdgeIn {
1532+ "from": "",
1533+ "name": "b",
1534+ "spec": "file:{CWD}/test/fixtures/workspaces-not-root/packages/b",
1535+ "type": "workspace",
1536+ },
1537+ },
1538+ "isWorkspace": true,
1539+ "location": "node_modules/b",
1540+ "name": "b",
1541+ "path": "{CWD}/test/fixtures/workspaces-not-root/node_modules/b",
1542+ "realpath": "{CWD}/test/fixtures/workspaces-not-root/packages/b",
1543+ "resolved": "file:../packages/b",
1544+ "target": ArboristNode {
1545+ "location": "packages/b",
1546+ },
1547+ "version": "1.2.3",
1548+ },
1549+ "c" => ArboristLink {
1550+ "edgesIn": Set {
1551+ EdgeIn {
1552+ "from": "",
1553+ "name": "c",
1554+ "spec": "file:{CWD}/test/fixtures/workspaces-not-root/packages/c",
1555+ "type": "workspace",
1556+ },
1557+ },
1558+ "isWorkspace": true,
1559+ "location": "node_modules/c",
1560+ "name": "c",
1561+ "path": "{CWD}/test/fixtures/workspaces-not-root/node_modules/c",
1562+ "realpath": "{CWD}/test/fixtures/workspaces-not-root/packages/c",
1563+ "resolved": "file:../packages/c",
1564+ "target": ArboristNode {
1565+ "location": "packages/c",
1566+ },
1567+ "version": "1.2.3",
1568+ },
1569+ "wrappy" => ArboristNode {
1570+ "edgesIn": Set {
1571+ EdgeIn {
1572+ "from": "",
1573+ "name": "wrappy",
1574+ "spec": "1.0.0",
1575+ "type": "prod",
1576+ },
1577+ },
1578+ "location": "node_modules/wrappy",
1579+ "name": "wrappy",
1580+ "path": "{CWD}/test/fixtures/workspaces-not-root/node_modules/wrappy",
1581+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.0.tgz",
1582+ "version": "1.0.0",
1583+ },
1584+ },
1585+ "edgesOut": Map {
1586+ "a" => EdgeOut {
1587+ "name": "a",
1588+ "spec": "file:{CWD}/test/fixtures/workspaces-not-root/packages/a",
1589+ "to": "node_modules/a",
1590+ "type": "workspace",
1591+ },
1592+ "abbrev" => EdgeOut {
1593+ "name": "abbrev",
1594+ "spec": "*",
1595+ "to": "node_modules/abbrev",
1596+ "type": "prod",
1597+ },
1598+ "b" => EdgeOut {
1599+ "name": "b",
1600+ "spec": "file:{CWD}/test/fixtures/workspaces-not-root/packages/b",
1601+ "to": "node_modules/b",
1602+ "type": "workspace",
1603+ },
1604+ "c" => EdgeOut {
1605+ "name": "c",
1606+ "spec": "file:{CWD}/test/fixtures/workspaces-not-root/packages/c",
1607+ "to": "node_modules/c",
1608+ "type": "workspace",
1609+ },
1610+ "wrappy" => EdgeOut {
1611+ "name": "wrappy",
1612+ "spec": "1.0.0",
1613+ "to": "node_modules/wrappy",
1614+ "type": "prod",
1615+ },
1616+ },
1617+ "fsChildren": Set {
1618+ ArboristNode {
1619+ "isWorkspace": true,
1620+ "location": "packages/a",
1621+ "name": "a",
1622+ "path": "{CWD}/test/fixtures/workspaces-not-root/packages/a",
1623+ "version": "1.2.3",
1624+ },
1625+ ArboristNode {
1626+ "edgesOut": Map {
1627+ "abbrev" => EdgeOut {
1628+ "name": "abbrev",
1629+ "spec": "*",
1630+ "to": "node_modules/abbrev",
1631+ "type": "prod",
1632+ },
1633+ },
1634+ "isWorkspace": true,
1635+ "location": "packages/b",
1636+ "name": "b",
1637+ "path": "{CWD}/test/fixtures/workspaces-not-root/packages/b",
1638+ "version": "1.2.3",
1639+ },
1640+ ArboristNode {
1641+ "edgesOut": Map {
1642+ "a" => EdgeOut {
1643+ "name": "a",
1644+ "spec": "file:../a",
1645+ "to": "node_modules/a",
1646+ "type": "prod",
1647+ },
1648+ "abbrev" => EdgeOut {
1649+ "name": "abbrev",
1650+ "spec": "*",
1651+ "to": "node_modules/abbrev",
1652+ "type": "prod",
1653+ },
1654+ },
1655+ "isWorkspace": true,
1656+ "location": "packages/c",
1657+ "name": "c",
1658+ "path": "{CWD}/test/fixtures/workspaces-not-root/packages/c",
1659+ "version": "1.2.3",
1660+ },
1661+ },
1662+ "isProjectRoot": true,
1663+ "location": "",
1664+ "name": "workspaces-not-root",
1665+ "path": "{CWD}/test/fixtures/workspaces-not-root",
1666+ "workspaces": Map {
1667+ "a" => "packages/a",
1668+ "b" => "packages/b",
1669+ "c" => "packages/c",
1670+ },
1671+ }
1672+ `
1673+
14731674exports[`test/arborist/build-ideal-tree.js TAP add packages to workspaces, not root > tree with abbrev removed from a and b 1`] = `
14741675ArboristNode {
14751676 "children": Map {
0 commit comments