mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Skip previously bundled extensions (#3420)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
106c9d4a37
commit
ba0581d982
@ -31,3 +31,7 @@ export function isCompatibleExtension(manifest: LensExtensionManifest): boolean
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isCompatibleBundledExtension(manifest: LensExtensionManifest): boolean {
|
||||||
|
return manifest.version === appSemVer.raw;
|
||||||
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ import { ExtensionsStore } from "./extensions-store";
|
|||||||
import { ExtensionLoader } from "./extension-loader";
|
import { ExtensionLoader } from "./extension-loader";
|
||||||
import type { LensExtensionId, LensExtensionManifest } from "./lens-extension";
|
import type { LensExtensionId, LensExtensionManifest } from "./lens-extension";
|
||||||
import { isProduction } from "../common/vars";
|
import { isProduction } from "../common/vars";
|
||||||
import { isCompatibleExtension } from "./extension-compatibility";
|
import { isCompatibleBundledExtension, isCompatibleExtension } from "./extension-compatibility";
|
||||||
|
|
||||||
export interface InstalledExtension {
|
export interface InstalledExtension {
|
||||||
id: LensExtensionId;
|
id: LensExtensionId;
|
||||||
@ -361,7 +361,7 @@ export class ExtensionDiscovery extends Singleton {
|
|||||||
const extensionDir = path.dirname(manifestPath);
|
const extensionDir = path.dirname(manifestPath);
|
||||||
const npmPackage = path.join(extensionDir, `${manifest.name}-${manifest.version}.tgz`);
|
const npmPackage = path.join(extensionDir, `${manifest.name}-${manifest.version}.tgz`);
|
||||||
const absolutePath = (isProduction && await fse.pathExists(npmPackage)) ? npmPackage : extensionDir;
|
const absolutePath = (isProduction && await fse.pathExists(npmPackage)) ? npmPackage : extensionDir;
|
||||||
const isCompatible = isBundled || isCompatibleExtension(manifest);
|
const isCompatible = (isBundled && isCompatibleBundledExtension(manifest)) || isCompatibleExtension(manifest);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user