Skip to content

Commit

Permalink
fix: better object creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jsterner30 committed Apr 4, 2024
1 parent 194c8b7 commit e75655e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ export default function (ruleFile: RuleFile): NPMDependencyParts[] {
const allDeps: Record<string, string> = combineDeps(ruleFile)

for (const name in allDeps) {
const dependencyName = name
if (!(allDeps[name]).includes('file:')) { // we don't care about intra-repo dependencies
parts.push({
name: dependencyName,
name,
version: removeComparatorsInVersion(allDeps[name])
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function (ruleFile: RuleFile): PIPDependencyParts[] {
if (validPIPRequirementsFile.Check(ruleFile) && ruleFile.fileType === FileTypeEnum.PIP_REQUIREMENTS) {
for (const name in ruleFile.dependencies) {
parts.push({
name: name,
name,
version: removeComparatorsInVersion(ruleFile.dependencies[name].version)
})
}
Expand Down

0 comments on commit e75655e

Please sign in to comment.