Skip to content

Commit

Permalink
fix: hermit versioning matches should call equals on Channel versions (
Browse files Browse the repository at this point in the history
  • Loading branch information
lyonlai committed Jan 27, 2023
1 parent 1a561ba commit a8d28dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/modules/versioning/hermit/index.spec.ts
Expand Up @@ -93,6 +93,8 @@ describe('modules/versioning/hermit/index', () => {
${'0.6.1'} | ${'~0.6'} | ${true}
${'0.6.1'} | ${'0.6.1'} | ${true}
${'0.0.6'} | ${'^0.0.6'} | ${true}
${'0.0.6'} | ${'@0.0.6'} | ${false}
${'@0.0.6'} | ${'0.0.6'} | ${false}
${'@1'} | ${'@1.2'} | ${false}
${'@1.2'} | ${'@1.2'} | ${true}
${'@1.2.3'} | ${'@1.2'} | ${false}
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/versioning/hermit/index.ts
Expand Up @@ -175,7 +175,7 @@ export class HermitVersioning extends RegExpVersioningApi {

override matches(version: string, range: string): boolean {
if (
HermitVersioning._isChannel(version) &&
HermitVersioning._isChannel(version) ||
HermitVersioning._isChannel(range)
) {
return this.equals(version, range);
Expand Down

0 comments on commit a8d28dd

Please sign in to comment.