electron-installer-snap
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "electron-installer-snap", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Build snapcraft packages for Electron applications", | ||
@@ -34,6 +34,6 @@ "author": "Mark Lee", | ||
"eslint": "^4.7.2", | ||
"eslint-config-standard": "^10.2.1", | ||
"eslint-config-standard": "^11.0.0", | ||
"eslint-plugin-ava": "^4.4.0", | ||
"eslint-plugin-import": "^2.7.0", | ||
"eslint-plugin-node": "^5.1.1", | ||
"eslint-plugin-node": "^6.0.0", | ||
"eslint-plugin-promise": "^3.5.0", | ||
@@ -55,2 +55,3 @@ "eslint-plugin-standard": "^3.0.1", | ||
"pify": "^3.0.0", | ||
"semver": "^5.5.0", | ||
"tmp-promise": "^1.0.3", | ||
@@ -57,0 +58,0 @@ "which": "^1.3.0", |
@@ -38,3 +38,3 @@ # Electron Installer: Snap | ||
Then you can run `npm run build:package && npm run build:snap`, which will prepare the Electron app | ||
for bundling, generate a `.snap` file in your current directory. | ||
for bundling and generate a `.snap` file in your current directory. | ||
It is recommended to ignore the generated `snap` directory in your version control. | ||
@@ -41,0 +41,0 @@ |
@@ -23,2 +23,3 @@ 'use strict' | ||
const pull = require('lodash.pull') | ||
const semver = require('semver') | ||
const yaml = require('js-yaml') | ||
@@ -152,4 +153,23 @@ | ||
this.parts.organize[path.basename(packageDir)] = this.data.name | ||
return this.updateGTKDependency(packageDir) | ||
} | ||
updateGTKDependency (packageDir) { | ||
return this.readElectronVersion(packageDir) | ||
.then(version => { | ||
if (semver.gte(version, '2.0.0-beta.1')) { | ||
this.parts.after[0] = 'desktop-gtk3' | ||
} | ||
return this.data | ||
}) | ||
} | ||
readElectronVersion (packageDir) { | ||
return fs.readFile(path.resolve(packageDir, 'version')) | ||
// The content of the version file is the tag name, e.g. "v1.8.1" | ||
.then(tag => tag.toString().slice(1).trim()) | ||
} | ||
transform (packageDir, userSupplied) { | ||
@@ -179,5 +199,3 @@ this.appName = userSupplied.name | ||
this.transformFeatures() | ||
this.transformParts(packageDir) | ||
return this.data | ||
return this.transformParts(packageDir) | ||
} | ||
@@ -184,0 +202,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
362201
636
0
15
+ Addedsemver@^5.5.0