You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

electron-extension-installer

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

17

dist/index.js

@@ -95,2 +95,11 @@ "use strict";

}
const isManifestVersion3 = async (manifestDirectory) => {
try {
const file = await fs_jetpack_1.default.readAsync(path.join(manifestDirectory, "manifest.json"), "json");
return file.manifest_version === 3;
}
catch (e) {
return false;
}
};
/**

@@ -137,2 +146,10 @@ * @param extensionReference Extension or extensions to install

}
if (await isManifestVersion3(extensionFolder)) {
throw new Error(`Manifest version 3 is not supported by electron. For more information, see:
https://github.com/facebook/react/issues/25843
https://github.com/electron/electron/issues/37876
https://github.com/MarshallOfSound/electron-devtools-installer/issues/238
https://github.com/electron/electron/blob/e3b7c3024f6f70155efb1022b691954280f983cb/docs/api/extensions.md#L1`);
}
const ext = await electron_1.session.defaultSession.loadExtension(extensionFolder, loadExtensionOptions);

@@ -139,0 +156,0 @@ return ext.name;

2

package.json
{
"name": "electron-extension-installer",
"version": "1.1.1",
"version": "1.1.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": "Jonluca DeCaro <electronextension@jonlu.ca>",

@@ -92,2 +92,11 @@ import type { LoadExtensionOptions } from "electron";

const isManifestVersion3 = async (manifestDirectory: string) => {
try {
const file = await jetpack.readAsync(path.join(manifestDirectory, "manifest.json"), "json");
return file.manifest_version === 3;
} catch (e) {
return false;
}
};
/**

@@ -143,2 +152,10 @@ * @param extensionReference Extension or extensions to install

if (await isManifestVersion3(extensionFolder)) {
throw new Error(`Manifest version 3 is not supported by electron. For more information, see:
https://github.com/facebook/react/issues/25843
https://github.com/electron/electron/issues/37876
https://github.com/MarshallOfSound/electron-devtools-installer/issues/238
https://github.com/electron/electron/blob/e3b7c3024f6f70155efb1022b691954280f983cb/docs/api/extensions.md#L1`);
}
const ext = await session.defaultSession.loadExtension(extensionFolder, loadExtensionOptions);

@@ -145,0 +162,0 @@ return ext.name;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc