Skip to content

Commit 55c5932

Browse files
Alexander MatyushentsevAlexander Matyushentsev
authored andcommitted
Remove obsolete redux utils
1 parent f9238f6 commit 55c5932

File tree

7 files changed

+18
-73
lines changed

7 files changed

+18
-73
lines changed

package.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@
4040
"prop-types": "^15.6.0",
4141
"react": "^16.2.0",
4242
"react-dom": "^16.2.0",
43-
"react-redux": "^5.0.6",
4443
"react-router-dom": "^4.2.2",
45-
"react-router-redux": "^5.0.0-alpha.9",
46-
"redux": "3.6.0",
4744
"rxjs": "^5.5.6",
4845
"superagent": "^3.8.2",
4946
"superagent-promise": "^1.1.0",
@@ -66,12 +63,9 @@
6663
"@types/history": "^4.6.2",
6764
"@types/mocha": "^2.2.48",
6865
"@types/prop-types": "^15.5.2",
66+
"@types/react": "^16.0.34",
6967
"@types/react-dom": "^16.0.3",
70-
"@types/react-redux": "^5.0.14",
7168
"@types/react-router-dom": "^4.2.3",
72-
"@types/react-router-redux": "^5.0.11",
73-
"@types/react": "^16.0.34",
74-
"@types/redux": "^3.6.0",
7569
"@types/storybook__addon-actions": "^3.0.2",
7670
"@types/storybook__addon-links": "^3.3.0",
7771
"@types/storybook__react": "^3.0.7",
@@ -96,10 +90,10 @@
9690
"source-map-loader": "^0.2.3",
9791
"style-loader": "^0.20.1",
9892
"ts-node": "^4.1.0",
99-
"tslint-react": "^3.4.0",
10093
"tslint": "^5.9.1",
94+
"tslint-react": "^3.4.0",
10195
"webfonts-generator": "^0.4.0",
102-
"webpack-dev-server": "^2.11.1",
103-
"webpack": "^3.10.0"
96+
"webpack": "^3.10.0",
97+
"webpack-dev-server": "^2.11.1"
10498
}
10599
}

src/app/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Redirect, Route, RouteComponentProps, Router, Switch } from 'react-rout
55

66
import { uiUrl } from './shared/base';
77
import { Layout } from './shared/components';
8-
import { AppContext } from './shared/redux';
8+
import { AppContext } from './shared/context';
99

1010
export const history = createHistory();
1111

src/app/shared/components/nav-bar/nav-bar.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@ import * as classNames from 'classnames';
22
import * as PropTypes from 'prop-types';
33
import * as React from 'react';
44

5-
import { AppContext, isActiveRoute } from '../../redux';
5+
import { AppContext } from '../../context';
66

77
require('./nav-bar.scss');
88

99
export interface NavBarProps extends React.Props<any> {
1010
items: Array<{ path: string; iconClassName: string; title: string; }>;
1111
}
1212

13+
export function isActiveRoute(locationPath: string, path: string) {
14+
return locationPath === path || locationPath.startsWith(`${path}/`);
15+
}
16+
1317
export const NavBar: React.StatelessComponent<NavBarProps> = (props: NavBarProps, context: AppContext) => {
1418
const locationPath = context.router.route.location.pathname;
1519
return (

src/app/shared/redux.tsx renamed to src/app/shared/context.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,3 @@ export interface AppContext {
1010
};
1111
};
1212
}
13-
14-
export function isActiveRoute(locationPath: string, path: string) {
15-
return locationPath === path || locationPath.startsWith(`${path}/`);
16-
}

src/app/workflows/components/workflow-details/workflow-details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Observable, Subscription } from 'rxjs';
77
import * as models from '../../../../models';
88
import { uiUrl } from '../../../shared/base';
99
import { LogsViewer, Page, SlidingPanel } from '../../../shared/components';
10-
import { AppContext } from '../../../shared/redux';
10+
import { AppContext } from '../../../shared/context';
1111
import { services } from '../../../shared/services';
1212

1313
import { WorkflowArtifacts } from '../workflow-artifacts';

src/app/workflows/components/workflows-list/workflows-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Subscription } from 'rxjs';
77
import * as models from '../../../../models';
88
import { uiUrl } from '../../../shared/base';
99
import { MockupList, Page, TopBarFilter } from '../../../shared/components';
10-
import { AppContext } from '../../../shared/redux';
10+
import { AppContext } from '../../../shared/context';
1111
import { services } from '../../../shared/services';
1212

1313
import { WorkflowListItem } from '../workflow-list-item/workflow-list-item';

yarn.lock

Lines changed: 6 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,6 @@
235235
"@types/node" "*"
236236
"@types/react" "*"
237237

238-
"@types/react-redux@^5.0.14":
239-
version "5.0.14"
240-
resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-5.0.14.tgz#f3fc30dcbb2d20455a714f591cc27f77b4df09bb"
241-
dependencies:
242-
"@types/react" "*"
243-
redux "^3.6.0"
244-
245238
"@types/react-router-dom@^4.2.3":
246239
version "4.2.3"
247240
resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-4.2.3.tgz#06e0b67ff536adc0681dffdbe592ae91fb85887d"
@@ -250,14 +243,6 @@
250243
"@types/react" "*"
251244
"@types/react-router" "*"
252245

253-
"@types/react-router-redux@^5.0.11":
254-
version "5.0.11"
255-
resolved "https://registry.yarnpkg.com/@types/react-router-redux/-/react-router-redux-5.0.11.tgz#5a1ebf7975c60640a524dadf95856ba3c26ddf09"
256-
dependencies:
257-
"@types/history" "*"
258-
"@types/react" "*"
259-
redux "^3.7.2"
260-
261246
"@types/react-router@*":
262247
version "4.0.20"
263248
resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-4.0.20.tgz#3404f54e44bba2239ea4320ea701d86d92f05486"
@@ -269,12 +254,6 @@
269254
version "16.0.34"
270255
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.34.tgz#7a8f795afd8a404a9c4af9539b24c75d3996914e"
271256

272-
"@types/redux@^3.6.0":
273-
version "3.6.0"
274-
resolved "https://registry.yarnpkg.com/@types/redux/-/redux-3.6.0.tgz#f1ebe1e5411518072e4fdfca5c76e16e74c1399a"
275-
dependencies:
276-
redux "*"
277-
278257
"@types/storybook__addon-actions@^3.0.2":
279258
version "3.0.2"
280259
resolved "https://registry.yarnpkg.com/@types/storybook__addon-actions/-/storybook__addon-actions-3.0.2.tgz#b5e0f95ecaf8902236fe74eab188f35a6b4d0c71"
@@ -3945,7 +3924,7 @@ [email protected], hoist-non-react-statics@^1.2.0:
39453924
version "1.2.0"
39463925
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb"
39473926

3948-
hoist-non-react-statics@^2.2.1, hoist-non-react-statics@^2.3.0:
3927+
hoist-non-react-statics@^2.3.0:
39493928
version "2.3.1"
39503929
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz#343db84c6018c650778898240135a1420ee22ce0"
39513930

@@ -4239,7 +4218,7 @@ interpret@^1.0.0:
42394218
version "1.1.0"
42404219
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"
42414220

4242-
invariant@^2.0.0, invariant@^2.2.1, invariant@^2.2.2:
4221+
invariant@^2.2.1, invariant@^2.2.2:
42434222
version "2.2.2"
42444223
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360"
42454224
dependencies:
@@ -4829,7 +4808,7 @@ locate-path@^2.0.0:
48294808
p-locate "^2.0.0"
48304809
path-exists "^3.0.0"
48314810

4832-
lodash-es@^4.2.0, lodash-es@^4.2.1:
4811+
lodash-es@^4.2.1:
48334812
version "4.17.4"
48344813
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7"
48354814

@@ -4909,7 +4888,7 @@ lodash@^3.10.1, lodash@^3.5.0, lodash@^3.7.0, lodash@~3.10.0:
49094888
version "3.10.1"
49104889
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
49114890

4912-
lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.6.1, lodash@~4.17.4:
4891+
lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.6.1, lodash@~4.17.4:
49134892
version "4.17.4"
49144893
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
49154894

@@ -6479,17 +6458,6 @@ react-proxy@^3.0.0-alpha.0:
64796458
dependencies:
64806459
lodash "^4.6.1"
64816460

6482-
react-redux@^5.0.6:
6483-
version "5.0.6"
6484-
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.6.tgz#23ed3a4f986359d68b5212eaaa681e60d6574946"
6485-
dependencies:
6486-
hoist-non-react-statics "^2.2.1"
6487-
invariant "^2.0.0"
6488-
lodash "^4.2.0"
6489-
lodash-es "^4.2.0"
6490-
loose-envify "^1.1.0"
6491-
prop-types "^15.5.10"
6492-
64936461
react-router-dom@^4.2.2:
64946462
version "4.2.2"
64956463
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-4.2.2.tgz#c8a81df3adc58bba8a76782e946cbd4eae649b8d"
@@ -6501,14 +6469,6 @@ react-router-dom@^4.2.2:
65016469
react-router "^4.2.0"
65026470
warning "^3.0.0"
65036471

6504-
react-router-redux@^5.0.0-alpha.9:
6505-
version "5.0.0-alpha.9"
6506-
resolved "https://registry.yarnpkg.com/react-router-redux/-/react-router-redux-5.0.0-alpha.9.tgz#825431516e0e6f1fd93b8807f6bd595e23ec3d10"
6507-
dependencies:
6508-
history "^4.7.2"
6509-
prop-types "^15.6.0"
6510-
react-router "^4.2.0"
6511-
65126472
react-router@^4.2.0:
65136473
version "4.2.0"
65146474
resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.2.0.tgz#61f7b3e3770daeb24062dae3eedef1b054155986"
@@ -6715,7 +6675,7 @@ reduce-function-call@^1.0.1:
67156675
dependencies:
67166676
balanced-match "^0.4.2"
67176677

6718-
redux@*, redux@^3.6.0, redux@^3.7.2:
6678+
redux@^3.7.2:
67196679
version "3.7.2"
67206680
resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b"
67216681
dependencies:
@@ -6724,15 +6684,6 @@ redux@*, redux@^3.6.0, redux@^3.7.2:
67246684
loose-envify "^1.1.0"
67256685
symbol-observable "^1.0.3"
67266686

6727-
6728-
version "3.6.0"
6729-
resolved "https://registry.yarnpkg.com/redux/-/redux-3.6.0.tgz#887c2b3d0b9bd86eca2be70571c27654c19e188d"
6730-
dependencies:
6731-
lodash "^4.2.1"
6732-
lodash-es "^4.2.1"
6733-
loose-envify "^1.1.0"
6734-
symbol-observable "^1.0.2"
6735-
67366687
regenerate@^1.2.1:
67376688
version "1.3.3"
67386689
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f"
@@ -7712,7 +7663,7 @@ [email protected]:
77127663
version "1.0.1"
77137664
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"
77147665

7715-
symbol-observable@^1.0.2, symbol-observable@^1.0.3:
7666+
symbol-observable@^1.0.3:
77167667
version "1.1.0"
77177668
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.1.0.tgz#5c68fd8d54115d9dfb72a84720549222e8db9b32"
77187669

0 commit comments

Comments
 (0)