minor fix

This commit is contained in:
Dmitry Shibanov 2022-12-27 21:20:23 +01:00
parent 363785e8f4
commit 68fd79d662
3 changed files with 4 additions and 10 deletions

View file

@ -43,10 +43,7 @@ export default class NightlyNodejs extends BaseDistribution {
const rawVersion = (isValidVersion ? raw : semver.coerce(raw))!;
if (prerelease !== this.distribution) {
range = `${rawVersion}-${prerelease.replace(
this.distribution,
`${this.distribution}.`
)}`;
range = versionSpec;
} else {
range = `${semver.validRange(`^${rawVersion}-${this.distribution}`)}-0`;
}

View file

@ -43,10 +43,7 @@ export default class CanaryBuild extends BaseDistribution {
const rawVersion = (isValidVersion ? raw : semver.coerce(raw))!;
if (prerelease !== this.distribution) {
range = `${rawVersion}-${prerelease.replace(
this.distribution,
`${this.distribution}.`
)}`;
range = versionSpec;
} else {
range = `${semver.validRange(`^${rawVersion}-${this.distribution}`)}-0`;
}