Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
electron-comlink
Advanced tools
An adapter to allow Electron to use Comlink to communicate between the background and renderer processes.
npm install electron-comlink
// In the renderer process
const Comlink = require("comlink");
const {ElectronMessageAdapter} = require("electron-comlink");
const endpoint = new ElectronMessageAdapter(window, electron.ipcRenderer);
const exposed = {
doSomething() {
return "Did something in the renderer";
},
};
Comlink.expose(exposed, endpoint);
// In the background process
const Comlink = require("comlink");
const {ElectronMessageAdapter} = require("electron-comlink");
const win = new BrowserWindow({width: 800, height: 600});
const endpoint = new ElectronMessageAdapter(win, electron.ipcMain);
const link = Comlink.wrap(endpoint);
await link.doSomething(); // Returns "Did something in the renderer"
// In the background process
const Comlink = require("comlink");
const {ElectronMessageAdapter} = require("electron-comlink");
const win = new BrowserWindow({width: 800, height: 600});
const endpoint = new ElectronMessageAdapter(win, electron.ipcMain);
const exposed = {
doSomethingElse() {
return "Did something in the background";
},
};
Comlink.expose(exposed, endpoint);
// In the renderer process
const Comlink = require("comlink");
const {ElectronMessageAdapter} = require("electron-comlink");
const endpoint = new ElectronMessageAdapter(window, electron.ipcRenderer);
const link = Comlink.wrap(endpoint);
await link.doSomethingElse(); // Returns "Did something in the background"
transferList
argument to .postMessage()
is not currently supported.await
ing foreverFAQs
Electron compatibility layer for Comlink
The npm package electron-comlink receives a total of 19 weekly downloads. As such, electron-comlink popularity was classified as not popular.
We found that electron-comlink demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.