Merge remote-tracking branch 'old-origin/develop' into dbkr/yarn_install

This commit is contained in:
David Baker 2020-07-15 12:55:58 +01:00
commit c2a39a4a8e
6 changed files with 162 additions and 42 deletions

View file

@ -1,3 +1,51 @@
Changes in [1.7.0](https://github.com/vector-im/riot-desktop/releases/tag/v1.7.0) (2020-07-15)
==============================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.8...v1.7.0)
* Fix lint error
[\#113](https://github.com/vector-im/riot-desktop/pull/113)
* Delabs font-scaling
[\#112](https://github.com/vector-im/riot-desktop/pull/112)
* Remove room list labs flag from config
[\#109](https://github.com/vector-im/riot-desktop/pull/109)
* Remove the irc layout setting from labs
[\#111](https://github.com/vector-im/riot-desktop/pull/111)
* Update npm to ^6.14.6
[\#108](https://github.com/vector-im/riot-desktop/pull/108)
Changes in [1.6.8](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.8) (2020-07-03)
==============================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.8-rc.1...v1.6.8)
* No changes since rc.1
Changes in [1.6.8-rc.1](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.8-rc.1) (2020-07-01)
========================================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.7...v1.6.8-rc.1)
* Show expiring toast on completed downloads to prompt user to open
[\#106](https://github.com/vector-im/riot-desktop/pull/106)
* Upgrade to Electron 9.0.5
[\#107](https://github.com/vector-im/riot-desktop/pull/107)
* Add new spinner labs option to config.json
[\#105](https://github.com/vector-im/riot-desktop/pull/105)
* electron-main: Skip the reindex if we're going to delete the db anyways.
[\#104](https://github.com/vector-im/riot-desktop/pull/104)
* riot-desktop: Bump the required seshat version.
[\#103](https://github.com/vector-im/riot-desktop/pull/103)
* main: Add an event index IPC method to check if a room is being indexed.
[\#100](https://github.com/vector-im/riot-desktop/pull/100)
* electron-main: Add support to set and get the user version.
[\#102](https://github.com/vector-im/riot-desktop/pull/102)
* Upgrade to Electron 9
[\#94](https://github.com/vector-im/riot-desktop/pull/94)
Changes in [1.6.7](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.7) (2020-06-29)
==============================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.6...v1.6.7)
* No changes since 1.6.6
Changes in [1.6.6](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.6) (2020-06-23)
==============================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.6-rc.1...v1.6.6)

View file

@ -14,6 +14,7 @@
"hosting_signup_link": "https://modular.im/services/matrix-hosting-riot?utm_source=riot-web&utm_medium=web",
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"features": {
"feature_new_spinner": "labs",
"feature_pinning": "labs",
"feature_custom_status": "labs",
"feature_custom_tags": "labs",
@ -23,10 +24,7 @@
"feature_dm_verification": "labs",
"feature_bridge_state": "labs",
"feature_presence_in_room_list": "labs",
"feature_custom_themes": "labs",
"feature_new_room_list": "labs",
"feature_irc_ui": "labs",
"feature_font_scaling": "labs"
"feature_custom_themes": "labs"
},
"piwik": {
"url": "https://piwik.riot.im/",

View file

@ -2,7 +2,7 @@
"name": "element-desktop",
"productName": "Element (Riot)",
"main": "src/electron-main.js",
"version": "1.6.6",
"version": "1.7.0",
"description": "A feature-rich client for Matrix.org",
"author": "Element",
"repository": {
@ -52,7 +52,7 @@
"mkdirp": "^1.0.3",
"needle": "^2.5.0",
"node-pre-gyp": "^0.15.0",
"npm": "^6.13.7",
"npm": "^6.14.6",
"rimraf": "^3.0.2",
"semver": "^7.1.3",
"tar": "^6.0.1"
@ -63,7 +63,7 @@
},
"build": {
"appId": "im.riot.app",
"electronVersion": "9.0.4",
"electronVersion": "9.0.5",
"files": [
"package.json",
{

View file

@ -99,6 +99,13 @@ if (argv["help"]) {
app.exit();
}
// Electron creates the user data directory (with just an empty 'Dictionaries' directory...)
// as soon as the app path is set, so pick a random path in it that must exist if it's a
// real user data directory.
function isRealUserDataDir(d) {
return fs.existsSync(path.join(d, 'IndexedDB'));
}
// check if we are passed a profile in the SSO callback url
let userDataPath;
@ -114,12 +121,6 @@ if (userDataPathInProtocol) {
if (argv['profile']) {
newUserDataPath += '-' + argv['profile'];
}
// Electron creates the user data directory (with just an empty 'Dictionaries' directory...)
// as soon as the app path is set, so pick a random path in it that must exist if it's a
// real user data directory.
function isRealUserDataDir(d) {
return fs.existsSync(path.join(d, 'IndexedDB'));
}
const newUserDataPathExists = isRealUserDataDir(newUserDataPath);
const oldUserDataPath = path.join(app.getPath('appData'), 'Riot');
const oldUserDataPathExists = isRealUserDataDir(oldUserDataPath);

View file

@ -1,7 +1,8 @@
const {clipboard, nativeImage, Menu, MenuItem, shell, dialog} = require('electron');
const {clipboard, nativeImage, Menu, MenuItem, shell, dialog, ipcMain} = require('electron');
const url = require('url');
const fs = require('fs');
const request = require('request');
const path = require('path');
const MAILTO_PREFIX = "mailto:";
@ -205,6 +206,9 @@ function onEditableContextMenu(ev, params) {
ev.preventDefault();
}
ipcMain.on('userDownloadOpen', function(ev, {path}) {
shell.openPath(path);
});
module.exports = (webContents) => {
webContents.on('new-window', onWindowOrNavigate);
@ -222,4 +226,16 @@ module.exports = (webContents) => {
onEditableContextMenu(ev, params);
}
});
webContents.session.on('will-download', (event, item) => {
item.once('done', (event, state) => {
if (state === 'completed') {
const savePath = item.getSavePath();
webContents.send('userDownloadCompleted', {
path: savePath,
name: path.basename(savePath),
});
}
});
});
};

113
yarn.lock
View file

@ -703,7 +703,7 @@ chardet@^0.7.0:
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
chownr@^1.1.1, chownr@^1.1.2:
chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==
@ -1956,11 +1956,16 @@ got@^9.6.0:
to-readable-stream "^1.0.0"
url-parse-lax "^3.0.0"
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.3:
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2:
version "4.2.3"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
graceful-fs@^4.2.4:
version "4.2.4"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
har-schema@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
@ -2006,11 +2011,16 @@ has@^1.0.1, has@^1.0.3:
dependencies:
function-bind "^1.1.1"
hosted-git-info@^2.1.4, hosted-git-info@^2.7.1, hosted-git-info@^2.8.5:
hosted-git-info@^2.1.4, hosted-git-info@^2.7.1:
version "2.8.5"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c"
integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==
hosted-git-info@^2.8.8:
version "2.8.8"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
hosted-git-info@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.4.tgz#be4973eb1fd2737b11c9c7c19380739bb249f60d"
@ -2907,8 +2917,8 @@ map-age-cleaner@^0.1.1:
p-defer "^1.0.0"
"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop":
version "7.0.0"
resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/f683f4544aa5da150836b01c754062809119fa97"
version "7.1.0"
resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/2a688bdac828dc62916437d83c72cef1e525d5f9"
dependencies:
"@babel/runtime" "^7.8.3"
another-json "^0.2.0"
@ -3053,14 +3063,14 @@ mississippi@^3.0.0:
stream-each "^1.1.0"
through2 "^2.0.0"
mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0:
version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
dependencies:
minimist "0.0.8"
mkdirp@^0.5.3:
mkdirp@^0.5.3, mkdirp@^0.5.5:
version "0.5.5"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
@ -3132,7 +3142,7 @@ node-fetch-npm@^2.0.2:
json-parse-better-errors "^1.0.0"
safe-buffer "^5.1.1"
node-gyp@^5.0.2, node-gyp@^5.0.7:
node-gyp@^5.0.2:
version "5.1.0"
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.0.tgz#8e31260a7af4a2e2f994b0673d4e0b3866156332"
integrity sha512-OUTryc5bt/P8zVgNUmC6xdXiDJxLMAW8cF5tLQOT9E5sOQj+UeQxnnPy74K3CLCa/SOjjBlbuzDLR8ANwA+wmw==
@ -3149,6 +3159,23 @@ node-gyp@^5.0.2, node-gyp@^5.0.7:
tar "^4.4.12"
which "^1.3.1"
node-gyp@^5.1.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e"
integrity sha512-WH0WKGi+a4i4DUt2mHnvocex/xPLp9pYt5R6M2JdFB7pJ7Z34hveZ4nDTGTiLXCkitA9T8HFZjhinBCiVHYcWw==
dependencies:
env-paths "^2.2.0"
glob "^7.1.4"
graceful-fs "^4.2.2"
mkdirp "^0.5.1"
nopt "^4.0.1"
npmlog "^4.1.2"
request "^2.88.0"
rimraf "^2.6.3"
semver "^5.7.1"
tar "^4.4.12"
which "^1.3.1"
node-pre-gyp@^0.15.0:
version "0.15.0"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.15.0.tgz#c2fc383276b74c7ffa842925241553e8b40f1087"
@ -3165,7 +3192,7 @@ node-pre-gyp@^0.15.0:
semver "^5.3.0"
tar "^4.4.2"
nopt@^4.0.1, nopt@~4.0.1:
nopt@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=
@ -3173,6 +3200,14 @@ nopt@^4.0.1, nopt@~4.0.1:
abbrev "1"
osenv "^0.1.4"
nopt@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48"
integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==
dependencies:
abbrev "1"
osenv "^0.1.4"
normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
@ -3254,7 +3289,7 @@ npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1:
semver "^5.6.0"
validate-npm-package-name "^3.0.0"
npm-packlist@^1.1.12, npm-packlist@^1.1.6, npm-packlist@^1.4.7:
npm-packlist@^1.1.12, npm-packlist@^1.1.6, npm-packlist@^1.4.8:
version "1.4.8"
resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e"
integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==
@ -3281,7 +3316,16 @@ npm-profile@^4.0.2:
figgy-pudding "^3.4.1"
npm-registry-fetch "^4.0.0"
npm-registry-fetch@^4.0.0, npm-registry-fetch@^4.0.2:
npm-profile@^4.0.4:
version "4.0.4"
resolved "https://registry.yarnpkg.com/npm-profile/-/npm-profile-4.0.4.tgz#28ee94390e936df6d084263ee2061336a6a1581b"
integrity sha512-Ta8xq8TLMpqssF0H60BXS1A90iMoM6GeKwsmravJ6wYjWwSzcYBTdyWa3DZCYqPutacBMEm7cxiOkiIeCUAHDQ==
dependencies:
aproba "^1.1.2 || 2"
figgy-pudding "^3.4.1"
npm-registry-fetch "^4.0.0"
npm-registry-fetch@^4.0.0:
version "4.0.2"
resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.2.tgz#2b1434f93ccbe6b6385f8e45f45db93e16921d7a"
integrity sha512-Z0IFtPEozNdeZRPh3aHHxdG+ZRpzcbQaJLthsm3VhNf6DScicTFRHZzK82u8RsJUsUHkX+QH/zcB/5pmd20H4A==
@ -3294,6 +3338,19 @@ npm-registry-fetch@^4.0.0, npm-registry-fetch@^4.0.2:
npm-package-arg "^6.1.0"
safe-buffer "^5.2.0"
npm-registry-fetch@^4.0.5:
version "4.0.5"
resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.5.tgz#cb87cf7f25bfb048d6c3ee19d115bebf93ea5bfa"
integrity sha512-yQ0/U4fYpCCqmueB2g8sc+89ckQ3eXpmU4+Yi2j5o/r0WkKvE2+Y0tK3DEILAtn2UaQTkjTHxIXe2/CSdit+/Q==
dependencies:
JSONStream "^1.3.4"
bluebird "^3.5.1"
figgy-pudding "^3.4.1"
lru-cache "^5.1.1"
make-fetch-happen "^5.0.0"
npm-package-arg "^6.1.0"
safe-buffer "^5.2.0"
npm-run-path@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
@ -3306,10 +3363,10 @@ npm-user-validate@~1.0.0:
resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.0.tgz#8ceca0f5cea04d4e93519ef72d0557a75122e951"
integrity sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE=
npm@^6.13.7:
version "6.13.7"
resolved "https://registry.yarnpkg.com/npm/-/npm-6.13.7.tgz#9533a3ddc57f9792db8a8b303efabaf878047841"
integrity sha512-X967EKTT407CvgrWFjXusnPh0VLERcmR9hZFSVgkEquOomZkvpwLJ5zrQ3qrG9SpPLKJE4bPLUu76exKQ4a3Cg==
npm@^6.14.6:
version "6.14.6"
resolved "https://registry.yarnpkg.com/npm/-/npm-6.14.6.tgz#1a81ce1fac2bf5457dbf6342ceed503627ff228f"
integrity sha512-axnz6iHFK6WPE0js/+mRp+4IOwpHn5tJEw5KB6FiCU764zmffrhsYHbSHi2kKqNkRBt53XasXjngZfBD3FQzrQ==
dependencies:
JSONStream "^1.3.5"
abbrev "~1.1.1"
@ -3322,7 +3379,7 @@ npm@^6.13.7:
byte-size "^5.0.1"
cacache "^12.0.3"
call-limit "^1.1.1"
chownr "^1.1.3"
chownr "^1.1.4"
ci-info "^2.0.0"
cli-columns "^3.1.2"
cli-table3 "^0.5.1"
@ -3338,10 +3395,10 @@ npm@^6.13.7:
fs-vacuum "~1.2.10"
fs-write-stream-atomic "~1.0.10"
gentle-fs "^2.3.0"
glob "^7.1.4"
graceful-fs "^4.2.3"
glob "^7.1.6"
graceful-fs "^4.2.4"
has-unicode "~2.0.1"
hosted-git-info "^2.8.5"
hosted-git-info "^2.8.8"
iferr "^1.0.2"
infer-owner "^1.0.4"
inflight "~1.0.6"
@ -3369,20 +3426,20 @@ npm@^6.13.7:
lru-cache "^5.1.1"
meant "~1.0.1"
mississippi "^3.0.0"
mkdirp "~0.5.1"
mkdirp "^0.5.5"
move-concurrently "^1.0.1"
node-gyp "^5.0.7"
nopt "~4.0.1"
node-gyp "^5.1.0"
nopt "^4.0.3"
normalize-package-data "^2.5.0"
npm-audit-report "^1.3.2"
npm-cache-filename "~1.0.2"
npm-install-checks "^3.0.2"
npm-lifecycle "^3.1.4"
npm-package-arg "^6.1.1"
npm-packlist "^1.4.7"
npm-packlist "^1.4.8"
npm-pick-manifest "^3.0.2"
npm-profile "^4.0.2"
npm-registry-fetch "^4.0.2"
npm-profile "^4.0.4"
npm-registry-fetch "^4.0.5"
npm-user-validate "~1.0.0"
npmlog "~4.1.2"
once "~1.4.0"
@ -3399,11 +3456,11 @@ npm@^6.13.7:
read-installed "~4.0.3"
read-package-json "^2.1.1"
read-package-tree "^5.3.1"
readable-stream "^3.4.0"
readable-stream "^3.6.0"
readdir-scoped-modules "^1.1.0"
request "^2.88.0"
retry "^0.12.0"
rimraf "^2.6.3"
rimraf "^2.7.1"
safe-buffer "^5.1.2"
semver "^5.7.1"
sha "^3.0.0"
@ -4237,7 +4294,7 @@ rimraf@2.6.3:
dependencies:
glob "^7.1.3"
rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3:
rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@^2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==