(req)
| 77360 | } |
| 77361 | |
| 77362 | resolveToResolution(req) { |
| 77363 | const parentNames = req.parentNames, |
| 77364 | pattern = req.pattern; |
| 77365 | |
| 77366 | |
| 77367 | if (!parentNames || this.flat) { |
| 77368 | return req; |
| 77369 | } |
| 77370 | |
| 77371 | const resolution = this.resolutionMap.find(pattern, parentNames); |
| 77372 | |
| 77373 | if (resolution) { |
| 77374 | const resolutionManifest = this.getResolvedPattern(resolution); |
| 77375 | |
| 77376 | if (resolutionManifest) { |
| 77377 | invariant(resolutionManifest._reference, 'resolutions should have a resolved reference'); |
| 77378 | resolutionManifest._reference.patterns.push(pattern); |
| 77379 | this.addPattern(pattern, resolutionManifest); |
| 77380 | const lockManifest = this.lockfile.getLocked(pattern); |
| 77381 | if ((0, (_resolutionMap2 || _load_resolutionMap2()).shouldUpdateLockfile)(lockManifest, resolutionManifest._reference)) { |
| 77382 | this.lockfile.removePattern(pattern); |
| 77383 | } |
| 77384 | } else { |
| 77385 | this.resolutionMap.addToDelayQueue(req); |
| 77386 | } |
| 77387 | return null; |
| 77388 | } |
| 77389 | |
| 77390 | return req; |
| 77391 | } |
| 77392 | } |
| 77393 | exports.default = PackageResolver; |
| 77394 |
no test coverage detected