Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

upgrade JS stuff #326

Merged
merged 1 commit into from Feb 10, 2018
Merged

upgrade JS stuff #326

merged 1 commit into from Feb 10, 2018

Conversation

nl0
Copy link
Member

@nl0 nl0 commented Feb 2, 2018

Upgrade lots of stuff, most notable changes:

  • webpack@3 & webpack-dev-middleware@2

  • react@16

  • material-ui@0.20

  • styled-components@3

  • enzyme@3

  • env babel presets instead of latest

Also, all the dependecnies are now stated with the caret (^) syntax.

Changes introduced to make things work with the updated dependencies:

  • use prop-types packages

  • update webpack configs

  • backport some changes from react-boilerplate@3.5

  • update code according to the new linting rules

  • make test stubs pass

@asah asah requested review from kevinemoore and akarve and removed request for kevinemoore February 5, 2018 17:45
Copy link
Member

@akarve akarve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refuses to build:

ERROR in chunk main [entry]
[name].[chunkhash].js
'import' and 'export' may only appear at the top level (65:6)
|   if (false) {
|     module.hot.accept('./reducers', function () {
|       import('./reducers').then(function (reducerModule) {
|         var createReducers = reducerModule.default;
|         var nextReducers = createReducers(store.asyncReducers);
Child html-webpack-plugin for "index.html":
     1 asset
npm ERR! code ELIFECYCLE

And fails lint:



/Users/karve/code/quilt/catalog/app/components/Demo/index.js
  17:11  error  <iframe> elements must have a unique title property  jsx-a11y/iframe-has-title

/Users/karve/code/quilt/catalog/app/components/Feature/index.js
  27:9  error  <iframe> elements must have a unique title property  jsx-a11y/iframe-has-title

/Users/karve/code/quilt/catalog/app/components/Help/index.js
  18:9  error  Expected indentation of 6 space characters but found 8  react/jsx-indent

/Users/karve/code/quilt/catalog/app/components/LayoutHelpers/index.js
  3:8  error  'React' is defined but never used  no-unused-vars

/Users/karve/code/quilt/catalog/app/components/PackageList/index.js
  42:9  error  Missing parentheses around multilines JSX  react/jsx-wrap-multilines

/Users/karve/code/quilt/catalog/app/components/Pagination/index.js
  83:3  error  Missing parentheses around multilines JSX  react/jsx-wrap-multilines

/Users/karve/code/quilt/catalog/app/components/Values/messages.js
   7:5  error  Expected indentation of 2 space characters but found 4  react/jsx-indent
  15:5  error  Expected indentation of 2 space characters but found 4  react/jsx-indent
  23:5  error  Expected indentation of 2 space characters but found 4  react/jsx-indent
  30:5  error  Expected indentation of 2 space characters but found 4  react/jsx-indent

✖ 10 problems (10 errors, 0 warnings)

This is after a merge with master.

@nl0
Copy link
Member Author

nl0 commented Feb 5, 2018

@akarve this one is work in progress, so not expected to be properly runnable)

@asah asah changed the title Upgrade stuff WIP: upgrade JS stuff Feb 5, 2018
@nl0 nl0 force-pushed the upgrade-stuff branch 2 times, most recently from d891e58 to 3ea2524 Compare February 6, 2018 12:58
@nl0
Copy link
Member Author

nl0 commented Feb 6, 2018

@akarve ok, now it should work. The branch has been rebased onto the latest master. I'll quote the commit message that sums up the changes:

Upgrade lots of stuff, most notable changes:

  • webpack@3 & webpack-dev-middleware@2

  • react@16

  • material-ui@0.20

  • styled-components@3

  • enzyme@3

  • env babel presets instead of latest

Also, all the dependecnies are now stated with the caret (^) syntax.

Changes introduced to make things work with the updated dependencies:

  • use prop-types packages

  • update webpack configs

  • backport some changes from react-boilerplate@3.5

  • update code according to the new linting rules

  • make test stubs pass

@nl0 nl0 changed the title WIP: upgrade JS stuff upgrade JS stuff Feb 6, 2018
@akarve
Copy link
Member

akarve commented Feb 6, 2018

Nice. npm run lint now works but npm run build does not.

  • fix npm run build

Here's the error I got:

apk-mbp-3:catalog karve$ npm run build

> quilt-catalog@0.0.0 prebuild /Users/karve/code/quilt/catalog
> npm run build:clean


> quilt-catalog@0.0.0 build:clean /Users/karve/code/quilt/catalog
> rimraf ./build


> quilt-catalog@0.0.0 build /Users/karve/code/quilt/catalog
> cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout

Hash: 2613cc93403f1005c8a5                                                    p Version: webpack 3.10.0
Time: 18688ms
                               Asset       Size  Chunks                    Chunk Names
     0.d14c187d470019d0c344.chunk.js     711 kB       0  [emitted]  [big]  
3b45ceb8d3ec8e67d781f4e30fe2b25c.jpg    38.8 kB          [emitted]         
398f721fb279562d5c2bafb6e420bc0f.png    5.33 kB          [emitted]         
e5e05daa7ebdb7a139da4b49d2251dac.png    20.5 kB          [emitted]         
fdb368cc4abf74980af624f5b5527b15.jpg     244 kB          [emitted]         
9eb602f32e9fce869c2009fc6eb63592.png    1.87 kB          [emitted]         
e7bc25f00791efe5f0419a8cd1fe5f96.png    10.7 kB          [emitted]         
f244525a399174334ebbc6cf619a26f6.png    8.34 kB          [emitted]         
6888f949f2285c93d96c7af3f490ceec.png     3.5 kB          [emitted]         
317962ba94a4e642fbc8b11cf78141b1.png    7.41 kB          [emitted]         
                       .htaccess.bin    1.79 kB          [emitted]         
                         favicon.ico    28.7 kB          [emitted]         
                       manifest.json  618 bytes          [emitted]         
                        quilt-og.png    15.8 kB          [emitted]         
90a8829436b1bfac06c56e93ef6e4e9f.png    11.3 kB          [emitted]         
     1.ff9bd9ecd59d653f1cff.chunk.js    96.3 kB       1  [emitted]         
     2.a277cfa5936907b7065d.chunk.js    31.8 kB       2  [emitted]         
     3.3a2316ab7d63a7bcc7d1.chunk.js    20.6 kB       3  [emitted]         
     4.c12deba07d769b6783bc.chunk.js    4.37 kB       4  [emitted]         
     5.75b55f88e1a89faeda86.chunk.js      41 kB       5  [emitted]         
     6.1a35637f1d9c199ce160.chunk.js    4.47 kB       6  [emitted]         
     7.91ae3786c16140407931.chunk.js    2.41 kB       7  [emitted]         
     8.623621b3c1f19ffb8970.chunk.js    24.1 kB       8  [emitted]         
     9.54eee04c9b69011c674a.chunk.js  541 bytes       9  [emitted]         
    10.c6ab9afacbefb34cb5d3.chunk.js    2.47 kB      10  [emitted]         
                          index.html       2 kB          [emitted]         
                           config.js  753 bytes          [emitted]         
                               sw.js  342 bytes          [emitted]         
                     docs/quants.pdf     616 kB          [emitted]  [big]  

ERROR in chunk main [entry]
[name].[chunkhash].js
'import' and 'export' may only appear at the top level (70:6)
|   if (false) {
|     module.hot.accept('./reducers', function () {
|       import('./reducers').then(function (reducerModule) {
|         var createReducers = reducerModule.default;
|         var nextReducers = createReducers(store.asyncReducers);
Child html-webpack-plugin for "index.html":
     1 asset
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! quilt-catalog@0.0.0 build: `cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the quilt-catalog@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/karve/.npm/_logs/2018-02-06T18_32_22_345Z-debug.log
apk-mbp-3:catalog karve$ 

@nl0
Copy link
Member Author

nl0 commented Feb 7, 2018

@akarve fixed and rebased. The bug in webpack's ModuleConcatenationPlugin caused build failure, so I had to work around it.

@akarve
Copy link
Member

akarve commented Feb 9, 2018

  • resolve conflicts with master (note that we've deleted yarn.lock)

Upgrade lots of stuff, most notable changes:

* webpack@3 & webpack-dev-middleware@2

* react@16

* material-ui@0.20

* styled-components@3

* enzyme@3

* `env` babel presets instead of `latest`

Also, all the dependecnies are now stated with the caret (^) syntax.

Changes introduced to make things work with the updated dependencies:

* use `prop-types` packages

* update webpack configs

* backport some changes from react-boilerplate@3.5

* update code according to the new linting rules

* make test stubs pass
@nl0
Copy link
Member Author

nl0 commented Feb 9, 2018

@akarve done

@akarve akarve merged commit 2b58eb2 into quiltdata:master Feb 10, 2018
nl0 added a commit to nl0/quilt that referenced this pull request Feb 13, 2018
* master: (38 commits)
  Implement the "always requires auth" catalog config (quiltdata#365)
  Replace a confusing SQL query with a slightly less confusing one (quiltdata#363)
  Eliminate stray back-tick [ci skip]
  Eliminate redundant `.team` [ci skip]
  Whack backticks [ci skip]
  fix syntax example; refactor headings [ci skip]
  Add alternative terms [ci skip]
  Link to object store docs [ci skip]
  Consolidate and move sections [ci skip]
  Rename section [ci skip]
  Simplify and update links [ci skip]
  Rename section [ci skip]
  Add notes on immutability, tophash, etc. [ci skip]
  Use a small dataset in most of the tests (quiltdata#360)
  Add (No results) to empty search results (quiltdata#359)
  Admin UI endpoint to list users and associated data (quiltdata#354)
  Upgrade the stack (quiltdata#326)
  build.yml globbing (quiltdata#287)
  Pass the DISABLE_SIGNUP env variable to django (quiltdata#356)
  use npm lock files, delete yarn (quiltdata#355)
  ...
@nl0 nl0 deleted the upgrade-stuff branch May 10, 2018 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants