web: Rename Version.is_compatible_with to Version.isCompatibleWith

This commit is contained in:
Nathan Adams 2020-11-13 22:50:45 +01:00 committed by Mike Welsh
parent d2e6ae50a9
commit ce6288fda8
3 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ export class VersionRange {
(version.has_precedence_over(fver) ||
version.is_equal(fver));
} else if (comparator === "^") {
matches = matches && version.is_compatible_with(fver);
matches = matches && version.isCompatibleWith(fver);
}
}

View File

@ -87,7 +87,7 @@ export class Version {
* @param fver The other version to test against
* @return True if compatible
*/
is_compatible_with(fver: Version): boolean {
isCompatibleWith(fver: Version): boolean {
return (
(this.major !== 0 && this.major === fver.major) ||
(this.major === 0 &&

View File

@ -72,7 +72,7 @@ describe("Version", function () {
for (const a of test) {
for (const b of test) {
assert.isOk(
Version.fromSemver(a).is_compatible_with(
Version.fromSemver(a).isCompatibleWith(
Version.fromSemver(b)
),
`${a} is compatible with ${b}`
@ -88,7 +88,7 @@ describe("Version", function () {
if (test === otherTest) continue;
for (const b of otherTest) {
assert.isNotOk(
Version.fromSemver(a).is_compatible_with(
Version.fromSemver(a).isCompatibleWith(
Version.fromSemver(b)
),
`${a} is not compatible with ${b}`