web: Rename Version.is_equal to Version.isEqual
This commit is contained in:
parent
f3efc5c80a
commit
6952197004
|
@ -33,21 +33,21 @@ export class VersionRange {
|
||||||
matches && version.is_stable_or_compatible_prerelease(fver);
|
matches && version.is_stable_or_compatible_prerelease(fver);
|
||||||
|
|
||||||
if (comparator === "" || comparator === "=") {
|
if (comparator === "" || comparator === "=") {
|
||||||
matches = matches && version.is_equal(fver);
|
matches = matches && version.isEqual(fver);
|
||||||
} else if (comparator === ">") {
|
} else if (comparator === ">") {
|
||||||
matches = matches && fver.hasPrecedenceOver(version);
|
matches = matches && fver.hasPrecedenceOver(version);
|
||||||
} else if (comparator === ">=") {
|
} else if (comparator === ">=") {
|
||||||
matches =
|
matches =
|
||||||
matches &&
|
matches &&
|
||||||
(fver.hasPrecedenceOver(version) ||
|
(fver.hasPrecedenceOver(version) ||
|
||||||
version.is_equal(fver));
|
version.isEqual(fver));
|
||||||
} else if (comparator === "<") {
|
} else if (comparator === "<") {
|
||||||
matches = matches && version.hasPrecedenceOver(fver);
|
matches = matches && version.hasPrecedenceOver(fver);
|
||||||
} else if (comparator === "<=") {
|
} else if (comparator === "<=") {
|
||||||
matches =
|
matches =
|
||||||
matches &&
|
matches &&
|
||||||
(version.hasPrecedenceOver(fver) ||
|
(version.hasPrecedenceOver(fver) ||
|
||||||
version.is_equal(fver));
|
version.isEqual(fver));
|
||||||
} else if (comparator === "^") {
|
} else if (comparator === "^") {
|
||||||
matches = matches && version.isCompatibleWith(fver);
|
matches = matches && version.isCompatibleWith(fver);
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,7 +193,7 @@ export class Version {
|
||||||
* @param fver The other version to test against
|
* @param fver The other version to test against
|
||||||
* @return True if the given version is equivalent
|
* @return True if the given version is equivalent
|
||||||
*/
|
*/
|
||||||
is_equal(fver: Version): boolean {
|
isEqual(fver: Version): boolean {
|
||||||
return (
|
return (
|
||||||
this.major === fver.major &&
|
this.major === fver.major &&
|
||||||
this.minor === fver.minor &&
|
this.minor === fver.minor &&
|
||||||
|
|
|
@ -148,7 +148,7 @@ describe("Version", function () {
|
||||||
const tests = flatten(testMatrix);
|
const tests = flatten(testMatrix);
|
||||||
for (const version of tests) {
|
for (const version of tests) {
|
||||||
assert.isOk(
|
assert.isOk(
|
||||||
Version.fromSemver(version).is_equal(
|
Version.fromSemver(version).isEqual(
|
||||||
Version.fromSemver(version)
|
Version.fromSemver(version)
|
||||||
),
|
),
|
||||||
`${version} is equal to itself`
|
`${version} is equal to itself`
|
||||||
|
@ -169,7 +169,7 @@ describe("Version", function () {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
assert.isNotOk(
|
assert.isNotOk(
|
||||||
Version.fromSemver(tests[a]).is_equal(
|
Version.fromSemver(tests[a]).isEqual(
|
||||||
Version.fromSemver(tests[b])
|
Version.fromSemver(tests[b])
|
||||||
),
|
),
|
||||||
`${tests[a]} does not equal ${tests[b]}`
|
`${tests[a]} does not equal ${tests[b]}`
|
||||||
|
|
Loading…
Reference in New Issue