Plugins: include pre-releases in compatibility lookup (#4506)
Semver doesn't treat pre-release versions as upgrades, meaning >4.3.0 isn't satisfied by 4.3.1-rc.1. For the purpose of TL plugins however, we are only interested in the semantic version and expect that rc's adhere to the compatibility promise.
This commit is contained in:
parent
d7bba325a7
commit
e4840b4d75
@ -109,7 +109,9 @@ function loadPackage(packageName) {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
packageInfo.thelounge.supports &&
|
packageInfo.thelounge.supports &&
|
||||||
!semver.satisfies(Helper.getVersionNumber(), packageInfo.thelounge.supports)
|
!semver.satisfies(Helper.getVersionNumber(), packageInfo.thelounge.supports, {
|
||||||
|
includePrerelease: true, // our pre-releases should respect the semver guarantees
|
||||||
|
})
|
||||||
) {
|
) {
|
||||||
throw `v${packageInfo.version} does not support this version of The Lounge. Supports: ${packageInfo.thelounge.supports}`;
|
throw `v${packageInfo.version} does not support this version of The Lounge. Supports: ${packageInfo.thelounge.supports}`;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user