Upgrade dependencies (#2009)
* Upgrade dependencies without breaking changes * Remove travis leftovers * Upgrade types dependencies * Upgrade eslint rules to new prettier configuration
This commit is contained in:
parent
cb16192555
commit
639bb98423
|
@ -1,10 +1,10 @@
|
|||
module.exports = {
|
||||
parser: '@typescript-eslint/parser',
|
||||
extends: [
|
||||
'plugin:react/recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'prettier/@typescript-eslint',
|
||||
'plugin:prettier/recommended',
|
||||
'plugin:react/recommended', // React recommended rules plugin
|
||||
'plugin:@typescript-eslint/recommended', // Plugin to use typescript with eslint
|
||||
'prettier', // Add prettier rules to eslint
|
||||
'plugin:prettier/recommended', // Plugin to use prettier rules with eslint
|
||||
],
|
||||
plugins: ['react-hooks'],
|
||||
parserOptions: {
|
||||
|
|
116
.travis.yml
116
.travis.yml
|
@ -1,116 +0,0 @@
|
|||
# if: (branch = development) OR (branch = master) OR (type = pull_request) OR (tag IS present)
|
||||
if: (branch = master) OR (tag IS present)
|
||||
dist: focal
|
||||
language: node_js
|
||||
node_js:
|
||||
- '12'
|
||||
os:
|
||||
- linux
|
||||
matrix:
|
||||
# include:
|
||||
# - env:
|
||||
# - REACT_APP_NETWORK='mainnet'
|
||||
# - STAGING_BUCKET_NAME=${STAGING_MAINNET_BUCKET_NAME}
|
||||
# - REACT_APP_SENTRY_DSN=${SENTRY_DSN_MAINNET}
|
||||
# - SENTRY_PROJECT=${SENTRY_PROJECT_MAINNET}
|
||||
# - REACT_APP_GOOGLE_ANALYTICS=${REACT_APP_GOOGLE_ANALYTICS_ID_MAINNET}
|
||||
# - REACT_APP_GNOSIS_APPS_URL=${REACT_APP_GNOSIS_APPS_URL_PROD}
|
||||
# if: (branch = master AND NOT type = pull_request) OR tag IS present
|
||||
# - env:
|
||||
# - REACT_APP_NETWORK='rinkeby'
|
||||
# - REACT_APP_SENTRY_DSN=${SENTRY_DSN_RINKEBY}
|
||||
# - SENTRY_PROJECT=${SENTRY_PROJECT_RINKEBY}
|
||||
# - REACT_APP_GOOGLE_ANALYTICS=${REACT_APP_GOOGLE_ANALYTICS_ID_RINKEBY}
|
||||
# - REACT_APP_GNOSIS_APPS_URL=${REACT_APP_GNOSIS_APPS_URL_STAGING}
|
||||
# if: (branch = development AND NOT type = pull_request) OR (branch = master) OR tag IS present
|
||||
# - env:
|
||||
# - REACT_APP_NETWORK='xdai'
|
||||
# - STAGING_BUCKET_NAME=${STAGING_XDAI_BUCKET_NAME}
|
||||
# - REACT_APP_SENTRY_DSN=${SENTRY_DSN_XDAI}
|
||||
# - SENTRY_PROJECT=${SENTRY_PROJECT_XDAI}
|
||||
# - REACT_APP_GOOGLE_ANALYTICS=${REACT_APP_GOOGLE_ANALYTICS_ID_XDAI}
|
||||
# if: (branch = master) OR tag IS present
|
||||
# - env:
|
||||
# - REACT_APP_NETWORK='volta'
|
||||
# - STAGING_BUCKET_NAME=${STAGING_VOLTA_BUCKET_NAME}
|
||||
# - REACT_APP_SENTRY_DSN=${SENTRY_DSN_VOLTA}
|
||||
# - SENTRY_PROJECT=${SENTRY_PROJECT_VOLTA}
|
||||
# - REACT_APP_GOOGLE_ANALYTICS=${REACT_APP_GOOGLE_ANALYTICS_ID_VOLTA}
|
||||
# if: (branch = master) OR tag IS present
|
||||
# - env:
|
||||
# - REACT_APP_NETWORK='energy_web_chain'
|
||||
# - STAGING_BUCKET_NAME=${STAGING_EWC_BUCKET_NAME}
|
||||
# - REACT_APP_SENTRY_DSN=${SENTRY_DSN_EWC}
|
||||
# - SENTRY_PROJECT=${SENTRY_PROJECT_EWC}
|
||||
# - REACT_APP_GOOGLE_ANALYTICS=${REACT_APP_GOOGLE_ANALYTICS_ID_EWC}
|
||||
# if: (branch = master AND NOT type = pull_request) OR tag IS present
|
||||
cache:
|
||||
npm: false
|
||||
yarn: true
|
||||
before_script:
|
||||
- if [[ -n "$TRAVIS_TAG" ]]; then export REACT_APP_ENV='production'; fi;
|
||||
- if [ $TRAVIS_PULL_REQUEST != "false" ]; then export PUBLIC_URL="/${REACT_APP_NETWORK}/app"; fi;
|
||||
before_install:
|
||||
# Needed to deploy pull request and releases
|
||||
# - sudo apt-get update
|
||||
# - sudo apt-get -y install python3-pip python3-dev libusb-1.0-0-dev libudev-dev
|
||||
# - pip install awscli --upgrade --user
|
||||
script:
|
||||
- yarn prettier:check
|
||||
# - yarn test:coverage
|
||||
# - yarn build
|
||||
# - if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]] || [ -n "$TRAVIS_TAG" ]; then
|
||||
# echo "Upload sentry source maps";
|
||||
# yarn sentry-upload-sourcemaps;
|
||||
# else
|
||||
# echo "Skip source map upload";
|
||||
# fi;
|
||||
after_success:
|
||||
# Pull Request - Deploy it to a review environment
|
||||
# Travis doesn't do deploy step with pull requests builds
|
||||
# - ./config/travis/deploy_pull_request.sh
|
||||
# Releases (tagged commits) - Deploy it to a release environment
|
||||
# - ./config/travis/deploy_release.sh
|
||||
# - yarn coveralls
|
||||
|
||||
deploy:
|
||||
# Development environment only on rinkeby
|
||||
# - provider: s3
|
||||
# bucket: $DEV_BUCKET_NAME
|
||||
# access_key_id: $AWS_ACCESS_KEY_ID
|
||||
# secret_access_key: $AWS_SECRET_ACCESS_KEY
|
||||
# skip_cleanup: true
|
||||
# local_dir: build
|
||||
# upload_dir: app
|
||||
# region: $AWS_DEFAULT_REGION
|
||||
# on:
|
||||
# branch: development
|
||||
# condition: $REACT_APP_NETWORK = rinkeby
|
||||
|
||||
# Staging environment
|
||||
# - provider: s3
|
||||
# bucket: $STAGING_BUCKET_NAME
|
||||
# access_key_id: $AWS_ACCESS_KEY_ID
|
||||
# secret_access_key: $AWS_SECRET_ACCESS_KEY
|
||||
# skip_cleanup: true
|
||||
# local_dir: build
|
||||
# upload_dir: current/app
|
||||
# region: $AWS_DEFAULT_REGION
|
||||
# on:
|
||||
# branch: master
|
||||
|
||||
# Prepare production deployment
|
||||
# - provider: s3
|
||||
# bucket: $STAGING_BUCKET_NAME
|
||||
# secret_access_key: $AWS_SECRET_ACCESS_KEY
|
||||
# access_key_id: $AWS_ACCESS_KEY_ID
|
||||
# skip_cleanup: true
|
||||
# local_dir: build
|
||||
# upload_dir: releases/$TRAVIS_TAG
|
||||
# region: $AWS_DEFAULT_REGION
|
||||
# on:
|
||||
# tags: true
|
||||
# - provider: script
|
||||
# script: ./config/travis/prepare_production_deployment.sh
|
||||
# on:
|
||||
# tags: true
|
|
@ -1,38 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
function deploy_pull_request {
|
||||
REVIEW_ENVIRONMENT_DOMAIN='review.gnosisdev.com'
|
||||
|
||||
# Pull request name with "pr" prefix
|
||||
PULL_REQUEST_NAME="pr$TRAVIS_PULL_REQUEST"
|
||||
|
||||
# Feature name without all path. Example gnosis/pm-trading-ui -> pm-trading-ui
|
||||
REPO_NAME=$(basename $TRAVIS_REPO_SLUG)
|
||||
# Only alphanumeric characters. Example pm-trading-ui -> pmtradingui
|
||||
REPO_NAME_ALPHANUMERIC=$(echo $REPO_NAME | sed 's/[^a-zA-Z0-9]//g')
|
||||
|
||||
# TRAVIS_PULL_REQUEST contains pull request number
|
||||
REVIEW_FEATURE_FOLDER="$REPO_NAME_ALPHANUMERIC/$PULL_REQUEST_NAME"
|
||||
|
||||
# Deploy safe-team project
|
||||
aws s3 sync build s3://${REVIEW_BUCKET_NAME}/${REVIEW_FEATURE_FOLDER}/${REACT_APP_NETWORK}/app --delete
|
||||
}
|
||||
|
||||
function publish_pull_request_urls_in_github {
|
||||
REVIEW_FEATURE_URL="https://$PULL_REQUEST_NAME--$REPO_NAME_ALPHANUMERIC.$REVIEW_ENVIRONMENT_DOMAIN/$REACT_APP_NETWORK/app"
|
||||
|
||||
# Using the Issues api instead of the PR api
|
||||
# Done so because every PR is an issue, and the issues api allows to post general comments,
|
||||
# while the PR api requires that comments are made to specific files and specific commits
|
||||
GITHUB_PR_COMMENTS=https://api.github.com/repos/${TRAVIS_REPO_SLUG}/issues/${TRAVIS_PULL_REQUEST}/comments
|
||||
curl -H "Authorization: token ${GITHUB_API_TOKEN}" --request POST ${GITHUB_PR_COMMENTS} --data '{"body":"Travis automatic deployment:\r\n '${REVIEW_FEATURE_URL}' \r\n"}'
|
||||
}
|
||||
|
||||
# Only:
|
||||
# - Pull requests
|
||||
# - Security env variables are available. PR from forks don't have them.
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ -n "$AWS_ACCESS_KEY_ID" ]
|
||||
then
|
||||
deploy_pull_request
|
||||
publish_pull_request_urls_in_github
|
||||
fi
|
38
package.json
38
package.json
|
@ -163,19 +163,19 @@
|
|||
"@gnosis.pm/safe-contracts": "1.1.1-dev.2",
|
||||
"@gnosis.pm/safe-react-components": "https://github.com/gnosis/safe-react-components.git#f610327",
|
||||
"@gnosis.pm/util-contracts": "2.0.6",
|
||||
"@ledgerhq/hw-transport-node-hid-singleton": "5.41.0",
|
||||
"@ledgerhq/hw-transport-node-hid-singleton": "5.45.0",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.11.0",
|
||||
"@material-ui/lab": "4.0.0-alpha.57",
|
||||
"@openzeppelin/contracts": "3.1.0",
|
||||
"@sentry/react": "^5.30.0",
|
||||
"@sentry/tracing": "^5.30.0",
|
||||
"@sentry/react": "^6.2.1",
|
||||
"@sentry/tracing": "^6.2.1",
|
||||
"@truffle/contract": "^4.3.0",
|
||||
"@unstoppabledomains/resolution": "^1.17.0",
|
||||
"async-sema": "^3.1.0",
|
||||
"axios": "0.21.1",
|
||||
"bignumber.js": "9.0.1",
|
||||
"bnc-onboard": "1.19.2",
|
||||
"bnc-onboard": "~1.20.0",
|
||||
"classnames": "^2.2.6",
|
||||
"concurrently": "^5.3.0",
|
||||
"connected-react-router": "6.8.0",
|
||||
|
@ -186,13 +186,13 @@
|
|||
"electron-is-dev": "^1.2.0",
|
||||
"electron-log": "^4.3.0",
|
||||
"electron-settings": "^4.0.2",
|
||||
"electron-updater": "4.3.5",
|
||||
"electron-updater": "4.3.8",
|
||||
"eth-sig-util": "^2.5.3",
|
||||
"ethereum-blockies-base64": "^1.0.2",
|
||||
"ethereumjs-abi": "0.6.8",
|
||||
"exponential-backoff": "^3.1.0",
|
||||
"express": "^4.17.1",
|
||||
"final-form": "^4.20.1",
|
||||
"final-form": "^4.20.2",
|
||||
"final-form-calculate": "^1.3.2",
|
||||
"history": "4.10.1",
|
||||
"immortal-db": "^1.1.0",
|
||||
|
@ -207,7 +207,7 @@
|
|||
"notistack": "https://github.com/gnosis/notistack.git#v0.9.4",
|
||||
"object-hash": "^2.1.1",
|
||||
"qrcode.react": "1.0.1",
|
||||
"query-string": "6.13.8",
|
||||
"query-string": "6.14.1",
|
||||
"react": "16.13.1",
|
||||
"react-device-detect": "^1.15.0",
|
||||
"react-dom": "16.13.1",
|
||||
|
@ -233,8 +233,8 @@
|
|||
"web3-utils": "^1.2.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rescripts/cli": "^0.0.15",
|
||||
"@sentry/cli": "^1.62.0",
|
||||
"@rescripts/cli": "^0.0.16",
|
||||
"@sentry/cli": "^1.63.1",
|
||||
"@storybook/addon-actions": "^5.3.19",
|
||||
"@storybook/addon-links": "^5.3.19",
|
||||
"@storybook/addons": "^5.3.19",
|
||||
|
@ -242,41 +242,41 @@
|
|||
"@storybook/react": "^5.3.19",
|
||||
"@testing-library/jest-dom": "^5.11.6",
|
||||
"@testing-library/react": "^11.2.2",
|
||||
"@typechain/web3-v1": "^2.0.0",
|
||||
"@typechain/web3-v1": "^2.2.0",
|
||||
"@types/history": "4.6.2",
|
||||
"@types/jest": "^26.0.16",
|
||||
"@types/lodash.get": "^4.4.6",
|
||||
"@types/lodash.memoize": "^4.1.6",
|
||||
"@types/node": "^14.14.10",
|
||||
"@types/react": "^16.9.55",
|
||||
"@types/node": "^14.14.30",
|
||||
"@types/react": "^16.14.5",
|
||||
"@types/react-dom": "^16.9.9",
|
||||
"@types/react-redux": "^7.1.11",
|
||||
"@types/react-router-dom": "^5.1.6",
|
||||
"@types/redux-actions": "^2.6.1",
|
||||
"@types/styled-components": "^5.1.4",
|
||||
"@typescript-eslint/eslint-plugin": "^4.14.0",
|
||||
"@typescript-eslint/parser": "^4.14.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.17.0",
|
||||
"@typescript-eslint/parser": "^4.17.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"dotenv": "^8.2.0",
|
||||
"dotenv-expand": "^5.1.0",
|
||||
"electron": "^9.4.0",
|
||||
"electron-builder": "22.9.1",
|
||||
"electron-builder": "22.10.5",
|
||||
"electron-notarize": "1.0.0",
|
||||
"eslint": "^7.17.0",
|
||||
"eslint-config-prettier": "^7.2.0",
|
||||
"eslint-config-prettier": "^8.1.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-jsx-a11y": "^6.3.1",
|
||||
"eslint-plugin-prettier": "^3.1.4",
|
||||
"eslint-plugin-react": "^7.21.5",
|
||||
"eslint-plugin-sort-destructure-keys": "^1.3.5",
|
||||
"husky": "^4.3.0",
|
||||
"husky": "~4.3.8",
|
||||
"lint-staged": "^10.5.2",
|
||||
"patch-package": "^6.2.2",
|
||||
"patch-package": "^6.4.6",
|
||||
"postinstall-postinstall": "^2.1.0",
|
||||
"prettier": "^2.2.0",
|
||||
"sass": "^1.32.0",
|
||||
"typechain": "^4.0.0",
|
||||
"typescript": "4.1.3",
|
||||
"typescript": "4.2.3",
|
||||
"wait-on": "5.2.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,13 +82,13 @@ export const getParsedJSONOrArrayFromString = (parameter: string): (string | num
|
|||
|
||||
export const handleSubmitError = (error: SubmissionErrors, values: Record<string, string>): Record<string, string> => {
|
||||
for (const key in values) {
|
||||
if (values.hasOwnProperty(key) && values[key] === error.value) {
|
||||
if (values.hasOwnProperty(key) && error !== undefined && values[key] === error.value) {
|
||||
return { [key]: error.reason }
|
||||
}
|
||||
}
|
||||
|
||||
// .call() failed and we're logging a generic error
|
||||
return { [FORM_ERROR]: error.message }
|
||||
return { [FORM_ERROR]: error ? error.message : undefined }
|
||||
}
|
||||
|
||||
export const generateFormFieldKey = (type: string, signatureHash: string, index: number): string => {
|
||||
|
|
Loading…
Reference in New Issue