Skip to content

Commit

Permalink
Resolve: Update npm dependencies (06-23-2021) (#1579)
Browse files Browse the repository at this point in the history
## Notes

- `yarn.lock` has been created from scratch (by removing it before running `yarn`)
- Node version update to `14.17` (as same as Electron@13 is using - see https://www.electronjs.org/releases/stable?version=13&page=2#13.0.0)
- `.storybook/main.js` defines `reactDocgen: 'react-docgen'` temporary (just as a workaround as mentioned in styleguidist/react-docgen-typescript#356 (comment))
- Upgrades to latest react-chart | chartjs@3.x needs updates for data and style handling for `PoolDetailsChart*.ts`
- Stick on `cosmos-client@0.39.2` (even a minor update to `@0.39.13` breaks tests - see https://github.com/thorchain/asgardex-electron/pull/1579/checks?check_run_id=2903609210#step:8:27)
- Following packages could not be updated (similar issues we had before in thorchain/asgardex-electron#1411)

```bash
ncu
Checking asgardex-electron/package.json
[====================] 105/105 100%

 @storybook/react  ^6.1.21  →   ^6.3.0 // breaks build of storybook, it seems babel loader version is not compatible with current CRA (as mentioned in #1411)
 @types/node        ^14.17  →   ^15.12 // we stick on Node@14.17 used by Electron@13.x  
 ts-loader          ^8.3.0  →   ^9.2.3 // not compatible w/ webpack <5.0 - see https://github.com/TypeStrong/ts-loader/releases/tag/v9.0.0
 cosmos-client     ^0.39.2  →  ^0.42.5 // `xchain-cosmos` needs to be updated before
 ethers             ^5.1.4  →   ^5.3.1 // `xchain-ethereum` needs to be updated before 
 rxjs               ^6.6.7  →   ^7.1.0 // `fp-ts-rxjs` + `@devexperts/rx-utils/dist/observable.utils` still depends on rxjs@6.x
 ```
  • Loading branch information
luxuereal committed Jun 24, 2021
1 parent 62307b9 commit 73c2305
Show file tree
Hide file tree
Showing 16 changed files with 3,764 additions and 4,122 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
node_version: [14]
node-version: [14.17]
steps:
- name: Checkout git repo
uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Unit tests
strategy:
matrix:
node-version: [14]
node-version: [14.17]

runs-on: ubuntu-latest

Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
name: ESLint
strategy:
matrix:
node-version: [14]
node-version: [14.17]

runs-on: ubuntu-latest

Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
name: Production build
strategy:
matrix:
node-version: [14]
node-version: [14.17]

runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.16.0
14.17
12 changes: 11 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,15 @@ module.exports = {
})

return webpackConfig
}
},
/** Use `react-docgen` temporary as a workaround to fix
* ```
* 70% sealing React Docgen Typescript Plugin/home/jk/Wrk/thorchain/repos/asgardex-electron/node_modules/react-docgen-typescript/lib/parser.js:442
* var trimmedText = (tag.text || '').trim();
* ```
* @see https://github.com/styleguidist/react-docgen-typescript/issues/356#issuecomment-850400428
*/
typescript: {
reactDocgen: 'react-docgen'
},
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ _(in alphabetical order)_

## Install

It's recommended to use a Node version as same as Electron is running with (currently: [`Electron v9.1.2` / Node `12.14.1`](https://github.com/electron/releases#releases))
It's recommended to use a Node version as same as Electron is running with (currently: [`Electron v13.1.4` / Node `14.17`](https://github.com/electron/releases#releases))

```bash
git clone https://github.com/thorchain/asgardex-electron.git asgardex
Expand All @@ -56,7 +56,7 @@ yarn prebuild
yarn dev
```

In case Node@12 might run into memory issues locally set `--max-old-space-size` as follow:
In case Node might run into memory issues locally set `--max-old-space-size` as follow:

```
export NODE_OPTIONS="--max-old-space-size=4096"
Expand Down
78 changes: 39 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,106 +66,106 @@
"@devexperts/remote-data-ts": "^2.0.5",
"@devexperts/rx-utils": "^1.0.0-alpha.14",
"@devexperts/utils": "^1.0.0-alpha.14",
"@openapitools/openapi-generator-cli": "^2.2.6",
"@openapitools/openapi-generator-cli": "^2.3.5",
"@psf/bitcoincashjs-lib": "^4.0.2",
"@thorchain/asgardex-midgard": "^1.1.0",
"@thorchain/asgardex-theme": "^0.1.1",
"@thorchain/asgardex-util": "^0.9.1",
"@types/electron-devtools-installer": "^2.2.0",
"@xchainjs/xchain-binance": "^5.2.1",
"@xchainjs/xchain-bitcoin": "^0.15.7",
"@xchainjs/xchain-bitcoincash": "^0.11.5",
"@xchainjs/xchain-bitcoin": "^0.15.8",
"@xchainjs/xchain-bitcoincash": "^0.11.6",
"@xchainjs/xchain-client": "^0.9.3",
"@xchainjs/xchain-cosmos": "^0.13.2",
"@xchainjs/xchain-crypto": "^0.2.4",
"@xchainjs/xchain-crypto": "^0.2.5",
"@xchainjs/xchain-ethereum": "^0.21.4",
"@xchainjs/xchain-litecoin": "^0.6.5",
"@xchainjs/xchain-litecoin": "^0.6.6",
"@xchainjs/xchain-thorchain": "^0.17.0",
"@xchainjs/xchain-util": "^0.2.8",
"antd": "^4.15.4",
"antd": "^4.16.5",
"axios": "^0.21.1",
"bchaddrjs": "^0.5.2",
"bignumber.js": "^9.0.1",
"bitcoinjs-lib": "^5.2.0",
"chart.js": "^2.9.4",
"chart.js": "^3.3.2",
"coininfo": "^5.1.0",
"cosmos-client": "^0.39.2",
"cosmos-client": "0.39.2",
"electron-debug": "^3.2.0",
"electron-log": "^4.3.5",
"electron-updater": "^4.3.8",
"electron-updater": "^4.3.9",
"ethers": "^5.1.4",
"fp-ts": "^2.10.5",
"fp-ts-rxjs": "^0.6.15",
"fs-extra": "^10.0.0",
"io-ts-types": "^0.5.16",
"lodash.shuffle": "^4.2.0",
"observable-hooks": "^4.0.3",
"observable-hooks": "^4.0.5",
"qrcode": "^1.4.4",
"react": "^17.0.2",
"react-chartjs-2": "^2.11.1",
"react-chartjs-2": "^3.0.3",
"react-circular-progressbar": "^2.0.4",
"react-dom": "^17.0.2",
"react-draggable": "^4.4.3",
"react-intl": "^5.17.4",
"react-intl": "^5.20.3",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.3",
"react-test-renderer": "^17.0.2",
"rxjs": "^6.6.7",
"styled-components": "^5.3.0",
"styled-theme": "^0.3.3",
"typescript": "^4.2.4",
"typescript": "^4.3.4",
"uuid": "^8.3.2",
"wif": "^2.0.6"
},
"devDependencies": {
"@hot-loader/react-dom": "^17.0.1",
"@react-theming/storybook-addon": "^1.1.1",
"@storybook/addon-actions": "^6.2.9",
"@storybook/addon-controls": "^6.2.9",
"@storybook/addon-knobs": "^6.2.9",
"@storybook/addon-links": "^6.2.9",
"@storybook/addon-viewport": "^6.2.9",
"@storybook/addons": "^6.2.9",
"@storybook/addon-actions": "^6.3.0",
"@storybook/addon-controls": "^6.3.0",
"@storybook/addon-knobs": "^6.3.0",
"@storybook/addon-links": "^6.3.0",
"@storybook/addon-viewport": "^6.3.0",
"@storybook/addons": "^6.3.0",
"@storybook/preset-create-react-app": "^3.1.7",
"@storybook/react": "^6.1.21",
"@storybook/theming": "^6.2.9",
"@testing-library/jest-dom": "^5.12.0",
"@testing-library/react": "^11.2.6",
"@testing-library/react-hooks": "^5.1.2",
"@testing-library/user-event": "^13.1.8",
"@storybook/react": "6.1.21",
"@storybook/theming": "^6.3.0",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"@testing-library/react-hooks": "^7.0.0",
"@testing-library/user-event": "^13.1.9",
"@types/bchaddrjs": "^0.4.0",
"@types/fs-extra": "^9.0.11",
"@types/jest": "^26.0.23",
"@types/lodash.shuffle": "^4.2.6",
"@types/node": "^14.14.37",
"@types/node": "^14.17",
"@types/qrcode": "^1.4.0",
"@types/react": "^17.0.5",
"@types/react-dom": "^17.0.3",
"@types/react": "^17.0.11",
"@types/react-dom": "^17.0.8",
"@types/react-intl": "^3.0.0",
"@types/react-router-dom": "^5.1.7",
"@types/styled-components": "^5.1.9",
"concurrently": "^6.1.0",
"@types/styled-components": "^5.1.10",
"concurrently": "^6.2.0",
"cross-env": "^7.0.3",
"electron": "^12.0.7",
"electron-builder": "^22.11.2",
"electron": "^13.1.4",
"electron-builder": "^22.11.7",
"electron-devtools-installer": "^3.2.0",
"electron-notarize": "^1.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"git-revision-webpack-plugin": "^5.0.0",
"husky": "^6.0.0",
"lint-staged": "^11.0.0",
"node-abi": "^2.26.0",
"node-abi": "^2.30.0",
"nodemon": "^2.0.7",
"prettier": "^2.3.0",
"prettier": "^2.3.1",
"source-map-explorer": "^2.5.2",
"testcafe": "^1.14.0",
"testcafe": "^1.14.2",
"testcafe-browser-provider-electron": "^0.0.16",
"testcafe-react-selectors": "^4.1.5",
"ts-jest": "^26.5.6",
"ts-loader": "^8.1.0",
"ts-node": "^9.1.1",
"ts-jest": "^27.0.3",
"ts-loader": "^8.3.0",
"ts-node": "^10.0.0",
"wait-on": "^5.3.0",
"webpack-cli": "^4.7.0"
"webpack-cli": "^4.7.2"
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import React from 'react'

import { radios } from '@storybook/addon-knobs'
import { RadiosTypeOptionsProp } from '@storybook/addon-knobs/dist/components/types'
import { storiesOf } from '@storybook/react'
import { AssetBCH, AssetBNB, AssetBTC, AssetETH, AssetRuneNative } from '@xchainjs/xchain-util'

import { ASSETS_MAINNET, ASSETS_TESTNET, ERC20_MAINNET, ERC20_TESTNET } from '../../../../../shared/mock/assets'
import { AssetIcon } from './AssetIcon'
import { Size } from './AssetIcon.types'

type SizeOptions = {
[key in Size]: Size
}

storiesOf('Components/assets/AssetIcon', module).add('default', () => {
const sizeOptions: SizeOptions = {
const sizeOptions: RadiosTypeOptionsProp<Size> = {
small: 'small',
normal: 'normal',
large: 'large',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from 'react'

import { withKnobs, radios } from '@storybook/addon-knobs'
import { RadiosTypeOptionsProp } from '@storybook/addon-knobs/dist/components/types'
import { storiesOf } from '@storybook/react'
import { AssetBNB, AssetRuneNative } from '@xchainjs/xchain-util'

import { Size as CoinSize } from '../assetIcon/AssetIcon.types'
import { AssetPair } from './AssetPair'

const sizeOptions: Record<CoinSize, CoinSize> = {
const sizeOptions: RadiosTypeOptionsProp<CoinSize> = {
small: 'small',
big: 'big',
normal: 'normal',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import React from 'react'

import { radios, withKnobs } from '@storybook/addon-knobs'
import { RadiosTypeOptionsProp } from '@storybook/addon-knobs/dist/components/types'
import { storiesOf } from '@storybook/react'
import { AssetBNB, AssetRuneNative } from '@xchainjs/xchain-util'

import { ASSETS_MAINNET } from '../../../../../shared/mock/assets'
import { Size } from '../assetIcon/AssetIcon.types'
import { AssetPairOverlapped } from './AssetPairOverlapped'

type SizeOptions = Record<Size, Size>

const sizeOptions: SizeOptions = {
const sizeOptions: RadiosTypeOptionsProp<Size> = {
small: 'small',
big: 'big',
normal: 'normal',
Expand Down
19 changes: 4 additions & 15 deletions src/renderer/components/uielements/button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,14 @@ import React from 'react'

import { ArrowRightOutlined } from '@ant-design/icons'
import { text, radios, boolean } from '@storybook/addon-knobs'
import { RadiosTypeOptionsProp } from '@storybook/addon-knobs/dist/components/types'
import { storiesOf } from '@storybook/react'
import { Row } from 'antd'
import styled from 'styled-components'

import { Button } from './Button'
import { ButtonSize, ButtonColor, ButtonType } from './Button.types'

type SizeOption = {
[key in ButtonSize]: ButtonSize
}

type ColorOption = {
[key in ButtonColor]: ButtonColor
}

type TypeOption = {
[key in ButtonType]: ButtonType
}

const StoryWrapper = styled.div`
div.ant-row {
display: flex;
Expand Down Expand Up @@ -150,21 +139,21 @@ storiesOf('Components/button/Button', module)
})
.add('properties', () => {
const buttonText = text('Button Text', 'button')
const sizeOptions: SizeOption = {
const sizeOptions: RadiosTypeOptionsProp<ButtonSize> = {
small: 'small',
normal: 'normal',
xnormal: 'xnormal',
big: 'big'
}

const colorOptions: ColorOption = {
const colorOptions: RadiosTypeOptionsProp<ButtonColor> = {
primary: 'primary',
success: 'success',
warning: 'warning',
error: 'error'
}

const typeOptions: TypeOption = {
const typeOptions: RadiosTypeOptionsProp<ButtonType> = {
default: 'default',
outline: 'outline',
normal: 'normal',
Expand Down
Loading

0 comments on commit 73c2305

Please sign in to comment.