Upgrade to Electron 1.8.2 / Node.js 8.2.1 (#2066)
* Upgrade to Electron 1.8.2 / Node.js 8.2.1 * Update CI Node.js versions * Make `engines` top-level property This was accidentally included under `build` which is disallowed by `electron-builder`. * Refactor notification updates Allows easier debugging through variable inspection. * Use `appId` for Application User Model ID Recommended in: https://github.com/electron/electron/issues/10864#issuecomment-346229090 * Update `spectron` to 3.8.0 * Bump `electron-builder` based dependencies * Use `config.extraMetadata` instead of `em` Prevents `Unknown argument: em` error. See: https://github.com/electron-userland/electron-builder/issues/2615 * Revert AUMID to be based on `packageJson.name` In our build artifact `packageJson.build.appId` causes an NPE.
This commit is contained in:
parent
3a334f3d8d
commit
a4c52b8d64
|
@ -1,6 +1,6 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- '7.9.0'
|
||||
- '8.2.1'
|
||||
os:
|
||||
- linux
|
||||
dist: trusty
|
||||
|
@ -12,7 +12,7 @@ script:
|
|||
- yarn eslint
|
||||
- yarn test-server
|
||||
- yarn lint
|
||||
- ./node_modules/.bin/build --em.environment=$SIGNAL_ENV --config.mac.bundleVersion='$TRAVIS_BUILD_NUMBER' --publish=never
|
||||
- $(yarn bin)/build --config.extraMetadata.environment=$SIGNAL_ENV --config.mac.bundleVersion='$TRAVIS_BUILD_NUMBER' --publish=never
|
||||
- ./travis.sh
|
||||
env:
|
||||
global:
|
||||
|
|
|
@ -8,7 +8,7 @@ cache:
|
|||
install:
|
||||
- systeminfo | findstr /C:"OS"
|
||||
- set PATH=C:\Ruby23-x64\bin;%PATH%
|
||||
- ps: Install-Product node 7.9.0 x64
|
||||
- ps: Install-Product node 8.2.1 x64
|
||||
- yarn install
|
||||
|
||||
build_script:
|
||||
|
@ -20,7 +20,7 @@ build_script:
|
|||
- type package.json | findstr /v certificateSubjectName > temp.json
|
||||
- move temp.json package.json
|
||||
- yarn prepare-beta-build
|
||||
- node_modules\.bin\build --em.environment=%SIGNAL_ENV% --publish=never
|
||||
- node_modules\.bin\build --config.extraMetadata.environment=%SIGNAL_ENV% --publish=never
|
||||
|
||||
test_script:
|
||||
- node build\grunt.js test
|
||||
|
|
|
@ -26,9 +26,10 @@
|
|||
this.trigger('click', conversation);
|
||||
},
|
||||
update: function() {
|
||||
const isFocused = window.isFocused();
|
||||
console.log(
|
||||
'updating notifications - count:', this.length,
|
||||
'focused:', window.isFocused(),
|
||||
'focused:', isFocused,
|
||||
'enabled:', enabled
|
||||
);
|
||||
if (!enabled) {
|
||||
|
@ -37,8 +38,9 @@
|
|||
if (this.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (window.isFocused()) {
|
||||
// The window is focused. Consider yourself notified.
|
||||
|
||||
const isNotificationOmitted = isFocused;
|
||||
if (isNotificationOmitted) {
|
||||
this.clear();
|
||||
return;
|
||||
}
|
||||
|
|
7
main.js
7
main.js
|
@ -22,10 +22,9 @@ const logging = require('./app/logging');
|
|||
const autoUpdate = require('./app/auto_update');
|
||||
const windowState = require('./app/window_state');
|
||||
|
||||
|
||||
const aumid = `org.whispersystems.${packageJson.name}`;
|
||||
console.log(`setting AUMID to ${aumid}`);
|
||||
app.setAppUserModelId(aumid);
|
||||
const appUserModelId = `org.whispersystems.${packageJson.name}`;
|
||||
console.log('Set Windows Application User Model ID (AUMID)', { appUserModelId });
|
||||
app.setAppUserModelId(appUserModelId);
|
||||
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
// be closed automatically when the JavaScript object is garbage collected.
|
||||
|
|
15
package.json
15
package.json
|
@ -18,7 +18,7 @@
|
|||
"asarl": "asar l release/mac/Signal.app/Contents/Resources/app.asar",
|
||||
"icon-gen": "electron-icon-maker --input=images/icon_1024.png --output=./build",
|
||||
"generate": "npm run icon-gen && grunt",
|
||||
"build": "build --em.environment=$SIGNAL_ENV",
|
||||
"build": "build --config.extraMetadata.environment=$SIGNAL_ENV",
|
||||
"dist": "npm run generate && npm run build",
|
||||
"pack": "npm run generate && npm run build -- --dir",
|
||||
"prepare-beta-build": "node prepare_beta_build.js",
|
||||
|
@ -51,7 +51,7 @@
|
|||
"electron-config": "^1.0.0",
|
||||
"electron-editor-context-menu": "^1.1.1",
|
||||
"electron-is-dev": "^0.3.0",
|
||||
"electron-updater": "^2.19.0",
|
||||
"electron-updater": "^2.21.0",
|
||||
"emoji-datasource": "4.0.0",
|
||||
"emoji-datasource-apple": "4.0.0",
|
||||
"emoji-js": "^3.4.0",
|
||||
|
@ -75,10 +75,10 @@
|
|||
"asar": "^0.14.0",
|
||||
"bower": "^1.8.2",
|
||||
"chai": "^4.1.2",
|
||||
"electron": "1.7.12",
|
||||
"electron-builder": "^19.53.7",
|
||||
"electron": "1.8.2",
|
||||
"electron-builder": "^20.2.0",
|
||||
"electron-icon-maker": "0.0.3",
|
||||
"electron-publisher-s3": "^19.53.7",
|
||||
"electron-publisher-s3": "^20.2.0",
|
||||
"eslint": "^4.14.0",
|
||||
"eslint-config-airbnb-base": "^12.1.0",
|
||||
"eslint-plugin-import": "^2.8.0",
|
||||
|
@ -98,9 +98,12 @@
|
|||
"mocha-testcheck": "^1.0.0-rc.0",
|
||||
"node-sass-import-once": "^1.2.0",
|
||||
"nyc": "^11.4.1",
|
||||
"spectron": "^3.7.2",
|
||||
"spectron": "^3.8.0",
|
||||
"tmp": "^0.0.33"
|
||||
},
|
||||
"engines": {
|
||||
"node": "8.2.1"
|
||||
},
|
||||
"build": {
|
||||
"appId": "org.whispersystems.signal-desktop",
|
||||
"mac": {
|
||||
|
|
14
yarn.lock
14
yarn.lock
|
@ -22,9 +22,9 @@
|
|||
"7zip-bin-mac" "^1.0.1"
|
||||
"7zip-bin-win" "^2.1.1"
|
||||
|
||||
"@types/node@^7.0.18":
|
||||
version "7.0.43"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c"
|
||||
"@types/node@^8.0.24":
|
||||
version "8.9.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.9.4.tgz#dfd327582a06c114eb6e0441fa3d6fab35edad48"
|
||||
|
||||
"JSV@>= 4.0.x":
|
||||
version "4.0.2"
|
||||
|
@ -1535,11 +1535,11 @@ electron-updater@^2.19.0:
|
|||
semver "^5.4.1"
|
||||
source-map-support "^0.5.0"
|
||||
|
||||
electron@1.7.12:
|
||||
version "1.7.12"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-1.7.12.tgz#dcc61a2c1b0c3df25f68b3425379a01abd01190e"
|
||||
electron@1.8.2:
|
||||
version "1.8.2"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-1.8.2.tgz#a817cd733c2972b3c7cc4f777caf6e424b88014d"
|
||||
dependencies:
|
||||
"@types/node" "^7.0.18"
|
||||
"@types/node" "^8.0.24"
|
||||
electron-download "^3.0.1"
|
||||
extract-zip "^1.0.3"
|
||||
|
||||
|
|
Loading…
Reference in New Issue