electron-installer-windows
Advanced tools
Comparing version 2.0.0 to 3.0.0
{ | ||
"name": "electron-installer-windows", | ||
"description": "Create a Windows package for your Electron app.", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"license": "MIT", | ||
@@ -33,24 +33,23 @@ "author": { | ||
"debug": "^4.1.1", | ||
"electron-installer-common": "^0.7.0", | ||
"fs-extra": "^8.0.1", | ||
"glob": "^7.1.4", | ||
"lodash": "^4.17.11", | ||
"electron-installer-common": "^0.10.0", | ||
"fs-extra": "^8.1.0", | ||
"lodash": "^4.17.15", | ||
"parse-author": "^2.0.0", | ||
"which": "^1.3.1", | ||
"yargs": "^13.2.4" | ||
"which": "^2.0.2", | ||
"yargs": "^15.1.0" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.2.0", | ||
"eslint": "^5.16.0", | ||
"eslint-config-standard": "^12.0.0", | ||
"eslint-plugin-import": "^2.17.3", | ||
"eslint-plugin-node": "^9.1.0", | ||
"eslint-plugin-promise": "^4.1.1", | ||
"eslint-plugin-standard": "^4.0.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-standard": "^14.1.0", | ||
"eslint-plugin-import": "^2.20.0", | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"finalhandler": "^1.1.2", | ||
"mocha": "^6.1.4", | ||
"mocha": "^7.0.0", | ||
"promise-retry": "^1.1.1", | ||
"serve-static": "^1.14.1", | ||
"tmp-promise": "^2.0.1" | ||
"tmp-promise": "^2.0.2" | ||
} | ||
} |
@@ -12,3 +12,3 @@ ![Electron Installer for Windows](resources/logo.png) | ||
This tool requires Node 8 or greater. | ||
This tool requires Node 10 or greater. | ||
@@ -236,2 +236,3 @@ I'd recommend building your packages on your target platform, but if you have to run this on Mac OS X or Linux, you will need to install `mono` and `wine` through your package manager. | ||
Name of the application (e.g., `Atom`), used in the [`title` field of the `nuspec` file](https://docs.nuget.org/create/nuspec-reference). | ||
It is also used as the description when signing your msi installer. | ||
@@ -248,10 +249,4 @@ #### options.exe | ||
Short description of the application, used in the [`summary` field of the `nuspec` file](https://docs.nuget.org/create/nuspec-reference). | ||
A description of the application, used in the [`description` field of the `nuspec` file](https://docs.microsoft.com/en-us/nuget/reference/nuspec#description). | ||
#### options.productDescription | ||
Type: `String` | ||
Default: `package.productDescription || package.description` | ||
Long description of the application, used in the [`description` field of the `nuspec` file](https://docs.nuget.org/create/nuspec-reference). | ||
#### options.version | ||
@@ -299,7 +294,7 @@ Type: `String` | ||
#### options.iconUrl | ||
#### options.iconNuget | ||
Type: `String` | ||
Default: `undefined` | ||
URL for the image to use as the icon for the package in the *Manage NuGet Packages* dialog box, used in the [`iconUrl` field of the `spec` file](https://docs.nuget.org/create/nuspec-reference). | ||
The path to an image file use as the icon for the NuGet package, used in the [`icon` field of the `spec` file](https://docs.microsoft.com/en-us/nuget/reference/nuspec#icon). | ||
@@ -375,3 +370,3 @@ #### options.tags | ||
### NuGet | ||
Current version: 5.1.0 | ||
Current version: 5.4.0 | ||
@@ -378,0 +373,0 @@ To update [NuGet](https://github.com/nuget/home) to the latest version, head over to the [releases page](https://www.nuget.org/downloads). |
@@ -8,4 +8,2 @@ 'use strict' | ||
const path = require('path') | ||
const { promisify } = require('util') | ||
const glob = promisify(require('glob')) | ||
@@ -54,2 +52,15 @@ const spawn = require('./spawn') | ||
/** | ||
* Transforms a version string from semver v2 into v1 | ||
*/ | ||
convertVersion () { | ||
const [mainVersion, ...suffix] = this.options.version.split('-') | ||
if (suffix.length > 0) { | ||
this.options.version = [mainVersion, suffix.join('-').replace(/\./g, '')].join('-') | ||
} else { | ||
this.options.version = mainVersion | ||
} | ||
} | ||
/** | ||
* Copy the application into the package. | ||
@@ -59,2 +70,6 @@ */ | ||
await super.copyApplication() | ||
if (this.options.iconNuget) { | ||
const iconNuget = path.join(this.stagingAppDir, this.options.iconNugetName) | ||
await super.copyIcon(this.options.iconNuget, iconNuget) | ||
} | ||
return this.copySquirrelUpdater() | ||
@@ -77,8 +92,5 @@ } | ||
const args = [ | ||
'pack', | ||
this.specPath, | ||
'-BasePath', | ||
this.stagingAppDir, | ||
'-OutputDirectory', | ||
path.join(this.stagingDir, 'nuget'), | ||
'pack', this.specPath, | ||
'-BasePath', this.stagingAppDir, | ||
'-OutputDirectory', path.join(this.stagingDir, 'nuget'), | ||
'-NoDefaultExcludes' | ||
@@ -103,15 +115,2 @@ ] | ||
/** | ||
* Find the package just created. | ||
*/ | ||
findPackage () { | ||
const packagePattern = path.join(this.stagingDir, 'nuget', '*.nupkg') | ||
this.options.logger(`Finding package with pattern ${packagePattern}`) | ||
return common.wrapError('finding package with pattern', async () => { | ||
const files = await glob(packagePattern) | ||
return files[0] | ||
}) | ||
} | ||
/** | ||
* Get the hash of default options for the installer. Some come from the info | ||
@@ -136,3 +135,3 @@ * read from `package.json`, and some are hardcoded. | ||
iconUrl: undefined, | ||
iconNuget: undefined, | ||
@@ -161,8 +160,12 @@ tags: [], | ||
if (!this.options.description && !this.options.productDescription) { | ||
throw new Error(`No Description or ProductDescription provided. Please set either a description in the app's package.json or provide it in the this.options.`) | ||
this.convertVersion() | ||
if (this.options.iconNuget) this.options.iconNugetName = path.basename(this.options.iconNuget) | ||
if (!this.options.description) { | ||
throw new Error("No Description provided. Please set a description in the app's package.json or provide it in the this.options.") | ||
} | ||
if (!this.options.authors) { | ||
throw new Error(`No Authors provided. Please set an author in the app's package.json or provide it in the this.options.`) | ||
throw new Error("No Authors provided. Please set an author in the app's package.json or provide it in the this.options.") | ||
} | ||
@@ -199,3 +202,4 @@ | ||
`/f "${path.resolve(this.options.certificateFile)}"`, | ||
`/p "${this.options.certificatePassword}"` | ||
`/p "${this.options.certificatePassword}"`, | ||
`/d "${this.options.productName}"` | ||
].join(' ')) | ||
@@ -209,3 +213,3 @@ } | ||
return common.wrapError('releasifying package', async () => { | ||
const pkg = await this.findPackage() | ||
const pkg = path.join(this.stagingDir, 'nuget', `${this.options.name}.${this.options.version}.nupkg`) | ||
args.unshift('--releasify', pkg) | ||
@@ -212,0 +216,0 @@ return spawn(cmd, args, this.options.logger) |
@@ -31,3 +31,6 @@ 'use strict' | ||
} | ||
return spawn(cmd, args, logger, updateExecutableMissingException) | ||
return spawn(cmd, args, { | ||
logger, | ||
updateErrorCallback: updateExecutableMissingException | ||
}) | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
18139971
7
266
385
+ Added@malept/cross-spawn-promise@1.1.1(transitive)
+ Added@types/fs-extra@9.0.13(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedasar@3.2.0(transitive)
+ Addedat-least-node@1.0.0(transitive)
+ Addedcliui@6.0.0(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedcommander@5.1.0(transitive)
+ Addedcross-spawn@7.0.3(transitive)
+ Addedelectron-installer-common@0.10.3(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedfind-up@4.1.0(transitive)
+ Addedfs-extra@9.1.0(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedjsonfile@6.1.0(transitive)
+ Addedlocate-path@5.0.0(transitive)
+ Addedp-locate@4.1.0(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedsemver@7.6.2(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedtmp@0.2.3(transitive)
+ Addedtmp-promise@3.0.3(transitive)
+ Addeduniversalify@2.0.1(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedwrap-ansi@6.2.0(transitive)
+ Addedyargs@15.4.1(transitive)
+ Addedyargs-parser@18.1.3(transitive)
- Removedglob@^7.1.4
- Removedansi-regex@4.1.1(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedasar@2.1.0(transitive)
- Removedbluebird@3.7.2(transitive)
- Removedcliui@5.0.0(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedcommander@2.20.3(transitive)
- Removedcross-spawn@5.1.0(transitive)
- Removedcross-spawn-promise@0.10.2(transitive)
- Removedcuint@0.2.2(transitive)
- Removedelectron-installer-common@0.7.3(transitive)
- Removedemoji-regex@7.0.3(transitive)
- Removedfind-up@3.0.0(transitive)
- Removedis-fullwidth-code-point@2.0.0(transitive)
- Removedlocate-path@3.0.0(transitive)
- Removedlru-cache@4.1.5(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedp-locate@3.0.0(transitive)
- Removedpath-exists@3.0.0(transitive)
- Removedpseudomap@1.0.2(transitive)
- Removedrimraf@2.7.1(transitive)
- Removedsemver@6.3.1(transitive)
- Removedshebang-command@1.2.0(transitive)
- Removedshebang-regex@1.0.0(transitive)
- Removedstring-width@3.1.0(transitive)
- Removedstrip-ansi@5.2.0(transitive)
- Removedtmp@0.1.0(transitive)
- Removedtmp-promise@1.1.02.1.1(transitive)
- Removedwhich@1.3.1(transitive)
- Removedwrap-ansi@5.1.0(transitive)
- Removedyallist@2.1.2(transitive)
- Removedyargs@13.3.2(transitive)
- Removedyargs-parser@13.1.2(transitive)
Updatedfs-extra@^8.1.0
Updatedlodash@^4.17.15
Updatedwhich@^2.0.2
Updatedyargs@^15.1.0