eth-hot-wallet

Update Project Dependencies

Updating the dependencies is a tedious job. This doc is intended to help streamline the process and make it painless.

Maintain Update Log

There’s a sample Update Log at the end of this document. Create a new file where you can dump the Version Diff, Test results, Chrome/Node/Yarn versions. Mention the dependencies that you had to roll back along with the reason. Optionally you can mention the errors/warnings that you encountered while updating dependencies.

Managing Node Versions

It is recommended that you use Node Version Manager or Node Version Control to switch node versions quickly in order to run and test this project on multiple node versions.

Update Tooling

Update Yarn:

  1. For OSX users- brew unlink yarn && brew install yarn

  2. For other users, follow yarn docs.
  3. Run yarn --version and record yarn version in Update Log.

Update Chrome

  1. Download the latest version or go to chrome://settings/ and update.

  2. Go to Chrome -> About and record version number in Update Log

Update Dependencies

npm-check-updates is a great tool to update your dependencies. It will only update your package.json. Run npm install or yarn if you want to install updated package versions. There are 3 useful commands.

  1. ncu -u --semverLevel minor
  2. ncu -u --semverLevel major
  3. ncu -u

Confirm/adjust eslint-config-airbnb compatible dependency versions

npm info "eslint-config-airbnb@latest" peerDependencies

Pinned Version Numbers

react-boilerplate does not use “^”, “~”, etc., and these should be removed from package.json, if present. See #598 for more details.

At this point, you should copy and paste the version diff from the terminal into your Update Log.

Correct Errors and Rollback Dependencies

Run yarn to install updated versions and then start the example app by running npm start. Make sure that the project is running smoothly. If not, track down the dependencies that are causing problems and try to roll them back one by one and check if the example application is running.

Note down the rolled back dependencies and state the reason in your Update Log.

Full Regression Testing

Most of the errors/warnings would go away once you roll back the problemetic dependencies. But we need to make sure that the internal commands, tools, scaffolding etc. are functional too.

Example App:

Identify problems that occur and try to resolve them by rolling back the respective dependencies. Update the Update Log.

Internal Commands:

Sample Update Log

Tooling Versions

:spiral_notepad: Notes

  1. react-router was not updated. Thanks to @anuraaga for all his work. Ref- #1746
  2. history was not updated because of react-router v3’s dependency on it. Should go away when #1746 is merged.
  3. cheerio was not updated because it was breaking the HTML template. Pending investigation.
  4. react-test-renderer was added as a dev-dependency because enzyme was showing warnings-

    A few deprecation warnings were added in React 15.5. This supports the new APIs that React recommends. Ref. #876

  5. If you see a package-name being repeated, note that the version number of the last occurrence will get precedence.

:package: Version Diff

[0] PATCH UPDATES

 fontfaceobserver                        2.0.8  →    2.0.9 
 ip                                      1.1.4  →    1.1.5 
 react-redux                             5.0.2  →    5.0.5 
 react-router                            3.0.2  →    3.0.5 
 react-router-redux                      4.0.7  →    4.0.8 
 react-router-scroll                     0.4.1  →    0.4.2 
 redux-saga                             0.14.3  →   0.14.8 
 whatwg-fetch                            2.0.2  →    2.0.3 
 babel-plugin-dynamic-import-node        1.0.0  →    1.0.2 
 coveralls                             2.11.15  →  2.11.16 
 css-loader                             0.26.1  →   0.26.4 
 exports-loader                          0.6.3  →    0.6.4 
 file-loader                            0.10.0  →   0.10.1 
 html-loader                             0.4.4  →    0.4.5 
 imports-loader                          0.7.0  →    0.7.1 
 lint-staged                             3.3.0  →    3.3.2 
 ngrok                                   2.2.6  →    2.2.9 
 offline-plugin                          4.6.1  →    4.6.2 
 shelljs                                 0.7.6  →    0.7.7 
 sinon                             2.0.0-pre.5  →    2.0.0 
 style-loader                           0.13.1  →   0.13.2 
 url-loader                              0.5.7  →    0.5.8 
 webpack-dev-middleware                 1.10.0  →   1.10.2 

[1] MINOR UPDATES

 babel-polyfill                                   6.22.0  →                 6.23.0 
 cross-env                                         3.1.4  →                  3.2.4 
 express                                          4.14.1  →                 4.15.3 
 history                                           3.2.1  →                  3.3.0 
 react                                            15.4.2  →                 15.5.4 
 react-dom                                        15.4.2  →                 15.5.4 
 react-intl                                        2.2.3  →                  2.3.0 
 redux-immutable                                  3.0.11  →                  3.1.0 
 redux-saga                                       0.14.8  →                 0.15.3 
 babel-cli                                        6.22.2  →                 6.24.1 
 babel-core                                       6.22.1  →                 6.24.1 
 babel-eslint                                      7.1.1  →                  7.2.3 
 babel-loader                                     6.2.10  →                  6.4.1 
 babel-plugin-transform-es2015-modules-commonjs   6.22.0  →                 6.24.1 
 babel-plugin-transform-react-constant-elements   6.22.0  →                 6.23.0 
 babel-plugin-transform-react-remove-prop-types   0.2.12  →                  0.4.5 
 babel-preset-env                                  1.4.0  →                  1.5.1 
 babel-preset-react                               6.22.0  →                 6.24.1 
 babel-preset-stage-0                             6.22.0  →                 6.24.1 
 coveralls                                       2.11.16  →                 2.13.1 
 css-loader                                       0.26.4  →                 0.28.4 
 enzyme                                            2.7.1  →                  2.8.2 
 eslint                                           3.13.1  →                 3.19.0 
 eslint-config-airbnb                             14.0.0  →                 14.1.0 
 eslint-config-airbnb-base                        11.0.1  →                 11.2.0 
 eslint-plugin-import                              2.2.0  →                  2.3.0 
 eslint-plugin-react                               6.9.0  →                 6.10.3 
 file-loader                                      0.10.1  →                 0.11.1 
 jest-cli                                         18.1.0  →  18.5.0-alpha.7da3df39 
 lint-staged                                       3.3.2  →                  3.5.1 
 node-plop                                         0.5.5  →                  0.7.0 
 offline-plugin                                    4.6.2  →                  4.8.1 
 plop                                              1.7.4  →                  1.8.0 
 react-addons-test-utils                          15.4.2  →                 15.5.1 
 rimraf                                            2.5.4  →                  2.6.1 
 sinon                                             2.0.0  →                  2.3.2 
 style-loader                                     0.13.2  →                 0.18.1 
 webpack                                           2.2.1  →                  2.6.1 
 webpack-hot-middleware                           2.16.1  →                 2.18.0 

[3] MAJOR UPDATES

 cross-env                                   3.2.4  →       5.0.0 
 history                                     3.3.0  →       4.6.1 
 react-helmet                                4.0.0  →       5.1.3 
 react-router                                3.0.5  →       4.1.1 
 redux-immutable                             3.1.0  →       4.0.0 
 reselect                                    2.5.4  →       3.0.1 
 sanitize.css                                4.1.0  →       5.0.0 
 babel-loader                                6.4.1  →       7.0.0 
 cheerio                                    0.22.0  →  1.0.0-rc.1 
 circular-dependency-plugin                  2.0.0  →       3.0.0 
 eslint-config-airbnb                       14.1.0  →      15.0.1 
 eslint-plugin-jsx-a11y                      3.0.2  →       5.0.3 
 eslint-plugin-react                        6.10.3  →       7.0.1 
 image-webpack-loader                        2.0.0  →       3.3.1 
 jest-cli                    18.5.0-alpha.7da3df39  →      20.0.4 

[4] ROLLBACKS

 history                                     3.3.0  →       4.6.1 <--- rolled back
 react-router                                3.0.5  →       4.1.1 <--- rolled back
 cheerio                                    0.22.0  →  1.0.0-rc.1 <--- rolled back
 image-webpack-loader                        2.0.0  →       3.0.0 <--- rolled back

[5] NEW DEPENDENCIES

react-test-renderer                                     15.5.4

Errors Encountered

Addressed here https://github.com/imagemin/imagemin-pngquant/issues/32 Needs Testing