New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

bd-edge-js

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bd-edge-js

Edge.js: run .NET and Node.js in-process on Electron

latest
Source
npmnpm
Version
8.2.9
Version published
Maintainers
1
Created
Source

bd-edge-js

This is a fork of electron-edge-js (which is itself a fork of edge-js) patched to support BetterDiscord.

Discord runs 32-bit Electron 1.7.9 (node v7.9.0) and calls electron.app.setVersion at the start, so the version property electron-edge-js looks for isn't there.

To fix this we simply use the deprecated (but still working) process.versions['atom-shell'] property.

NB: Inspecting edge.js stuff with Chromium DevTools can sometimes crash the renderer process. Here be dragons!

Usage is the same as edge or edge-js, replace require('edge') or require('edge-js') with require('electron-edge-js'):

npm install bd-edge-js
-var edge = require('edge');
+var edge = require('bd-edge-js');

var helloWorld = edge.func(function () {/*
    async (input) => {
        return ".NET Welcomes " + input.ToString();
    }
*/});

// Do not attempt to dump `helloWorld` in DevTools. It will crash Electron!

Why use bd-edge-js?

Discord's Electron is built using specific version of Node.js. In order to use edge in Electron project you would need to recompile it using the same Node.js version.

bd-edge-js comes precompiled with correct Node.js versions.

Differences from electron-edge

  • Uses same codebase as edge-js that comes with both latest code changes from edge project and additional fixes and improvements available in edge-js project.
  • Supports majority of Electron versions.

Differences from electron-edge-js

FAQs

Package last updated on 30 Nov 2017

Did you know?

Socket

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.

Install

Related posts