mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
ignore Lens's prerelease tag when checking extension compatibility
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
parent
77f8ea67bd
commit
301d8a14c0
@ -364,13 +364,12 @@ export class ExtensionDiscovery extends Singleton {
|
|||||||
const absolutePath = (isProduction && await fse.pathExists(npmPackage)) ? npmPackage : extensionDir;
|
const absolutePath = (isProduction && await fse.pathExists(npmPackage)) ? npmPackage : extensionDir;
|
||||||
let isCompatible = isBundled;
|
let isCompatible = isBundled;
|
||||||
|
|
||||||
if (manifest.engines?.lens) {
|
/* assume bundled extensions are compatibile */
|
||||||
|
if (!isBundled && manifest.engines?.lens) {
|
||||||
const appSemVerLatestImplied = appSemVer;
|
const appSemVerLatestImplied = appSemVer;
|
||||||
|
|
||||||
if (appSemVerLatestImplied.prerelease?.[0] === "latest") {
|
/* remove any prerelease tag so the extension's compatibility is not limited by it */
|
||||||
/* remove the "latest" prerelease tag so as not to require the extension to specify it */
|
appSemVerLatestImplied.prerelease = [];
|
||||||
appSemVerLatestImplied.prerelease = [];
|
|
||||||
}
|
|
||||||
isCompatible = semver.satisfies(appSemVerLatestImplied, manifest.engines.lens);
|
isCompatible = semver.satisfies(appSemVerLatestImplied, manifest.engines.lens);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user