diff --git a/CHANGELOG.md b/CHANGELOG.md
index 79fc7e5e5..a6c1889fb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
## Changelog
+### 3.0.0
+
+* Add React 16 support (#629, #658)
+* Remove RedBox as default error catcher (#494)
+
### 3.0.0-beta.6
* Use production versions of `patch` and `AppContainer` if no `module.hot` available, so it doesn't break people using `NODE_ENV=test`. (#398)
diff --git a/LICENSE.md b/LICENSE
similarity index 100%
rename from LICENSE.md
rename to LICENSE
diff --git a/README.md b/README.md
index 0dabbfe69..109a8fc7c 100644
--- a/README.md
+++ b/README.md
@@ -1,91 +1,313 @@
-# React Hot Loader 3 [](https://www.npmjs.org/package/react-hot-loader)
+# React Hot Loader
-### React Hot Loader 3 beta has arrived!
+[![Build Status][build-badge]][build]
+[![version][version-badge]][package]
+[![MIT License][license-badge]][LICENSE]
-It fixes some long-standing issues with both React Hot Loader and React Transform.
+[![PRs Welcome][prs-badge]][prs]
+[![Chat][chat-badge]][chat]
-**It is intended as a replacement for both.**
+[![Watch on GitHub][github-watch-badge]][github-watch]
+[![Star on GitHub][github-star-badge]][github-star]
-Some nice things about it:
+Tweak React components in real time ⚛️⚡️
-* Editing functional components preserves state (see [notes](#limitations))
-* Works great with higher order components (see [notes](#limitations))
-* Requires little configuration
-* Automatically disabled in production
-* Works with or without Babel (you can remove `react-hot-loader/babel` from `.babelrc` and instead add `react-hot-loader/webpack` to `loaders`) (see [notes](#limitations))
+Watch **[Dan Abramov's talk on Hot Reloading with Time Travel](https://www.youtube.com/watch?v=xsSnOQynTHs).**
-Check out [the Migration to 3.0 guide](https://github.com/gaearon/react-hot-loader/tree/master/docs#migration-to-30) to learn how to migrate your app to 3.0.
+## Install
+
+```
+npm install react-hot-loader
+```
+
+## Getting started
+
+1. Add `react-hot-loader/babel` to your `.babelrc`:
+
+```js
+// .babelrc
+{
+ "plugins": ["react-hot-loader/babel"]
+}
+```
+
+2. [Enable Hot Module Replacement in Webpack](https://webpack.js.org/guides/hot-module-replacement/#enabling-hmr)
+
+3. Add `react-hot-loader/patch` at the top of the entry section (except polyfills) of your Webpack config:
+
+```js
+// webpack.config.js
+module.exports = {
+ entry: [
+ 'babel-polyfill',
+ 'react-hot-loader/patch',
+ './main.js'
+ ]
+}
+```
+
+4. Wrap your application into ``, all children of `` will be reloaded when a change occurs:
+
+```js
+// main.js
+import React from 'react'
+import ReactDOM from 'react-dom'
+import { AppContainer } from 'react-hot-loader'
+import App from './containers/App'
+
+ReactDOM.render(
+
+
+ ,
+ document.getElementById('root'),
+)
+
+// Webpack Hot Module Replacement API
+if (module.hot) {
+ module.hot.accept('./containers/App', () => { render(App) })
+}
+```
+
+> Note: To make this work, you'll need to opt out of Babel transpiling ES2015 modules by changing the Babel ES2015 preset to be `["es2015", { "modules": false }]`
+
+## Using Webpack loader instead of Babel plugin
+
+You may not use Babel in your project, React Hot Loader provides a Webpack loader with **[limited support](https://github.com/gaearon/react-hot-loader#known-limitations)**. If you want to use it, you can add it in your Webpack config. **If you use Babel, you don't need to add this loader**.
+
+```js
+// webpack.config.js
+module.exports = {
+ module: {
+ rules: [
+ {
+ test: /\.jsx?$/,
+ use: ['react-hot-loader/webpack']
+ }
+ ]
+ }
+}
+```
+
+## Migrating from [create-react-app](https://github.com/facebookincubator/create-react-app)
+
+* Run `npm run eject`
+* Install React Hot Loader (`npm install --save-dev react-hot-loader`)
+* In `config/webpack.config.dev.js`:
+ 1. Add `'react-hot-loader/patch'` to entry array (anywhere before `paths.appIndexJs`). It should now look like (excluding comments):
+ ```js
+ entry: [
+ 'react-hot-loader/patch',
+ require.resolve('react-dev-utils/webpackHotDevClient'),
+ require.resolve('./polyfills'),
+ paths.appIndexJs
+ ]
+ ```
+
+ 2. Add `'react-hot-loader/babel'` to Babel loader configuration. The loader should now look like:
+ ```js
+ {
+ test: /\.(js|jsx)$/,
+ include: paths.appSrc,
+ loader: 'babel',
+ query: {
+ cacheDirectory: findCacheDir({
+ name: 'react-scripts'
+ }),
+ plugins: [
+ 'react-hot-loader/babel'
+ ]
+ }
+ }
+ ```
+
+* Add `AppContainer` to `src/index.js` (see step 4 of Getting Started).
+
+## TypeScript
+
+When using TypeScript, Babel is not required, so your config should look like ([demo](https://github.com/Glavin001/react-hot-ts)):
+
+```js
+{
+ test: /\.tsx?$/,
+ loaders: ['react-hot-loader/webpack', 'ts-loader'] // (or awesome-typescript-loader)
+}
+```
+
+## Source Maps
+
+If you use `devtool: 'source-map'` (or its equivalent), source maps will be emitted to hide hot reloading code.
+
+Source maps slow down your project. Use `devtool: 'eval'` for best build performance.
+
+Hot reloading code is just one line in the beginning and one line in the end of each module so you might not need source maps at all.
-## Installation
+## React Native
-`npm install --save react-hot-loader@next`
+React Native **[supports hot reloading natively](https://facebook.github.io/react-native/blog/2016/03/24/introducing-hot-reloading.html)** as of version 0.22.
-## Usage
+## Adding a custom error reporter
+
+The previously used `Redbox` for React Hot Loader has known limitations due to sourcemaps and it's no longer a default catcher. Errors are great to clearly see rendering issues, and avoiding an uncaught error from breaking your app. But there are some advantages to a thrown error in the console too, like filename resolution via sourcemaps, and click-to-open. To get the `Redbox` back, and have the best of both worlds, modify your app entry point as follows:
+
+```js
+import Redbox from 'redbox-react';
+
+const CustomErrorReporter = ({ error }) => ;
+
+CustomErrorReporter.propTypes = {
+ error: React.PropTypes.instanceOf(Error).isRequired
+};
+
+render((
+
+
+
+), document.getElementById('react-root'));
+```
+
+You'll also need to `npm install --save-dev redbox-react`.
+
+## Starter Kit
+
+Provided by collaborators:
+* [react-hot-boilerplate](https://github.com/gaearon/react-hot-boilerplate/tree/next) (Bare minimum)
+* [react-hot-loader-minimal-boilerplate](https://github.com/wkwiatek/react-hot-loader-minimal-boilerplate)* (Bare minimum)
+
+Provided by community:
+* [react-kit](https://github.com/thomasthiebaud/react-kit) (webpack v2, redux, react-router v4, code splitting, jest, saga, reselect)
+* [hapi-react-hot-loader-example](https://github.com/codeBelt/hapi-react-hot-loader-example) (ES2015, Universal (SSR), React Hot Loader 3, React Router 4, Redux, Redux Saga, Redux Form, Async Component Code Splitting, Hapi, Webpack 3)
+* [typescript-hapi-react-hot-loader-example](https://github.com/codeBelt/typescript-hapi-react-hot-loader-example) (TypeScript, Universal (SSR), React Hot Loader 3, React Router 4, Redux, Redux Saga, Redux Form, Async Component Code Splitting, Hapi, Webpack 3)
+* [react-redux-styled-hot-universal](https://github.com/krasevych/react-redux-styled-hot-universal) (SSR, Universal Webpack, Redux, React-router, Webpack 2, Babel, Styled Components and more...)
+* [webpack-react-redux](https://github.com/jpsierens/webpack-react-redux) (redux, react-router, hmr)
+* [react-lego](https://github.com/peter-mouland/react-lego) (universal, react-router, other optional techs)
+* [react-static-boilerplate](https://github.com/koistya/react-static-boilerplate) (static site generator; React, PostCSS, Webpack, BrowserSync)
+* [react-cool-starter](https://github.com/wellyshen/react-cool-starter) (universal, redux, react-router, webpack 2, Babel, PostCSS, and more...)
+* [react-redux-saga-boilerplate](https://github.com/gilbarbara/react-redux-saga-boilerplate) (react-router, redux, saga, webpack 2, jest w/ coverage, enzyme)
+* [react-universal-boiler](https://github.com/strues/react-universal-boiler) (webpack 2, universal, react-router, redux, happypack)
+* [apollo-fullstack-starter-kit](https://github.com/sysgears/apollo-fullstack-starter-kit) (universal, apollo, graphql, react, react-router, knex)
+* [react-universally](https://github.com/ctrlplusb/react-universally) (universal, react, react router, express, seo, full stack webpack 2, babel)
+* [meatier](https://github.com/mattkrick/meatier) (webpack 2 + hmr, universal, redux, graphql, react, react-router-redux, ssr)
+* [react-hot-ts](https://github.com/Glavin001/react-hot-ts) (React, Webpack, TypeScript)
+* [react-boilerplate-app](https://github.com/vebjorni/react-boilerplate-app) (react (duh), router, webpack with dev server, babel, hot reloading)
+* [react-native-web](https://github.com/agrcrobles/react-native-web-webpack-starter) (react-native-web, webpack with dev server, hot reloading and flow soon...)
+* [react-starter-kit](https://github.com/elios264/react-starter) (webpack 2 + htr + react + redux + router + babel + sass)
+* [redux-react-starter](https://github.com/didierfranc/redux-react-starter) (webpack 2 + redux + react-redux 5 + react-router 4 + styled-component ...)
+* [react-redux-universal-boilerplate](https://github.com/kiki-le-singe/react-redux-universal-boilerplate) (redux, react-router, universal, koa, webpack 2, babel, PostCSS, sass or cssnext, hot reloading, ...)
+* [ARc](https://arc.js.org) (React, Jest, Storybook and other optional feature branches)
+* [webpack-react-redux-starter](https://github.com/stsiarzhanau/webpack-react-redux-starter) (webpack 2, browsersync, babel, eslint, mocha, enzyme, jsdom, production config, detailed readme, and more...)
+* [trowel](https://github.com/frux/trowel) (universal/ssr, redux, react-router 4, webpack 2, postcss)
+* [react-navigation-web](https://github.com/agrcrobles/react-navigation-web) (react-navigation in web + redux, hot reloading!)
+* [react-universal-hot-loader-starter-kit](https://github.com/earnubs/react-hot-loader-starter-kit) (universal express app with webpack 2, react-router 4, redux and react-hot-loader 3)
+* [bare-minimum-react-hot-rr4-redux](https://github.com/nganbread/bare-minimum-react-hot-rr4-redux) (Bare minimum webpack 2, react-router 4, redux)
+* [react-webpack2-boilerplate](https://github.com/plag/react-webpack2-boilerplate/) (Minimal react-router-3, react-redux, redux-saga on webpack2 with full hot reloading include reducers, sagas and react-components)
+* [react-webpack-boilerplate](https://github.com/eqfox/react-webpack-boilerplate) (Boilerplate for ReactJS project with Webpack2 hot code reloading!)
+* [react-boilerplatinum](https://github.com/Kikobeats/react-boilerplatinum) (Webpack2, Babel, React, Dev Server, PostCSS, SASS, PurifyCSS, HMR, Standard, Offline, BrowserSync)
+* [ts-react-boilerplate](https://github.com/sotnikov-link/ts-react-boilerplate) (react, typescript 2, webpack 2 + hot-reload, karma + jasmine + coverage, sourcemaps)
+* [react-boilerplate](https://github.com/mikechabot/react-boilerplate) (Dead simple boilerplate for ReactJS. Webpack 2, Redux. Hot Loader. Router)
+* [molecule](https://github.com/timberio/molecule) (Production ready boilerplate targeting web & electron, using webpack 2, redux, react-hot-loader, immutable.js, react-router and more)
+* [universal-js-hmr-ssr-react-redux](https://github.com/Alex-ray/v2-universal-js-hmr-ssr-react-redux) (Universal JS, Webpack 2, React Router 4, Server Side Rendering, Code Splitting, Redux, Express)
+
+## Known limitations
+
+### Components not replaced
-If you want to try hot reloading in a new project, try **[one of the starter kits](https://github.com/gaearon/react-hot-loader/tree/master/docs#starter-kits)**.
+- React Hot Loader can't replace any Component, only *registered* ones.
+ - when using webpack loader - only module exports are _registered_.
+ - when using babel plugin - only top level variables are _registered_.
+ - when React Hot Loader can't replace Component, an error message will be displayed.
-Provided by owner and collaborators:
-- **[React Hot Boilerplate](https://github.com/gaearon/react-hot-boilerplate/tree/next)**
-- **[React Hot Loader Minimal Boilerplate](https://github.com/wkwiatek/react-hot-loader-minimal-boilerplate)**
+### Code Splitting
-To use React Hot Loader in an existing project, you need to
+If you want to use Webpack code splitting via `require.ensure`, you'll need to add an additional `module.hot.accept` callback within the `require.ensure` block, like this:
-* switch to Webpack for builds (instead of RequireJS or Browserify);
-* enable Hot Module Replacement, which is a Webpack feature;
-* configure Webpack to use React Hot Loader for JS or JSX files.
+```js
+require.ensure([], (require) => {
+ if (module.hot) {
+ module.hot.accept('../components/App', () => {
+ loadComponent(require('../components/App').default);
+ })
+ }
+ loadComponent(require('../components/App').default);
+});
+```
-These steps are covered by **[the Migration to 3.0 guide](https://github.com/gaearon/react-hot-loader/tree/master/docs#migration-to-30)**.
+Note that if you're using React Router (pre-4.0), this will only work with `getChildRoutes`, but not `getComponent`, since `getComponent`'s callback will only load a component once.
-If you'd rather stay with **Browserify**, check out **[LiveReactload](https://github.com/milankinen/livereactload)** by Matti Lankinen.
+Also, if you're using the Webpack 2 beta, you can use `System.import` without extra `module.hot.accept` calls, although there are still a [few issues with it](https://github.com/gaearon/react-hot-loader/issues/303).
-## Known limitations
+### Checking Element `type`s
-- React Router v3 is not fully supported (e.g. async routes). If you want to get most of React Hot Loader, consider switching to [React Router v4](https://reacttraining.com/react-router/). If you want to understand the reasoning, it's good to start in [React Router v4 FAQ](https://github.com/ReactTraining/react-router/tree/v4.0.0-beta.8#v4-faq)
-- React Hot Loader can't replace any Component, only *registered* ones.
- - when using webpack loader - only module exports are _registered_.
- - when using babel plugin - only top level variables are _registered_.
- - when React Hot Loader can't replace Component, an error message will be displayed.
+Because React Hot Loader creates proxied versions of your components, comparing reference types of elements won't work:
-## The Talk
+```js
+const element = ;
+console.log(element.type === Component); // false
+```
-React Hot Loader was demoed together with **[Redux](https://github.com/gaearon/redux)** at React Europe.
-Watch **[Dan Abramov's talk on Hot Reloading with Time Travel](https://www.youtube.com/watch?v=xsSnOQynTHs).**
+One workaround is to create an element (that will have the `type` of the proxied component):
-## React Native
+```js
+const ComponentType = ().type;
+const element = ;
+console.log(element.type === ComponentType); // true
+```
-React Native **[supports hot reloading natively](https://facebook.github.io/react-native/blog/2016/03/24/introducing-hot-reloading.html)** as of version 0.22.
+You can also set a property on the component class:
-## Troubleshooting
+```js
+const Widget = () => hi
;
+Widget.isWidgetType = true;
+console.log(.type.isWidgetType); // true
+```
-If it doesn't work, in 99% cases it's a configuration issue.
-A missing option, a wrong path or port. Webpack is very strict about configuration, and the best way to find out what's wrong is to compare your project to an already working setup, such as **[React Hot Boilerplate](https://github.com/gaearon/react-hot-boilerplate)**, bit by bit.
-
-If something doesn't work, in 99% cases it's an issue with your code - Component doesn't got registered, due to HOC or Decorator around it, which making it invisible to babel plugin, or webpack loader.
+### Reassigning Components
-We're also gathering **[Troubleshooting Recipes](https://github.com/gaearon/react-hot-loader/blob/master/docs/Troubleshooting.md)** so send a PR if you have a lesson to share!
+React Hot Loader will only try to reload the original component reference, so if you reassign it to another variable like this:
-## Documentation
+```js
+let App = () => (hello
);
+App = connect()(App);
+export default App;
+```
-Check out the [docs directory](docs).
+React Hot Loader won't reload it. Instead, you'll need to define it once:
-You can also check out a great [webpack guide to React hot module replacement](https://webpack.js.org/guides/hot-module-replacement/#components/sidebar/sidebar.jsx).
+```js
+const App = () => (hello
);
+export default connect()(App);
+```
-## Got Questions?
+### Decorators
-[](https://gitter.im/gaearon/react-hot-loader?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+Components that are decorated (using something like [`@autobind`](https://github.com/andreypopp/autobind-decorator)) currently do not retain state when being hot-reloaded. (see [#279](https://github.com/gaearon/react-hot-loader/issues/279))
-Watch the repo to stay tuned!
-## Patrons
+## Troubleshooting
-The work on React Hot Loader, [React Transform](https://github.com/gaearon/babel-plugin-react-transform), [Redux](https://github.com/reactjs/redux), and related projects was [funded by the community](https://www.patreon.com/reactdx).
-Meet some of the outstanding companies that made it possible:
+If it doesn't work, in 99% cases it's a configuration issue.
+A missing option, a wrong path or port. Webpack is very strict about configuration, and the best way to find out what's wrong is to compare your project to an already working setup, such as **[React Hot Boilerplate](https://github.com/gaearon/react-hot-boilerplate)**, bit by bit.
-* [Webflow](https://github.com/webflow)
-* [Ximedes](https://www.ximedes.com/)
+If something doesn't work, in 99% cases it's an issue with your code - Component doesn't got registered, due to HOC or Decorator around it, which making it invisible to Babel plugin, or Webpack loader.
+
+We're also gathering **[Troubleshooting Recipes](https://github.com/gaearon/react-hot-loader/blob/master/docs/Troubleshooting.md)** so send a PR if you have a lesson to share!
-[See the full list of React Hot Loader patrons.](PATRONS.md)
+## [Patrons](PATRONS.md)
## License
-MIT (https://opensource.org/licenses/mit-license.php)
+MIT
+
+[build-badge]: https://img.shields.io/travis/gaearon/react-hot-loader.svg?style=flat-square
+[build]: https://travis-ci.org/gaearon/react-hot-loader
+[version-badge]: https://img.shields.io/npm/v/react-hot-loader.svg?style=flat-square
+[package]: https://www.npmjs.com/package/react-hot-loader
+[license-badge]: https://img.shields.io/npm/l/react-hot-loader.svg?style=flat-square
+[license]: https://github.com/gaearon/react-hot-loader/blob/master/LICENSE
+[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
+[prs]: http://makeapullrequest.com
+[chat]: https://gitter.im/gaearon/react-hot-loader
+[chat-badge]: https://img.shields.io/gitter/room/gaearon/react-hot-loader.svg?style=flat-square
+[github-watch-badge]: https://img.shields.io/github/watchers/gaearon/react-hot-loader.svg?style=social
+[github-watch]: https://github.com/gaearon/react-hot-loader/watchers
+[github-star-badge]: https://img.shields.io/github/stars/gaearon/react-hot-loader.svg?style=social
+[github-star]: https://github.com/gaearon/react-hot-loader/stargazers
diff --git a/docs/Known Limitations.md b/docs/Known Limitations.md
deleted file mode 100644
index 13ba477d8..000000000
--- a/docs/Known Limitations.md
+++ /dev/null
@@ -1,62 +0,0 @@
-## Known Limitations
-
-### Code Splitting
-If you want to use Webpack code splitting via `require.ensure`, you'll need to add an additional `module.hot.accept` callback within the `require.ensure` block, like this:
-
-```js
-require.ensure([], (require) => {
- if (module.hot) {
- module.hot.accept('../components/App', () => {
- loadComponent(require('../components/App').default);
- })
- }
- loadComponent(require('../components/App').default);
-});
-```
-
-Note that if you're using React Router (pre-4.0), this will only work with `getChildRoutes`, but not `getComponent`, since `getComponent`'s callback will only load a component once.
-
-Also, if you're using the Webpack 2 beta, you can use `System.import` without extra `module.hot.accept` calls, although there are still a [few issues with it](https://github.com/gaearon/react-hot-loader/issues/303).
-
-### Checking Element `type`s
-Because React Hot Loader creates proxied versions of your components, comparing reference types of elements won't work:
-
-```jsx
-const element = ;
-console.log(element.type === Component); // false
-```
-
-One workaround is to create an element (that will have the `type` of the proxied component):
-
-```jsx
-const ComponentType = ().type;
-const element = ;
-console.log(element.type === ComponentType); // true
-```
-
-You can also set a property on the component class:
-
-```jsx
-const Widget = () => hi
;
-Widget.isWidgetType = true;
-console.log(.type.isWidgetType); // true
-```
-
-### Reassigning Components
-React Hot Loader will only try to reload the original component reference, so if you reassign it to another variable like this:
-
-```jsx
-let App = () => (hello
);
-App = connect()(App);
-export default App;
-```
-
-React Hot Loader won't reload it. Instead, you'll need to define it once:
-
-```jsx
-const App = () => (hello
);
-export default connect()(App);
-```
-
-### Decorators
-Components that are decorated (using something like [`@autobind`](https://github.com/andreypopp/autobind-decorator)) currently do not retain state when being hot-reloaded. (see [#279](https://github.com/gaearon/react-hot-loader/issues/279))
diff --git a/docs/README.md b/docs/README.md
deleted file mode 100644
index aa414094b..000000000
--- a/docs/README.md
+++ /dev/null
@@ -1,197 +0,0 @@
-### Starter Kit
-
-Provided by collaborators:
-* [react-hot-boilerplate](https://github.com/gaearon/react-hot-boilerplate/tree/next) (Bare minimum)
-* [react-hot-loader-minimal-boilerplate](https://github.com/wkwiatek/react-hot-loader-minimal-boilerplate)* (Bare minimum)
-
-Provided by community:
-* [react-kit](https://github.com/thomasthiebaud/react-kit) (webpack v2, redux, react-router v4, code splitting, jest, saga, reselect)
-* [hapi-react-hot-loader-example](https://github.com/codeBelt/hapi-react-hot-loader-example) (ES2015, Universal (SSR), React Hot Loader 3, React Router 4, Redux, Redux Saga, Redux Form, Async Component Code Splitting, Hapi, Webpack 3)
-* [typescript-hapi-react-hot-loader-example](https://github.com/codeBelt/typescript-hapi-react-hot-loader-example) (TypeScript, Universal (SSR), React Hot Loader 3, React Router 4, Redux, Redux Saga, Redux Form, Async Component Code Splitting, Hapi, Webpack 3)
-* [react-redux-styled-hot-universal](https://github.com/krasevych/react-redux-styled-hot-universal) (SSR, Universal Webpack, Redux, React-router, Webpack 2, Babel, Styled Components and more...)
-* [webpack-react-redux](https://github.com/jpsierens/webpack-react-redux) (redux, react-router, hmr)
-* [react-lego](https://github.com/peter-mouland/react-lego) (universal, react-router, other optional techs)
-* [react-static-boilerplate](https://github.com/koistya/react-static-boilerplate) (static site generator; React, PostCSS, Webpack, BrowserSync)
-* [react-cool-starter](https://github.com/wellyshen/react-cool-starter) (universal, redux, react-router, webpack 2, Babel, PostCSS, and more...)
-* [react-redux-saga-boilerplate](https://github.com/gilbarbara/react-redux-saga-boilerplate) (react-router, redux, saga, webpack 2, jest w/ coverage, enzyme)
-* [react-universal-boiler](https://github.com/strues/react-universal-boiler) (webpack 2, universal, react-router, redux, happypack)
-* [apollo-fullstack-starter-kit](https://github.com/sysgears/apollo-fullstack-starter-kit) (universal, apollo, graphql, react, react-router, knex)
-* [react-universally](https://github.com/ctrlplusb/react-universally) (universal, react, react router, express, seo, full stack webpack 2, babel)
-* [meatier](https://github.com/mattkrick/meatier) (webpack 2 + hmr, universal, redux, graphql, react, react-router-redux, ssr)
-* [react-hot-ts](https://github.com/Glavin001/react-hot-ts) (React, Webpack, TypeScript)
-* [react-boilerplate-app](https://github.com/vebjorni/react-boilerplate-app) (react (duh), router, webpack with dev server, babel, hot reloading)
-* [react-native-web](https://github.com/agrcrobles/react-native-web-webpack-starter) (react-native-web, webpack with dev server, hot reloading and flow soon...)
-* [react-starter-kit](https://github.com/elios264/react-starter) (webpack 2 + htr + react + redux + router + babel + sass)
-* [redux-react-starter](https://github.com/didierfranc/redux-react-starter) (webpack 2 + redux + react-redux 5 + react-router 4 + styled-component ...)
-* [react-redux-universal-boilerplate](https://github.com/kiki-le-singe/react-redux-universal-boilerplate) (redux, react-router, universal, koa, webpack 2, babel, PostCSS, sass or cssnext, hot reloading, ...)
-* [ARc](https://arc.js.org) (React, Jest, Storybook and other optional feature branches)
-* [webpack-react-redux-starter](https://github.com/stsiarzhanau/webpack-react-redux-starter) (webpack 2, browsersync, babel, eslint, mocha, enzyme, jsdom, production config, detailed readme, and more...)
-* [trowel](https://github.com/frux/trowel) (universal/ssr, redux, react-router 4, webpack 2, postcss)
-* [react-navigation-web](https://github.com/agrcrobles/react-navigation-web) (react-navigation in web + redux, hot reloading!)
-* [react-universal-hot-loader-starter-kit](https://github.com/earnubs/react-hot-loader-starter-kit) (universal express app with webpack 2, react-router 4, redux and react-hot-loader 3)
-* [bare-minimum-react-hot-rr4-redux](https://github.com/nganbread/bare-minimum-react-hot-rr4-redux) (Bare minimum webpack 2, react-router 4, redux)
-* [react-webpack2-boilerplate](https://github.com/plag/react-webpack2-boilerplate/) (Minimal react-router-3, react-redux, redux-saga on webpack2 with full hot reloading include reducers, sagas and react-components)
-* [react-webpack-boilerplate](https://github.com/eqfox/react-webpack-boilerplate) (Boilerplate for ReactJS project with Webpack2 hot code reloading!)
-* [react-boilerplatinum](https://github.com/Kikobeats/react-boilerplatinum) (Webpack2, Babel, React, Dev Server, PostCSS, SASS, PurifyCSS, HMR, Standard, Offline, BrowserSync)
-* [ts-react-boilerplate](https://github.com/sotnikov-link/ts-react-boilerplate) (react, typescript 2, webpack 2 + hot-reload, karma + jasmine + coverage, sourcemaps)
-* [react-boilerplate](https://github.com/mikechabot/react-boilerplate) (Dead simple boilerplate for ReactJS. Webpack 2, Redux. Hot Loader. Router)
-* [molecule](https://github.com/timberio/molecule) (Production ready boilerplate targeting web & electron, using webpack 2, redux, react-hot-loader, immutable.js, react-router and more)
-* [universal-js-hmr-ssr-react-redux](https://github.com/Alex-ray/v2-universal-js-hmr-ssr-react-redux) (Universal JS, Webpack 2, React Router 4, Server Side Rendering, Code Splitting, Redux, Express)
-
-### Migration to 3.0
-- If you're using Babel and ES6, remove the `react-hot` loader from any loaders in your Webpack config, and add `react-hot-loader/babel` to the `plugins` section of your `.babelrc`:
-
-```js
-// .babelrc
-{
- "presets": ["es2015-loose", "stage-0", "react"],
- "plugins": ["react-hot-loader/babel"]
-}
-```
-
-- If you're *not* using Babel, or you're using Babel without ES6, replace the `react-hot` loader in your Webpack config with `react-hot-loader/webpack`:
-
-```js
-// webpack.config.js
-{
- test: /\.js$/,
- loaders: ['react-hot', 'babel']
-}
-
-// becomes
-// webpack.config.js
-{
- test: /\.js$/,
- loaders: ['react-hot-loader/webpack', 'babel']
-}
-```
-
-- 'react-hot-loader/patch' should be placed at the top of the `entry` section in your Webpack config. An error will occur if any app code runs before `react-hot-loader/patch` has, so put it in the first position. However, if you're using polyfills put them before patch:
-
-```js
-// webpack.config.js
-{
- entry: {
- 'app': [
- 'babel-polyfill',
- 'react-hot-loader/patch',
- './src/index'
- ]
- }
-}
-```
-
-- `` is a component that handles module reloading, as well as error handling. The root component of your app should be nested in AppContainer as a child. When in production, AppContainer is automatically disabled, and simply returns its children.
-
-- React Hot Loader 3 does not hide the hot module replacement API, so the following needs to be added below wherever you call `ReactDOM.render` in your app:
-
-```jsx
-import React from 'react'
-import ReactDOM from 'react-dom'
-import { AppContainer } from 'react-hot-loader'
-import App from './containers/App'
-
-ReactDOM.render(
-
-
- ,
- document.getElementById('root')
-);
-
-// Hot Module Replacement API
-if (module.hot) {
- module.hot.accept('./containers/App', () => {
- const NextApp = require('./containers/App').default;
- ReactDOM.render(
-
-
- ,
- document.getElementById('root')
- );
- });
-}
-```
-
-You can also check out [this commit for the migration of a TodoMVC app from 1.0 to 3.0.](https://github.com/gaearon/redux-devtools/commit/64f58b7010a1b2a71ad16716eb37ac1031f93915)
-
-## Webpack 2+
-
-Because Webpack 2+ has built-in support for ES2015 modules, you won't need to re-require your app root in `module.hot.accept`. The example above becomes:
-
-> Note: To make this work, you'll need to opt out of Babel transpiling ES2015 modules by changing the Babel ES2015 preset to be `["es2015", { "modules": false }]`
-
-```jsx
-import React from 'react'
-import ReactDOM from 'react-dom'
-import { AppContainer } from 'react-hot-loader'
-
-import App from './containers/App'
-
-const render = Component => {
- ReactDOM.render(
-
-
- ,
- document.getElementById('root')
- )
-}
-
-render(App)
-
-if (module.hot) {
- module.hot.accept('./containers/App', () => { render(App) })
-}
-```
-
-### Source Maps
-
-If you use `devtool: 'source-map'` (or its equivalent), source maps will be emitted to hide hot reloading code.
-
-Source maps slow down your project. Use `devtool: 'eval'` for best build performance.
-
-Hot reloading code is just one line in the beginning and one line in the end of each module so you might not need source maps at all.
-
-## Migrating from [create-react-app](https://github.com/facebookincubator/create-react-app)
-
-* Run `npm run eject`
-* Install React Hot Loader (`npm install --save-dev react-hot-loader@next`)
-* In `config/webpack.config.dev.js`:
- 1. Add `'react-hot-loader/patch'` to entry array (anywhere before `paths.appIndexJs`). It should now look like (excluding comments):
- ```js
- entry: [
- 'react-hot-loader/patch',
- require.resolve('react-dev-utils/webpackHotDevClient'),
- require.resolve('./polyfills'),
- paths.appIndexJs
- ]
- ```
-
- 2. Add `'react-hot-loader/babel'` to Babel loader configuration. The loader should now look like:
- ```js
- {
- test: /\.(js|jsx)$/,
- include: paths.appSrc,
- loader: 'babel',
- query: {
- cacheDirectory: findCacheDir({
- name: 'react-scripts'
- }),
- plugins: [
- 'react-hot-loader/babel'
- ]
- }
- }
- ```
-
-* Add `AppContainer` to `src/index.js` (see `AppContainer` section in [Migration to 3.0 above](https://github.com/gaearon/react-hot-loader/blob/master/docs/README.md#migration-to-30))
-
-## TypeScript
-
-When using TypeScript, Babel is not required, so your config should look like ([demo](https://github.com/Glavin001/react-hot-ts)):
-
-```js
-{
- test: /\.tsx?$/,
- loaders: ['react-hot-loader/webpack', 'ts-loader'] // (or awesome-typescript-loader)
-}
-```
diff --git a/docs/TipsAndTricks.md b/docs/TipsAndTricks.md
deleted file mode 100644
index ace929bcb..000000000
--- a/docs/TipsAndTricks.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# Tips and Tricks
-
-**How to get an error in your console too:**
-
-The previously used `Redbox` for React Hot Loader has known limitations due to sourcemaps and it's no longer a default catcher. Errors are great to clearly see rendering issues, and avoiding an uncaught error from breaking your app. But there are some advantages to a thrown error in the console too, like filename resolution via sourcemaps, and click-to-open. To get the `Redbox` back, and have the best of both worlds, modify your app entry point as follows:
-
-```jsx
-import Redbox from 'redbox-react';
-
-const CustomErrorReporter = ({ error }) => ;
-
-CustomErrorReporter.propTypes = {
- error: React.PropTypes.instanceOf(Error).isRequired
-};
-
-render((
-
-
-
-), document.getElementById('react-root'));
-```
-
-You'll also need to `npm install --save-dev redbox-react`.
diff --git a/docs/Troubleshooting.md b/docs/Troubleshooting.md
deleted file mode 100644
index a63aaab52..000000000
--- a/docs/Troubleshooting.md
+++ /dev/null
@@ -1,255 +0,0 @@
-This file serves as a repository of common problems setting up React Hot Loader, and solutions to them.
-Know a problem? Feel free to send a PR with edits.
-
-### What Should It Look Like?
-
-#### When the page loads
-
-
-
-#### When you save a file
-
-
-
-If you don't see some of the messages, or some of the requests, or if some of the requests fail, this is a symptom of an incorrect configuration. Comparing your setup with [React Hot Boilerplate](https://github.com/gaearon/react-hot-boilerplate) may help you find the mistake.
-
----------
-
-### Can't Build
-
-#### Cannot resolve 'file' or 'directory' `react/lib/ReactMount`
-
-If you're using a precompiled React instead of `react` npm package, React Hot Loader configuration will need a few tweaks. See [Usage with External React](https://github.com/gaearon/react-hot-loader/blob/master/docs/README.md#usage-with-external-react).
-
-Make sure you have `'.js'` in `resolve.extensions` section of Webpack config, or Webpack won't be able to find any JS files without explicitly specifying extension in `require`.
-
-#### SyntaxError: 'import' and 'export' may only appear at the top level
-
-If you're using React Hot Loader together with [Babel](https://babeljs.io/) (ex 6to5), make sure React Hot Loader stays **to the left** of Babel in `loaders` array in Webpack config:
-
-```js
- { test: /\.jsx?$/, loaders: ['react-hot', 'babel'], include: path.join(__dirname, 'src') }
-```
-
-Webpack applies `loaders` right to left, and we need to feed Babel's *output* to React Hot Loader, not vice versa.
-
-#### Error: Invalid path './' (or similar)
-
-If you're using a relative output path in your Webpack config, wrap it in a call to `path.resolve()`:
-
-```js
-var path = require('path');
-
-module.exports = {
- ...,
- output: {
- path: path.resolve('./my-relative-path'),
- ...
- }
-};
-```
-
-If you used WebpackDevServer CLI mode and after switching to Node it crashes with `Error: Invalid path ''`, you probably didn't have `path` specified in `output` at all. You can just put `path: __dirname` there, as it won't matter for development config.
-
-### Module not found: Error: Cannot resolve module 'react-hot'
-
-Most likely you used `npm link` to use a development version of a package in a different folder, and React Hot Loader processed it by mistake. You should use [`include` in loader configuration](https://github.com/gaearon/react-hot-boilerplate/blob/master/webpack.config.js#L22) to only opt-in your app's files to processing.
-
----------
-
-### Page Throws an Error
-
-#### Uncaught TypeError: Cannot read property 'NODE_ENV' of undefined
-
-#### Uncaught TypeError: Cannot read property 'env' of undefined
-
-#### [socket.io] Cannot use 'in' operator to search for 'document' in undefined
-
-Make sure you have `exclude: /node_modules/` or, better, `include: path.join(__dirname, 'src')` (path depends on your application) in loader configuration [just like on this line](https://github.com/gaearon/react-hot-boilerplate/blob/fbdbd93956241320bc3960d350c4dd0030cc6e84/webpack.config.js#L27). You never need to process `node_modules` with React Hot Loader. If you use other loaders such as `jsx?harmony` or `babel`, most likely they **also** need to have `include` specified.
-
----------
-
-### Can't Hot Reload
-
-Generally, the best way to fix this class of errors is to compare your setup to [React Hot Boilerplate](https://github.com/gaearon/react-hot-boilerplate) very carefully and see what's different.
-
-#### Try WebpackDevServer Node Interface Instead of CLI!
-
-WebpackDevServer CLI mode [behaves slightly differently](https://github.com/webpack/webpack-dev-server/issues/106) from its Node API. When in doubt, I suggest you use Node API like [React Hot Boilerplate does](https://github.com/gaearon/react-hot-boilerplate/blob/master/server.js).
-
-#### Uncaught RangeError: Maximum call stack size exceeded
-
-When using WebpackDevServer CLI flag `--hot`, the plugin `new HotModuleReplacementPlugin()` should not be used and vice versa, they are mutually exclusive but the desired effect will work with any of them.
-
-#### No 'Access-Control-Allow-Origin' header is present on the requested resource.
-
-If you're trying to access Webpack Dev Server from a URL served on another port, you may try:
-
-* Changing `WebpackDevServer` options to include CORS header:
-
-```js
-new WebpackDevServer(webpack(config), {
- publicPath: config.output.publicPath,
- hot: true,
- headers: { 'Access-Control-Allow-Origin': '*' }
-})
-```
-
-* Making sure that `webpack-dev-server` **client host and port** in `webpack.config.js` matches those of your development server:
-
-```js
-entry: [
- 'webpack-dev-server/client?http://localhost:3000', // WebpackDevServer host and port
- 'webpack/hot/only-dev-server',
- './src/app'
-]
-```
-
-
-#### The following modules couldn't be hot updated: (They would need a full reload!)
-
-**If you get this warning when editing a root component**, this may be because you don't export anything from it, and call `React.render` from there. Put your root component in a separate file (e.g. `App.jsx`) and `require` it from `index.js` where you call `React.render`.
-
-You also get this warning in v1.x if you write your root component as [stateless plain function](http://facebook.github.io/react/docs/reusable-components.html#stateless-functions) instead of using `React.Component`. This problem is already solved completely in the upcoming [v3.x](https://github.com/gaearon/react-hot-boilerplate/pull/61).
-
-This warning may also appear **if you edit some non-component file** which is `require`d from files other than components. This means hot update bubbled up, but the app couldn't handle it. This is normal! Just refresh.
-
-If you get this warning **together with a 404 for `hot-update.json` file**, you're probably using an ancient version of `webpack-dev-server` (just update it).
-
-#### I see “[WDS] Hot Module Replacement enabled” but nothing happens when I edit `App.js`
-
-If you're running Node 0.11.13, you might want to try updating to 0.12. Some people reported this helped solve this problem. Also **make sure that your `require`s have the same filename casing as the files.** Having `App.js` and doing `require('app')` might trip the watcher on some systems.
-
-OS X also has a rarely-occuring bug that causes some folders to get 'broken' with regards to file system change monitoring. Here are some suggested [fixes](http://feedback.livereload.com/knowledgebase/articles/86239).
-
-#### I see “[HMR] Nothing hot updated.” and nothing happens when I edit `App.js`
-
-If you have several entry points in `entry` configuration option, make sure `webpack/hot/only-dev-server` **is in each of them:**
-
-```js
- entry: {
- app: ['./src/app', 'webpack/hot/only-dev-server'],
- editor: ['./src/editor', 'webpack/hot/only-dev-server'],
- ...,
- client: 'webpack-dev-server/client?http://localhost:3000'
- }
-```
-
-You will have to include "client.js" in your host page for the hot updates to work. For example:
-
-```html
-
-
-
-```
-
-The entry points that don't have `webpack/hot/only-dev-server` (or `webpack/hot/dev-server` if you fancy occasional reloads) won't know how to apply hot updates.
-
-#### Syntax error: Unexpected token <
-
-If you combine WebpackDevServer with an existing server like Express and get this error message on hot updates, it is because Webpack is configured to request hot updates *from the current hostname*. So if your Express server is on `8000` and `publicPath` in Webpack config is `/build/`, it will request hot updates from `http://localhost:8000/build/`, which in your case is served by Express. Instead, you need to set `publicPath` to point to the port where WebpackDevServer is running. For example, it could be `http://localhost:9000/build/`.
-
-#### Not enough watchers
-
-Verify that if you have enough available watchers in your system. If this value is too low, the file watcher in Webpack won't recognize the changes:
-
-```
-cat /proc/sys/fs/inotify/max_user_watches
-```
-
-Arch users, add `fs.inotify.max_user_watches=524288` to `/etc/sysctl.d/99-sysctl.conf` and then execute `sysctl --system`. Ubuntu users (and possibly others): `echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`.
-
-#### 404 errors for `hot-update.json` files
-
-First, make sure you have recent versions of Webpack and Webpack Dev Server (>= 1.7 is fine). Earlier versions use 404 code when no updates were available, so it wasn't technically an error.
-
-Now, take a look at the path where they are requested. Webpack uses `output.publicPath` from Webpack config to determine this path. If you forget to specify it, Webpack will request updates from a relative path to the current one, so any client-side routing will break it.
-
-Normally you want it to be `'/'` if you're serving scripts from root, something like `'/scripts/'` if you have a virtual path for scripts, and something like `'http://localhost:port/scripts/` if you're using Webpack only for scripts but have another primary server like Express. **This config variable must also match `publicPath` option specified when creating `WebpackDevServer` instance.** [Take a look at React Hot Boilerplate](https://github.com/gaearon/react-hot-boilerplate/blob/master/server.js#L6) to get an idea.
-
----------------
-
-### Misc
-
-#### It's slowing down my build!
-
-Make sure you have `include` limited to your app's modules in loader configuration [just like on this line](https://github.com/gaearon/react-hot-boilerplate/blob/fbdbd93956241320bc3960d350c4dd0030cc6e84/webpack.config.js#L27). You never need to process `node_modules` with React Hot Loader.
-
-#### My bundle is so large!
-
-Make sure you have separate configs for development and production. You don't need `react-hot` in `loaders` or `webpack-dev-server/client` or `webpack/hot/only-dev-server` in production config. They are only for development. For easier maintenance, you can set an environment variable before invoking Webpack and read it in config.
-
-Also make sure you have these plugins in production config:
-
-```js
-// removes a lot of debugging code in React
-new webpack.DefinePlugin({
- 'process.env': {
- 'NODE_ENV': JSON.stringify('production')
- }
-}),
-// keeps hashes consistent between compilations
-new webpack.optimize.OccurrenceOrderPlugin(),
-// minifies your code
-new webpack.optimize.UglifyJsPlugin({
- compressor: {
- warnings: false
- }
-})
-```
-
-Oh, and don't forget to remove `devtool: 'eval'` from a production config. Otherwise Uglify won't uglify anything at all.
-
-#### I can access my Single Page App (SPA) only via `/` on refresh
-
-The problem is that by default **WebpackDevServer** doesn't deal with HTML5 History correctly and the server won't route the url as it should. You can fix this issue by setting `historyApiFallback: true`. Here's a full example:
-
-```js
-var webpack = require('webpack');
-var WebpackDevServer = require('webpack-dev-server');
-
-var config = require('./webpack.config');
-
-var port = 4000;
-var ip = '0.0.0.0';
-
-new WebpackDevServer(webpack(config), {
- publicPath: config.output.publicPath,
- historyApiFallback: true,
-}).listen(port, ip, function (err) {
- if(err) {
- return console.log(err);
- }
-
- console.log('Listening at ' + ip + ':' + port);
-});
-```
-
-After this you should be able to access your SPA via any url that has been defined in it.
-
-#### React Hot Loader: this component is not accepted by Hot Loader
-
-The problem is that React Hot Loader could not replace the `old` version of some Component, by the new one.
-The reason is always the same - React Hot Loader can't understand that old and new is the same Component.
-
-Why? The Component is not extracted as a top level variable. And only such Components React Hot Loader can digest.
-```js
- const SuperComponent =
- connect()( <-- last HoC
- withSomeStuff( <-- first HoC
- Component <-- a real component
- )
- );
-```
-SuperComponent is a top-level variable. And Component is. But withSomeStuff will also produce a (temporal) Component, absolutely invisible to React Hot Loader.
-
-Solution
-```js
- const WithSomeStuffComponent = withSomeStuff(Component);
- const SuperComponent = connect()(WithSomeStuffComponent);
-```
-So yes - it is __absolutely__ impossible to use functional composition and React Hot Loader.
-All temporal variables, steps, spare parts __must__ be separated.
-
-PS: it is possible to create a babel plugin, which will extract all the things. But who will create it?
-
diff --git a/package.json b/package.json
index fd7adcb7a..862a7bc89 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "react-hot-loader",
- "version": "3.0.0-beta.7",
+ "version": "3.0.0",
"description": "Tweak React components in real time.",
"main": "index.js",
"files": [
@@ -18,14 +18,6 @@
"prepublish": "yarn clean && yarn build",
"format": "prettier --write \"{test,src}/**/*.js\" *.js"
},
- "dependencies": {
- "babel-template": "^6.7.0",
- "global": "^4.3.0",
- "react-deep-force-update": "^2.0.1",
- "react-proxy": "^3.0.0-alpha.0",
- "redbox-react": "^1.3.6",
- "source-map": "^0.5.7"
- },
"repository": {
"type": "git",
"url": "https://github.com/gaearon/react-hot-loader.git"
@@ -48,30 +40,47 @@
"url": "https://github.com/gaearon/react-hot-loader/issues"
},
"homepage": "https://github.com/gaearon/react-hot-loader",
+ "dependencies": {
+ "babel-template": "^6.7.0",
+ "global": "^4.3.0",
+ "react-deep-force-update": "^2.1.1",
+ "react-proxy": "^3.0.0-alpha.0",
+ "redbox-react": "^1.3.6",
+ "source-map": "^0.6.1"
+ },
"devDependencies": {
"babel-cli": "^6.7.5",
"babel-core": "^6.7.6",
- "babel-eslint": "^8.0.0",
- "babel-jest": "^21.0.2",
+ "babel-eslint": "^8.0.1",
+ "babel-jest": "^21.2.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.5.0",
- "enzyme": "^2.2.0",
- "eslint": "^4.7.0",
- "eslint-config-airbnb": "^15.1.0",
- "eslint-config-prettier": "^2.5.0",
+ "create-react-class": "^15.6.2",
+ "enzyme": "^3.1.0",
+ "enzyme-adapter-react-16": "^1.0.1",
+ "eslint": "^4.7.2",
+ "eslint-config-airbnb": "^16.0.0",
+ "eslint-config-prettier": "^2.6.0",
"eslint-plugin-import": "^2.7.0",
- "eslint-plugin-jsx-a11y": "^5.1.1",
- "eslint-plugin-react": "^7.3.0",
- "jest": "^21.1.0",
- "prettier": "^1.7.0",
- "react": "^15.0.2",
- "react-dom": "^15.6.1",
- "react-test-renderer": "^15.6.1",
- "recompose": "^0.25.0",
+ "eslint-plugin-jsx-a11y": "^6.0.2",
+ "eslint-plugin-react": "^7.4.0",
+ "jest": "^21.2.1",
+ "prettier": "^1.7.4",
+ "raf": "^3.4.0",
+ "react": "^16.0.0",
+ "react-dom": "^16.0.0",
+ "react-test-renderer": "^16.0.0",
+ "recompose": "^0.26.0",
"rimraf": "^2.5.2"
},
"engines": {
"node": ">= 6"
+ },
+ "jest": {
+ "setupFiles": [
+ "raf/polyfill",
+ "/test/setup.js"
+ ]
}
}
diff --git a/src/HotContainer.dev.js b/src/AppContainer.dev.js
similarity index 88%
rename from src/HotContainer.dev.js
rename to src/AppContainer.dev.js
index 00aefb3fb..41d98852d 100644
--- a/src/HotContainer.dev.js
+++ b/src/AppContainer.dev.js
@@ -1,9 +1,10 @@
const React = require('react')
+const PropTypes = require('prop-types')
const deepForceUpdate = require('react-deep-force-update')
const { Component } = React
-class HotContainer extends Component {
+class AppContainer extends Component {
constructor(props) {
super(props)
this.state = { error: null }
@@ -64,21 +65,18 @@ class HotContainer extends Component {
}
}
-HotContainer.propTypes = {
+AppContainer.propTypes = {
children(props) {
if (React.Children.count(props.children) !== 1) {
return new Error(
- 'Invalid prop "children" supplied to HotContainer. ' +
+ 'Invalid prop "children" supplied to AppContainer. ' +
'Expected a single React element with your app’s root component, e.g. .',
)
}
return undefined
},
- errorReporter: React.PropTypes.oneOfType([
- React.PropTypes.node,
- React.PropTypes.func,
- ]),
+ errorReporter: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
}
-module.exports = HotContainer
+module.exports = AppContainer
diff --git a/src/HotContainer.js b/src/AppContainer.js
similarity index 52%
rename from src/HotContainer.js
rename to src/AppContainer.js
index c90ec1779..b5bc7d555 100644
--- a/src/HotContainer.js
+++ b/src/AppContainer.js
@@ -1,7 +1,7 @@
/* eslint-disable global-require */
if (!module.hot || process.env.NODE_ENV === 'production') {
- module.exports = require('./HotContainer.prod')
+ module.exports = require('./AppContainer.prod')
} else {
- module.exports = require('./HotContainer.dev')
+ module.exports = require('./AppContainer.dev')
}
diff --git a/src/HotContainer.prod.js b/src/AppContainer.prod.js
similarity index 79%
rename from src/HotContainer.prod.js
rename to src/AppContainer.prod.js
index 70d1c107b..e165dc4c1 100644
--- a/src/HotContainer.prod.js
+++ b/src/AppContainer.prod.js
@@ -4,7 +4,7 @@ const React = require('react')
const { Component } = React
-class HotContainer extends Component {
+class AppContainer extends Component {
render() {
if (this.props.component) {
return
@@ -14,4 +14,4 @@ class HotContainer extends Component {
}
}
-module.exports = HotContainer
+module.exports = AppContainer
diff --git a/src/babel/index.js b/src/babel/index.js
index a37d575c9..dbd114193 100644
--- a/src/babel/index.js
+++ b/src/babel/index.js
@@ -240,7 +240,7 @@ module.exports = function plugin(args) {
return
}
- const params = node.value.params
+ const { params } = node.value
const newIdentifier = t.identifier(
`__${node.key.name}__REACT_HOT_LOADER__`,
)
@@ -281,7 +281,7 @@ module.exports = function plugin(args) {
const node = exp.node.right
const isAsync = node.async
- const params = node.params
+ const { params } = node
const newIdentifier = t.identifier(
`__${key.name}__REACT_HOT_LOADER__`,
)
diff --git a/src/index.dev.js b/src/index.dev.js
index b1910366f..2ecf8cab2 100644
--- a/src/index.dev.js
+++ b/src/index.dev.js
@@ -1,4 +1,4 @@
-const HotContainer = require('./HotContainer')
+const AppContainer = require('./AppContainer')
module.exports = function warnAboutIncorrectUsage(arg) {
if (this && this.callback) {
@@ -27,11 +27,11 @@ module.exports = function warnAboutIncorrectUsage(arg) {
throw new Error(
'React Hot Loader does not have a default export. ' +
'If you use the import statement, make sure to include the ' +
- 'curly braces: import { HotContainer } from "react-hot-loader". ' +
+ 'curly braces: import { AppContainer } from "react-hot-loader". ' +
'If you use CommonJS, make sure to read the named export: ' +
- 'require("react-hot-loader").HotContainer.',
+ 'require("react-hot-loader").AppContainer.',
)
}
}
-module.exports.HotContainer = HotContainer
+module.exports.AppContainer = AppContainer
diff --git a/src/index.prod.js b/src/index.prod.js
index f7125265a..da07bc6e6 100644
--- a/src/index.prod.js
+++ b/src/index.prod.js
@@ -1 +1 @@
-module.exports.HotContainer = require('./HotContainer')
+module.exports.AppContainer = require('./AppContainer')
diff --git a/src/patch.dev.js b/src/patch.dev.js
index f44b37427..e3cff07b5 100644
--- a/src/patch.dev.js
+++ b/src/patch.dev.js
@@ -127,9 +127,9 @@ function warnAboutUnnacceptedClass(typeSignature) {
if (didUpdateProxy) {
console.error(
'React Hot Loader: this component is not accepted by Hot Loader. \n' +
- 'Please check is it extracted as a top level class, a function or a variable. \n' +
- 'Click below to reveal the source location: \n',
- typeSignature
+ 'Please check is it extracted as a top level class, a function or a variable. \n' +
+ 'Click below to reveal the source location: \n',
+ typeSignature,
)
}
}
@@ -154,7 +154,7 @@ function resolveType(type) {
knownSignatures[signature] = type
}
}
- return type;
+ return type
}
const proxy = proxiesByID[id]
@@ -165,7 +165,7 @@ function resolveType(type) {
return proxy.get()
}
-const createElement = React.createElement
+const { createElement } = React
function patchedCreateElement(type, ...args) {
// Trick React into rendering a proxy so that
// its state is preserved when the class changes.
diff --git a/test/.eslintrc.js b/test/.eslintrc.js
index b5e05cc66..4bba888ee 100644
--- a/test/.eslintrc.js
+++ b/test/.eslintrc.js
@@ -13,10 +13,12 @@ module.exports = {
'react/no-multi-comp': 'off',
'react/prefer-es6-class': 'off',
'react/prop-types': 'off',
+ 'react/no-unused-state': 'off',
'no-shadow': 'off',
'new-cap': 'off',
'import/first': 'off',
'class-methods-use-this': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
+ 'jsx-a11y/click-events-have-key-events': 'off',
},
}
diff --git a/test/AppContainer.dev.test.js b/test/AppContainer.dev.test.js
index 098eacaa1..5d53a2236 100644
--- a/test/AppContainer.dev.test.js
+++ b/test/AppContainer.dev.test.js
@@ -1,14 +1,15 @@
import '../src/patch.dev'
import React, { Component } from 'react'
+import createReactClass from 'create-react-class'
import { mount } from 'enzyme'
import { mapProps } from 'recompose'
-import HotContainer from '../src/HotContainer.dev'
+import AppContainer from '../src/AppContainer.dev'
const RHL = global.__REACT_HOT_LOADER__
function runAllTests(useWeakMap) {
- describe(` [useWeakMap == ${useWeakMap}]`, () => {
+ describe(` [useWeakMap == ${useWeakMap}]`, () => {
beforeEach(() => {
RHL.reset(useWeakMap)
})
@@ -25,9 +26,9 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
expect(wrapper.find('App').length).toBe(1)
expect(wrapper.contains(hey
)).toBe(true)
@@ -50,9 +51,9 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
expect(spy).toHaveBeenCalledTimes(1)
@@ -91,7 +92,7 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const element =
- const wrapper = mount({element})
+ const wrapper = mount({element})
expect(spy).toHaveBeenCalledTimes(1)
{
@@ -143,7 +144,7 @@ function runAllTests(useWeakMap) {
}
}
RHL.register(App, 'App', 'test.js')
- wrapper = mount({element})
+ wrapper = mount({element})
}
expect(spy).toHaveBeenCalledTimes(1)
@@ -152,8 +153,9 @@ function runAllTests(useWeakMap) {
it('hot-reloads children without losing state', () => {
class App extends Component {
- componentWillMount() {
- this.state = 'old'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'old' }
}
shouldComponentUpdate() {
@@ -161,22 +163,23 @@ function runAllTests(useWeakMap) {
}
render() {
- return
old render + {this.state} state
+ return old render + {this.state.value} state
}
}
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
expect(wrapper.text()).toBe('old render + old state')
{
class App extends Component {
- componentWillMount() {
- this.state = 'new'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'new' }
}
shouldComponentUpdate() {
@@ -184,7 +187,7 @@ function runAllTests(useWeakMap) {
}
render() {
- return new render + {this.state} state
+ return new render + {this.state.value} state
}
}
RHL.register(App, 'App', 'test.js')
@@ -198,8 +201,9 @@ function runAllTests(useWeakMap) {
const spy = jest.fn()
class App extends Component {
- componentWillMount() {
- this.state = 'old'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'old' }
}
shouldComponentUpdate() {
@@ -213,7 +217,7 @@ function runAllTests(useWeakMap) {
render() {
return (
- old render + {this.state} state
+ old render + {this.state.value} state
)
}
@@ -221,9 +225,9 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
wrapper.find('span').simulate('click')
expect(spy).toHaveBeenCalledWith('foo')
@@ -232,8 +236,9 @@ function runAllTests(useWeakMap) {
spy.mockReset()
{
class App extends Component {
- componentWillMount() {
- this.state = 'new'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'new' }
}
shouldComponentUpdate() {
@@ -247,7 +252,7 @@ function runAllTests(useWeakMap) {
render() {
return (
- new render + {this.state} state
+ new render + {this.state.value} state
)
}
@@ -265,8 +270,9 @@ function runAllTests(useWeakMap) {
const spy = jest.fn()
class App extends Component {
- componentWillMount() {
- this.state = 'old'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'old' }
}
shouldComponentUpdate() {
@@ -280,7 +286,7 @@ function runAllTests(useWeakMap) {
render() {
return (
- old render + {this.state} state
+ old render + {this.state.value} state
)
}
@@ -288,9 +294,9 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
wrapper.find('span').simulate('click')
expect(spy).toHaveBeenCalledWith('foo')
@@ -299,8 +305,9 @@ function runAllTests(useWeakMap) {
spy.mockReset()
{
class App extends Component {
- componentWillMount() {
- this.state = 'new'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'new' }
}
shouldComponentUpdate() {
@@ -314,7 +321,7 @@ function runAllTests(useWeakMap) {
render() {
return (
- new render + {this.state} state
+ new render + {this.state.value} state
)
}
@@ -338,9 +345,8 @@ function runAllTests(useWeakMap) {
this.handleClick = () => {
spy('foo')
}
- }
- componentWillMount() {
- this.state = 'old'
+
+ this.state = { value: 'old' }
}
shouldComponentUpdate() {
@@ -350,7 +356,7 @@ function runAllTests(useWeakMap) {
render() {
return (
- old render + {this.state} state
+ old render + {this.state.value} state
)
}
@@ -358,9 +364,9 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
wrapper.find('span').simulate('click')
expect(spy).toHaveBeenCalledWith('foo')
@@ -369,8 +375,9 @@ function runAllTests(useWeakMap) {
spy.mockReset()
{
class App extends Component {
- componentWillMount() {
- this.state = 'new'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'new' }
}
shouldComponentUpdate() {
@@ -384,7 +391,7 @@ function runAllTests(useWeakMap) {
render() {
return (
- new render + {this.state} state
+ new render + {this.state.value} state
)
}
@@ -402,8 +409,9 @@ function runAllTests(useWeakMap) {
const spy = jest.fn()
class App extends Component {
- componentWillMount() {
- this.state = 'old'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'old' }
}
shouldComponentUpdate() {
@@ -415,7 +423,7 @@ function runAllTests(useWeakMap) {
render() {
return (
- old render + {this.state} state
+ old render + {this.state.value} state
)
}
@@ -423,9 +431,9 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
wrapper.find('span').simulate('click')
expect(spy).toHaveBeenCalledWith('foo')
@@ -434,8 +442,9 @@ function runAllTests(useWeakMap) {
spy.mockReset()
{
class App extends Component {
- componentWillMount() {
- this.state = 'new'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'new' }
}
shouldComponentUpdate() {
@@ -447,7 +456,7 @@ function runAllTests(useWeakMap) {
render() {
return (
- new render + {this.state} state
+ new render + {this.state.value} state
)
}
@@ -468,8 +477,9 @@ function runAllTests(useWeakMap) {
const spy = jest.fn()
class App extends Component {
- componentWillMount() {
- this.state = 'old'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'old' }
}
shouldComponentUpdate() {
@@ -481,7 +491,7 @@ function runAllTests(useWeakMap) {
render() {
return (
- old render + {this.state} state
+ old render + {this.state.value} state
)
}
@@ -489,9 +499,9 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
wrapper.find('span').simulate('click')
expect(spy).toHaveBeenCalledWith('foo')
@@ -500,8 +510,9 @@ function runAllTests(useWeakMap) {
spy.mockReset()
{
class App extends Component {
- componentWillMount() {
- this.state = 'new'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'new' }
}
shouldComponentUpdate() {
@@ -513,7 +524,7 @@ function runAllTests(useWeakMap) {
render() {
return (
- new render + {this.state} state
+ new render + {this.state.value} state
)
}
@@ -532,7 +543,7 @@ function runAllTests(useWeakMap) {
describe('with createClass root', () => {
it('renders children', () => {
const spy = jest.fn()
- const App = React.createClass({
+ const App = createReactClass({
render() {
spy()
return hey
@@ -541,9 +552,9 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
expect(wrapper.find('App').length).toBe(1)
expect(wrapper.contains(hey
)).toBe(true)
@@ -553,7 +564,7 @@ function runAllTests(useWeakMap) {
it('force updates the tree on receiving new children', () => {
const spy = jest.fn()
- const App = React.createClass({
+ const App = createReactClass({
shouldComponentUpdate() {
return false
},
@@ -566,14 +577,14 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
expect(spy).toHaveBeenCalledTimes(1)
{
- const App = React.createClass({
+ const App = createReactClass({
shouldComponentUpdate() {
return false
},
@@ -594,7 +605,7 @@ function runAllTests(useWeakMap) {
it('force updates the tree on receiving cached children', () => {
const spy = jest.fn()
- const App = React.createClass({
+ const App = createReactClass({
shouldComponentUpdate() {
return false
},
@@ -607,11 +618,11 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const element =
- const wrapper = mount({element})
+ const wrapper = mount({element})
expect(spy).toHaveBeenCalledTimes(1)
{
- const App = React.createClass({
+ const App = createReactClass({
shouldComponentUpdate() {
return false
},
@@ -632,7 +643,7 @@ function runAllTests(useWeakMap) {
it('renders latest children on receiving cached never-rendered children', () => {
const spy = jest.fn()
- const App = React.createClass({
+ const App = createReactClass({
shouldComponentUpdate() {
return false
},
@@ -648,7 +659,7 @@ function runAllTests(useWeakMap) {
let wrapper
{
- const App = React.createClass({
+ const App = createReactClass({
shouldComponentUpdate() {
return false
},
@@ -659,7 +670,7 @@ function runAllTests(useWeakMap) {
},
})
RHL.register(App, 'App', 'test.js')
- wrapper = mount({element})
+ wrapper = mount({element})
}
expect(spy).toHaveBeenCalledTimes(1)
@@ -667,9 +678,9 @@ function runAllTests(useWeakMap) {
})
it('hot-reloads children without losing state', () => {
- const App = React.createClass({
- componentWillMount() {
- this.state = 'old'
+ const App = createReactClass({
+ getInitialState() {
+ return { value: 'old' }
},
shouldComponentUpdate() {
@@ -677,22 +688,22 @@ function runAllTests(useWeakMap) {
},
render() {
- return old render + {this.state} state
+ return old render + {this.state.value} state
},
})
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
expect(wrapper.text()).toBe('old render + old state')
{
- const App = React.createClass({
- componentWillMount() {
- this.state = 'new'
+ const App = createReactClass({
+ getInitialState() {
+ return { value: 'new' }
},
shouldComponentUpdate() {
@@ -700,7 +711,7 @@ function runAllTests(useWeakMap) {
},
render() {
- return new render + {this.state} state
+ return new render + {this.state.value} state
},
})
RHL.register(App, 'App', 'test.js')
@@ -714,7 +725,7 @@ function runAllTests(useWeakMap) {
describe('with createFactory root', () => {
it('renders children', () => {
const spy = jest.fn()
- const App = React.createClass({
+ const App = createReactClass({
render() {
spy()
return hey
@@ -723,7 +734,7 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const AppF = React.createFactory(App)
- const wrapper = mount({AppF()})
+ const wrapper = mount({AppF()})
expect(wrapper.find('App').length).toBe(1)
expect(wrapper.contains(hey
)).toBe(true)
expect(spy).toHaveBeenCalledTimes(1)
@@ -732,7 +743,7 @@ function runAllTests(useWeakMap) {
it('force updates the tree on receiving new children', () => {
const spy = jest.fn()
- const App = React.createClass({
+ const App = createReactClass({
shouldComponentUpdate() {
return false
},
@@ -745,11 +756,11 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const AppF = React.createFactory(App)
- const wrapper = mount({AppF()})
+ const wrapper = mount({AppF()})
expect(spy).toHaveBeenCalledTimes(1)
{
- const App = React.createClass({
+ const App = createReactClass({
shouldComponentUpdate() {
return false
},
@@ -771,7 +782,7 @@ function runAllTests(useWeakMap) {
it('force updates the tree on receiving cached children', () => {
const spy = jest.fn()
- const App = React.createClass({
+ const App = createReactClass({
shouldComponentUpdate() {
return false
},
@@ -785,11 +796,11 @@ function runAllTests(useWeakMap) {
const AppF = React.createFactory(App)
const element = AppF()
- const wrapper = mount({element})
+ const wrapper = mount({element})
expect(spy).toHaveBeenCalledTimes(1)
{
- const App = React.createClass({
+ const App = createReactClass({
shouldComponentUpdate() {
return false
},
@@ -810,7 +821,7 @@ function runAllTests(useWeakMap) {
it('renders latest children on receiving cached never-rendered children', () => {
const spy = jest.fn()
- const App = React.createClass({
+ const App = createReactClass({
shouldComponentUpdate() {
return false
},
@@ -827,7 +838,7 @@ function runAllTests(useWeakMap) {
let wrapper
{
- const App = React.createClass({
+ const App = createReactClass({
shouldComponentUpdate() {
return false
},
@@ -838,7 +849,7 @@ function runAllTests(useWeakMap) {
},
})
RHL.register(App, 'App', 'test.js')
- wrapper = mount({element})
+ wrapper = mount({element})
}
expect(spy).toHaveBeenCalledTimes(1)
@@ -846,9 +857,9 @@ function runAllTests(useWeakMap) {
})
it('hot-reloads children without losing state', () => {
- const App = React.createClass({
- componentWillMount() {
- this.state = 'old'
+ const App = createReactClass({
+ getInitialState() {
+ return { value: 'old' }
},
shouldComponentUpdate() {
@@ -856,19 +867,19 @@ function runAllTests(useWeakMap) {
},
render() {
- return old render + {this.state} state
+ return old render + {this.state.value} state
},
})
RHL.register(App, 'App', 'test.js')
const AppF = React.createFactory(App)
- const wrapper = mount({AppF()})
+ const wrapper = mount({AppF()})
expect(wrapper.text()).toBe('old render + old state')
{
- const App = React.createClass({
- componentWillMount() {
- this.state = 'new'
+ const App = createReactClass({
+ getInitialState() {
+ return { value: 'new' }
},
shouldComponentUpdate() {
@@ -876,7 +887,7 @@ function runAllTests(useWeakMap) {
},
render() {
- return new render + {this.state} state
+ return new render + {this.state.value} state
},
})
RHL.register(App, 'App', 'test.js')
@@ -898,9 +909,9 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
expect(wrapper.find('App').length).toBe(1)
expect(wrapper.contains(hey
)).toBe(true)
@@ -917,9 +928,9 @@ function runAllTests(useWeakMap) {
RHL.register(App, 'App', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
expect(spy).toHaveBeenCalledTimes(1)
@@ -937,29 +948,32 @@ function runAllTests(useWeakMap) {
})
it('force updates the tree on receiving cached children', () => {
- const spy = jest.fn()
-
- const App = () => {
- spy()
- return hey
+ const firstSpy = jest.fn()
+ const Dummy = () => {
+ firstSpy()
+ return first
}
- RHL.register(App, 'App', 'test.js')
- const element =
- const wrapper = mount({element})
- expect(spy).toHaveBeenCalledTimes(1)
+ const App = () =>
+ RHL.register(Dummy, 'Dummy', 'test.js')
+
+ const wrapper = mount()
+ expect(firstSpy).toHaveBeenCalledTimes(1)
+
+ const secondSpy = jest.fn()
{
- const App = () => {
- spy()
- return ho
+ const Dummy = () => {
+ secondSpy()
+ return second
}
- RHL.register(App, 'App', 'test.js')
- wrapper.setProps({ children: element })
+ RHL.register(Dummy, 'Dummy', 'test.js')
+ wrapper.setProps({ children: })
}
- expect(spy).toHaveBeenCalledTimes(2)
- expect(wrapper.contains(ho
)).toBe(true)
+ expect(firstSpy).toHaveBeenCalledTimes(1)
+ expect(secondSpy).toHaveBeenCalledTimes(1)
+ expect(wrapper.contains(second
)).toBe(true)
})
it('renders latest children on receiving cached never-rendered children', () => {
@@ -980,7 +994,7 @@ function runAllTests(useWeakMap) {
return ho
}
RHL.register(App, 'App', 'test.js')
- wrapper = mount({element})
+ wrapper = mount({element})
}
expect(spy).toHaveBeenCalledTimes(1)
@@ -989,8 +1003,9 @@ function runAllTests(useWeakMap) {
it('hot-reloads children without losing state', () => {
class App extends Component {
- componentWillMount() {
- this.state = 'old'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'old' }
}
shouldComponentUpdate() {
@@ -998,7 +1013,7 @@ function runAllTests(useWeakMap) {
}
render() {
- return old render + {this.state} state
+ return old render + {this.state.value} state
}
}
RHL.register(App, 'App', 'test.js')
@@ -1007,16 +1022,17 @@ function runAllTests(useWeakMap) {
RHL.register(Root, 'Root', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
expect(wrapper.text()).toBe('old render + old state')
{
class App extends Component {
- componentWillMount() {
- this.state = 'new'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'new' }
}
shouldComponentUpdate() {
@@ -1024,7 +1040,7 @@ function runAllTests(useWeakMap) {
}
render() {
- return new render + {this.state} state
+ return new render + {this.state.value} state
}
}
RHL.register(App, 'App', 'test.js')
@@ -1053,9 +1069,9 @@ function runAllTests(useWeakMap) {
RHL.register(Enhanced, 'Enhanced', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
expect(wrapper.find('App').length).toBe(1)
expect(wrapper.contains(hey
)).toBe(true)
@@ -1077,9 +1093,9 @@ function runAllTests(useWeakMap) {
RHL.register(Enhanced, 'Enhanced', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
expect(spy).toHaveBeenCalledTimes(1)
@@ -1102,38 +1118,36 @@ function runAllTests(useWeakMap) {
})
it('force updates the tree on receiving cached children', () => {
- const spy = jest.fn()
- class App extends React.Component {
- render() {
- spy()
- return hey
- }
+ const firstSpy = jest.fn()
+ const Dummy = () => {
+ firstSpy()
+ return first
}
- RHL.register(App, 'App', 'test.js')
+ const App = () =>
+ RHL.register(Dummy, 'Dummy', 'test.js')
const Enhanced = mapProps(props => ({ n: props.n * 5 }))(App)
RHL.register(Enhanced, 'Enhanced', 'test.js')
- const element =
- const wrapper = mount({element})
- expect(spy).toHaveBeenCalledTimes(1)
+ const wrapper = mount()
+ expect(firstSpy).toHaveBeenCalledTimes(1)
+ const secondSpy = jest.fn()
{
- class App extends React.Component {
- render() {
- spy()
- return ho
- }
+ const Dummy = () => {
+ secondSpy()
+ return second
}
- RHL.register(App, 'App', 'test.js')
+ RHL.register(Dummy, 'Dummy', 'test.js')
const Enhanced = mapProps(props => ({ n: props.n * 5 }))(App)
RHL.register(Enhanced, 'Enhanced', 'test.js')
- wrapper.setProps({ children: element })
+ wrapper.setProps({ children: })
}
- expect(spy).toHaveBeenCalledTimes(2)
- expect(wrapper.contains(ho
)).toBe(true)
+ expect(firstSpy).toHaveBeenCalledTimes(1)
+ expect(secondSpy).toHaveBeenCalledTimes(1)
+ expect(wrapper.contains(second
)).toBe(true)
})
it('renders latest children on receiving cached never-rendered children', () => {
@@ -1163,7 +1177,7 @@ function runAllTests(useWeakMap) {
const Enhanced = mapProps(props => ({ n: props.n * 5 }))(App)
RHL.register(Enhanced, 'Enhanced', 'test.js')
- wrapper = mount({element})
+ wrapper = mount({element})
}
expect(spy).toHaveBeenCalledTimes(1)
@@ -1172,8 +1186,9 @@ function runAllTests(useWeakMap) {
it('hot-reloads children without losing state', () => {
class App extends Component {
- componentWillMount() {
- this.state = 'old'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'old' }
}
shouldComponentUpdate() {
@@ -1183,7 +1198,7 @@ function runAllTests(useWeakMap) {
render() {
return (
- old render + {this.state} state + {this.props.n}
+ old render + {this.state.value} state + {this.props.n}
)
}
@@ -1194,16 +1209,17 @@ function runAllTests(useWeakMap) {
RHL.register(Enhanced, 'Enhanced', 'test.js')
const wrapper = mount(
-
+
- ,
+ ,
)
expect(wrapper.text()).toBe('old render + old state + 15')
{
class App extends Component {
- componentWillMount() {
- this.state = 'new'
+ constructor(props) {
+ super(props)
+ this.state = { value: 'new' }
}
shouldComponentUpdate() {
@@ -1213,7 +1229,7 @@ function runAllTests(useWeakMap) {
render() {
return (
- new render + {this.state} state + {this.props.n}
+ new render + {this.state.value} state + {this.props.n}
)
}
@@ -1232,4 +1248,4 @@ function runAllTests(useWeakMap) {
}
runAllTests(true)
-runAllTests(false)
+// runAllTests(false)
diff --git a/test/patch.dev.test.js b/test/patch.dev.test.js
index 98dc3756b..259d2f140 100644
--- a/test/patch.dev.test.js
+++ b/test/patch.dev.test.js
@@ -30,7 +30,7 @@ function runAllTests(useWeakMap) {
// or we may cause an existing component to unmount unpredictably.
// https://github.com/gaearon/react-hot-loader/issues/241
- const spy = jest.spyOn(console, 'error')
+ const spy = jest.spyOn(console, 'error').mockImplementation(() => {})
try {
RHL.register(Kanye, 'Yeezy', '/wow/test.js')
expect(console.error.mock.calls.length).toBe(1)
@@ -60,7 +60,7 @@ function runAllTests(useWeakMap) {
const dynamic = () => () => 123
- const spy = jest.spyOn(console, 'error')
+ const spy = jest.spyOn(console, 'error').mockImplementation(() => {})
try {
RHL.register(f1, 'f1', '/wow/test.js')
diff --git a/test/setup.js b/test/setup.js
new file mode 100644
index 000000000..88c8c3b32
--- /dev/null
+++ b/test/setup.js
@@ -0,0 +1,4 @@
+import Enzyme from 'enzyme'
+import Adapter from 'enzyme-adapter-react-16'
+
+Enzyme.configure({ adapter: new Adapter() })
diff --git a/yarn.lock b/yarn.lock
index d4c30cdeb..d0ba5ea7a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,6 +2,10 @@
# yarn lockfile v1
+"@types/node@^6.0.46":
+ version "6.0.88"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.88.tgz#f618f11a944f6a18d92b5c472028728a3e3d4b66"
+
abab@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d"
@@ -284,9 +288,9 @@ babel-core@^6.0.0, babel-core@^6.26.0, babel-core@^6.7.6:
slash "^1.0.0"
source-map "^0.5.6"
-babel-eslint@^8.0.0:
- version "8.0.0"
- resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.0.0.tgz#ce06f385bdfb5b6d7e603f06222f891abd14c240"
+babel-eslint@^8.0.1:
+ version "8.0.1"
+ resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.0.1.tgz#5d718be7a328625d006022eb293ed3008cbd6346"
dependencies:
babel-code-frame "7.0.0-beta.0"
babel-traverse "7.0.0-beta.0"
@@ -430,12 +434,12 @@ babel-helpers@^6.24.1:
babel-runtime "^6.22.0"
babel-template "^6.24.1"
-babel-jest@^21.0.2:
- version "21.0.2"
- resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-21.0.2.tgz#817ea52c23f1c6c4b684d6960968416b6a9e9c6c"
+babel-jest@^21.2.0:
+ version "21.2.0"
+ resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-21.2.0.tgz#2ce059519a9374a2c46f2455b6fbef5ad75d863e"
dependencies:
babel-plugin-istanbul "^4.0.0"
- babel-preset-jest "^21.0.2"
+ babel-preset-jest "^21.2.0"
babel-messages@7.0.0-beta.0:
version "7.0.0-beta.0"
@@ -461,9 +465,9 @@ babel-plugin-istanbul@^4.0.0:
istanbul-lib-instrument "^1.7.5"
test-exclude "^4.1.1"
-babel-plugin-jest-hoist@^21.0.2:
- version "21.0.2"
- resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.0.2.tgz#cfdce5bca40d772a056cb8528ad159c7bb4bb03d"
+babel-plugin-jest-hoist@^21.2.0:
+ version "21.2.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.2.0.tgz#2cef637259bd4b628a6cace039de5fcd14dbb006"
babel-plugin-syntax-async-functions@^6.8.0:
version "6.13.0"
@@ -485,6 +489,10 @@ babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"
+babel-plugin-syntax-object-rest-spread@^6.13.0:
+ version "6.13.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
+
babel-plugin-syntax-trailing-function-commas@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3"
@@ -779,11 +787,12 @@ babel-preset-flow@^6.23.0:
dependencies:
babel-plugin-transform-flow-strip-types "^6.22.0"
-babel-preset-jest@^21.0.2:
- version "21.0.2"
- resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-21.0.2.tgz#9db25def2329f49eace3f5ea0de42a0b898d12cc"
+babel-preset-jest@^21.2.0:
+ version "21.2.0"
+ resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-21.2.0.tgz#ff9d2bce08abd98e8a36d9a8a5189b9173b85638"
dependencies:
- babel-plugin-jest-hoist "^21.0.2"
+ babel-plugin-jest-hoist "^21.2.0"
+ babel-plugin-syntax-object-rest-spread "^6.13.0"
babel-preset-react@^6.5.0:
version "6.24.1"
@@ -1014,26 +1023,16 @@ change-emitter@^0.1.2:
version "0.1.6"
resolved "https://registry.yarnpkg.com/change-emitter/-/change-emitter-0.1.6.tgz#e8b2fe3d7f1ab7d69a32199aff91ea6931409515"
-cheerio@^0.22.0:
- version "0.22.0"
- resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e"
+cheerio@^1.0.0-rc.2:
+ version "1.0.0-rc.2"
+ resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db"
dependencies:
css-select "~1.2.0"
dom-serializer "~0.1.0"
entities "~1.1.1"
htmlparser2 "^3.9.1"
- lodash.assignin "^4.0.9"
- lodash.bind "^4.1.4"
- lodash.defaults "^4.0.1"
- lodash.filter "^4.4.0"
- lodash.flatten "^4.2.0"
- lodash.foreach "^4.3.0"
- lodash.map "^4.4.0"
- lodash.merge "^4.4.0"
- lodash.pick "^4.2.1"
- lodash.reduce "^4.4.0"
- lodash.reject "^4.4.0"
- lodash.some "^4.4.0"
+ lodash "^4.15.0"
+ parse5 "^3.0.1"
chokidar@^1.6.1:
version "1.7.0"
@@ -1102,6 +1101,10 @@ color-name@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
+colors@0.5.x:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774"
+
combined-stream@^1.0.5, combined-stream@~1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009"
@@ -1152,9 +1155,9 @@ core-util-is@1.0.2, core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
-create-react-class@^15.6.0:
- version "15.6.0"
- resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.0.tgz#ab448497c26566e1e29413e883207d57cfe7bed4"
+create-react-class@^15.6.2:
+ version "15.6.2"
+ resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.2.tgz#cf1ed15f12aad7f14ef5f2dfe05e6c42f91ef02a"
dependencies:
fbjs "^0.8.9"
loose-envify "^1.3.1"
@@ -1282,6 +1285,10 @@ diff@^3.2.0:
version "3.3.1"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
+discontinuous-range@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a"
+
doctrine@1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa"
@@ -1359,20 +1366,38 @@ entities@^1.1.1, entities@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
-enzyme@^2.2.0:
- version "2.9.1"
- resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-2.9.1.tgz#07d5ce691241240fb817bf2c4b18d6e530240df6"
+enzyme-adapter-react-16@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.0.1.tgz#066cb1735e65d8d95841a023f94dab3ce6109e17"
+ dependencies:
+ enzyme-adapter-utils "^1.0.0"
+ lodash "^4.17.4"
+ object.assign "^4.0.4"
+ object.values "^1.0.4"
+ prop-types "^15.5.10"
+
+enzyme-adapter-utils@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.0.0.tgz#e94eee63da9a798d498adb1162a2102ed04fc638"
dependencies:
- cheerio "^0.22.0"
- function.prototype.name "^1.0.0"
+ lodash "^4.17.4"
+ object.assign "^4.0.4"
+ prop-types "^15.5.10"
+
+enzyme@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.1.0.tgz#d8ca84085790fbcec6ed40badd14478faee4c25a"
+ dependencies:
+ cheerio "^1.0.0-rc.2"
+ function.prototype.name "^1.0.3"
is-subset "^0.1.1"
lodash "^4.17.4"
object-is "^1.0.1"
object.assign "^4.0.4"
object.entries "^1.0.4"
object.values "^1.0.4"
- prop-types "^15.5.10"
- uuid "^3.0.1"
+ raf "^3.3.2"
+ rst-selector-parser "^2.2.2"
errno@^0.1.4:
version "0.1.4"
@@ -1425,21 +1450,21 @@ escodegen@^1.6.1:
optionalDependencies:
source-map "~0.5.6"
-eslint-config-airbnb-base@^11.3.0:
- version "11.3.2"
- resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.3.2.tgz#8703b11abe3c88ac7ec2b745b7fdf52e00ae680a"
+eslint-config-airbnb-base@^12.0.2:
+ version "12.0.2"
+ resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-12.0.2.tgz#45fea317d71b8f1da323c730f3a8471988757793"
dependencies:
eslint-restricted-globals "^0.1.1"
-eslint-config-airbnb@^15.1.0:
- version "15.1.0"
- resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-15.1.0.tgz#fd432965a906e30139001ba830f58f73aeddae8e"
+eslint-config-airbnb@^16.0.0:
+ version "16.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-16.0.0.tgz#21e81476ab7f5f27c1a900ff415cac9e1e12f3ed"
dependencies:
- eslint-config-airbnb-base "^11.3.0"
+ eslint-config-airbnb-base "^12.0.2"
-eslint-config-prettier@^2.5.0:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.5.0.tgz#9ecb9296bae4e2e59a3ce361a96c9f825fe67b75"
+eslint-config-prettier@^2.6.0:
+ version "2.6.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.6.0.tgz#f21db0ebb438ad678fb98946097c4bb198befccc"
dependencies:
get-stdin "^5.0.1"
@@ -1472,9 +1497,9 @@ eslint-plugin-import@^2.7.0:
minimatch "^3.0.3"
read-pkg-up "^2.0.0"
-eslint-plugin-jsx-a11y@^5.1.1:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-5.1.1.tgz#5c96bb5186ca14e94db1095ff59b3e2bd94069b1"
+eslint-plugin-jsx-a11y@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.0.2.tgz#659277a758b036c305a7e4a13057c301cd3be73f"
dependencies:
aria-query "^0.7.0"
array-includes "^3.0.3"
@@ -1484,9 +1509,9 @@ eslint-plugin-jsx-a11y@^5.1.1:
emoji-regex "^6.1.0"
jsx-ast-utils "^1.4.0"
-eslint-plugin-react@^7.3.0:
- version "7.3.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.3.0.tgz#ca9368da36f733fbdc05718ae4e91f778f38e344"
+eslint-plugin-react@^7.4.0:
+ version "7.4.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.4.0.tgz#300a95861b9729c087d362dd64abcc351a74364a"
dependencies:
doctrine "^2.0.0"
has "^1.0.1"
@@ -1504,9 +1529,9 @@ eslint-scope@^3.7.1:
esrecurse "^4.1.0"
estraverse "^4.1.1"
-eslint@^4.7.0:
- version "4.7.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.7.0.tgz#d35fc07c472520be3de85b3da11e99c576afd515"
+eslint@^4.7.2:
+ version "4.8.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.8.0.tgz#229ef0e354e0e61d837c7a80fdfba825e199815e"
dependencies:
ajv "^5.2.0"
babel-code-frame "^6.22.0"
@@ -1612,16 +1637,16 @@ expand-range@^1.8.1:
dependencies:
fill-range "^2.1.0"
-expect@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/expect/-/expect-21.1.0.tgz#1c138ec803c72d28cbd10dfe97104966d967c24a"
+expect@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/expect/-/expect-21.2.1.tgz#003ac2ac7005c3c29e73b38a272d4afadd6d1d7b"
dependencies:
ansi-styles "^3.2.0"
- jest-diff "^21.1.0"
- jest-get-type "^21.0.2"
- jest-matcher-utils "^21.1.0"
- jest-message-util "^21.1.0"
- jest-regex-util "^21.1.0"
+ jest-diff "^21.2.1"
+ jest-get-type "^21.2.0"
+ jest-matcher-utils "^21.2.1"
+ jest-message-util "^21.2.1"
+ jest-regex-util "^21.2.0"
extend@~3.0.0:
version "3.0.1"
@@ -1671,6 +1696,18 @@ fbjs@^0.8.1, fbjs@^0.8.9:
setimmediate "^1.0.5"
ua-parser-js "^0.7.9"
+fbjs@^0.8.16:
+ version "0.8.16"
+ resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db"
+ dependencies:
+ core-js "^1.0.0"
+ isomorphic-fetch "^2.1.1"
+ loose-envify "^1.0.0"
+ object-assign "^4.1.0"
+ promise "^7.1.1"
+ setimmediate "^1.0.5"
+ ua-parser-js "^0.7.9"
+
figures@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
@@ -1795,7 +1832,7 @@ function-bind@^1.0.2, function-bind@^1.1.0, function-bind@^1.1.1, function-bind@
version "1.1.1"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
-function.prototype.name@^1.0.0:
+function.prototype.name@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.0.3.tgz#0099ae5572e9dd6f03c97d023fd92bcc5e639eac"
dependencies:
@@ -1954,9 +1991,9 @@ hoek@2.x.x:
version "2.16.3"
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
-hoist-non-react-statics@^1.0.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb"
+hoist-non-react-statics@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz#343db84c6018c650778898240135a1420ee22ce0"
home-or-tmp@^2.0.0:
version "2.0.0"
@@ -2292,15 +2329,15 @@ istanbul-reports@^1.1.2:
dependencies:
handlebars "^4.0.3"
-jest-changed-files@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-21.1.0.tgz#e70f6b33b75d5987f4eae07e35bea5525635f92a"
+jest-changed-files@^21.2.0:
+ version "21.2.0"
+ resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-21.2.0.tgz#5dbeecad42f5d88b482334902ce1cba6d9798d29"
dependencies:
throat "^4.0.0"
-jest-cli@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-21.1.0.tgz#4f671885ea3521803c96a1fd95baaa6a1ba8d70f"
+jest-cli@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-21.2.1.tgz#9c528b6629d651911138d228bdb033c157ec8c00"
dependencies:
ansi-escapes "^3.0.0"
chalk "^2.0.1"
@@ -2311,17 +2348,17 @@ jest-cli@^21.1.0:
istanbul-lib-coverage "^1.0.1"
istanbul-lib-instrument "^1.4.2"
istanbul-lib-source-maps "^1.1.0"
- jest-changed-files "^21.1.0"
- jest-config "^21.1.0"
- jest-environment-jsdom "^21.1.0"
- jest-haste-map "^21.1.0"
- jest-message-util "^21.1.0"
- jest-regex-util "^21.1.0"
- jest-resolve-dependencies "^21.1.0"
- jest-runner "^21.1.0"
- jest-runtime "^21.1.0"
- jest-snapshot "^21.1.0"
- jest-util "^21.1.0"
+ jest-changed-files "^21.2.0"
+ jest-config "^21.2.1"
+ jest-environment-jsdom "^21.2.1"
+ jest-haste-map "^21.2.0"
+ jest-message-util "^21.2.1"
+ jest-regex-util "^21.2.0"
+ jest-resolve-dependencies "^21.2.0"
+ jest-runner "^21.2.1"
+ jest-runtime "^21.2.1"
+ jest-snapshot "^21.2.1"
+ jest-util "^21.2.1"
micromatch "^2.3.11"
node-notifier "^5.0.2"
pify "^3.0.0"
@@ -2332,146 +2369,146 @@ jest-cli@^21.1.0:
worker-farm "^1.3.1"
yargs "^9.0.0"
-jest-config@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-21.1.0.tgz#7ef8778af679de30dad75e355a0dfbb0330b8d2f"
+jest-config@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-21.2.1.tgz#c7586c79ead0bcc1f38c401e55f964f13bf2a480"
dependencies:
chalk "^2.0.1"
glob "^7.1.1"
- jest-environment-jsdom "^21.1.0"
- jest-environment-node "^21.1.0"
- jest-get-type "^21.0.2"
- jest-jasmine2 "^21.1.0"
- jest-regex-util "^21.1.0"
- jest-resolve "^21.1.0"
- jest-util "^21.1.0"
- jest-validate "^21.1.0"
- pretty-format "^21.1.0"
-
-jest-diff@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-21.1.0.tgz#ca4c9d40272a6901dcde6c4c0bb2f568c363cc42"
+ jest-environment-jsdom "^21.2.1"
+ jest-environment-node "^21.2.1"
+ jest-get-type "^21.2.0"
+ jest-jasmine2 "^21.2.1"
+ jest-regex-util "^21.2.0"
+ jest-resolve "^21.2.0"
+ jest-util "^21.2.1"
+ jest-validate "^21.2.1"
+ pretty-format "^21.2.1"
+
+jest-diff@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-21.2.1.tgz#46cccb6cab2d02ce98bc314011764bb95b065b4f"
dependencies:
chalk "^2.0.1"
diff "^3.2.0"
- jest-get-type "^21.0.2"
- pretty-format "^21.1.0"
+ jest-get-type "^21.2.0"
+ pretty-format "^21.2.1"
-jest-docblock@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.1.0.tgz#43154be2441fb91403e36bb35cb791a5017cea81"
+jest-docblock@^21.2.0:
+ version "21.2.0"
+ resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414"
-jest-environment-jsdom@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-21.1.0.tgz#40729a60cd4544625f7d3a33c32bdaad63e57db7"
+jest-environment-jsdom@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-21.2.1.tgz#38d9980c8259b2a608ec232deee6289a60d9d5b4"
dependencies:
- jest-mock "^21.1.0"
- jest-util "^21.1.0"
+ jest-mock "^21.2.0"
+ jest-util "^21.2.1"
jsdom "^9.12.0"
-jest-environment-node@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-21.1.0.tgz#a11fd611e8ae6c3e02b785aa1b12a3009f4fd0f1"
+jest-environment-node@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-21.2.1.tgz#98c67df5663c7fbe20f6e792ac2272c740d3b8c8"
dependencies:
- jest-mock "^21.1.0"
- jest-util "^21.1.0"
+ jest-mock "^21.2.0"
+ jest-util "^21.2.1"
-jest-get-type@^21.0.2:
- version "21.0.2"
- resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.0.2.tgz#304e6b816dd33cd1f47aba0597bcad258a509fc6"
+jest-get-type@^21.2.0:
+ version "21.2.0"
+ resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23"
-jest-haste-map@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-21.1.0.tgz#08e7a8c584008d4b790b8dddf7dd3e3db03b75d3"
+jest-haste-map@^21.2.0:
+ version "21.2.0"
+ resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-21.2.0.tgz#1363f0a8bb4338f24f001806571eff7a4b2ff3d8"
dependencies:
fb-watchman "^2.0.0"
graceful-fs "^4.1.11"
- jest-docblock "^21.1.0"
+ jest-docblock "^21.2.0"
micromatch "^2.3.11"
sane "^2.0.0"
worker-farm "^1.3.1"
-jest-jasmine2@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-21.1.0.tgz#975c3cd3ecd9d50d385bfe3c680dd61979f50c9c"
+jest-jasmine2@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-21.2.1.tgz#9cc6fc108accfa97efebce10c4308548a4ea7592"
dependencies:
chalk "^2.0.1"
- expect "^21.1.0"
+ expect "^21.2.1"
graceful-fs "^4.1.11"
- jest-diff "^21.1.0"
- jest-matcher-utils "^21.1.0"
- jest-message-util "^21.1.0"
- jest-snapshot "^21.1.0"
+ jest-diff "^21.2.1"
+ jest-matcher-utils "^21.2.1"
+ jest-message-util "^21.2.1"
+ jest-snapshot "^21.2.1"
p-cancelable "^0.3.0"
-jest-matcher-utils@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-21.1.0.tgz#b02e237b287c58915ce9a5bf3c7138dba95125a7"
+jest-matcher-utils@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-21.2.1.tgz#72c826eaba41a093ac2b4565f865eb8475de0f64"
dependencies:
chalk "^2.0.1"
- jest-get-type "^21.0.2"
- pretty-format "^21.1.0"
+ jest-get-type "^21.2.0"
+ pretty-format "^21.2.1"
-jest-message-util@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-21.1.0.tgz#7f9a52535d1a640af0d4c800edde737e14ea0526"
+jest-message-util@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-21.2.1.tgz#bfe5d4692c84c827d1dcf41823795558f0a1acbe"
dependencies:
chalk "^2.0.1"
micromatch "^2.3.11"
slash "^1.0.0"
-jest-mock@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-21.1.0.tgz#c4dddfa893a0b120b72b5ae87c7506745213a790"
+jest-mock@^21.2.0:
+ version "21.2.0"
+ resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-21.2.0.tgz#7eb0770e7317968165f61ea2a7281131534b3c0f"
-jest-regex-util@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-21.1.0.tgz#59e4bad74f5ffd62a3835225f9bc1ee3796b5adb"
+jest-regex-util@^21.2.0:
+ version "21.2.0"
+ resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-21.2.0.tgz#1b1e33e63143babc3e0f2e6c9b5ba1eb34b2d530"
-jest-resolve-dependencies@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-21.1.0.tgz#9f78852e65d864d04ad0919ac8226b3f1434e7b0"
+jest-resolve-dependencies@^21.2.0:
+ version "21.2.0"
+ resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-21.2.0.tgz#9e231e371e1a736a1ad4e4b9a843bc72bfe03d09"
dependencies:
- jest-regex-util "^21.1.0"
+ jest-regex-util "^21.2.0"
-jest-resolve@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-21.1.0.tgz#6bb806ca5ad876c250044fe62f298321d2da5c06"
+jest-resolve@^21.2.0:
+ version "21.2.0"
+ resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-21.2.0.tgz#068913ad2ba6a20218e5fd32471f3874005de3a6"
dependencies:
browser-resolve "^1.11.2"
chalk "^2.0.1"
is-builtin-module "^1.0.0"
-jest-runner@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-21.1.0.tgz#d7ea7e2fa10ed673d4dd25ba2f3faae2efb89a07"
- dependencies:
- jest-config "^21.1.0"
- jest-docblock "^21.1.0"
- jest-haste-map "^21.1.0"
- jest-jasmine2 "^21.1.0"
- jest-message-util "^21.1.0"
- jest-runtime "^21.1.0"
- jest-util "^21.1.0"
+jest-runner@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-21.2.1.tgz#194732e3e518bfb3d7cbfc0fd5871246c7e1a467"
+ dependencies:
+ jest-config "^21.2.1"
+ jest-docblock "^21.2.0"
+ jest-haste-map "^21.2.0"
+ jest-jasmine2 "^21.2.1"
+ jest-message-util "^21.2.1"
+ jest-runtime "^21.2.1"
+ jest-util "^21.2.1"
pify "^3.0.0"
throat "^4.0.0"
worker-farm "^1.3.1"
-jest-runtime@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-21.1.0.tgz#c9a180a9e06ef046d0ad157dea52355abb7cbad4"
+jest-runtime@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-21.2.1.tgz#99dce15309c670442eee2ebe1ff53a3cbdbbb73e"
dependencies:
babel-core "^6.0.0"
- babel-jest "^21.0.2"
+ babel-jest "^21.2.0"
babel-plugin-istanbul "^4.0.0"
chalk "^2.0.1"
convert-source-map "^1.4.0"
graceful-fs "^4.1.11"
- jest-config "^21.1.0"
- jest-haste-map "^21.1.0"
- jest-regex-util "^21.1.0"
- jest-resolve "^21.1.0"
- jest-util "^21.1.0"
+ jest-config "^21.2.1"
+ jest-haste-map "^21.2.0"
+ jest-regex-util "^21.2.0"
+ jest-resolve "^21.2.0"
+ jest-util "^21.2.1"
json-stable-stringify "^1.0.1"
micromatch "^2.3.11"
slash "^1.0.0"
@@ -2479,43 +2516,43 @@ jest-runtime@^21.1.0:
write-file-atomic "^2.1.0"
yargs "^9.0.0"
-jest-snapshot@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-21.1.0.tgz#a5fa9d52847d8f52e19a1df6ccae9de699193ccc"
+jest-snapshot@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-21.2.1.tgz#29e49f16202416e47343e757e5eff948c07fd7b0"
dependencies:
chalk "^2.0.1"
- jest-diff "^21.1.0"
- jest-matcher-utils "^21.1.0"
+ jest-diff "^21.2.1"
+ jest-matcher-utils "^21.2.1"
mkdirp "^0.5.1"
natural-compare "^1.4.0"
- pretty-format "^21.1.0"
+ pretty-format "^21.2.1"
-jest-util@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-21.1.0.tgz#f92ff756422cc0609ddf5a9bfa4d34b2835d8c30"
+jest-util@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-21.2.1.tgz#a274b2f726b0897494d694a6c3d6a61ab819bb78"
dependencies:
callsites "^2.0.0"
chalk "^2.0.1"
graceful-fs "^4.1.11"
- jest-message-util "^21.1.0"
- jest-mock "^21.1.0"
- jest-validate "^21.1.0"
+ jest-message-util "^21.2.1"
+ jest-mock "^21.2.0"
+ jest-validate "^21.2.1"
mkdirp "^0.5.1"
-jest-validate@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.1.0.tgz#39d01115544a758bce49f221a5fcbb24ebdecc65"
+jest-validate@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7"
dependencies:
chalk "^2.0.1"
- jest-get-type "^21.0.2"
+ jest-get-type "^21.2.0"
leven "^2.1.0"
- pretty-format "^21.1.0"
+ pretty-format "^21.2.1"
-jest@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/jest/-/jest-21.1.0.tgz#77c7baa8aa9e8bace7fe41a30d748ab56e89476a"
+jest@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/jest/-/jest-21.2.1.tgz#c964e0b47383768a1438e3ccf3c3d470327604e1"
dependencies:
- jest-cli "^21.1.0"
+ jest-cli "^21.2.1"
js-tokens@^3.0.0, js-tokens@^3.0.2:
version "3.0.2"
@@ -2672,59 +2709,15 @@ locate-path@^2.0.0:
p-locate "^2.0.0"
path-exists "^3.0.0"
-lodash.assignin@^4.0.9:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2"
-
-lodash.bind@^4.1.4:
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35"
-
lodash.cond@^4.3.0:
version "4.5.2"
resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5"
-lodash.defaults@^4.0.1:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
-
-lodash.filter@^4.4.0:
- version "4.6.0"
- resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace"
-
-lodash.flatten@^4.2.0:
- version "4.4.0"
- resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f"
-
-lodash.foreach@^4.3.0:
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53"
-
-lodash.map@^4.4.0:
- version "4.6.0"
- resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3"
-
-lodash.merge@^4.4.0:
- version "4.6.0"
- resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5"
-
-lodash.pick@^4.2.1:
+lodash.flattendeep@^4.4.0:
version "4.4.0"
- resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
+ resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2"
-lodash.reduce@^4.4.0:
- version "4.6.0"
- resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b"
-
-lodash.reject@^4.4.0:
- version "4.6.0"
- resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415"
-
-lodash.some@^4.4.0:
- version "4.6.0"
- resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
-
-lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.6.1:
+lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.6.1:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
@@ -2839,6 +2832,14 @@ natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
+nearley@^2.7.10:
+ version "2.11.0"
+ resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.11.0.tgz#5e626c79a6cd2f6ab9e7e5d5805e7668967757ae"
+ dependencies:
+ nomnom "~1.6.2"
+ railroad-diagrams "^1.0.0"
+ randexp "^0.4.2"
+
node-fetch@^1.0.1:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
@@ -2874,6 +2875,13 @@ node-pre-gyp@^0.6.36:
tar "^2.2.1"
tar-pack "^3.4.0"
+nomnom@~1.6.2:
+ version "1.6.2"
+ resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.6.2.tgz#84a66a260174408fc5b77a18f888eccc44fb6971"
+ dependencies:
+ colors "0.5.x"
+ underscore "~1.4.4"
+
nopt@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
@@ -3076,6 +3084,12 @@ parse5@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94"
+parse5@^3.0.1:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.2.tgz#05eff57f0ef4577fb144a79f8b9a967a6cc44510"
+ dependencies:
+ "@types/node" "^6.0.46"
+
path-exists@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
@@ -3120,6 +3134,10 @@ performance-now@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5"
+performance-now@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
+
pify@^2.0.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
@@ -3156,13 +3174,13 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
-prettier@^1.7.0:
- version "1.7.0"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.0.tgz#47481588f41f7c90f63938feb202ac82554e7150"
+prettier@^1.7.4:
+ version "1.7.4"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.4.tgz#5e8624ae9363c80f95ec644584ecdf55d74f93fa"
-pretty-format@^21.1.0:
- version "21.1.0"
- resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.1.0.tgz#557428254323832ee8b7c971cb613442bea67f61"
+pretty-format@^21.2.1:
+ version "21.2.1"
+ resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.2.1.tgz#ae5407f3cf21066cd011aa1ba5fce7b6a2eddb36"
dependencies:
ansi-regex "^3.0.0"
ansi-styles "^3.2.0"
@@ -3196,6 +3214,14 @@ prop-types@^15.5.10, prop-types@^15.5.4:
fbjs "^0.8.9"
loose-envify "^1.3.1"
+prop-types@^15.6.0:
+ version "15.6.0"
+ resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856"
+ dependencies:
+ fbjs "^0.8.16"
+ loose-envify "^1.3.1"
+ object-assign "^4.1.1"
+
prr@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
@@ -3212,6 +3238,29 @@ qs@~6.4.0:
version "6.4.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
+raf@^3.3.2:
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/raf/-/raf-3.3.2.tgz#0c13be0b5b49b46f76d6669248d527cf2b02fe27"
+ dependencies:
+ performance-now "^2.1.0"
+
+raf@^3.4.0:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575"
+ dependencies:
+ performance-now "^2.1.0"
+
+railroad-diagrams@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e"
+
+randexp@^0.4.2:
+ version "0.4.6"
+ resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3"
+ dependencies:
+ discontinuous-range "1.0.0"
+ ret "~0.1.10"
+
randomatic@^1.1.3:
version "1.1.7"
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
@@ -3228,18 +3277,18 @@ rc@^1.1.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"
-react-deep-force-update@^2.0.1:
+react-deep-force-update@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-2.1.1.tgz#8ea4263cd6455a050b37445b3f08fd839d86e909"
-react-dom@^15.6.1:
- version "15.6.1"
- resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.1.tgz#2cb0ed4191038e53c209eb3a79a23e2a4cf99470"
+react-dom@^16.0.0:
+ version "16.0.0"
+ resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.0.0.tgz#9cc3079c3dcd70d4c6e01b84aab2a7e34c303f58"
dependencies:
- fbjs "^0.8.9"
+ fbjs "^0.8.16"
loose-envify "^1.1.0"
- object-assign "^4.1.0"
- prop-types "^15.5.10"
+ object-assign "^4.1.1"
+ prop-types "^15.6.0"
react-proxy@^3.0.0-alpha.0:
version "3.0.0-alpha.1"
@@ -3247,22 +3296,21 @@ react-proxy@^3.0.0-alpha.0:
dependencies:
lodash "^4.6.1"
-react-test-renderer@^15.6.1:
- version "15.6.1"
- resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-15.6.1.tgz#026f4a5bb5552661fd2cc4bbcd0d4bc8a35ebf7e"
+react-test-renderer@^16.0.0:
+ version "16.0.0"
+ resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.0.0.tgz#9fe7b8308f2f71f29fc356d4102086f131c9cb15"
dependencies:
- fbjs "^0.8.9"
- object-assign "^4.1.0"
+ fbjs "^0.8.16"
+ object-assign "^4.1.1"
-react@^15.0.2:
- version "15.6.1"
- resolved "https://registry.yarnpkg.com/react/-/react-15.6.1.tgz#baa8434ec6780bde997cdc380b79cd33b96393df"
+react@^16.0.0:
+ version "16.0.0"
+ resolved "https://registry.yarnpkg.com/react/-/react-16.0.0.tgz#ce7df8f1941b036f02b2cca9dbd0cb1f0e855e2d"
dependencies:
- create-react-class "^15.6.0"
- fbjs "^0.8.9"
+ fbjs "^0.8.16"
loose-envify "^1.1.0"
- object-assign "^4.1.0"
- prop-types "^15.5.10"
+ object-assign "^4.1.1"
+ prop-types "^15.6.0"
read-pkg-up@^1.0.1:
version "1.0.1"
@@ -3315,13 +3363,13 @@ readdirp@^2.0.0:
readable-stream "^2.0.2"
set-immediate-shim "^1.0.1"
-recompose@^0.25.0:
- version "0.25.0"
- resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.25.0.tgz#e2ec723692ff0fdab3d62bd22c1da69af1985acd"
+recompose@^0.26.0:
+ version "0.26.0"
+ resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.26.0.tgz#9babff039cb72ba5bd17366d55d7232fbdfb2d30"
dependencies:
change-emitter "^0.1.2"
fbjs "^0.8.1"
- hoist-non-react-statics "^1.0.0"
+ hoist-non-react-statics "^2.3.1"
symbol-observable "^1.0.4"
redbox-react@^1.3.6:
@@ -3464,6 +3512,10 @@ resumer@~0.0.0:
dependencies:
through "~2.3.4"
+ret@~0.1.10:
+ version "0.1.15"
+ resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
+
right-align@^0.1.1:
version "0.1.3"
resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
@@ -3476,6 +3528,13 @@ rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.2, rimraf@^2.6.1:
dependencies:
glob "^7.0.5"
+rst-selector-parser@^2.2.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.2.tgz#9927b619bd5af8dc23a76c64caef04edf90d2c65"
+ dependencies:
+ lodash.flattendeep "^4.4.0"
+ nearley "^2.7.10"
+
run-async@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
@@ -3578,10 +3637,14 @@ source-map@^0.4.4:
dependencies:
amdefine ">=0.0.4"
-source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.6:
+source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.6:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+source-map@^0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+
sourcemapped-stacktrace@^1.1.6:
version "1.1.7"
resolved "https://registry.yarnpkg.com/sourcemapped-stacktrace/-/sourcemapped-stacktrace-1.1.7.tgz#17e05374ff78b71a9d89ad3975a49f22725ba935"
@@ -3867,6 +3930,10 @@ uid-number@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
+underscore@~1.4.4:
+ version "1.4.4"
+ resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604"
+
user-home@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
@@ -3875,7 +3942,7 @@ util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
-uuid@^3.0.0, uuid@^3.0.1:
+uuid@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04"