Skip to content

Commit

Permalink
Plugins: include pre-releases in compatibility lookup (#4506)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brunnre8 committed Apr 12, 2022
1 parent d7bba32 commit e4840b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/packages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ function loadPackage(packageName) {

if (
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}`;
}
Expand Down

0 comments on commit e4840b4

Please sign in to comment.