1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

include Lens's prerelease tag in the matching by semver.satisfies() so an extension's compatibility is not limited by it

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
Jim Ehrismann 2021-07-09 11:44:30 -04:00
parent 301d8a14c0
commit 8620370ecf

View File

@ -366,11 +366,8 @@ export class ExtensionDiscovery extends Singleton {
/* assume bundled extensions are compatibile */
if (!isBundled && manifest.engines?.lens) {
const appSemVerLatestImplied = appSemVer;
/* remove any prerelease tag so the extension's compatibility is not limited by it */
appSemVerLatestImplied.prerelease = [];
isCompatible = semver.satisfies(appSemVerLatestImplied, manifest.engines.lens);
/* include Lens's prerelease tag in the matching so the extension's compatibility is not limited by it */
isCompatible = semver.satisfies(appSemVer, manifest.engines.lens, { includePrerelease: true });
}
return {