Skip to content

Commit

Permalink
fix: version prefix needs to be maintained in newCandidate too
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Nov 14, 2022
1 parent 7ebb59e commit c9c2203
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/plugins/node-workspace.ts
Expand Up @@ -242,13 +242,17 @@ export class NodeWorkspace extends WorkspacePlugin<Package> {
for (const [depName, resolved] of graphPackage.localDependencies) {
const depVersion = updatedVersions.get(depName);
if (depVersion && resolved.type !== 'directory') {
const currentVersion = this.combineDeps(pkg)?.[depName];
const prefix = currentVersion
? this.detectRangePrefix(currentVersion)
: '';
updatedPackage.updateLocalDependency(
resolved,
depVersion.toString(),
'^'
prefix
);
this.logger.info(
`${pkg.name}.${depName} updated to ^${depVersion.toString()}`
`${pkg.name}.${depName} updated to ${prefix}${depVersion.toString()}`
);
}
}
Expand Down

0 comments on commit c9c2203

Please sign in to comment.