Skip to content

Commit

Permalink
[core] Increase React peer dependency to v16.8.0 (#14432)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Feb 6, 2019
1 parent 0a5916c commit 2c3c897
Show file tree
Hide file tree
Showing 21 changed files with 309 additions and 436 deletions.
2 changes: 1 addition & 1 deletion .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ module.exports = [
name: 'The main docs bundle',
webpack: false,
path: main.path,
limit: '193 KB',
limit: '194 KB',
},
{
name: 'The docs home page',
Expand Down
2 changes: 0 additions & 2 deletions docs/src/pages/css-in-js/basics/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ npm install @material-ui/styles
yarn add @material-ui/styles
```

> Please note that it depends on *react@next* and *react-dom@next*.
### Migration for `@material-ui/core` users

To switch from the default style implementation to this newest version, you need to execute the following code **before importing any** Material-UI's components:
Expand Down
3 changes: 0 additions & 3 deletions docs/src/pages/layout/use-media-query/use-media-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ title: Media queries in React for responsive design

<p class="description">This is a CSS media query hook for React. It listens for matches to a CSS media query. It allows the rendering of components based on whether the query matches or not.</p>

> ⚠️ `useMediaQuery` is unstable as hooks aren't stable yet, therefore it is exported with an unstable prefix.
Please note that it depends on *react@next* and *react-dom@next*.

Some of the key features:

- ⚛️ It has an idiomatic React API.
Expand Down
2 changes: 1 addition & 1 deletion examples/cdn-next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ which is great for prototyping. We discourage using this approach in production
the client has to download the entire library, regardless of which components are actually used,
affecting performance and bandwidth utilisation.

[The live preview.](https://rawgit.com/mui-org/material-ui/master/examples/cdn/index.html)
[The live preview.](https://rawgit.com/mui-org/material-ui/next/examples/cdn/index.html)

## UMD releases

Expand Down
2 changes: 1 addition & 1 deletion examples/cdn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ which is great for prototyping. We discourage using this approach in production
the client has to download the entire library, regardless of which components are actually used,
affecting performance and bandwidth utilisation.

[The live preview.](https://rawgit.com/mui-org/material-ui/master/examples/cdn/index.html)
[The live preview.](https://rawgit.com/mui-org/material-ui/next/examples/cdn/index.html)

## UMD releases

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@
"prettier": "^1.8.2",
"puppeteer": "^1.5.0",
"raw-loader": "^0.5.1",
"react": "^16.8.0-alpha.1",
"react": "^16.8.0",
"react-autosuggest": "^9.3.2",
"react-docgen": "^3.0.0",
"react-dom": "^16.8.0-alpha.1",
"react-dom": "^16.8.0",
"react-draggable": "^3.0.5",
"react-final-form": "^4.0.2",
"react-frame-component": "^4.0.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/material-ui-benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
},
"license": "MIT",
"dependencies": {
"@emotion/core": "^10.0.0",
"@emotion/styled": "^10.0.0",
"benchmark": "^2.1.4",
"emotion-server": "^10.0.6",
"nodemod": "^1.5.19",
"styled-system": "^3.1.11",
"@emotion/core": "^10.0.0",
"@emotion/styled": "^10.0.0"
"styled-system": "^3.1.11"
}
}
4 changes: 2 additions & 2 deletions packages/material-ui-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
},
"peerDependencies": {
"@material-ui/core": "^3.0.0",
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"dependencies": {
"@babel/runtime": "^7.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
},
"peerDependencies": {
"@material-ui/core": "^3.0.0",
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"dependencies": {
"@babel/runtime": "^7.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui-lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
},
"peerDependencies": {
"@material-ui/core": "^3.0.0",
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"dependencies": {
"@babel/runtime": "^7.2.0",
Expand Down
5 changes: 0 additions & 5 deletions packages/material-ui-lab/src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,6 @@ function preventPageScrolling(event) {
event.preventDefault();
}

/* istanbul ignore if */
if (process.env.NODE_ENV !== 'production' && !React.createContext) {
throw new Error('Material-UI: [email protected] or greater is required.');
}

/**
* @param {number} rawValue
* @param {object} props
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui-styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"typescript": "tslint -p tsconfig.json \"{src,test}/**/*.{ts,tsx}\""
},
"peerDependencies": {
"react": "^16.7.0-alpha.2",
"react-dom": "^16.7.0-alpha.2"
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"dependencies": {
"@babel/runtime": "^7.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/material-ui-system/**/*.test.js' --exclude '**/node_modules/**'"
},
"peerDependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"dependencies": {
"@babel/runtime": "^7.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/material-ui-utils/**/*.test.js' --exclude '**/node_modules/**'"
},
"peerDependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"dependencies": {
"@babel/runtime": "^7.2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/material-ui/.size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"build/umd/material-ui.production.min.js": {
"bundled": 867738,
"minified": 320738,
"gzipped": 84774
"bundled": 868476,
"minified": 321053,
"gzipped": 84839
}
}
4 changes: 2 additions & 2 deletions packages/material-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"typescript": "tslint -p tsconfig.json \"{src,test}/**/*.{ts,tsx}\""
},
"peerDependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"dependencies": {
"@babel/runtime": "^7.2.0",
Expand Down
5 changes: 0 additions & 5 deletions packages/material-ui/src/ButtonBase/ButtonBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ export const styles = {
focusVisible: {},
};

/* istanbul ignore if */
if (process.env.NODE_ENV !== 'production' && !React.createContext) {
throw new Error('Material-UI: [email protected] or greater is required.');
}

/**
* `ButtonBase` contains as few styles as possible.
* It aims to be a simple building block for creating a button.
Expand Down
5 changes: 0 additions & 5 deletions packages/material-ui/src/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ export const styles = theme => ({
},
});

/* istanbul ignore if */
if (process.env.NODE_ENV !== 'production' && !React.createContext) {
throw new Error('Material-UI: [email protected] or greater is required.');
}

/**
* Modal is a lower-level construct that is leveraged by the following components:
*
Expand Down
5 changes: 0 additions & 5 deletions packages/material-ui/src/Snackbar/Snackbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ export const styles = theme => {
};
};

/* istanbul ignore if */
if (process.env.NODE_ENV !== 'production' && !React.createContext) {
throw new Error('Material-UI: [email protected] or greater is required.');
}

class Snackbar extends React.Component {
state = {};

Expand Down
5 changes: 0 additions & 5 deletions packages/material-ui/src/SwipeableDrawer/SwipeableDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ export function reset() {
nodeThatClaimedTheSwipe = null;
}

/* istanbul ignore if */
if (process.env.NODE_ENV !== 'production' && !React.createContext) {
throw new Error('Material-UI: [email protected] or greater is required.');
}

class SwipeableDrawer extends React.Component {
state = {};

Expand Down
Loading

0 comments on commit 2c3c897

Please sign in to comment.