Skip to content

Commit

Permalink
deleting comments
Browse files Browse the repository at this point in the history
  • Loading branch information
eranturgeman committed Aug 1, 2023
1 parent fb0ad47 commit d38280a
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions build/utils/yarn.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,25 +169,17 @@ func buildYarnV1DependencyMap(packageInfo *PackageInfo, responseStr string) (dep
for _, curDependency := range depTree.Data.DepTree {
packageCleanName, _ := splitNameAndVersion(curDependency.Name)
locatorsMap[packageCleanName] = curDependency.Name
// locatorsMap[curDependency.Name[:strings.Index(curDependency.Name[1:], "@")+1]] = curDependency.Name
}

for _, curDependency := range depTree.Data.DepTree {
var dependency YarnDependency
dependency.Value = curDependency.Name
_, packageVersion := splitNameAndVersion(curDependency.Name)
// packageVersion := curDependency.Name[strings.Index(curDependency.Name[1:], "@")+2:] // TODO make sure the +2 is ok, suppose to cover a package that starts with @
// packageCleanName := curDependency.Name[:strings.Index(curDependency.Name[1:], "@")+1]
// locatorsMap[packageCleanName] = curDependency.Name

dependency.Details = YarnDepDetails{packageVersion, nil}
for _, subDep := range curDependency.Dependencies {
subDepName, _ := splitNameAndVersion(subDep.DependencyName)
dependency.Details.Dependencies = append(dependency.Details.Dependencies, YarnDependencyPointer{subDep.DependencyName, locatorsMap[subDepName]})

// dependency.Details.Dependencies = append(dependency.Details.Dependencies, YarnDependencyPointer{subDep.DependencyName, ""})
// subDependency := &(dependency.Details.Dependencies[len(dependency.Details.Dependencies)-1])
// subDependency.Locator = locatorsMap[subDep.DependencyName[:strings.Index(subDep.DependencyName[1:], "@")+1]]
}
dependenciesMap[curDependency.Name] = &dependency
}
Expand Down

0 comments on commit d38280a

Please sign in to comment.