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

Feature/node upgrade #181

Merged
merged 5 commits into from
Feb 7, 2018
Merged

Feature/node upgrade #181

merged 5 commits into from
Feb 7, 2018

Conversation

garyluu
Copy link
Contributor

@garyluu garyluu commented Jan 25, 2018

Originally trying to fix the npm econreset and cypress install issue on Travis. Ended up:

  • Upgrading to the current node js LTS (v8.9.4) which updated npm to 5.6.0 to hopefully fix the npm econreset
  • Upgrade Cypress to the latest 1.4.1 because I encounter difficulties installing otherwise
  • Downgrade flexbox 2.0.0-beta.12 to 2.0.0-beta.9 because everything higher is supposed to require angular 5 (which I don't want go down that rabbit hole at this time)
  • removed npm-shrinkwrap in favor of package-lock.json because it's the general recommended one. It also auto updates upon new npm package installs. https://www.reddit.com/r/javascript/comments/6dgnnq/npm_v500_released_save_by_default_lockfile_better/di3mjuk/ The dev deps are also in the lock file which is why it's larger than the old one. Install the different type of deps with npm i --prod, npm i --dev, and npm i. The lock file's packages will be used for whichever one is about to be installed.

Notes

  • Can't solve angular-tag-cloud-module 1.4.0 requiring an old angular version because the next angular-tag-cloud-module is 2.0.0 which jumps straight to requiring angular 5.
  • why is package-lock being ignored? npm/npm#17979 (comment) shows how the new shrinkwrap works. In short, when prod or other devs checkout the branch where package.json and package-lock.json are "compatible", npm i will install the exact version of the packages listed in the lock file. If they are not compatible, npm will install what's listed in the package.json and then update the lock file.
  • I had to run npm dedupe to modify the lock file again otherwise a bunch of deps of deps will conflict with each other
  • npm install --prod and npm install yields a slightly different package-lock.json due to angular/cli not liking being placed in deps instead of devDeps. Using the package-lock.json from npm install --prod instead. Can't move cli to devDeps because we need ng commands during production. Can't install it outside of npm install --prod because it would still require an angular-cli in the package.json to link to things like the compiler-cli etc.

@denis-yuen
Copy link
Member

flexbox 2.0.0-beta.12 to 2.0.0-beta.9 because everything higher is supposed to require angular 5
How is this working now since we're not actually using angular 5 but we're already using flexbox 2.0.0-beta.12?

@garyluu
Copy link
Contributor Author

garyluu commented Jan 25, 2018

I think the angular 5 requirement is something the flexbox developer manually set the requirement as (in his package.json probably). The flexbox developer probably tested it with Angular 5, but still retains backwards compatibility with Angular 4. It's likely there's 0 breaking changes between Angular 4 and 5 for using flexbox.

@denis-yuen
Copy link
Member

ok, might as well keep the newer version then

@garyluu garyluu force-pushed the feature/nodeUpgrade branch from 4ed0f71 to f685252 Compare January 25, 2018 21:23
@garyluu
Copy link
Contributor Author

garyluu commented Jan 25, 2018

Ok this is interesting. apparently the shrinkwrap from before locked it down to beta 9 which completely disregarded beta 12 in the package.json which is why it works. My recent upgrade to 12 actually does not work

@codecov-io
Copy link

codecov-io commented Jan 25, 2018

Codecov Report

❗ No coverage uploaded for pull request base (develop@24d4dd6). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop     #181   +/-   ##
==========================================
  Coverage           ?   63.16%           
==========================================
  Files              ?       95           
  Lines              ?     2802           
  Branches           ?      365           
==========================================
  Hits               ?     1770           
  Misses             ?      839           
  Partials           ?      193

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24d4dd6...5360e4a. Read the comment docs.

@garyluu garyluu force-pushed the feature/nodeUpgrade branch from 52bf950 to f685252 Compare January 26, 2018 14:23
@denis-yuen
Copy link
Member

@garyluu could you comment on the status of this? thanks

@garyluu
Copy link
Contributor Author

garyluu commented Jan 30, 2018

Good to re-review

denis-yuen
denis-yuen previously approved these changes Jan 31, 2018
@denis-yuen denis-yuen dismissed their stale review January 31, 2018 16:50

Small change requested

@denis-yuen
Copy link
Member

As discussed, let's get a check into the travis-ci production checks.
Make sure to run
git diff checking for an exit code to see whether package-lock and package.json are consistent

denis-yuen
denis-yuen previously approved these changes Jan 31, 2018
@denis-yuen denis-yuen dismissed their stale review January 31, 2018 17:19

Build failure

@garyluu garyluu force-pushed the feature/nodeUpgrade branch from 6a633da to b70db38 Compare January 31, 2018 18:01
@garyluu garyluu force-pushed the feature/nodeUpgrade branch 6 times, most recently from 2278030 to cf236cd Compare January 31, 2018 21:36
@denis-yuen
Copy link
Member

As discussed, we'll discuss this as a group at the demo and hopefully decide between yarn and npm5

@denis-yuen
Copy link
Member

As discussed, we'll move ahead with NPM5

@garyluu garyluu merged commit 98c473f into develop Feb 7, 2018
garyluu added a commit that referenced this pull request Feb 13, 2018
* Update node and cypress

* Moved fixed versions to package-lock.json, no need in package.json

* Check if package-lock.json has changed

* Don't dedupe, run package-lock.json against all deps
@denis-yuen denis-yuen deleted the feature/nodeUpgrade branch March 12, 2018 14:46
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.

3 participants