@yarnpkg/nm 4.0.0-rc.47 → 4.0.0-rc.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -207,7 +207,6 @@ const buildPackageTree = (pnp, options) => {
207
207
  const nodes = new Map();
208
208
  const getNodeKey = (name, locator) => `${stringifyLocator(locator)}:${name}`;
209
209
  const addPackageToTree = (name, pkg, locator, parent, parentPkg, parentDependencies, parentRelativeCwd, isHoistBorder) => {
210
- var _a, _b;
211
210
  const nodeKey = getNodeKey(name, locator);
212
211
  let node = nodes.get(nodeKey);
213
212
  const isSeen = !!node;
@@ -331,9 +330,9 @@ const buildPackageTree = (pnp, options) => {
331
330
  }
332
331
  }
333
332
  }
334
- const parentHoistingLimits = (_a = options.hoistingLimitsByCwd) === null || _a === void 0 ? void 0 : _a.get(parentRelativeCwd);
333
+ const parentHoistingLimits = options.hoistingLimitsByCwd?.get(parentRelativeCwd);
335
334
  const relativeDepCwd = isExternalSoftLinkDep ? parentRelativeCwd : fslib_1.ppath.relative(topPkgPortableLocation, fslib_1.npath.toPortablePath(depPkg.packageLocation)) || fslib_2.PortablePath.dot;
336
- const depHoistingLimits = (_b = options.hoistingLimitsByCwd) === null || _b === void 0 ? void 0 : _b.get(relativeDepCwd);
335
+ const depHoistingLimits = options.hoistingLimitsByCwd?.get(relativeDepCwd);
337
336
  const isHoistBorder = parentHoistingLimits === NodeModulesHoistingLimits.DEPENDENCIES
338
337
  || depHoistingLimits === NodeModulesHoistingLimits.DEPENDENCIES
339
338
  || depHoistingLimits === NodeModulesHoistingLimits.WORKSPACES;
package/lib/hoist.js CHANGED
@@ -442,7 +442,7 @@ const getNodeHoistInfo = (rootNode, rootNodePathLocators, nodePath, node, usedDe
442
442
  if (!usedDep || origDep.ident !== usedDep.ident) {
443
443
  isHoistable = false;
444
444
  if (outputReason)
445
- reason = `- previously hoisted dependency mismatch, needed: ${prettyPrintLocator(origDep.locator)}, available: ${prettyPrintLocator(usedDep === null || usedDep === void 0 ? void 0 : usedDep.locator)}`;
445
+ reason = `- previously hoisted dependency mismatch, needed: ${prettyPrintLocator(origDep.locator)}, available: ${prettyPrintLocator(usedDep?.locator)}`;
446
446
  break;
447
447
  }
448
448
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarnpkg/nm",
3
- "version": "4.0.0-rc.47",
3
+ "version": "4.0.0-rc.49",
4
4
  "license": "BSD-2-Clause",
5
5
  "main": "./lib/index.js",
6
6
  "exports": {
@@ -9,9 +9,9 @@
9
9
  },
10
10
  "sideEffects": false,
11
11
  "dependencies": {
12
- "@yarnpkg/core": "^4.0.0-rc.47",
13
- "@yarnpkg/fslib": "^3.0.0-rc.47",
14
- "@yarnpkg/pnp": "^4.0.0-rc.47"
12
+ "@yarnpkg/core": "^4.0.0-rc.49",
13
+ "@yarnpkg/fslib": "^3.0.0-rc.49",
14
+ "@yarnpkg/pnp": "^4.0.0-rc.49"
15
15
  },
16
16
  "scripts": {
17
17
  "postpack": "rm -rf lib",