We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2d1871 commit b8e52c4Copy full SHA for b8e52c4
pkg/dependency/parser/nodejs/npm/parse.go
@@ -216,7 +216,8 @@ func (p *Parser) resolveLinks(packages map[string]Package) {
216
}
217
218
workspaces := rootPkg.Workspaces
219
- // Clone packages to avoid cases when we check already updated packages
+ // Changing the map during the map iteration causes unexpected behavior,
220
+ // so we need to iterate over the cloned `packages` map, but change the original `packages` map.
221
for pkgPath, pkg := range maps.Clone(packages) {
222
for linkPath, link := range links {
223
if !strings.HasPrefix(pkgPath, link.Resolved) {
0 commit comments