Skip to content

Commit

Permalink
fix(semver): fix false positive for workspace mismatches
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMason committed Feb 15, 2023
1 parent df61df6 commit 4f696c5
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ export class Instance {
}

hasRange(range: Syncpack.Config.SemverRange.Value): boolean {
return (
this.pathDef.name !== 'workspace' &&
this.version === setSemverRange(range, this.version)
);
if (this.pathDef.name === 'workspace') {
// version property of package.json must always be exact
return this.version === setSemverRange('', this.version);
}
return this.version === setSemverRange(range, this.version);
}

setRange(range: Syncpack.Config.SemverRange.Value): void {
Expand Down

0 comments on commit 4f696c5

Please sign in to comment.