Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
Update Electron to version 13 (#2149)
Browse files Browse the repository at this point in the history
* Add support for darwin-arm64 builds

* Setup to test electron v11 in Windows

* Restore node to v14

* Set node-gyp to previous version for desktop build

* bump electron related packages

* use electron 11.2.3

* trying to figure out things

* electron stuff refactor and ts migration

* electron magic continues

* eslint scripts/public

* trying to figure out things

* remove electron js files

* revert electron/transport to ledger live setup

* use latest electron version

* add onboard patch

* fix patch

* fix eslint

* remove console.log

* pr review fixes

* fix build command

* Feature: dependency updates (#2611)

* Dep update

* update lockfile

* remove @gnosis.pm/safe-contracts

* fix upgrade safe test

* fix upgrade safe test 2

* fix signature prefix check

* fix signature prefix check

* fix signature prefix check 2

* use bash for windows

* update sdk-gateway version, fix import, remove types copy

* Revert "use bash for windows"

This reverts commit b4982d3.

* dont user concurrency 1

* Revert "dont user concurrency 1"

This reverts commit 0548a59.

* increase network timeout & remove concurrency

* cross env electron dev

* fix ledger on windows

* fix ledger on windows

* install jest

* comment out windows patches

* dont use global tsc

* remove windows patches

* remove preventDefault

* update walletconnect & patch package versions

* restorenetwork name for onboard

Co-authored-by: Daniel Sanchez <[email protected]>
Co-authored-by: Mikhail <[email protected]>
  • Loading branch information
3 people authored Aug 16, 2021
1 parent 2622151 commit 0b02b16
Show file tree
Hide file tree
Showing 38 changed files with 4,930 additions and 4,907 deletions.
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ flow-typed
flow-typed/npm
migrations
node_modules
public
scripts
src/assets
src/config
test
Expand Down
18 changes: 2 additions & 16 deletions .github/workflows/release-mainnet-desktop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Build/Release Mainnet desktop app

# this will help you specify where to run
on:
workflow_dispatch
on: workflow_dispatch

env:
REACT_APP_FORTMATIC_KEY: ${{ secrets.REACT_APP_FORTMATIC_KEY }}
Expand Down Expand Up @@ -30,19 +29,6 @@ jobs:
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install libudev-dev libusb-1.0-0-dev

# Windows build patches
- name: Patch node gyp on windows to support Visual Studio 2019
if: startsWith(matrix.os, 'windows')
shell: powershell
run: |
yarn global add --production windows-build-tools --vs2015 --msvs_version=2015
- name: Install node-gyp
if: startsWith(matrix.os, 'windows')
shell: powershell
run: |
yarn global add node-gyp
yarn config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"
# Load node_modules cache action
- uses: actions/cache@v2
with:
Expand All @@ -55,7 +41,7 @@ jobs:
node-version: 14

- name: Run yarn install
run: yarn install --frozen-lockfile --network-concurrency 1
run: yarn install --frozen-lockfile --network-timeout 1000000

- name: Build/Release Desktop App
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ yalc.lock
src/types/contracts/
src/types/gateway/
tsconfig.tsbuildinfo
public/**/*.js
jest.results.json
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged --allow-empty
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn tsc --noEmit --incremental
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ flow-typed
flow-typed/npm
migrations
node_modules
public
scripts
src/assets
src/types/contracts
test
91 changes: 48 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
"main": "public/electron.js",
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
"build-desktop": "cross-env REACT_APP_BUILD_FOR_DESKTOP=true REACT_APP_ENV=production yarn build-mainnet",
"build-desktop": "yarn compile-electron && cross-env REACT_APP_BUILD_FOR_DESKTOP=true REACT_APP_ENV=production yarn build-mainnet",
"build-mainnet": "cross-env REACT_APP_NETWORK=mainnet yarn build",
"build": "cross-env REACT_APP_APP_VERSION=$npm_package_version rescripts --max-old-space-size=8192 build",
"compile-electron": "tsc --project tsconfig.electron.json",
"eject": "rescripts eject",
"electron-build": "electron-builder --mac --windows --linux",
"electron-dev": "concurrently \"BROWSER=none yarn start\" \"wait-on http://localhost:3000 && electron .\"",
"electron-build": "yarn compile-electron && electron-builder --windows",
"electron-dev": "yarn compile-electron && concurrently \"cross-env BROWSER=none REACT_APP_BUILD_FOR_DESKTOP=true yarn start\" \"wait-on http://localhost:3000 && electron .\"",
"format:staged": "lint-staged",
"generate-types": "yarn generate-types:contracts && yarn generate-types:spendingLimit && yarn generate-types:safeDeployments && yarn generate-types:erc20 && yarn generate-types:erc721",
"generate-types:contracts": "cross-env typechain --target=web3-v1 --out-dir './src/types/contracts' './node_modules/@gnosis.pm/safe-contracts/build/contracts/*.json'",
"generate-types": "yarn generate-types:spendingLimit && yarn generate-types:safeDeployments && yarn generate-types:erc20 && yarn generate-types:erc721",
"generate-types:erc20": "cross-env typechain --target=web3-v1 --out-dir './src/types/contracts' './node_modules/@openzeppelin/contracts/build/contracts/ERC20.json'",
"generate-types:erc721": "cross-env typechain --target=web3-v1 --out-dir './src/types/contracts' './node_modules/@openzeppelin/contracts/build/contracts/ERC721.json'",
"generate-types:spendingLimit": "cross-env typechain --target=web3-v1 --out-dir './src/types/contracts' ./src/logic/contracts/artifacts/*.json",
Expand All @@ -49,18 +49,21 @@
"test:ci": "yarn test --ci --coverage --json --watchAll=false --testLocationInResults --runInBand",
"storybook": "start-storybook -p 9009 -s public",
"build-storybook": "build-storybook -s public",
"sentry-upload-sourcemaps": "sentry-cli --auth-token $SENTRY_AUTH_TOKEN releases -o $SENTRY_ORG -p $SENTRY_PROJECT files $npm_package_version upload-sourcemaps ./build/static/js/"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged --allow-empty",
"pre-push": "tsc --noEmit --incremental"
}
"sentry-upload-sourcemaps": "sentry-cli --auth-token $SENTRY_AUTH_TOKEN releases -o $SENTRY_ORG -p $SENTRY_PROJECT files $npm_package_version upload-sourcemaps ./build/static/js/",
"prepare": "husky install"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx}": [
"eslint --fix",
"prettier --write"
],
"public/**/*.{ts}": [
"eslint --fix",
"prettier --write"
],
"scripts/**/*.{js,jsx,ts,tsx}": [
"eslint --fix",
"prettier --write"
]
},
"jest": {
Expand Down Expand Up @@ -164,33 +167,31 @@
]
},
"dependencies": {
"@gnosis.pm/safe-apps-sdk": "3.1.0-alpha.0",
"@gnosis.pm/safe-apps-sdk": "4.1.0",
"@gnosis.pm/safe-apps-sdk-v1": "npm:@gnosis.pm/[email protected]",
"@gnosis.pm/safe-contracts": "1.1.1-dev.2",
"@gnosis.pm/safe-deployments": "^1.0.0",
"@gnosis.pm/safe-react-components": "^0.7.0",
"@gnosis.pm/safe-react-gateway-sdk": "^1.2.0",
"@ledgerhq/hw-transport-node-hid-singleton": "5.51.1",
"@ledgerhq/hw-transport-node-hid-singleton": "6.3.0",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.11.0",
"@material-ui/lab": "4.0.0-alpha.57",
"@material-ui/lab": "4.0.0-alpha.60",
"@openzeppelin/contracts": "3.4.0",
"@sentry/react": "^6.10.0",
"@sentry/tracing": "^6.10.0",
"@unstoppabledomains/resolution": "^1.17.0",
"abi-decoder": "^2.4.0",
"axios": "0.21.1",
"bignumber.js": "9.0.1",
"bnc-onboard": "~1.30.0",
"bnc-onboard": "~1.34.1",
"classnames": "^2.2.6",
"connected-react-router": "6.8.0",
"currency-flags": "2.1.2",
"currency-flags": "3.2.1",
"date-fns": "^2.20.2",
"detect-port": "^1.3.0",
"electron-is-dev": "^1.2.0",
"electron-log": "^4.3.0",
"electron-log": "^4.4.1",
"electron-settings": "^4.0.2",
"electron-updater": "4.3.8",
"electron-updater": "4.3.9",
"eth-sig-util": "^2.5.3",
"ethereum-blockies-base64": "^1.0.2",
"ethereumjs-abi": "0.6.8",
Expand All @@ -201,8 +202,8 @@
"final-form-calculate": "^1.3.2",
"history": "4.10.1",
"immortal-db": "^1.1.0",
"immutable": "^4.0.0-rc.12",
"js-cookie": "^2.2.1",
"immutable": "4.0.0-rc.12",
"js-cookie": "^3.0.0",
"lodash.debounce": "^4.0.8",
"lodash.get": "^4.4.2",
"lodash.isequal": "^4.5.0",
Expand All @@ -212,10 +213,10 @@
"notistack": "https://github.com/gnosis/notistack.git#v0.9.4",
"object-hash": "^2.1.1",
"qrcode.react": "1.0.1",
"query-string": "6.14.1",
"react": "16.13.1",
"query-string": "7.0.1",
"react": "17.0.2",
"react-device-detect": "^1.17.0",
"react-dom": "16.13.1",
"react-dom": "17.0.2",
"react-final-form": "^6.5.3",
"react-final-form-listeners": "^1.0.2",
"react-ga": "3.3.0",
Expand All @@ -227,7 +228,7 @@
"react-router-dom": "5.2.0",
"react-scripts": "^4.0.1",
"react-window": "^1.8.6",
"redux": "4.1.0",
"redux": "4.1.1",
"redux-actions": "^2.6.5",
"redux-localstorage-simple": "^2.4.1",
"redux-thunk": "^2.3.0",
Expand All @@ -242,22 +243,24 @@
"devDependencies": {
"@rescripts/cli": "^0.0.16",
"@sentry/cli": "^1.67.2",
"@storybook/addon-actions": "^5.3.19",
"@storybook/addon-links": "^5.3.19",
"@storybook/addons": "^5.3.19",
"@storybook/addon-actions": "^6.3.6",
"@storybook/addon-links": "^6.3.6",
"@storybook/addons": "^6.3.6",
"@storybook/preset-create-react-app": "^3.1.5",
"@storybook/react": "^5.3.19",
"@storybook/react": "6.0.0",
"@testing-library/jest-dom": "^5.11.10",
"@testing-library/react": "^11.2.7",
"@testing-library/react": "^12.0.0",
"@typechain/web3-v1": "^3.0.0",
"@types/detect-port": "^1.3.1",
"@types/express": "^4.17.13",
"@types/history": "4.6.2",
"@types/jest": "^26.0.23",
"@types/jest": "^27.0.1",
"@types/js-cookie": "^2.2.7",
"@types/lodash.get": "^4.4.6",
"@types/lodash.memoize": "^4.1.6",
"@types/node": "^15.12.5",
"@types/react": "^16.14.11",
"@types/react-dom": "^16.9.14",
"@types/node": "^16.6.1",
"@types/react": "^17.0.18",
"@types/react-dom": "^17.0.9",
"@types/react-redux": "^7.1.18",
"@types/react-router-dom": "^5.1.8",
"@types/redux-actions": "^2.6.2",
Expand All @@ -267,27 +270,29 @@
"concurrently": "^6.0.0",
"coveralls": "^3.1.1",
"cross-env": "^7.0.3",
"dotenv": "^8.2.0",
"dotenv": "^10.0.0",
"dotenv-expand": "^5.1.0",
"electron": "^9.4.0",
"electron-builder": "22.10.5",
"electron-notarize": "1.0.0",
"electron": "13.1.9",
"electron-builder": "22.11.7",
"electron-notarize": "1.1.0",
"eslint": "^7.30.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "~4.3.8",
"lint-staged": "^10.5.2",
"husky": "^7.0.0",
"jest": "26.6.0",
"lint-staged": "^11.1.1",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.3.2",
"redux-mock-store": "^1.5.4",
"sass": "^1.32.0",
"typechain": "^5.1.2",
"typescript": "^4.3.5",
"wait-on": "^5.3.0"
"usb-detection": "^4.10.0",
"wait-on": "^6.0.0"
}
}
77 changes: 0 additions & 77 deletions public/auto-updater/index.js

This file was deleted.

Loading

0 comments on commit 0b02b16

Please sign in to comment.