Skip to content

Commit

Permalink
Merge pull request #658 from AurorNZ/Stop-using-locked-version-becaus…
Browse files Browse the repository at this point in the history
…e-it-is-lying

Stop using lockedVersion because it does not work correctly with pnpm
  • Loading branch information
Obi-Dann committed Jul 6, 2023
2 parents b62f722 + b4dce39 commit e8812a9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
14 changes: 8 additions & 6 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions src/getUpdatedDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,14 @@ export function* getUpdatedDependencies(
manager: managerName,
packageFile: basePackage,
update: {
newValue: headDependency.currentValue || '',
newValue:
headDependency.currentValue ||
headDependency.currentRawValue ||
'',
newVersion:
headDependency.lockedVersion ||
headDependency.currentVersion ||
headDependency.currentValue ||
headDependency.currentRawValue ||
undefined
},
dependency: baseDependency
Expand All @@ -79,9 +82,9 @@ function isSameVersion(
a: PackageDependency<Record<string, unknown>>,
b: PackageDependency<Record<string, unknown>>
): boolean {
if (a.lockedVersion && b.lockedVersion) {
return a.lockedVersion === b.lockedVersion
if (a.currentValue && b.currentValue) {
return a.currentValue === b.currentValue
}

return a.currentValue === b.currentValue
return a.currentRawValue === b.currentRawValue
}

0 comments on commit e8812a9

Please sign in to comment.