fix(core): fix invalid yarn parser dependencies grouping key (#15647)

This commit is contained in:
Miroslav Jonaš 2023-03-14 16:21:58 +01:00 committed by GitHub
parent 8a0398d744
commit 3f4ba6d2af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -227,7 +227,7 @@ function groupDependencies(
const resolutionMap = new Map<string, YarnDependency>(); const resolutionMap = new Map<string, YarnDependency>();
const snapshotMap = new Map<YarnDependency, Set<string>>(); const snapshotMap = new Map<YarnDependency, Set<string>>();
Object.entries(dependencies).forEach(([key, snapshot]) => { Object.entries(dependencies).forEach(([key, snapshot]) => {
const resolutionKey = `${snapshot.resolution}${snapshot.integrity}`; const resolutionKey = `${snapshot.resolved}${snapshot.integrity}`;
if (resolutionMap.has(resolutionKey)) { if (resolutionMap.has(resolutionKey)) {
const existingSnapshot = resolutionMap.get(resolutionKey); const existingSnapshot = resolutionMap.get(resolutionKey);
snapshotMap.get(existingSnapshot).add(key); snapshotMap.get(existingSnapshot).add(key);