Skip to content

Commit 812b91b

Browse files
authored
Lock 'react' and 'react-dom' to '^16.14.0' version and fix some types (#152)
1 parent 4236ce6 commit 812b91b

File tree

8 files changed

+21367
-23571
lines changed

8 files changed

+21367
-23571
lines changed

.flowconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
[lints]
1212

1313
[options]
14-
module.file_ext=.ts
15-
module.file_ext=.tsx
1614
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
1715

1816
[strict]

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1111

1212
- Update prettier and eslint configurations;
1313

14+
- Lock `react` and `react-dom` to `^16.14.0` version;
15+
1416
## [7.10.0]
1517

1618
- Pass menu subitems to filtering

package-lock.json

Lines changed: 21354 additions & 23559 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
"promise": "^8.0.1",
3838
"raf": "^3.4.0",
3939
"ramda": "^0.25.0",
40-
"react": "^17.0.2",
41-
"react-dom": "^17.0.2",
40+
"react": "^16.14.0",
41+
"react-dom": "^16.14.0",
4242
"react-redux": "^5.0.7",
4343
"react-router": "^4.3.1",
4444
"react-router-dom": "^4.3.1",
@@ -54,7 +54,7 @@
5454
"@babel/plugin-proposal-decorators": "^7.14.2",
5555
"@babel/preset-flow": "^7.13.13",
5656
"@emotion/babel-plugin": "^11.3.0",
57-
"@tarantool.io/eslint-config": "^1.0.3",
57+
"@tarantool.io/eslint-config": "^1.0.4",
5858
"@tarantool.io/import-sort-style": "^1.0.3",
5959
"@tarantool.io/lua-bundler-webpack-plugin": "^1.0.1",
6060
"@tarantool.io/prettier-config": "^1.0.3",
@@ -85,7 +85,7 @@
8585
"postcss-flexbugs-fixes": "^3.2.0",
8686
"postcss-loader": "^3.0.0",
8787
"react-dev-utils": "^11.0.4",
88-
"react-test-renderer": "16.14.0",
88+
"react-test-renderer": "^16.14.0",
8989
"style-loader": "^1.0.0",
9090
"typescript": "4.4.2",
9191
"url-loader": "^2.1.0",

src/api.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ApolloClient } from 'apollo-client';
44
import { from } from 'apollo-link';
55
import { HttpLink } from 'apollo-link-http';
66
import axios from 'axios';
7+
// eslint-disable-next-line import/no-named-as-default
78
import gql from 'graphql-tag';
89
import nock from 'nock';
910

src/components/Routes.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* eslint-disable sonarjs/no-duplicate-string */
2-
// @flow
32
import React from 'react';
43
import { Provider } from 'react-redux';
54
import { Route, Router, Switch } from 'react-router-dom';
@@ -65,7 +64,7 @@ test('not found', () => {
6564
}
6665

6766
class RouteProvider extends React.Component {
68-
render(): React.ReactNode {
67+
render() {
6968
const { store, core } = this.props;
7069
return (
7170
<div>

src/store/middlewares/pageFilter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const fnSubstituteAction = [PAGE_FILTER_ADD, PAGE_FILTER_REMOVE];
77

88
export default () => (next: Function) => (action: FSA) => {
99
if (fnSubstituteAction.includes(action.type)) {
10+
// $FlowFixMe
1011
action.payload.fn = disposableFunctionKey(action.payload.fn);
1112
if (action.type === PAGE_FILTER_REMOVE) {
1213
disposeFnByKey(action.payload.fn);

src/utils/disposableFnMap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ const fnKeyMap = new Map<Function, string>();
88
fnMap['1'] = 1;
99
delete fnMap['1'];
1010

11-
export const getKeyByFn: (Function) => ?string = (fn) => fnKeyMap.get(fn);
11+
export const getKeyByFn = (fn: ?Function): ?string => (fn ? fnKeyMap.get(fn) : undefined);
1212

13-
export const disposableFunctionKey: (Function) => string = (fn) => {
13+
export const disposableFunctionKey = (fn: Function): string => {
1414
const key = getKeyByFn(fn) || nanoid();
1515
fnMap[key] = fn;
1616
fnKeyMap.set(fn, key);
1717
return key;
1818
};
1919

20-
export const getFnByKey: (string) => Function = (key) => fnMap[key];
20+
export const getFnByKey = (key: string): ?Function => fnMap[key];
2121

22-
export const disposeFnByKey: (string) => void = (key) => {
22+
export const disposeFnByKey = (key: string): void => {
2323
const fn = fnMap[key];
2424
delete fnMap[key];
2525
fnKeyMap.delete(fn);

0 commit comments

Comments
 (0)