Skip to content

Commit 766ae68

Browse files
authored
chore: update npm dependencies (#68)
1 parent 6584e0f commit 766ae68

File tree

8 files changed

+564
-427
lines changed

8 files changed

+564
-427
lines changed

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,8 @@
6363
"editor.codeActionsOnSave": {
6464
"source.fixAll.eslint": true
6565
},
66-
"eslint.workingDirectories": ["./app"]
66+
"eslint.workingDirectories": [
67+
"./app"
68+
],
69+
"eslint.enable": true
6770
}

app/.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"react/prop-types": "off",
2424
"@typescript-eslint/explicit-function-return-type": "off",
2525
"@typescript-eslint/explicit-member-accessibility": "off",
26-
"@typescript-eslint/no-explicit-any": 0
26+
"@typescript-eslint/no-explicit-any": 0,
27+
"@typescript-eslint/explicit-module-boundary-types": "off"
2728
}
2829
}

app/package.json

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,64 +20,64 @@
2020
"@emotion/core": "10.0.28",
2121
"@emotion/styled": "10.0.27",
2222
"@improbable-eng/grpc-web": "0.12.0",
23-
"@types/big.js": "4.0.5",
24-
"@types/file-saver": "2.0.1",
25-
"@types/react-virtualized": "^9.21.9",
2623
"big.js": "5.2.2",
24+
"bootstrap": "4.5.0",
2725
"debug": "4.1.1",
2826
"emotion-theming": "10.0.27",
2927
"file-saver": "2.0.2",
3028
"http-proxy-middleware": "1.0.4",
31-
"i18next": "19.4.4",
32-
"i18next-browser-languagedetector": "4.1.1",
29+
"i18next": "19.5.1",
30+
"i18next-browser-languagedetector": "5.0.0",
3331
"lodash": "4.17.15",
34-
"lottie-web": "5.6.8",
32+
"lottie-web": "5.7.0",
3533
"mobx": "5.15.4",
36-
"mobx-react-lite": "2.0.6",
34+
"mobx-react-lite": "2.0.7",
3735
"mobx-react-router": "4.1.0",
38-
"mobx-utils": "5.5.7",
39-
"rc-tooltip": "4.2.0",
40-
"react": "^16.13.1",
41-
"react-dom": "^16.13.1",
42-
"react-i18next": "11.4.0",
36+
"mobx-utils": "5.6.1",
37+
"rc-tooltip": "4.2.1",
38+
"react": "16.13.1",
39+
"react-dom": "16.13.1",
40+
"react-i18next": "11.7.0",
4341
"react-router": "5.2.0",
4442
"react-scripts": "3.4.1",
45-
"react-toastify": "6.0.5",
46-
"react-virtualized": "^9.21.2"
43+
"react-toastify": "6.0.6",
44+
"react-virtualized": "9.21.2"
4745
},
4846
"devDependencies": {
49-
"@storybook/addon-actions": "^5.3.18",
50-
"@storybook/addon-docs": "5.3.18",
51-
"@storybook/addon-links": "^5.3.18",
52-
"@storybook/addons": "^5.3.18",
53-
"@storybook/preset-create-react-app": "^2.1.1",
54-
"@storybook/react": "^5.3.18",
55-
"@testing-library/jest-dom": "^5.5.0",
56-
"@testing-library/react": "^10.0.4",
57-
"@testing-library/user-event": "^10.1.0",
47+
"@storybook/addon-actions": "5.3.19",
48+
"@storybook/addon-docs": "5.3.19",
49+
"@storybook/addon-links": "5.3.19",
50+
"@storybook/addons": "5.3.19",
51+
"@storybook/preset-create-react-app": "3.1.2",
52+
"@storybook/react": "5.3.19",
53+
"@testing-library/jest-dom": "5.11.0",
54+
"@testing-library/react": "10.4.3",
55+
"@testing-library/user-event": "12.0.11",
56+
"@types/big.js": "4.0.5",
5857
"@types/debug": "4.1.5",
58+
"@types/file-saver": "2.0.1",
5959
"@types/google-protobuf": "3.7.2",
6060
"@types/history": "4.7.6",
61-
"@types/jest": "^25.2.1",
62-
"@types/lodash": "4.14.155",
63-
"@types/node": "^13.13.5",
64-
"@types/react": "^16.9.34",
65-
"@types/react-dom": "^16.9.7",
66-
"@types/react-router": "5.1.7",
67-
"@typescript-eslint/eslint-plugin": "^2.31.0",
68-
"@typescript-eslint/parser": "^2.31.0",
69-
"bootstrap": "4.4.1",
61+
"@types/jest": "26.0.3",
62+
"@types/lodash": "4.14.157",
63+
"@types/node": "14.0.14",
64+
"@types/react": "16.9.41",
65+
"@types/react-dom": "16.9.8",
66+
"@types/react-router": "5.1.8",
67+
"@types/react-virtualized": "9.21.10",
68+
"@typescript-eslint/eslint-plugin": "3.5.0",
69+
"@typescript-eslint/parser": "3.5.0",
7070
"cross-env": "7.0.2",
7171
"eslint-config-prettier": "6.11.0",
72-
"eslint-plugin-prettier": "3.1.3",
73-
"eslint-plugin-react": "7.19.0",
74-
"google-protobuf": "3.11.4",
72+
"eslint-plugin-prettier": "3.1.4",
73+
"eslint-plugin-react": "7.20.2",
74+
"google-protobuf": "3.12.2",
7575
"jest-canvas-mock": "2.2.0",
7676
"jest-environment-jsdom-sixteen": "1.0.3",
7777
"node-sass": "4.14.1",
7878
"prettier": "2.0.5",
7979
"ts-protoc-gen": "0.12.0",
80-
"typescript": "~3.8.3"
80+
"typescript": "~3.9.5"
8181
},
8282
"eslintConfig": {
8383
"extends": "react-app",

app/src/__stories__/LoopPage.stories.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { useEffect } from 'react';
22
import { observable, ObservableMap, values } from 'mobx';
33
import { useStore } from 'store';
44
import { Channel } from 'store/models';
@@ -23,17 +23,23 @@ const channelSubset = (channels: ObservableMap<string, Channel>) => {
2323

2424
export const Default = () => {
2525
const { channelStore } = useStore();
26-
// only use a small set of channels
27-
channelStore.channels = channelSubset(channelStore.channels);
26+
useEffect(() => {
27+
// only use a small set of channels
28+
channelStore.channels = channelSubset(channelStore.channels);
29+
}, [channelStore]);
2830

2931
return <LoopPage />;
3032
};
3133

3234
export const ManyChannels = () => <LoopPage />;
3335

3436
export const InsideLayout = () => {
35-
const store = useStore();
36-
store.uiStore.goToLoop();
37+
const { channelStore } = useStore();
38+
useEffect(() => {
39+
// only use a small set of channels
40+
channelStore.channels = channelSubset(channelStore.channels);
41+
}, [channelStore]);
42+
3743
return (
3844
<Layout>
3945
<LoopPage />

app/src/hooks/usePrefixedTranslation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useCallback } from 'react';
22
import { useTranslation } from 'react-i18next';
3+
import { StringMap } from 'i18next';
34

45
/**
56
* A hook which returns a `t` function that inserts a prefix in each key lookup
@@ -9,7 +10,7 @@ const usePrefixedTranslation = (prefix: string) => {
910
const { t } = useTranslation();
1011
// the new `t` function that will append the prefix
1112
const translate = useCallback(
12-
(key: string, options?: string | object) => {
13+
(key: string, options?: string | StringMap) => {
1314
// if the key contains a '.', then don't add the prefix
1415
return key.includes('.') ? t(key, options) : t(`${prefix}.${key}`, options);
1516
},

app/src/util/tests/sampleData.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/camelcase */
21
import * as LND from 'types/generated/lnd_pb';
32
import * as LOOP from 'types/generated/loop_pb';
43

app/src/util/translate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import i18n from 'i18next';
1+
import i18n, { StringMap } from 'i18next';
22

33
/**
44
* A utility function which returns a `t` function that inserts a prefix in each key lookup
55
* @param prefix the prefix to use for all translation keys
66
*/
77
export const prefixTranslation = (prefix: string) => {
88
// the new `t` function that will append the prefix
9-
const translate = (key: string, options?: string | object) => {
9+
const translate = (key: string, options?: string | StringMap) => {
1010
return i18n.t(`${prefix}.${key}`, options);
1111
};
1212

0 commit comments

Comments
 (0)