-
Notifications
You must be signed in to change notification settings - Fork 8
build: switch to yarn #58
Conversation
.travis.yml
Outdated
directories: | ||
- ~/.npm | ||
- node_modules |
There was a problem hiding this comment.
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
)
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping
There was a problem hiding this comment.
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
There was a problem hiding this 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
|
@felixfbecker Feel free to merge this if it looks good to you. |
Codecov Report
@@ 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.
|
7c0904a
to
fa52a4f
Compare
Updated it per the comments above |
🎉 This PR is included in version 6.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
See https://github.com/sourcegraph/sourcegraph/issues/13181