Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electron-panel

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-panel - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

19

index.js
'use strict';
const platform = require('electron-platform');
const pkgJson = require('./package.json');
let panel;
let name = `__electron_panel__`;
let msg = `Failed to require ${pkgJson.name}@${pkgJson.version}:
A different version of ${pkgJson.name} already running in the process, we will redirect to it.
Please make sure your dependencies use the same version of ${pkgJson.name}.`;
if ( platform.isMainProcess ) {
panel = require('./lib/main');
if (global[name]) {
console.warn(msg);
panel = global[name];
} else {
panel = global[name] = require('./lib/main');
}
} else {
panel = require('./lib/renderer/index');
if (window[name]) {
console.warn(msg);
panel = window[name];
} else {
panel = window[name] = require('./lib/renderer/index');
}
}

@@ -12,0 +27,0 @@

9

lib/main.js
'use strict';
if ( global.__electron_panel__ ) {
const pkgJson = require('../package.json');
console.warn(`A different version of electron-panel already running in the process: ${pkgJson.version}, redirect to it. Please make sure your dependencies use the same version of electron-panel.`);
module.exports = global.__electron_panel__;
return;
}
const {app, ipcMain, BrowserWindow} = require('electron');

@@ -24,3 +16,2 @@ const ipcPlus = require('electron-ipc-plus');

module.exports = panel;
global.__electron_panel__ = panel;

@@ -27,0 +18,0 @@ /**

'use strict';
if ( window.__electron_panel__ ) {
const pkgJson = require('../../package.json');
console.warn(`A different version of electron-panel already running in the process: ${pkgJson.version}, redirect to it. Please make sure your dependencies use the same version of electron-panel.`);
module.exports = window.__electron_panel__;
return;
}
const {ipcRenderer} = require('electron');

@@ -17,3 +9,2 @@ const ipcPlus = require('electron-ipc-plus');

module.exports = panel;
window.__electron_panel__ = panel;

@@ -20,0 +11,0 @@ // ========================================

{
"name": "electron-panel",
"version": "1.3.2",
"version": "1.3.3",
"description": "Manipulate panels in window for Electron",

@@ -25,3 +25,3 @@ "main": "index.js",

"dependencies": {
"clean-css": "^4.0.7",
"clean-css": "^4.0.8",
"electron-ipc-listener": "^1.0.0",

@@ -28,0 +28,0 @@ "electron-ipc-plus": "^1.3.3",

@@ -87,5 +87,7 @@ # electron-panel

- [Panel (main process)](docs/panel-main.md)
- [Panel (renderer process)](docs/panel-renderer.md)
- [Panel Frame](docs/panel-frame.md)
- Main Process
- [Panel](docs/panel-main.md)
- Renderer Process
- [Panel](docs/panel-renderer.md)
- [Panel Frame](docs/panel-frame.md)

@@ -92,0 +94,0 @@ ## TODO

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc