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,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAA;gBACtN,GAAG,IAAI,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,MAAM,GAAG,GAAG,GAAG,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;YAC7F,CAAC;QACH,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QACnB,OAAO,GAAG,CAAA;IACZ,CAAC,CAAA;IAED,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,CAAA;IAE7C,OAAO,QAAQ,GAAG,CAAC,SAAS,GAAG,iBAAiB,CAAC,CAAC,CAAC,yDAAyD,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AACpH,CAAC,CAAA","sourcesContent":["// copy from https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-nm/sources/hoist.ts\n/**\nBSD 2-Clause License\n\nCopyright (c) 2016-present, Yarn Contributors.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n// commit: d63d411bcc5adcbffd198b8987c5a14c81eaf669\n// fix(nm): optimize hoisting by treating peer deps same as other deps (#6517)\n/**\n * High-level node_modules hoisting algorithm recipe\n *\n * 1. Take input dependency graph and start traversing it,\n * as you visit new node in the graph - clone it if there can be multiple paths\n * to access the node from the graph root to the node, e.g. essentially represent\n * the graph with a tree as you go, to make hoisting possible.\n * 2. You want to hoist every node possible to the top root node first,\n * then to each of its children etc, so you need to keep track what is your current\n * root node into which you are hoisting\n * 3. Traverse the dependency graph from the current root node and for each package name\n * that can be potentially hoisted to the current root node build a list of idents\n * in descending hoisting preference. You will check in next steps whether most preferred ident\n * for the given package name can be hoisted first, and if not, then you check the\n * less preferred ident, etc, until either some ident will be hoisted\n * or you run out of idents to check\n * (no need to convert the graph to the tree when you build this preference map).\n * 4. The children of the root node are already \"hoisted\", so you need to start\n * from the dependencies of these children. You take some child and\n * sort its dependencies so that regular dependencies without peer dependencies\n * will come first and then those dependencies that peer depend on them.\n * This is needed to make algorithm more efficient and hoist nodes which are easier\n * to hoist first and then handle peer dependent nodes.\n * 5. You take this sorted list of dependencies and check if each of them can be\n * hoisted to the current root node. To answer is the node can be hoisted you check\n * your constraints - require promise and peer dependency promise.\n * The possible answers can be: YES - the node is hoistable to the current root,\n * NO - the node is not hoistable to the current root\n * and DEPENDS - the node is hoistable to the root if nodes X, Y, Z are hoistable\n * to the root. The case DEPENDS happens when all the require and other\n * constraints are met, except peer dependency constraints. Note, that the nodes\n * that are not package idents currently at the top of preference list are considered\n * to have the answer NO right away, before doing any other constraint checks.\n * 6. When you have hoistable answer for each dependency of a node you then build\n * a list of nodes that are NOT hoistable. These are the nodes that have answer NO\n * and the nodes that DEPENDS on these nodes. All the other nodes are hoistable,\n * those that have answer YES and those that have answer DEPENDS,\n * because they are cyclically dependent on each another\n * 7. You hoist all the hoistable nodes to the current root and continue traversing\n * the tree. Note, you need to track newly added nodes to the current root,\n * because after you finished tree traversal you want to come back to these new nodes\n * first thing and hoist everything from each of them to the current tree root.\n * 8. After you have finished traversing newly hoisted current root nodes\n * it means you cannot hoist anything to the current tree root and you need to pick\n * the next node as current tree root and run the algorithm again\n * until you run out of candidates for current tree root.\n */\ntype PackageName = string\nexport enum HoisterDependencyKind {\n REGULAR,\n WORKSPACE,\n EXTERNAL_SOFT_LINK,\n}\nexport type HoisterTree = {\n name: PackageName\n identName: PackageName\n reference: string\n dependencies: Set\n peerNames: Set\n hoistPriority?: number\n dependencyKind?: HoisterDependencyKind\n}\nexport type HoisterResult = { name: PackageName; identName: PackageName; references: Set; dependencies: Set }\ntype Locator = string\ntype AliasedLocator = string & { __aliasedLocator: true }\ntype Ident = string\ntype HoisterWorkTree = {\n name: PackageName\n references: Set\n ident: Ident\n locator: Locator\n dependencies: Map\n originalDependencies: Map\n hoistedDependencies: Map\n peerNames: ReadonlySet\n decoupled: boolean\n reasons: Map\n isHoistBorder: boolean\n hoistedFrom: Map>\n hoistedTo: Map\n hoistPriority: number\n dependencyKind: HoisterDependencyKind\n}\n\n/**\n * Mapping which packages depend on a given package alias + ident. It is used to determine hoisting weight,\n * e.g. which one among the group of packages with the same name should be hoisted.\n * The package having the biggest number of parents using this package will be hoisted.\n */\ntype PreferenceMap = Map; dependents: Set; hoistPriority: number }>\n\nenum Hoistable {\n YES,\n NO,\n DEPENDS,\n}\ntype HoistInfo =\n | {\n isHoistable: Hoistable.YES\n }\n | {\n isHoistable: Hoistable.NO\n reason: string | null\n }\n | {\n isHoistable: Hoistable.DEPENDS\n dependsOn: Set\n reason: string | null\n }\n\ntype ShadowedNodes = Map>\n\nconst makeLocator = (name: string, reference: string) => `${name}@${reference}`\nconst makeIdent = (name: string, reference: string) => {\n const hashIdx = reference.indexOf(`#`)\n // Strip virtual reference part, we don't need it for hoisting purposes\n const realReference = hashIdx >= 0 ? reference.substring(hashIdx + 1) : reference\n return makeLocator(name, realReference)\n}\n\nenum DebugLevel {\n NONE = -1,\n PERF = 0,\n CHECK = 1,\n REASONS = 2,\n INTENSIVE_CHECK = 9,\n}\n\nexport type HoistOptions = {\n /** Runs self-checks after hoisting is finished */\n check?: boolean\n /** Debug level */\n debugLevel?: DebugLevel\n /** Hoist borders are defined by parent node locator and its dependency name. The dependency is considered a border, nothing can be hoisted past this dependency, but dependency can be hoisted */\n hoistingLimits?: Map>\n}\n\ntype InternalHoistOptions = {\n check?: boolean\n debugLevel: DebugLevel\n fastLookupPossible: boolean\n hoistingLimits: Map>\n}\n\n/**\n * Hoists package tree.\n *\n * The root node of a tree must has id: '.'.\n * This function does not mutate its arguments, it hoists and returns tree copy.\n *\n * @param tree package tree (cycles in the tree are allowed)\n *\n * @returns hoisted tree copy\n */\nexport const hoist = (tree: HoisterTree, opts: HoistOptions = {}): HoisterResult => {\n const debugLevel = opts.debugLevel || Number(process.env.NM_DEBUG_LEVEL || DebugLevel.NONE)\n const check = opts.check || debugLevel >= (DebugLevel.INTENSIVE_CHECK as number)\n const hoistingLimits = opts.hoistingLimits || new Map()\n const options: InternalHoistOptions = { check, debugLevel, hoistingLimits, fastLookupPossible: true }\n let startTime: number\n\n if (options.debugLevel >= DebugLevel.PERF) startTime = Date.now()\n\n const treeCopy = cloneTree(tree, options)\n\n let anotherRoundNeeded = false\n let round = 0\n do {\n const result = hoistTo(treeCopy, [treeCopy], new Set([treeCopy.locator]), new Map(), options)\n anotherRoundNeeded = result.anotherRoundNeeded || result.isGraphChanged\n options.fastLookupPossible = false\n round++\n } while (anotherRoundNeeded)\n\n if (options.debugLevel >= DebugLevel.PERF) console.log(`hoist time: ${Date.now() - startTime!}ms, rounds: ${round}`)\n\n if (options.debugLevel >= DebugLevel.CHECK) {\n const prevTreeDump = dumpDepTree(treeCopy)\n const isGraphChanged = hoistTo(treeCopy, [treeCopy], new Set([treeCopy.locator]), new Map(), options).isGraphChanged\n if (isGraphChanged) throw new Error(`The hoisting result is not terminal, prev tree:\\n${prevTreeDump}, next tree:\\n${dumpDepTree(treeCopy)}`)\n const checkLog = selfCheck(treeCopy)\n if (checkLog) {\n throw new Error(`${checkLog}, after hoisting finished:\\n${dumpDepTree(treeCopy)}`)\n }\n }\n\n if (options.debugLevel >= DebugLevel.REASONS) console.log(dumpDepTree(treeCopy))\n\n return shrinkTree(treeCopy)\n}\n\nconst getZeroRoundUsedDependencies = (rootNodePath: Array): Map => {\n const rootNode = rootNodePath[rootNodePath.length - 1]\n const usedDependencies = new Map()\n const seenNodes = new Set()\n\n const addUsedDependencies = (node: HoisterWorkTree) => {\n if (seenNodes.has(node)) return\n seenNodes.add(node)\n\n for (const dep of node.hoistedDependencies.values()) usedDependencies.set(dep.name, dep)\n\n for (const dep of node.dependencies.values()) {\n if (!node.peerNames.has(dep.name)) {\n addUsedDependencies(dep)\n }\n }\n }\n\n addUsedDependencies(rootNode)\n\n return usedDependencies\n}\n\nconst getUsedDependencies = (rootNodePath: Array): Map => {\n const rootNode = rootNodePath[rootNodePath.length - 1]\n const usedDependencies = new Map()\n const seenNodes = new Set()\n\n const hiddenDependencies = new Set()\n const addUsedDependencies = (node: HoisterWorkTree, hiddenDependencies: Set) => {\n if (seenNodes.has(node)) return\n seenNodes.add(node)\n\n for (const dep of node.hoistedDependencies.values()) {\n if (!hiddenDependencies.has(dep.name)) {\n let reachableDependency\n for (const node of rootNodePath) {\n reachableDependency = node.dependencies.get(dep.name)\n if (reachableDependency) {\n usedDependencies.set(reachableDependency.name, reachableDependency)\n }\n }\n }\n }\n\n const childrenHiddenDependencies = new Set()\n\n for (const dep of node.dependencies.values()) childrenHiddenDependencies.add(dep.name)\n\n for (const dep of node.dependencies.values()) {\n if (!node.peerNames.has(dep.name)) {\n addUsedDependencies(dep, childrenHiddenDependencies)\n }\n }\n }\n\n addUsedDependencies(rootNode, hiddenDependencies)\n\n return usedDependencies\n}\n\n/**\n * This method clones the node and returns cloned node copy, if the node was not previously decoupled.\n *\n * The node is considered decoupled if there is no multiple parents to any node\n * on the path from the dependency graph root up to this node. This means that there are no other\n * nodes in dependency graph that somehow transitively use this node and hence node can be hoisted without\n * side effects.\n *\n * The process of node decoupling is done by going from root node of the graph up to the node in concern\n * and decoupling each node on this graph path.\n *\n * @param node original node\n *\n * @returns decoupled node\n */\nconst decoupleGraphNode = (parent: HoisterWorkTree, node: HoisterWorkTree): HoisterWorkTree => {\n if (node.decoupled) return node\n\n const {\n name,\n references,\n ident,\n locator,\n dependencies,\n originalDependencies,\n hoistedDependencies,\n peerNames,\n reasons,\n isHoistBorder,\n hoistPriority,\n dependencyKind,\n hoistedFrom,\n hoistedTo,\n } = node\n // To perform node hoisting from parent node we must clone parent nodes up to the root node,\n // because some other package in the tree might depend on the parent package where hoisting\n // cannot be performed\n const clone = {\n name,\n references: new Set(references),\n ident,\n locator,\n dependencies: new Map(dependencies),\n originalDependencies: new Map(originalDependencies),\n hoistedDependencies: new Map(hoistedDependencies),\n peerNames: new Set(peerNames),\n reasons: new Map(reasons),\n decoupled: true,\n isHoistBorder,\n hoistPriority,\n dependencyKind,\n hoistedFrom: new Map(hoistedFrom),\n hoistedTo: new Map(hoistedTo),\n }\n const selfDep = clone.dependencies.get(name)\n if (selfDep && selfDep.ident == clone.ident)\n // Update self-reference\n clone.dependencies.set(name, clone)\n\n parent.dependencies.set(clone.name, clone)\n\n return clone\n}\n\n/**\n * Builds a map of most preferred packages that might be hoisted to the root node.\n *\n * The values in the map are idents sorted by preference from most preferred to less preferred.\n * If the root node has already some version of a package, the value array will contain only\n * one element, since it is not possible for other versions of a package to be hoisted.\n *\n * @param rootNode root node\n * @param preferenceMap preference map\n */\nconst getHoistIdentMap = (rootNode: HoisterWorkTree, preferenceMap: PreferenceMap): Map> => {\n const identMap = new Map>([[rootNode.name, [rootNode.ident]]])\n\n for (const dep of rootNode.dependencies.values()) {\n if (!rootNode.peerNames.has(dep.name)) {\n identMap.set(dep.name, [dep.ident])\n }\n }\n\n const keyList = Array.from(preferenceMap.keys())\n keyList.sort((key1, key2) => {\n const entry1 = preferenceMap.get(key1)!\n const entry2 = preferenceMap.get(key2)!\n if (entry2.hoistPriority !== entry1.hoistPriority) {\n return entry2.hoistPriority - entry1.hoistPriority\n } else {\n const entry1Usages = entry1.dependents.size + entry1.peerDependents.size\n const entry2Usages = entry2.dependents.size + entry2.peerDependents.size\n return entry2Usages - entry1Usages\n }\n })\n\n for (const key of keyList) {\n const name = key.substring(0, key.indexOf(`@`, 1))\n const ident = key.substring(name.length + 1)\n if (!rootNode.peerNames.has(name)) {\n let idents = identMap.get(name)\n if (!idents) {\n idents = []\n identMap.set(name, idents)\n }\n if (idents.indexOf(ident) < 0) {\n idents.push(ident)\n }\n }\n }\n\n return identMap\n}\n\n/**\n * Gets regular node dependencies only and sorts them in the order so that\n * peer dependencies come before the dependency that rely on them.\n *\n * @param node graph node\n * @returns sorted regular dependencies\n */\nconst getSortedRegularDependencies = (node: HoisterWorkTree): Set => {\n const dependencies: Set = new Set()\n\n const addDep = (dep: HoisterWorkTree, seenDeps = new Set()) => {\n if (seenDeps.has(dep)) return\n seenDeps.add(dep)\n\n for (const peerName of dep.peerNames) {\n if (!node.peerNames.has(peerName)) {\n const peerDep = node.dependencies.get(peerName)\n if (peerDep && !dependencies.has(peerDep)) {\n addDep(peerDep, seenDeps)\n }\n }\n }\n dependencies.add(dep)\n }\n\n for (const dep of node.dependencies.values()) {\n if (!node.peerNames.has(dep.name)) {\n addDep(dep)\n }\n }\n\n return dependencies\n}\n\n/**\n * Performs hoisting all the dependencies down the tree to the root node.\n *\n * The algorithm used here reduces dependency graph by deduplicating\n * instances of the packages while keeping:\n * 1. Regular dependency promise: the package should require the exact version of the dependency\n * that was declared in its `package.json`\n * 2. Peer dependency promise: the package and its direct parent package\n * must use the same instance of the peer dependency\n *\n * The regular and peer dependency promises are kept while performing transform\n * on tree branches of packages at a time:\n * `root package` -> `parent package 1` ... `parent package n` -> `dependency`\n * We check wether we can hoist `dependency` to `root package`, this boils down basically\n * to checking:\n * 1. Wether `root package` does not depend on other version of `dependency`\n * 2. Wether all the peer dependencies of a `dependency` had already been hoisted from all `parent packages`\n *\n * If many versions of the `dependency` can be hoisted to the `root package` we choose the most used\n * `dependency` version in the project among them.\n *\n * This function mutates the tree.\n *\n * @param tree package dependencies graph\n * @param rootNode root node to hoist to\n * @param rootNodePath root node path in the tree\n * @param rootNodePathLocators a set of locators for nodes that lead from the top of the tree up to root node\n * @param options hoisting options\n */\nconst hoistTo = (\n tree: HoisterWorkTree,\n rootNodePath: Array,\n rootNodePathLocators: Set,\n parentShadowedNodes: ShadowedNodes,\n options: InternalHoistOptions,\n seenNodes: Set = new Set()\n): { anotherRoundNeeded: boolean; isGraphChanged: boolean } => {\n const rootNode = rootNodePath[rootNodePath.length - 1]\n if (seenNodes.has(rootNode)) return { anotherRoundNeeded: false, isGraphChanged: false }\n seenNodes.add(rootNode)\n\n const preferenceMap = buildPreferenceMap(rootNode)\n\n const hoistIdentMap = getHoistIdentMap(rootNode, preferenceMap)\n\n const usedDependencies = tree == rootNode ? new Map() : options.fastLookupPossible ? getZeroRoundUsedDependencies(rootNodePath) : getUsedDependencies(rootNodePath)\n\n let wasStateChanged\n\n let anotherRoundNeeded = false\n let isGraphChanged = false\n\n const hoistIdents = new Map(Array.from(hoistIdentMap.entries()).map(([k, v]) => [k, v[0]]))\n const shadowedNodes: ShadowedNodes = new Map()\n do {\n const result = hoistGraph(tree, rootNodePath, rootNodePathLocators, usedDependencies, hoistIdents, hoistIdentMap, parentShadowedNodes, shadowedNodes, options)\n if (result.isGraphChanged) isGraphChanged = true\n if (result.anotherRoundNeeded) anotherRoundNeeded = true\n\n wasStateChanged = false\n for (const [name, idents] of hoistIdentMap) {\n if (idents.length > 1 && !rootNode.dependencies.has(name)) {\n hoistIdents.delete(name)\n idents.shift()\n hoistIdents.set(name, idents[0])\n wasStateChanged = true\n }\n }\n } while (wasStateChanged)\n\n for (const dependency of rootNode.dependencies.values()) {\n if (!rootNode.peerNames.has(dependency.name) && !rootNodePathLocators.has(dependency.locator)) {\n rootNodePathLocators.add(dependency.locator)\n const result = hoistTo(tree, [...rootNodePath, dependency], rootNodePathLocators, shadowedNodes, options)\n if (result.isGraphChanged) isGraphChanged = true\n if (result.anotherRoundNeeded) anotherRoundNeeded = true\n\n rootNodePathLocators.delete(dependency.locator)\n }\n }\n\n return { anotherRoundNeeded, isGraphChanged }\n}\n\nconst hasUnhoistedDependencies = (node: HoisterWorkTree): boolean => {\n for (const [subName, subDependency] of node.dependencies) {\n if (!node.peerNames.has(subName) && subDependency.ident !== node.ident) {\n return true\n }\n }\n return false\n}\n\nconst getNodeHoistInfo = (\n rootNode: HoisterWorkTree,\n rootNodePathLocators: Set,\n nodePath: Array,\n node: HoisterWorkTree,\n usedDependencies: Map,\n hoistIdents: Map,\n hoistIdentMap: Map>,\n shadowedNodes: ShadowedNodes,\n { outputReason, fastLookupPossible }: { outputReason: boolean; fastLookupPossible: boolean }\n): HoistInfo => {\n let reasonRoot\n let reason: string | null = null\n let dependsOn: Set | null = new Set()\n if (outputReason)\n reasonRoot = `${Array.from(rootNodePathLocators)\n .map(x => prettyPrintLocator(x))\n .join(`→`)}`\n\n const parentNode = nodePath[nodePath.length - 1]\n // We cannot hoist self-references\n const isSelfReference = node.ident === parentNode.ident\n let isHoistable = !isSelfReference\n if (outputReason && !isHoistable) reason = `- self-reference`\n\n if (isHoistable) {\n isHoistable = node.dependencyKind !== HoisterDependencyKind.WORKSPACE\n if (outputReason && !isHoistable) {\n reason = `- workspace`\n }\n }\n\n if (isHoistable && node.dependencyKind === HoisterDependencyKind.EXTERNAL_SOFT_LINK) {\n isHoistable = !hasUnhoistedDependencies(node)\n if (outputReason && !isHoistable) {\n reason = `- external soft link with unhoisted dependencies`\n }\n }\n\n if (isHoistable) {\n isHoistable = !rootNode.peerNames.has(node.name)\n if (outputReason && !isHoistable) {\n reason = `- cannot shadow peer: ${prettyPrintLocator(rootNode.originalDependencies.get(node.name)!.locator)} at ${reasonRoot}`\n }\n }\n\n if (isHoistable) {\n let isNameAvailable = false\n const usedDep = usedDependencies.get(node.name)\n isNameAvailable = !usedDep || usedDep.ident === node.ident\n if (outputReason && !isNameAvailable) reason = `- filled by: ${prettyPrintLocator(usedDep!.locator)} at ${reasonRoot}`\n if (isNameAvailable) {\n for (let idx = nodePath.length - 1; idx >= 1; idx--) {\n const parent = nodePath[idx]\n const parentDep = parent.dependencies.get(node.name)\n if (parentDep && parentDep.ident !== node.ident) {\n isNameAvailable = false\n let shadowedNames = shadowedNodes.get(parentNode)\n if (!shadowedNames) {\n shadowedNames = new Set()\n shadowedNodes.set(parentNode, shadowedNames)\n }\n shadowedNames.add(node.name)\n if (outputReason)\n reason = `- filled by ${prettyPrintLocator(parentDep.locator)} at ${nodePath\n .slice(0, idx)\n .map(x => prettyPrintLocator(x.locator))\n .join(`→`)}`\n break\n }\n }\n }\n\n isHoistable = isNameAvailable\n }\n\n if (isHoistable) {\n const hoistedIdent = hoistIdents.get(node.name)\n isHoistable = hoistedIdent === node.ident\n if (outputReason && !isHoistable) {\n reason = `- filled by: ${prettyPrintLocator(hoistIdentMap.get(node.name)![0])} at ${reasonRoot}`\n }\n }\n\n if (isHoistable) {\n let arePeerDepsSatisfied = true\n const checkList = new Set(node.peerNames)\n for (let idx = nodePath.length - 1; idx >= 1; idx--) {\n const parent = nodePath[idx]\n for (const name of checkList) {\n if (parent.peerNames.has(name) && parent.originalDependencies.has(name)) continue\n\n const parentDepNode = parent.dependencies.get(name)\n if (parentDepNode && rootNode.dependencies.get(name) !== parentDepNode) {\n if (idx === nodePath.length - 1) {\n dependsOn!.add(parentDepNode)\n } else {\n dependsOn = null\n arePeerDepsSatisfied = false\n if (outputReason) {\n reason = `- peer dependency ${prettyPrintLocator(parentDepNode.locator)} from parent ${prettyPrintLocator(parent.locator)} was not hoisted to ${reasonRoot}`\n }\n }\n }\n checkList.delete(name)\n }\n if (!arePeerDepsSatisfied) {\n break\n }\n }\n isHoistable = arePeerDepsSatisfied\n }\n\n if (isHoistable && !fastLookupPossible) {\n for (const origDep of node.hoistedDependencies.values()) {\n const usedDep = usedDependencies.get(origDep.name) || rootNode.dependencies.get(origDep.name)\n if (!usedDep || origDep.ident !== usedDep.ident) {\n isHoistable = false\n if (outputReason) reason = `- previously hoisted dependency mismatch, needed: ${prettyPrintLocator(origDep.locator)}, available: ${prettyPrintLocator(usedDep?.locator)}`\n\n break\n }\n }\n }\n\n if (dependsOn !== null && dependsOn.size > 0) {\n return { isHoistable: Hoistable.DEPENDS, dependsOn, reason }\n } else {\n return { isHoistable: isHoistable ? Hoistable.YES : Hoistable.NO, reason }\n }\n}\n\nconst getAliasedLocator = (node: HoisterWorkTree): AliasedLocator => `${node.name}@${node.locator}` as AliasedLocator\n\n/**\n * Performs actual graph transformation, by hoisting packages to the root node.\n *\n * @param tree dependency tree\n * @param rootNodePath root node path in the tree\n * @param rootNodePathLocators a set of locators for nodes that lead from the top of the tree up to root node\n * @param usedDependencies map of dependency nodes from parents of root node used by root node and its children via parent lookup\n * @param hoistIdents idents that should be attempted to be hoisted to the root node\n */\nconst hoistGraph = (\n tree: HoisterWorkTree,\n rootNodePath: Array,\n rootNodePathLocators: Set,\n usedDependencies: Map,\n hoistIdents: Map,\n hoistIdentMap: Map>,\n parentShadowedNodes: ShadowedNodes,\n shadowedNodes: ShadowedNodes,\n options: InternalHoistOptions\n): { anotherRoundNeeded: boolean; isGraphChanged: boolean } => {\n const rootNode = rootNodePath[rootNodePath.length - 1]\n const seenNodes = new Set()\n let anotherRoundNeeded = false\n let isGraphChanged = false\n\n const hoistNodeDependencies = (\n nodePath: Array,\n locatorPath: Array,\n aliasedLocatorPath: Array,\n parentNode: HoisterWorkTree,\n newNodes: Set\n ) => {\n if (seenNodes.has(parentNode)) return\n const nextLocatorPath = [...locatorPath, getAliasedLocator(parentNode)]\n const nextAliasedLocatorPath = [...aliasedLocatorPath, getAliasedLocator(parentNode)]\n\n const dependantTree = new Map>()\n const hoistInfos = new Map()\n for (const subDependency of getSortedRegularDependencies(parentNode)) {\n const hoistInfo = getNodeHoistInfo(\n rootNode,\n rootNodePathLocators,\n [rootNode, ...nodePath, parentNode],\n subDependency,\n usedDependencies,\n hoistIdents,\n hoistIdentMap,\n shadowedNodes,\n { outputReason: options.debugLevel >= DebugLevel.REASONS, fastLookupPossible: options.fastLookupPossible }\n )\n\n hoistInfos.set(subDependency, hoistInfo)\n if (hoistInfo.isHoistable === Hoistable.DEPENDS) {\n for (const node of hoistInfo.dependsOn) {\n const nodeDependants = dependantTree.get(node.name) || new Set()\n nodeDependants.add(subDependency.name)\n dependantTree.set(node.name, nodeDependants)\n }\n }\n }\n\n const unhoistableNodes = new Set()\n const addUnhoistableNode = (node: HoisterWorkTree, hoistInfo: HoistInfo, reason: string) => {\n if (!unhoistableNodes.has(node)) {\n unhoistableNodes.add(node)\n hoistInfos.set(node, { isHoistable: Hoistable.NO, reason })\n for (const dependantName of dependantTree.get(node.name) || []) {\n addUnhoistableNode(\n parentNode.dependencies.get(dependantName)!,\n hoistInfo,\n options.debugLevel >= DebugLevel.REASONS\n ? `- peer dependency ${prettyPrintLocator(node.locator)} from parent ${prettyPrintLocator(parentNode.locator)} was not hoisted`\n : ``\n )\n }\n }\n }\n\n for (const [node, hoistInfo] of hoistInfos) if (hoistInfo.isHoistable === Hoistable.NO) addUnhoistableNode(node, hoistInfo, hoistInfo.reason!)\n\n let wereNodesHoisted = false\n for (const node of hoistInfos.keys()) {\n if (!unhoistableNodes.has(node)) {\n isGraphChanged = true\n const shadowedNames = parentShadowedNodes.get(parentNode)\n if (shadowedNames && shadowedNames.has(node.name)) anotherRoundNeeded = true\n\n wereNodesHoisted = true\n parentNode.dependencies.delete(node.name)\n parentNode.hoistedDependencies.set(node.name, node)\n parentNode.reasons.delete(node.name)\n\n const hoistedNode = rootNode.dependencies.get(node.name)\n if (options.debugLevel >= DebugLevel.REASONS) {\n const hoistedFrom = Array.from(locatorPath)\n .concat([parentNode.locator])\n .map(x => prettyPrintLocator(x))\n .join(`→`)\n let hoistedFromArray = rootNode.hoistedFrom.get(node.name)\n if (!hoistedFromArray) {\n hoistedFromArray = []\n rootNode.hoistedFrom.set(node.name, hoistedFromArray)\n }\n hoistedFromArray.push(hoistedFrom)\n\n parentNode.hoistedTo.set(\n node.name,\n Array.from(rootNodePath)\n .map(x => prettyPrintLocator(x.locator))\n .join(`→`)\n )\n }\n // Add hoisted node to root node, in case it is not already there\n if (!hoistedNode) {\n // Avoid adding other version of root node to itself\n if (rootNode.ident !== node.ident) {\n rootNode.dependencies.set(node.name, node)\n newNodes.add(node)\n }\n } else {\n for (const reference of node.references) {\n hoistedNode.references.add(reference)\n }\n }\n }\n }\n\n if (parentNode.dependencyKind === HoisterDependencyKind.EXTERNAL_SOFT_LINK && wereNodesHoisted) anotherRoundNeeded = true\n\n if (options.check) {\n const checkLog = selfCheck(tree)\n if (checkLog) {\n throw new Error(\n `${checkLog}, after hoisting dependencies of ${[rootNode, ...nodePath, parentNode].map(x => prettyPrintLocator(x.locator)).join(`→`)}:\\n${dumpDepTree(tree)}`\n )\n }\n }\n\n const children = getSortedRegularDependencies(parentNode)\n for (const node of children) {\n if (unhoistableNodes.has(node)) {\n const hoistInfo = hoistInfos.get(node)!\n const hoistableIdent = hoistIdents.get(node.name)\n if ((hoistableIdent === node.ident || !parentNode.reasons.has(node.name)) && hoistInfo.isHoistable !== Hoistable.YES) parentNode.reasons.set(node.name, hoistInfo.reason!)\n\n if (!node.isHoistBorder && nextAliasedLocatorPath.indexOf(getAliasedLocator(node)) < 0) {\n seenNodes.add(parentNode)\n const decoupledNode = decoupleGraphNode(parentNode, node)\n\n hoistNodeDependencies([...nodePath, parentNode], nextLocatorPath, nextAliasedLocatorPath, decoupledNode, nextNewNodes)\n\n seenNodes.delete(parentNode)\n }\n }\n }\n }\n\n let newNodes\n let nextNewNodes = new Set(getSortedRegularDependencies(rootNode))\n const aliasedRootNodePathLocators = Array.from(rootNodePath).map(x => getAliasedLocator(x))\n do {\n newNodes = nextNewNodes\n nextNewNodes = new Set()\n for (const dep of newNodes) {\n if (dep.locator === rootNode.locator || dep.isHoistBorder) continue\n const decoupledDependency = decoupleGraphNode(rootNode, dep)\n\n hoistNodeDependencies([], Array.from(rootNodePathLocators), aliasedRootNodePathLocators, decoupledDependency, nextNewNodes)\n }\n } while (nextNewNodes.size > 0)\n\n return { anotherRoundNeeded, isGraphChanged }\n}\n\nconst selfCheck = (tree: HoisterWorkTree): string => {\n const log: Array = []\n\n const seenNodes = new Set()\n const parents = new Set()\n\n const checkNode = (node: HoisterWorkTree, parentDeps: Map, parent: HoisterWorkTree) => {\n if (seenNodes.has(node)) return\n seenNodes.add(node)\n\n if (parents.has(node)) return\n\n const dependencies = new Map(parentDeps)\n for (const dep of node.dependencies.values()) if (!node.peerNames.has(dep.name)) dependencies.set(dep.name, dep)\n\n for (const origDep of node.originalDependencies.values()) {\n const dep = dependencies.get(origDep.name)\n const prettyPrintTreePath = () =>\n `${Array.from(parents)\n .concat([node])\n .map(x => prettyPrintLocator(x.locator))\n .join(`→`)}`\n if (node.peerNames.has(origDep.name)) {\n const parentDep = parentDeps.get(origDep.name)\n if (parentDep !== dep || !parentDep || parentDep.ident !== origDep.ident) {\n log.push(`${prettyPrintTreePath()} - broken peer promise: expected ${origDep.ident} but found ${parentDep ? parentDep.ident : parentDep}`)\n }\n } else {\n const hoistedFrom = parent.hoistedFrom.get(node.name)\n const originalHoistedTo = node.hoistedTo.get(origDep.name)\n const prettyHoistedFrom = `${hoistedFrom ? ` hoisted from ${hoistedFrom.join(`, `)}` : ``}`\n const prettyOriginalHoistedTo = `${originalHoistedTo ? ` hoisted to ${originalHoistedTo}` : ``}`\n const prettyNodePath = `${prettyPrintTreePath()}${prettyHoistedFrom}`\n if (!dep) {\n log.push(`${prettyNodePath} - broken require promise: no required dependency ${origDep.name}${prettyOriginalHoistedTo} found`)\n } else if (dep.ident !== origDep.ident) {\n log.push(`${prettyNodePath} - broken require promise for ${origDep.name}${prettyOriginalHoistedTo}: expected ${origDep.ident}, but found: ${dep.ident}`)\n }\n }\n }\n\n parents.add(node)\n for (const dep of node.dependencies.values()) {\n if (!node.peerNames.has(dep.name)) {\n checkNode(dep, dependencies, node)\n }\n }\n parents.delete(node)\n }\n\n checkNode(tree, tree.dependencies, tree)\n\n return log.join(`\\n`)\n}\n\n/**\n * Creates a clone of package tree with extra fields used for hoisting purposes.\n *\n * @param tree package tree clone\n */\nconst cloneTree = (tree: HoisterTree, options: InternalHoistOptions): HoisterWorkTree => {\n const { identName, name, reference, peerNames } = tree\n const treeCopy: HoisterWorkTree = {\n name,\n references: new Set([reference]),\n locator: makeLocator(identName, reference),\n ident: makeIdent(identName, reference),\n dependencies: new Map(),\n originalDependencies: new Map(),\n hoistedDependencies: new Map(),\n peerNames: new Set(peerNames),\n reasons: new Map(),\n decoupled: true,\n isHoistBorder: true,\n hoistPriority: 0,\n dependencyKind: HoisterDependencyKind.WORKSPACE,\n hoistedFrom: new Map(),\n hoistedTo: new Map(),\n }\n\n const seenNodes = new Map([[tree, treeCopy]])\n\n const addNode = (node: HoisterTree, parentNode: HoisterWorkTree) => {\n let workNode = seenNodes.get(node)\n const isSeen = !!workNode\n if (!workNode) {\n const { name, identName, reference, peerNames, hoistPriority, dependencyKind } = node\n const dependenciesNmHoistingLimits = options.hoistingLimits.get(parentNode.locator)\n workNode = {\n name,\n references: new Set([reference]),\n locator: makeLocator(identName, reference),\n ident: makeIdent(identName, reference),\n dependencies: new Map(),\n originalDependencies: new Map(),\n hoistedDependencies: new Map(),\n peerNames: new Set(peerNames),\n reasons: new Map(),\n decoupled: true,\n isHoistBorder: dependenciesNmHoistingLimits ? dependenciesNmHoistingLimits.has(name) : false,\n hoistPriority: hoistPriority || 0,\n dependencyKind: dependencyKind || HoisterDependencyKind.REGULAR,\n hoistedFrom: new Map(),\n hoistedTo: new Map(),\n }\n seenNodes.set(node, workNode)\n }\n\n parentNode.dependencies.set(node.name, workNode)\n parentNode.originalDependencies.set(node.name, workNode)\n\n if (!isSeen) {\n for (const dep of node.dependencies) {\n addNode(dep, workNode)\n }\n } else {\n const seenCoupledNodes = new Set()\n\n const markNodeCoupled = (node: HoisterWorkTree) => {\n if (seenCoupledNodes.has(node)) return\n seenCoupledNodes.add(node)\n node.decoupled = false\n\n for (const dep of node.dependencies.values()) {\n if (!node.peerNames.has(dep.name)) {\n markNodeCoupled(dep)\n }\n }\n }\n\n markNodeCoupled(workNode)\n }\n }\n\n for (const dep of tree.dependencies) addNode(dep, treeCopy)\n\n return treeCopy\n}\n\nconst getIdentName = (locator: Locator) => locator.substring(0, locator.indexOf(`@`, 1))\n\n/**\n * Creates a clone of hoisted package tree with extra fields removed\n *\n * @param tree stripped down hoisted package tree clone\n */\nconst shrinkTree = (tree: HoisterWorkTree): HoisterResult => {\n const treeCopy: HoisterResult = {\n name: tree.name,\n identName: getIdentName(tree.locator),\n references: new Set(tree.references),\n dependencies: new Set(),\n }\n\n const seenNodes = new Set([tree])\n\n const addNode = (node: HoisterWorkTree, parentWorkNode: HoisterWorkTree, parentNode: HoisterResult) => {\n const isSeen = seenNodes.has(node)\n\n let resultNode: HoisterResult\n if (parentWorkNode === node) {\n resultNode = parentNode\n } else {\n const { name, references, locator } = node\n resultNode = {\n name,\n identName: getIdentName(locator),\n references,\n dependencies: new Set(),\n }\n }\n parentNode.dependencies.add(resultNode)\n\n if (!isSeen) {\n seenNodes.add(node)\n for (const dep of node.dependencies.values()) {\n if (!node.peerNames.has(dep.name)) {\n addNode(dep, node, resultNode)\n }\n }\n seenNodes.delete(node)\n }\n }\n\n for (const dep of tree.dependencies.values()) addNode(dep, tree, treeCopy)\n\n return treeCopy\n}\n\n/**\n * Builds mapping, where key is an alias + dependent package ident and the value is the list of\n * parent package idents who depend on this package.\n *\n * @param rootNode package tree root node\n *\n * @returns preference map\n */\nconst buildPreferenceMap = (rootNode: HoisterWorkTree): PreferenceMap => {\n const preferenceMap: PreferenceMap = new Map()\n\n const seenNodes = new Set([rootNode])\n const getPreferenceKey = (node: HoisterWorkTree) => `${node.name}@${node.ident}`\n\n const getOrCreatePreferenceEntry = (node: HoisterWorkTree) => {\n const key = getPreferenceKey(node)\n let entry = preferenceMap.get(key)\n if (!entry) {\n entry = { dependents: new Set(), peerDependents: new Set(), hoistPriority: 0 }\n preferenceMap.set(key, entry)\n }\n return entry\n }\n\n const addDependent = (dependent: HoisterWorkTree, node: HoisterWorkTree) => {\n const isSeen = !!seenNodes.has(node)\n\n const entry = getOrCreatePreferenceEntry(node)\n entry.dependents.add(dependent.ident)\n\n if (!isSeen) {\n seenNodes.add(node)\n for (const dep of node.dependencies.values()) {\n const entry = getOrCreatePreferenceEntry(dep)\n entry.hoistPriority = Math.max(entry.hoistPriority, dep.hoistPriority)\n if (node.peerNames.has(dep.name)) {\n entry.peerDependents.add(node.ident)\n } else {\n addDependent(node, dep)\n }\n }\n }\n }\n\n for (const dep of rootNode.dependencies.values()) if (!rootNode.peerNames.has(dep.name)) addDependent(rootNode, dep)\n\n return preferenceMap\n}\n\nconst prettyPrintLocator = (locator?: Locator) => {\n if (!locator) return `none`\n\n const idx = locator.indexOf(`@`, 1)\n let name = locator.substring(0, idx)\n if (name.endsWith(`$wsroot$`)) name = `wh:${name.replace(`$wsroot$`, ``)}`\n const reference = locator.substring(idx + 1)\n if (reference === `workspace:.`) {\n return `.`\n } else if (!reference) {\n return `${name}`\n } else {\n let version = (reference.indexOf(`#`) > 0 ? reference.split(`#`)[1] : reference).replace(`npm:`, ``)\n if (reference.startsWith(`virtual`)) name = `v:${name}`\n if (version.startsWith(`workspace`)) {\n name = `w:${name}`\n version = ``\n }\n\n return `${name}${version ? `@${version}` : ``}`\n }\n}\n\nconst MAX_NODES_TO_DUMP = 50000\n\n/**\n * Pretty-prints dependency tree in the `yarn why`-like format\n *\n * The function is used for troubleshooting purposes only.\n *\n * @param pkg node_modules tree\n *\n * @returns sorted node_modules tree\n */\n\nconst dumpDepTree = (tree: HoisterWorkTree) => {\n let nodeCount = 0\n const dumpPackage = (pkg: HoisterWorkTree, parents: Set, prefix = ``): string => {\n if (nodeCount > MAX_NODES_TO_DUMP || parents.has(pkg)) return ``\n\n nodeCount++\n const dependencies = Array.from(pkg.dependencies.values()).sort((n1, n2) => {\n if (n1.name === n2.name) {\n return 0\n } else {\n return n1.name > n2.name ? 1 : -1\n }\n })\n\n let str = ``\n parents.add(pkg)\n for (let idx = 0; idx < dependencies.length; idx++) {\n const dep = dependencies[idx]\n if (!pkg.peerNames.has(dep.name) && dep !== pkg) {\n const reason = pkg.reasons.get(dep.name)\n const identName = getIdentName(dep.locator)\n str += `${prefix}${idx < dependencies.length - 1 ? `├─` : `└─`}${(parents.has(dep) ? `>` : ``) + (identName !== dep.name ? `a:${dep.name}:` : ``) + prettyPrintLocator(dep.locator) + (reason ? ` ${reason}` : ``)}\\n`\n str += dumpPackage(dep, parents, `${prefix}${idx < dependencies.length - 1 ? `│ ` : ` `}`)\n }\n }\n parents.delete(pkg)\n return str\n }\n\n const treeDump = dumpPackage(tree, new Set())\n\n return treeDump + (nodeCount > MAX_NODES_TO_DUMP ? `\\nTree is too large, part of the tree has been dunped\\n` : ``)\n}\n"]}