-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(app): Upgrade Electron to v3 and remove Node in renderer
- Loading branch information
Showing
16 changed files
with
170 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// sets up a mock global available to all tests | ||
'use strict' | ||
|
||
const mockElectron = require('./electron') | ||
|
||
global.APP_SHELL = { | ||
__mockElectron: mockElectron, | ||
ipcRenderer: mockElectron.ipcRenderer, | ||
apiUpdate: mockElectron.remote.require('./api-update'), | ||
config: mockElectron.remote.require('./config'), | ||
discovery: mockElectron.remote.require('./discovery'), | ||
update: mockElectron.remote.require('./update'), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"appId": "com.opentrons.app", | ||
"electronVersion": "1.8.3", | ||
"electronVersion": "3.0.2", | ||
"files": [ | ||
"**/*", | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// @flow | ||
// preload script for renderer process | ||
// defines subset of Electron API that renderer process is allowed to access | ||
// for security reasons | ||
import {ipcRenderer, remote} from 'electron' | ||
|
||
global.APP_SHELL = { | ||
ipcRenderer, | ||
apiUpdate: remote.require('./api-update'), | ||
config: remote.require('./config'), | ||
discovery: remote.require('./discovery'), | ||
update: remote.require('./update'), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
'use strict' | ||
|
||
module.exports = { | ||
setupFiles: ['<rootDir>/__mocks__/setup-mock-globals.js'], | ||
moduleNameMapper: { | ||
'\\.(css)$': 'identity-obj-proxy', | ||
}, | ||
transform: { | ||
'^.+\\.js$': 'babel-jest', | ||
'\\.(jpg|png|gif|svg|woff|woff2)$': | ||
'@opentrons/components/src/__mocks__/file.js', | ||
}, | ||
transformIgnorePatterns: ['/node_modules/(?!@opentrons/)'], | ||
collectCoverageFrom: [ | ||
'**/*.js', | ||
'!.eslintrc.js', | ||
'!.stylelintrc.js', | ||
'!api/**', | ||
'!webpack-config/**', | ||
'!**/scripts/**', | ||
'!components/interfaces/**', | ||
'!components/styleguide.config.js', | ||
'!**/node_modules/**', | ||
'!**/__mocks__/**', | ||
'!**/dist/**', | ||
'!**/build/**', | ||
'!**/webpack*', | ||
'!**/webpack/**', | ||
'!**/coverage/**', | ||
'!**/test/**', | ||
'!**/test-with-flow/**', | ||
'!**/flow-typed/**', | ||
], | ||
coverageReporters: ['lcov', 'text'], | ||
} |
Oops, something went wrong.