electron
Advanced tools
Comparing version
16
index.js
@@ -6,6 +6,14 @@ var fs = require('fs') | ||
if (fs.existsSync(pathFile)) { | ||
module.exports = path.join(__dirname, fs.readFileSync(pathFile, 'utf-8')) | ||
} else { | ||
throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again') | ||
function getElectronPath () { | ||
if (fs.existsSync(pathFile)) { | ||
var executablePath = fs.readFileSync(pathFile, 'utf-8') | ||
if (process.env.ELECTRON_OVERRIDE_DIST_PATH) { | ||
return path.join(process.env.ELECTRON_OVERRIDE_DIST_PATH, executablePath) | ||
} | ||
return path.join(__dirname, 'dist', executablePath) | ||
} else { | ||
throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again') | ||
} | ||
} | ||
module.exports = getElectronPath() |
@@ -20,12 +20,8 @@ #!/usr/bin/env node | ||
if (installedVersion === version && fs.existsSync(path.join(__dirname, platformPath))) { | ||
var electronPath = process.env.ELECTRON_OVERRIDE_DIST_PATH || path.join(__dirname, 'dist', platformPath) | ||
if (installedVersion === version && fs.existsSync(electronPath)) { | ||
process.exit(0) | ||
} | ||
var mirror | ||
if (version.indexOf('nightly') !== -1) { | ||
mirror = 'https://github.com/electron/nightlies/releases/download/v' | ||
} | ||
// downloads if not cached | ||
@@ -39,4 +35,3 @@ download({ | ||
force: process.env.force_no_cache === 'true', | ||
quiet: process.env.npm_config_loglevel === 'silent' || process.env.CI, | ||
mirror | ||
quiet: process.env.npm_config_loglevel === 'silent' || process.env.CI | ||
}, extractFile) | ||
@@ -64,8 +59,8 @@ | ||
case 'darwin': | ||
return 'dist/Electron.app/Contents/MacOS/Electron' | ||
return 'Electron.app/Contents/MacOS/Electron' | ||
case 'freebsd': | ||
case 'linux': | ||
return 'dist/electron' | ||
return 'electron' | ||
case 'win32': | ||
return 'dist/electron.exe' | ||
return 'electron.exe' | ||
default: | ||
@@ -72,0 +67,0 @@ throw new Error('Electron builds are not available on platform: ' + platform) |
@@ -14,4 +14,4 @@ { | ||
"dependencies": { | ||
"@types/node": "^8.0.24", | ||
"electron-download": "^3.0.1", | ||
"@types/node": "^10.1.4", | ||
"electron-download": "^4.1.0", | ||
"extract-zip": "^1.0.3" | ||
@@ -27,4 +27,7 @@ }, | ||
}, | ||
"engines": { | ||
"node": ">= 4.0" | ||
}, | ||
"name": "electron", | ||
"version": "2.0.18", | ||
"version": "3.1.13", | ||
"repository": "https://github.com/electron/electron", | ||
@@ -31,0 +34,0 @@ "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", |
@@ -6,3 +6,2 @@ [](https://electronjs.org) | ||
[](https://windows-ci.electronjs.org/project/AppVeyor/electron/branch/master) | ||
[](https://mac-ci.electronjs.org/blue/organizations/jenkins/Electron%20org%2Felectron/activity?branch=master) | ||
[](https://david-dm.org/electron/electron?type=dev) | ||
@@ -12,3 +11,3 @@ [](https://atom-slack.herokuapp.com/) | ||
:memo: Available Translations: 🇨🇳 🇹🇼 🇧🇷 🇪🇸 🇰🇷 🇯🇵 🇷🇺 🇫🇷 🇹🇭 🇳🇱 🇹🇷 🇮🇩 🇺🇦 🇨🇿 🇮🇹. | ||
View these docs in other languages at [electron/electron-i18n](https://github.com/electron/electron-i18n/tree/master/content/). | ||
View these docs in other languages at [electron/i18n](https://github.com/electron/i18n/tree/master/content/). | ||
@@ -35,7 +34,7 @@ The Electron framework lets you write cross-platform desktop applications | ||
```sh | ||
npm install electron --save-dev --save-exact | ||
npm install electron --save-dev [--save-exact] | ||
``` | ||
The `--save-exact` flag is recommended as Electron does not follow semantic | ||
versioning. For info on how to manage Electron versions in your apps, see | ||
The `--save-exact` flag is recommended for Electron prior to version 2, as it does not follow semantic | ||
versioning. As of version 2.0.0, Electron follows semver, so you don't need `--save-exact` flag. For info on how to manage Electron versions in your apps, see | ||
[Electron versioning](docs/tutorial/electron-versioning.md). | ||
@@ -91,3 +90,3 @@ | ||
Find documentation translations in [electron/electron-i18n](https://github.com/electron/electron-i18n). | ||
Find documentation translations in [electron/i18n](https://github.com/electron/i18n). | ||
@@ -94,0 +93,0 @@ ## Community |
Sorry, the diff of this file is too big to display
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
394667
5.17%8999
4.8%99
-1%14
16.67%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated