Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit 934e57b

Browse files
authored
Tidy up and upgrade outdated dependencies (#144)
* Remove npm watch scripts * Fix deprecation warnings from npm scripts * Upgrade testing libraries * Upgrade ESLint and related libraries to latest version * Upgrade to Babel 7 * Update copyright year in license * Reformat license content * Upgrade hoist-non-react-statics to version 3.3.0 from 2.3.1 * Upgrade babel-plugin-istanbul to version 5.1.4 from 4.1.5 * Upgrade redux and related packages to latest version * Reduce peer dependency version requirements for React and React DOM * Upgrade greenkeeper-postpublish to version 2.0.0 from 1.3.0 * Remove yarn.lock file * Add package-lock.json file
1 parent 0320294 commit 934e57b

20 files changed

+7715
-4743
lines changed

.babelrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
>0.2%
2+
not dead
3+
not op_mini all

LICENSE

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
Copyright (c) 2016 Flow Commerce, Inc.
1+
Copyright (c) 2019 Flow Commerce, Inc.
22

3-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in the
5+
Software without restriction, including without limitation the rights to use,
6+
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
7+
Software, and to permit persons to whom the Software is furnished to do so,
8+
subject to the following conditions:
49

5-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
612

7-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

babel.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
presets: [
3+
'@babel/preset-env',
4+
'@babel/preset-react',
5+
],
6+
plugins: [
7+
['@babel/plugin-transform-runtime', {
8+
corejs: false,
9+
regenerator: false,
10+
}],
11+
'@babel/plugin-proposal-class-properties',
12+
['@babel/plugin-proposal-object-rest-spread', {
13+
useBuiltIns: true,
14+
}],
15+
],
16+
env: {
17+
test: {
18+
plugins: ['babel-plugin-istanbul'],
19+
},
20+
},
21+
};

examples/twitter/common/components/HomeTimeline.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import { Alert, Col, Grid, Row } from 'react-bootstrap';
3+
import {
4+
Alert, Col, Grid, Row,
5+
} from 'react-bootstrap';
46
import { compose } from 'redux';
57
import { connect } from 'react-redux';
68
import { withFetch } from '@flowio/redux-fetch';

examples/twitter/common/components/InternalServerError.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import { Button, Col, Grid, Jumbotron, Row } from 'react-bootstrap';
3+
import {
4+
Button, Col, Grid, Jumbotron, Row,
5+
} from 'react-bootstrap';
46

57
const InternalServerError = ({ message, retry, ...otherProps }) => (
68
<Grid>

examples/twitter/common/components/NotFound.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from 'react';
2-
import { Col, Grid, Jumbotron, Row } from 'react-bootstrap';
2+
import {
3+
Col, Grid, Jumbotron, Row,
4+
} from 'react-bootstrap';
35
import { Link } from 'react-router';
46

57
const NotFound = () => (

examples/twitter/common/components/TimelineItem.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ const TimelineItem = ({ tweet }) => (
1616
<div {...classes('content')}>
1717
<p>
1818
<strong {...classes('fullname')}>{tweet.user.name}</strong>
19-
<span {...classes('username')}>@{tweet.user.screen_name}</span>
19+
<span {...classes('username')}>
20+
@
21+
{tweet.user.screen_name}
22+
</span>
2023
</p>
2124
<p>{tweet.text}</p>
2225
</div>

examples/twitter/common/components/UserProfile.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ const UserProfile = ({ user }) => (
2020
<Link to="/user/timeline">{user.name}</Link>
2121
</p>
2222
<p {...classes('screen-name')}>
23-
<Link to="/user/timeline">@{user.screen_name}</Link>
23+
<Link to="/user/timeline">
24+
@
25+
{user.screen_name}
26+
</Link>
2427
</p>
2528
</div>
2629
<div {...classes('stats')}>

examples/twitter/common/reducers/homeTimeline.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const initialState = {
99
};
1010

1111
export default handleActions({
12-
[ActionTypes.FETCH_HOME_TIMELINE_SUCCESS]: (state, action) =>
13-
assign({}, state, { timeline: action.payload, error: null }),
14-
[ActionTypes.FETCH_HOME_TIMELINE_FAILURE]: (state, action) =>
15-
assign({}, state, { error: action.payload, timeline: [] }),
12+
[ActionTypes.FETCH_HOME_TIMELINE_SUCCESS]:
13+
(state, action) => assign({}, state, { timeline: action.payload, error: null }),
14+
[ActionTypes.FETCH_HOME_TIMELINE_FAILURE]:
15+
(state, action) => assign({}, state, { error: action.payload, timeline: [] }),
1616
}, initialState);

examples/twitter/common/reducers/user.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ const initialState = {
88
};
99

1010
export default handleActions({
11-
[ActionTypes.FETCH_USER_SUCCESS]: (state, action) =>
12-
assign({}, state, action.payload),
13-
[ActionTypes.FETCH_USER_FAILURE]: (state, action) =>
14-
assign({}, state, { error: action.payload }),
11+
[ActionTypes.FETCH_USER_SUCCESS]: (state, action) => assign({}, state, action.payload),
12+
[ActionTypes.FETCH_USER_FAILURE]: (state, action) => assign({}, state, { error: action.payload }),
1513
}, initialState);

examples/twitter/common/reducers/userTimeline.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const initialState = {
99
};
1010

1111
export default handleActions({
12-
[ActionTypes.FETCH_USER_TIMELINE_SUCCESS]: (state, action) =>
13-
assign({}, state, { timeline: action.payload }),
14-
[ActionTypes.FETCH_USER_TIMELINE_FAILURE]: (state, action) =>
15-
assign({}, state, { error: action.payload }),
12+
[ActionTypes.FETCH_USER_TIMELINE_SUCCESS]:
13+
(state, action) => assign({}, state, { timeline: action.payload }),
14+
[ActionTypes.FETCH_USER_TIMELINE_FAILURE]:
15+
(state, action) => assign({}, state, { error: action.payload }),
1616
}, initialState);

0 commit comments

Comments
 (0)