Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFR] Upgrade dependencies #3170

Merged
merged 14 commits into from
Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,119 changes: 50 additions & 1,069 deletions UPGRADE.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Button from '@material-ui/core/Button';
import { showNotification } from 'react-admin';
import { push } from 'react-router-redux';
import { push } from 'connected-react-router';

class ApproveButton extends Component {
handleClick = () => {
Expand Down Expand Up @@ -242,7 +242,7 @@ import {
UPDATE,
withDataProvider,
} from 'react-admin';
-import { push } from 'react-router-redux';
-import { push } from 'connected-react-router';

class ApproveButton extends Component {
handleClick = () => {
Expand Down
4 changes: 2 additions & 2 deletions docs/Admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ The `<Admin>` app uses [Redux](http://redux.js.org/) to manage state. The state
{
admin: { /*...*/ }, // used by react-admin
form: { /*...*/ }, // used by redux-form
routing: { /*...*/ }, // used by react-router-redux
routing: { /*...*/ }, // used by connected-react-router
}
```

Expand Down Expand Up @@ -331,7 +331,7 @@ Now the state will look like:
{
admin: { /*...*/ }, // used by react-admin
form: { /*...*/ }, // used by redux-form
routing: { /*...*/ }, // used by react-router-redux
routing: { /*...*/ }, // used by connected-react-router
bitcoinRate: 123, // managed by rateReducer
}
```
Expand Down
12 changes: 6 additions & 6 deletions docs/CustomApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Here is the default store creation for react-admin:
```js
// in src/createAdminStore.js
import { applyMiddleware, combineReducers, compose, createStore } from 'redux';
import { routerMiddleware, routerReducer } from 'react-router-redux';
import { routerMiddleware, connectRouter } from 'connected-react-router';
import { reducer as formReducer } from 'redux-form';
import createSagaMiddleware from 'redux-saga';
import { all, fork } from 'redux-saga/effects';
Expand All @@ -45,7 +45,7 @@ export default ({
admin: adminReducer,
i18n: i18nReducer(locale, i18nProvider(locale)),
form: formReducer,
router: routerReducer,
router: connectRouter(history),
{ /* add your own reducers here */ },
});
const resettableAppReducer = (state, action) =>
Expand Down Expand Up @@ -152,7 +152,7 @@ Here is the main code for bootstrapping a barebones react-admin application with
import React from 'react';
import { Provider } from 'react-redux';
import { createHashHistory } from 'history';
+import { ConnectedRouter } from 'react-router-redux';
+import { ConnectedRouter } from 'connected-react-router';
+import { Switch, Route } from 'react-router-dom';
+import withContext from 'recompose/withContext';
-import { Admin, Resource } from 'react-admin';
Expand Down Expand Up @@ -203,9 +203,9 @@ const App = () => (
- <Resource name="users" list={UserList} edit={UserEdit} create={UserCreate} />
+ <TranslationProvider>
+ <MuiThemeProvider>
+ <Resource name="posts" context="registration" />
+ <Resource name="comments" context="registration" />
+ <Resource name="users" context="registration" />
+ <Resource name="posts" intent="registration" />
+ <Resource name="comments" intent="registration" />
+ <Resource name="users" intent="registration" />
+ <AppBar position="static" color="default">
+ <Toolbar>
+ <Typography variant="title" color="inherit">
Expand Down
2 changes: 1 addition & 1 deletion examples/data-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
},
"devDependencies": {
"cross-env": "^5.2.0",
"rimraf": "^2.6.2"
"rimraf": "^2.6.3"
}
}
10 changes: 5 additions & 5 deletions examples/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"ra-input-rich-text": "^2.0.0",
"ra-language-english": "^2.0.0",
"ra-language-french": "^2.0.0",
"react": "~16.3.1",
"react": "~16.8.0",
"react-admin": "^2.0.0",
"react-app-polyfill": "^0.1.3",
"react-dom": "~16.3.1",
"react-redux": "~5.0.7",
"react-dom": "~16.8.0",
"react-redux": "^7.1.0-alpha.3",
"react-router-dom": "^4.2.0",
"react-scripts": "^2.0.5",
"react-scripts": "^3.0.0",
"recompose": "~0.26.0",
"redux-form": "~7.4.0",
"redux-form": "~8.2.0",
"redux-saga": "~0.16.0"
},
"scripts": {
Expand Down
53 changes: 30 additions & 23 deletions examples/demo/src/reviews/ReviewList.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import compose from 'recompose/compose';
import classnames from 'classnames';
import { BulkDeleteButton, List, Responsive } from 'react-admin';
import { connect } from 'react-redux';
import { push } from 'react-router-redux';
import { push } from 'connected-react-router';
import { Route } from 'react-router';
import Drawer from '@material-ui/core/Drawer';
import { createStyles, withStyles } from '@material-ui/core/styles';
Expand All @@ -22,21 +22,22 @@ const ReviewsBulkActionButtons = props => (
</Fragment>
);

const styles = theme => createStyles({
root: {
display: 'flex',
},
list: {
flexGrow: 1,
transition: theme.transitions.create(['all'], {
duration: theme.transitions.duration.enteringScreen,
}),
marginRight: 0,
},
listWithDrawer: {
marginRight: 400,
},
});
const styles = theme =>
createStyles({
root: {
display: 'flex',
},
list: {
flexGrow: 1,
transition: theme.transitions.create(['all'], {
duration: theme.transitions.duration.enteringScreen,
}),
marginRight: 0,
},
listWithDrawer: {
marginRight: 400,
},
});

class ReviewList extends Component {
render() {
Expand All @@ -45,19 +46,22 @@ class ReviewList extends Component {
<div className={classes.root}>
<Route path="/reviews/:id">
{({ match }) => {
const isMatch =
!!(match &&
const isMatch = !!(
match &&
match.params &&
match.params.id !== 'create');
match.params.id !== 'create'
);

return (
<Fragment>
<List
{...props}
className={classnames(classes.list, {
[classes.listWithDrawer]: isMatch
[classes.listWithDrawer]: isMatch,
})}
bulkActionButtons={<ReviewsBulkActionButtons />}
bulkActionButtons={
<ReviewsBulkActionButtons />
}
filters={<ReviewFilter />}
perPage={25}
sort={{ field: 'date', order: 'DESC' }}
Expand All @@ -73,7 +77,7 @@ class ReviewList extends Component {
anchor="right"
onClose={this.handleClose}
classes={{
paper: classes.drawerPaper
paper: classes.drawerPaper,
}}
>
{/* To avoid any errors if the route does not match, we don't render at all the component in this case */}
Expand All @@ -99,6 +103,9 @@ class ReviewList extends Component {
}

export default compose(
connect(undefined, { push }),
connect(
undefined,
{ push }
),
withStyles(styles)
)(ReviewList);
14 changes: 7 additions & 7 deletions examples/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.1.0",
"babel-loader": "^8.0.4",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.7.1",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.12.1",
"hard-source-webpack-plugin": "^0.11.2",
"html-loader": "~0.5.5",
"html-webpack-plugin": "~3.2.0",
"ignore-not-found-export-plugin": "^1.0.1",
"jest": "^23.6.0",
"jest": "^24.7.0",
"serve": "~9.1.0",
"style-loader": "~0.20.3",
"wait-on": "^2.1.0",
"wait-on": "^3.2.0",
"webpack": "~4.5.0",
"webpack-cli": "~2.0.13",
"webpack-dev-server": "~3.1.11"
},
"dependencies": {
"@babel/polyfill": "^7.0.0",
"@material-ui/core": "~1.5.1",
"@material-ui/icons": "~1.1.1",
"@babel/polyfill": "^7.0.0",
"ra-data-fakerest": "^2.0.0",
"ra-input-rich-text": "^2.0.0",
"ra-language-english": "^2.0.0",
Expand All @@ -48,8 +48,8 @@
"ra-tree-language-english": "^2.0.0",
"ra-tree-language-french": "^2.0.0",
"ra-tree-ui-materialui": "^2.0.0",
"react": "~16.3.1",
"react": "~16.8.0",
"react-admin": "^2.0.0",
"react-dom": "~16.3.1"
"react-dom": "~16.8.0"
}
}
6 changes: 3 additions & 3 deletions examples/tutorial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"dependencies": {
"@material-ui/core": "~1.5.1",
"ra-data-json-server": "^2.0.0",
"react": "~16.3.1",
"react": "~16.8.0",
"react-admin": "^2.0.0",
"react-dom": "~16.3.1",
"react-scripts": "^2.0.5"
"react-dom": "~16.8.0",
"react-scripts": "^3.0.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"run-graphql-demo": "cd examples/demo && cross-env REACT_APP_DATA_PROVIDER=graphql yarn -s start"
},
"jest": {
"setupTestFrameworkScriptFile": "./test-setup.js",
"setupFilesAfterEnv": [
"./test-setup.js"
],
"preset": "ts-jest/presets/js-with-ts",
"testPathIgnorePatterns": [
"/node_modules/",
Expand All @@ -38,32 +40,32 @@
},
"devDependencies": {
"@types/jest": "^23.3.5",
"@types/react": "^16.4.16",
"@types/react": "^16.8.0",
"@types/react-redux": "^6.0.9",
"@types/recompose": "^0.27.0",
"cheerio": "~1.0.0-rc.2",
"cross-env": "^5.2.0",
"express": "~4.16.3",
"full-icu": "~1.2.1",
"jest": "^23.6.0",
"jest": "^24.7.0",
"lerna": "~2.9.1",
"lolex": "~2.3.2",
"mutationobserver-shim": "^0.3.3",
"prettier": "~1.16.4",
"raf": "~3.4.0",
"ts-jest": "^23.10.5",
"tslint": "^5.12.1",
"raf": "~3.4.1",
"ts-jest": "^24.0.0",
"tslint": "^5.16.0",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1",
"tslint-react": "^3.6.0",
"wait-on": "^2.1.0"
"wait-on": "^3.2.0"
},
"workspaces": [
"packages/*",
"examples/*",
"cypress"
],
"dependencies": {
"typescript": "^3.3.3"
"typescript": "^3.4.5"
}
}
26 changes: 13 additions & 13 deletions packages/ra-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,36 @@
"@types/recompose": "^0.27.0",
"@types/redux-form": "^7.5.2",
"cross-env": "^5.2.0",
"enzyme": "~3.7.0",
"enzyme-adapter-react-16": "~1.6.0",
"enzyme": "~3.9.0",
"enzyme-adapter-react-16": "~1.12.1",
"history": "^4.7.2",
"ignore-styles": "~5.0.1",
"react": "~16.3.1",
"react-dom": "~16.3.1",
"react-test-renderer": "~16.3.1",
"react": "~16.8.0",
"react-dom": "~16.8.0",
"react-test-renderer": "~16.8.6",
"react-testing-library": "^5.2.3",
"rimraf": "^2.6.2"
"rimraf": "^2.6.3"
},
"peerDependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"dependencies": {
"classnames": "~2.2.5",
"connected-react-router": "^6.4.0",
"date-fns": "^1.29.0",
"inflection": "~1.12.0",
"lodash": "~4.17.5",
"node-polyglot": "^2.2.2",
"prop-types": "~15.6.1",
"prop-types": "^15.6.1",
"query-string": "~5.1.1",
"ra-language-english": "^2.8.5",
"react-redux": "~5.0.7",
"react-redux": "^7.1.0-alpha.3",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.0",
"react-router-redux": "~5.0.0-alpha.9",
"recompose": "~0.26.0",
"redux": "~3.7.2",
"redux-form": "~7.4.0",
"redux": "^3.7.2 || ^4.0.0",
"redux-form": "~8.2.0",
"redux-saga": "~0.16.0",
"reselect": "~3.0.0"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/CoreAdmin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider } from 'react-redux';
import { History } from 'history';
import { createHashHistory } from 'history';
import { Switch, Route } from 'react-router-dom';
import { ConnectedRouter } from 'react-router-redux';
import { ConnectedRouter } from 'connected-react-router';
import withContext from 'recompose/withContext';

import createAdminStore from './createAdminStore';
Expand Down
Loading