Skip to content

Commit 757e30f

Browse files
committed
BUGFIX: Update flow-typed and outdated react-redux(connect hoc) type usages
1 parent b6b9728 commit 757e30f

File tree

13 files changed

+149
-166
lines changed

13 files changed

+149
-166
lines changed

packages/create-react-microservice-scaffold/src/package.json

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,30 @@
33
"license": "my-chosen-spdx-license",
44
"version": "0.0.0-development",
55
"scripts": {
6-
"clean": "rimraf node_modules flow-typed/npm packages/*/{dist,coverage,flow-typed/npm,node_modules}",
6+
"clean":
7+
"rimraf node_modules flow-typed/npm packages/*/{dist,coverage,flow-typed/npm,node_modules}",
78
"prepare": "yarn run bootstrap:flow:links",
89
"bootstrap": "check-engines && per-env && yarn run build",
910
"bootstrap:development": "yarn run bootstrap:flow",
1011
"bootstrap:production": "exit 0",
1112
"bootstrap:test": "yarn run bootstrap:flow",
12-
"bootstrap:flow": "yarn run bootstrap:flow:links && yarn run bootstrap:flow:types && yarn run bootstrap:flow:stubs",
13+
"bootstrap:flow":
14+
"yarn run bootstrap:flow:links && yarn run bootstrap:flow:types && yarn run bootstrap:flow:stubs",
1315
"bootstrap:flow:links": "flow-mono create-symlinks build/.flowconfig",
14-
"bootstrap:flow:types": "flow-mono install-types --overwrite --ignoreDeps=peer && flow-mono create-stubs --use-root",
16+
"bootstrap:flow:types":
17+
"flow-mono install-types --overwrite --ignoreDeps=peer && flow-mono create-stubs --use-root",
1518
"bootstrap:flow:stubs": "flow-mono create-stubs --use-root",
1619
"lint": "yarn run lint:editorconfig && lerna run lint --parallel",
17-
"lint:editorconfig": "editorconfig-checker --exclude-pattern **/*.js.snap packages/*/src/** packages/*/bin/* build",
18-
"prettier": "prettier --write 'build/**/*.{js,json,scss,sass,css}' 'packages/*/{src,bin}/**/*.{js,json,scss,sass,css}'",
20+
"lint:editorconfig":
21+
"editorconfig-checker --exclude-pattern **/*.js.snap packages/*/src/** packages/*/bin/* build",
22+
"prettier":
23+
"prettier --write 'build/**/*.{js,json,scss,sass,css}' 'packages/*/{src,bin}/**/*.{js,json,scss,sass,css}'",
1924
"flow": "lerna run flow --parallel",
2025
"jest": "lerna run jest --parallel",
2126
"jest:coverage": "lerna run jest:coverage --parallel",
2227
"test": "better-npm-run test",
23-
"testcafe": "testcafe -- chrome:headless __tests__/**/*.js --selector-timeout=30000 --assertion-timeout=30000",
28+
"testcafe":
29+
"testcafe -- chrome:headless __tests__/**/*.js --selector-timeout=30000 --assertion-timeout=30000",
2430
"build": "better-npm-run build",
2531
"dev": "better-npm-run dev",
2632
"start": "better-npm-run start",
@@ -32,21 +38,24 @@
3238
"dev": {
3339
"command": "lerna run dev --parallel",
3440
"env": {
35-
"DEBUG": "*,-babel*,-socket*,-express*,-connect*,-body-parser*,-morgan*,-compression*,-send*,-tinylr*",
41+
"DEBUG":
42+
"*,-babel*,-socket*,-express*,-connect*,-body-parser*,-morgan*,-compression*,-send*,-tinylr*",
3643
"BABEL_ENV": "development",
3744
"NODE_ENV": "development"
3845
}
3946
},
4047
"start": {
4148
"command": "lerna run start --parallel",
4249
"env": {
43-
"DEBUG": "*,-babel*,-socket*,-express*,-connect*,-body-parser*,-morgan*,-compression*,-send*",
50+
"DEBUG":
51+
"*,-babel*,-socket*,-express*,-connect*,-body-parser*,-morgan*,-compression*,-send*",
4452
"BABEL_ENV": "production",
4553
"NODE_ENV": "production"
4654
}
4755
},
4856
"build": {
49-
"command": "lerna run build --parallel --ignore=@company-scope/my-fancy-ui && lerna run build --parallel --scope=@company-scope/my-fancy-ui",
57+
"command":
58+
"lerna run build --parallel --ignore=@company-scope/my-fancy-ui && lerna run build --parallel --scope=@company-scope/my-fancy-ui",
5059
"env": {
5160
"DEBUG": "*,-babel",
5261
"BABEL_ENV": "production",
@@ -66,9 +75,7 @@
6675
"yarn": ">=1.3.2"
6776
},
6877
"private": true,
69-
"workspaces": [
70-
"packages/*"
71-
],
78+
"workspaces": ["packages/*"],
7279
"dependencies": {
7380
"better-npm-run": "0.1.0",
7481
"check-engines": "1.5.0",
@@ -82,7 +89,7 @@
8289
"editorconfig-checker": "1.2.0",
8390
"flow-bin": "0.65.0",
8491
"flow-mono-cli": "1.3.0",
85-
"flow-typed": "2.3.0",
92+
"flow-typed": "2.4.0",
8693
"lint-staged": "6.1.1",
8794
"prettier": "1.11.1",
8895
"pwmetrics": "3.1.6",

packages/create-react-microservice-scaffold/src/packages/my-fancy-ui-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"enzyme-to-json": "3.3.1",
3232
"eslint": "4.18.2",
3333
"flow-bin": "0.65.0",
34-
"flow-typed": "2.3.0",
34+
"flow-typed": "2.4.0",
3535
"jest": "22.0.4",
3636
"prop-types": "15.6.1",
3737
"react": "16.2.0",

packages/create-react-microservice-scaffold/src/packages/my-fancy-ui-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"case-sensitive-paths-webpack-plugin": "2.1.1",
5252
"eslint": "4.18.2",
5353
"flow-bin": "0.65.0",
54-
"flow-typed": "2.3.0",
54+
"flow-typed": "2.4.0",
5555
"jest": "22.0.4",
5656
"nodemon": "1.17.1",
5757
"open-browser-webpack-plugin": "0.0.5",

packages/create-react-microservice-scaffold/src/packages/my-fancy-ui-hypernova/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"create-config": "1.0.4",
4343
"eslint": "4.18.2",
4444
"flow-bin": "0.65.0",
45-
"flow-typed": "2.3.0",
45+
"flow-typed": "2.4.0",
4646
"invalidate-module": "1.0.0",
4747
"jest": "22.0.4",
4848
"nodemon": "1.17.1",

packages/create-react-microservice-scaffold/src/packages/my-fancy-ui-i18n/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@immowelt/jest-preset-node": "1.0.1",
2929
"eslint": "4.18.2",
3030
"flow-bin": "0.65.0",
31-
"flow-typed": "2.3.0",
31+
"flow-typed": "2.4.0",
3232
"jest": "22.0.4"
3333
},
3434
"peerDependencies": {

packages/create-react-microservice-scaffold/src/packages/my-fancy-ui-logger/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@immowelt/jest-preset-node": "1.0.1",
2929
"eslint": "4.18.2",
3030
"flow-bin": "0.65.0",
31-
"flow-typed": "2.3.0",
31+
"flow-typed": "2.4.0",
3232
"jest": "22.0.4"
3333
},
3434
"jest": {

packages/create-react-microservice-scaffold/src/packages/my-fancy-ui-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"create-config": "1.0.4",
5252
"eslint": "4.18.2",
5353
"flow-bin": "0.65.0",
54-
"flow-typed": "2.3.0",
54+
"flow-typed": "2.4.0",
5555
"jest": "22.0.4",
5656
"mock-fs": "4.4.2",
5757
"nodemon": "1.17.1",

packages/create-react-microservice-scaffold/src/packages/my-fancy-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"enzyme-to-json": "3.3.1",
5757
"eslint": "4.18.2",
5858
"flow-bin": "0.65.0",
59-
"flow-typed": "2.3.0",
59+
"flow-typed": "2.4.0",
6060
"jest": "22.0.4",
6161
"jest-react-redux": "1.0.3",
6262
"react-test-renderer": "16.2.0",

packages/create-react-microservice-scaffold/src/packages/my-fancy-ui/src/containers/CommentsList/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// @flow
22

3-
import type {Connector} from 'react-redux';
43
import type {StateType} from './../../store/types.js';
54
import type {CommentIdType} from './../../store/modules/comments/types.js';
65

@@ -48,10 +47,7 @@ const mapStateToProps = (state: StateType): StatePropsType => ({
4847
const mapDispatchToProps: DispatchPropsType = {
4948
loadComments: commentsActions.loadComments
5049
};
51-
const withState: Connector<OwnPropsType, PropsType> = connect(
52-
mapStateToProps,
53-
mapDispatchToProps
54-
);
50+
const withState = connect(mapStateToProps, mapDispatchToProps);
5551
const Container = withState(CommentsList);
5652

5753
export {

packages/create-react-microservice-scaffold/src/packages/my-fancy-ui/src/containers/CommentsListComment/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// @flow
22

3-
import type {Connector} from 'react-redux';
43
import type {StateType} from './../../store/types.js';
54
import type {
65
CommentIdType,
@@ -44,7 +43,7 @@ const mapStateToProps = (
4443
): StatePropsType => ({
4544
comment: commentsSelectors.getCommentForId(state, {id: ownProps.commentId})
4645
});
47-
const withState: Connector<OwnPropsType, PropsType> = connect(mapStateToProps);
46+
const withState = connect(mapStateToProps);
4847
const Container = withState(CommentsListComment);
4948

5049
export {CommentsListComment, mapStateToProps, Container as default};

0 commit comments

Comments
 (0)