Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Commit

Permalink
Upgrade to [email protected] (#1537)
Browse files Browse the repository at this point in the history
  • Loading branch information
quanglam2807 authored Oct 8, 2021
1 parent 9bd8114 commit 5c83504
Show file tree
Hide file tree
Showing 6 changed files with 242 additions and 229 deletions.
3 changes: 3 additions & 0 deletions main-src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const {
protocol,
} = require('electron');
const fs = require('fs');
const electronRemote = require('@electron/remote/main');

const settings = require('electron-settings');

Expand All @@ -20,6 +21,8 @@ settings.configure({

const { autoUpdater } = require('electron-updater');

electronRemote.initialize();

const {
getPreference,
getPreferences,
Expand Down
4 changes: 4 additions & 0 deletions main-src/libs/windows/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const path = require('path');
const windowStateKeeper = require('electron-window-state');
const { menubar } = require('menubar');
const contextMenu = require('electron-context-menu');
const electronRemote = require('@electron/remote/main');

const sendToAllWindows = require('../send-to-all-windows');
const { getPreference } = require('../preferences');
Expand Down Expand Up @@ -164,6 +165,8 @@ const createAsync = () => new Promise((resolve) => {
});

mb.on('after-create-window', () => {
electronRemote.enable(mb.window.webContents);

menubarWindowState.manage(mb.window);

contextMenu({ window: mb.window });
Expand Down Expand Up @@ -220,6 +223,7 @@ const createAsync = () => new Promise((resolve) => {
win = new BrowserWindow(winOpts);

mainWindowState.manage(win);
electronRemote.enable(win.webContents);
contextMenu({ window: win });

// check system-preferences.js
Expand Down
3 changes: 2 additions & 1 deletion main-src/libs/windows/preload-shared.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
const { remote, ipcRenderer } = require('electron');
const remote = require('@electron/remote');
const { ipcRenderer } = require('electron');
const machineId = require('node-machine-id');

// Activate the Sentry Electron SDK as early as possible in every process.
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@elastic/react-search-ui": "1.7.0",
"@elastic/search-ui-app-search-connector": "1.7.0",
"@electron/get": "1.13.0",
"@electron/remote": "2.0.1",
"@fontsource/roboto": "4.5.1",
"@material-ui/core": "4.12.3",
"@material-ui/icons": "4.11.2",
Expand All @@ -50,7 +51,7 @@
"copy-webpack-plugin": "6.4.1",
"cross-env": "7.0.3",
"decompress": "4.2.1",
"electron": "13.5.1",
"electron": "15.1.1",
"electron-builder": "22.11.11",
"electron-context-menu": "3.1.1",
"electron-fetch": "1.7.4",
Expand All @@ -68,7 +69,7 @@
"eslint-plugin-react": "7.26.1",
"eslint-plugin-react-hooks": "1.7.0",
"file-saver": "2.0.5",
"firebase": "9.1.1",
"firebase": "9.1.2",
"follow-redirects": "1.14.4",
"fs-extra": "10.0.0",
"gravatar": "1.8.2",
Expand Down Expand Up @@ -96,7 +97,7 @@
"redux-thunk": "2.3.0",
"regedit": "5.0.0",
"semver": "7.3.5",
"slugify": "1.6.0",
"slugify": "1.6.1",
"source-map-support": "0.5.20",
"sudo-prompt": "9.2.1",
"tmp": "0.2.1",
Expand Down
54 changes: 27 additions & 27 deletions public/open-source-notices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12091,7 +12091,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

-----

The following software may be included in this product: get-symbol-description, has-tostringtag. A copy of the source code may be downloaded from git+https://github.com/inspect-js/get-symbol-description.git (get-symbol-description), git+https://github.com/inspect-js/has-tostringtag.git (has-tostringtag). This software contains the following license and notice below:
The following software may be included in this product: get-symbol-description, has-tostringtag, is-shared-array-buffer. A copy of the source code may be downloaded from git+https://github.com/inspect-js/get-symbol-description.git (get-symbol-description), git+https://github.com/inspect-js/has-tostringtag.git (has-tostringtag), git+https://github.com/inspect-js/is-shared-array-buffer.git (is-shared-array-buffer). This software contains the following license and notice below:

MIT License

Expand Down Expand Up @@ -13940,6 +13940,32 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

-----

The following software may be included in this product: is-weakref. A copy of the source code may be downloaded from git+https://github.com/inspect-js/is-weakref.git. This software contains the following license and notice below:

MIT License

Copyright (c) 2020 Inspect JS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

-----

The following software may be included in this product: is-yarn-global. A copy of the source code may be downloaded from [email protected]:LitoMore/is-yarn-global.git. This software contains the following license and notice below:

MIT License
Expand Down Expand Up @@ -16758,32 +16784,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-----

The following software may be included in this product: nanocolors. A copy of the source code may be downloaded from https://github.com/ai/nanocolors.git. This software contains the following license and notice below:

The MIT License (MIT)

Copyright 2021 Jorge Bucaran <[email protected]>,
Andrey Sitnik <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-----

The following software may be included in this product: nanomatch, to-regex. A copy of the source code may be downloaded from https://github.com/micromatch/nanomatch.git (nanomatch), https://github.com/jonschlinkert/to-regex.git (to-regex). This software contains the following license and notice below:

The MIT License (MIT)
Expand Down
Loading

0 comments on commit 5c83504

Please sign in to comment.