Skip to content
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.

build: switch to yarn #58

Merged
merged 1 commit into from
Dec 31, 2018
Merged

build: switch to yarn #58

merged 1 commit into from
Dec 31, 2018

Conversation

chrismwendt
Copy link
Contributor

.travis.yml Outdated
directories:
- ~/.npm
- node_modules
Copy link
Contributor

Choose a reason for hiding this comment

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

Caching node_modules is not safe. node_modules can contain binaries that are downloaded and compiled in postinstall scripts, and these binaries depend on the environment. Caching ~/.cache/~/.npm is the proper way to do it (and if that cache is hydrated, install is nothing but a cp -r)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was following https://blog.travis-ci.com/2016-11-21-travis-ci-now-supports-yarn

I don't see anything related to npm or yarn in my ~/.cache (macOS). Is this different for Travis (probably Linux)?

Feel free to push to this PR with improvements!

Copy link
Contributor

Choose a reason for hiding this comment

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

https://stackoverflow.com/a/42523517/4208018
I've encountered these errors myself before.

I don't see anything related to npm or yarn in my ~/.cache (macOS)

That's probably because the cache dirs are different per OS. On macOS, yarn cache dir prints /Users/felix/Library/Caches/Yarn/v2 for me.

Copy link
Contributor

Choose a reason for hiding this comment

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

ping

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed caching for node_modules

.travis.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@felixfbecker felixfbecker left a comment

Choose a reason for hiding this comment

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

Please .gitignore package-lock.json so it doesn't get committed accidentally

@chrismwendt
Copy link
Contributor Author

.gitignored package-lock.json

@chrismwendt
Copy link
Contributor Author

@felixfbecker Feel free to merge this if it looks good to you.

@codecov
Copy link

codecov bot commented Sep 23, 2018

Codecov Report

Merging #58 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #58   +/-   ##
======================================
  Coverage    83.2%   83.2%           
======================================
  Files          13      13           
  Lines         518     518           
  Branches      119     119           
======================================
  Hits          431     431           
  Misses         87      87

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 c6dc4cb...3cff60c. Read the comment docs.

@sqs
Copy link
Member

sqs commented Dec 31, 2018

Updated it per the comments above

@sqs sqs merged commit 28f0dae into master Dec 31, 2018
@sqs sqs deleted the yarn branch December 31, 2018 04:41
@sourcegraph-bot
Copy link

🎉 This PR is included in version 6.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants