ChessCom / browser-extension

Customize your Chess.com experience
Other
48 stars 15 forks source link

Remove any dynamism in package.json by switching to Yarn #64

Closed martynchamberlin closed 7 years ago

martynchamberlin commented 7 years ago

This is to accommodate FireFox. The build process and resulting minified files should be consistently similar across environments in order to meet FireFox's approval.

Going forward, any needed updates to these packages should be handled manually.

The initial solution was to simply remove the caret from our package.json but this resulted in incompatibilities, as we saw on CircleCI:

npm ERR! peerinvalid The package react@15.0.2 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer react-color@2.2.0 wants react@^0.14.0 || ^15.0.0
npm ERR! peerinvalid Peer react-dock@0.2.3 wants react@>=0.13.0
npm ERR! peerinvalid Peer react-dom@15.0.2 wants react@^15.0.2
npm ERR! peerinvalid Peer reactcss@1.0.6 wants react@^0.14.8 || ^15.1.0
npm ERR! peerinvalid Peer react-addons-test-utils@15.0.2 wants react@^15.0.2
npm ERR! peerinvalid Peer babel-preset-react-hmre@1.0.0 wants react@^0.14.1

Rather than wading through what combination we needed, since the current versions that we have installed are working, it made the most sense to go with them and just tie them down via Shrinkwrap. Except that Shrinkwrap doesn't support a modern version of node:

A consistent shrinkwrap tool Note: npm >= 3 is currently not supported.

It's not fair to expect everyone to downgrade their local version of NPM just because it's not supported. My current version is 4.0.5.

The only real choice at this point was to move to Yarn. CircleCI, the tool we use for continuous development, has great support for Yarn, so this works out great.