-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Switching from yarn to npm #2329
Conversation
@julienben Thank you for taking the time to do this. Great work! 👍 A few thoughts/questions: Should Regarding
Should
|
Good catch. The "engines" entry in package.json will take care of warning users on old Node.js versions and we also have version checks before install and before the setup script. IMO, this is more than enough and makes this question irrelevant.
Yup. Changing that.
That too.
Can you expand on what you mean by having audit as part of the commit pipeline? Are there other projects that do this? How does it work? |
(Note that Travis already uses |
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.
Travis handles it nicely, let's keep AppVeyor using npm install
until the LTS npm
version changes to >= 5.7
.
Can you expand on what you mean by having audit as part of the commit pipeline? Are there other projects that do this? How does it work?
Was just a thinking out loud; there aren't a lot of other projects, I've seen/know about, leveraging npm audit
in any automated manner.
LGTM 👍 Great work on this.
with respect to we can add audit in future release @julienben awesome work |
Good to know about npm audit! Let's remember for whenever npm v6.4 ships with node LTS. @jwinn I'll restore appveyor to using npm install in the babel fixes branch. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Following our conversation in #2327, I did some quick benchmarking on yarn vs npm (3 runs each, clean node_modules, with both lock files present). Yarn was faster but only by 10-12 seconds.
IMO, this switch still makes sense. First, for the reasons discussed earlier (audit and ci) but also because it just makes our code and docs more consistent. Some of our commands require
yarn
(mostly installing dependencies) and while everything can be done withyarn
, our docs go back and forth and are overwhelminglynpm
-oriented.I took advantage of this to refactor
setup.js
. We were usingparseFloat
to check node and npm versions. This was inaccurate since our requirement is 8.10 and parseFloat will return 8.1. We're now using a semVer comparison library.