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

Do not check updates for bundled extensions from default sources

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2022-01-18 14:37:18 +02:00
parent 2eba814fe7
commit 798ad85fad
2 changed files with 5 additions and 7 deletions

View File

@ -271,7 +271,7 @@ export class ExtensionLoader {
loadOnMain() {
this.autoInitExtensions(async (extension: LensMainExtension) => {
// Check for update for the extension on main process that does not have renderer script
if (!extension.manifest.renderer) {
if (extension.isBundled || !extension.manifest.renderer) {
this.checkForExtensionUpdate(extension);
}
@ -299,7 +299,9 @@ export class ExtensionLoader {
}
});
this.checkForExtensionUpdate(extension);
if (!extension.isBundled) {
this.checkForExtensionUpdate(extension);
}
return removeItems;
});

View File

@ -33,11 +33,7 @@ export class NpmJsVersionChecker implements LensExtensionLatestVersionChecker {
this.downloadJson = downloadJsonOverride || downloadJson;
}
public async getLatestVersion(manifest: LensExtensionManifest, isBundled: boolean) {
if (!isBundled) {
return null;
}
public async getLatestVersion(manifest: LensExtensionManifest) {
const { name } = manifest;
const registryUrl = new URLParse("https://registry.npmjs.com").set("pathname", name).toString();
const json = await this.getJson(registryUrl);