Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Commit

Permalink
fix(electron): downgrade electron-{forge,packager}
Browse files Browse the repository at this point in the history
  • Loading branch information
devinus committed Nov 27, 2018
1 parent 0081ad6 commit e4c6f22
Show file tree
Hide file tree
Showing 7 changed files with 174 additions and 139 deletions.
3 changes: 1 addition & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ test_script:
- yarn test

after_test:
- yarn cross-env NODE_ENV=production ember electron:build -e production
- ps: |
$path = "$Env:PATH;C:\Program Files (x86)\Windows Kits\10\App Certification Kit"
Set-AppveyorBuildVariable -Name 'PATH' -Value $path
- yarn cross-env NODE_ENV=production ember electron:build -e production
- ps: |
$cscFile = Join-Path -Path "$Env:TMP" -ChildPath csc.p12
[IO.File]::WriteAllBytes($cscFile, [Convert]::FromBase64String($Env:CSC_LINK))
Set-AppveyorBuildVariable -Name 'CSC_FILE' -Value $cscFile
Expand Down
1 change: 0 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = (defaults) => {
sourceMaps: isProduction ? false : 'inline',
plugins: [
'@babel/plugin-proposal-function-bind',
'@babel/plugin-proposal-throw-expressions',
],
},

Expand Down
9 changes: 8 additions & 1 deletion ember-electron/electron-forge-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');

const del = require('del');
const moment = require('moment');

const {
Expand Down Expand Up @@ -99,7 +100,6 @@ module.exports = {
// extendInfo: {
// CSResourcesFileMapped: true,
// },
prune: false,
overwrite: true,
packageManager: 'yarn',
executableName: name,
Expand All @@ -110,6 +110,13 @@ module.exports = {
OriginalFilename: `${name}.exe`,
ProductName: productName,
},
afterPrune: [
(buildPath, electronVersion, platform, arch, callback) => {
const cwd = path.join(buildPath, 'node_modules', 'lzma-native');
return del(['{deps,build}', 'bin/**'], { cwd })
.then(() => callback(), err => callback(err));
},
],
},
electronWinstallerConfig: {
name,
Expand Down
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/plugin-proposal-function-bind": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@commitlint/cli": "^7.2.1",
"@commitlint/config-conventional": "^7.1.2",
"@commitlint/prompt": "^7.2.1",
Expand All @@ -148,7 +147,6 @@
"babel-eslint": "^10.0.1",
"bignumber.js": "^8.0.1",
"bip39": "^2.5.0",
"bootstrap": "^4.1.3",
"broccoli-asset-rev": "^3.0.0",
"broccoli-funnel": "^2.0.1",
"broccoli-merge-trees": "^3.0.1",
Expand All @@ -159,9 +157,9 @@
"cross-env": "^5.2.0",
"devtron": "^1.4.0",
"downloadjs": "^1.4.7",
"electron-forge": "^5.2.3",
"electron-forge": "~5.0.0",
"electron-installer-dmg": "^2.0.0",
"electron-packager": "^12.2.0",
"electron-packager": "~10.1.2",
"electron-prebuilt-compile": "3.0.10",
"ember-ajax": "^4.0.0",
"ember-auto-import": "^1.2.16",
Expand Down Expand Up @@ -266,9 +264,7 @@
"standard-version": "^4.4.0"
},
"resolutions": {
"electron-forge": "^5.2.3",
"electron-installer-dmg": "^2.0.0",
"electron-packager": "^12.2.0"
"electron-installer-dmg": "^2.0.0"
},
"engines": {
"node": ">= 10.2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
diff --git a/node_modules/electron-forge/dist/api/make.js b/node_modules/electron-forge/dist/api/make.js
index c51cd46..1a7cdad 100644
index a18d452..4d8ba3c 100644
--- a/node_modules/electron-forge/dist/api/make.js
+++ b/node_modules/electron-forge/dist/api/make.js
@@ -204,7 +204,8 @@ exports.default = (() => {
for (var _iterator2 = (0, _getIterator3.default)((0, _parseArchs2.default)(platform, arch, electronVersion)), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
@@ -199,7 +199,8 @@ exports.default = (() => {
for (var _iterator2 = (0, _getIterator3.default)((0, _parseArchs2.default)(platform, arch, packageJSON.devDependencies['electron-prebuilt-compile'])), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
const targetArch = _step2.value;

- const packageDir = _path2.default.resolve(outDir, `${appName}-${actualTargetPlatform}-${targetArch}`);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/electron-packager/common.js b/node_modules/electron-packager/common.js
index d389ffa..f0277e2 100644
index b619db9..b36ffe9 100644
--- a/node_modules/electron-packager/common.js
+++ b/node_modules/electron-packager/common.js
@@ -72,7 +72,8 @@ function sanitizeAppName (name) {
Expand Down
Loading

0 comments on commit e4c6f22

Please sign in to comment.