web: Rename Version.is_compatible_with to Version.isCompatibleWith
This commit is contained in:
parent
d2e6ae50a9
commit
ce6288fda8
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 &&
|
||||
|
|
|
@ -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}`
|
||||
|
|
Loading…
Reference in New Issue