-
Notifications
You must be signed in to change notification settings - Fork 417
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
Yarn or npm for plugin development? #162
Comments
Some scenariosWithout cacheyarnFirst lets remove cache
Result
npmFirst lets remove cache
Result
Conclusionyarn - 21.427s With cache / without node_modulesyarnFirst lets remove node_modules
Result
npmFirst lets remove node_modules
Result
Conclusionyarn - 4.782s With cache and node_modulesyarnCommand
Result
npmCommand
Result
Conclusionyarn - 0.751s Final ConclusionSo it looks like |
|
Despite the speed of yarn, the linked articles show that npm 5 is currently more robust regarding dependency stability and integrity - yarn needs the package.json in combination to the yarn.lock to retrieve the dependencies, which might lead to different versions if the package.json changed independently, whereas package-lock.json contains the integral definition of all dependencies (including transient ones). We could check in a package-lock.json as well as a yarn.lock in parallel (for master I can take care of that after merging PRs that change dependencies and for release preparations), so contributors can use their tool of choice to get the development environment up and running - as long as the package.json is not newer than the yarn.lock file. As soon as yarn supports package.json files, we could even drop the yarn.lock (I do not really get why yarn does not support it already, because the format is the same as the shrinkwrap ;-) ) |
@HyperBrain |
Would imo be feasible (beginning with v3, as soon as master is prepared for that release). From the project history the only point where dependencies change (if at all) are releases or - very rare - if PRs introduce new dependencies. If it would happen frequently I'd go for npm for now to reduce efforts, but as I said I do not think that this is the case. Are there any other opinions on that? |
It's fine for me |
Sorry for being silent for this issue for a long time now. Bringing the repo and project back on track left not really time to care about these more "uncritical" issues 😃 . I think we can bring that up again soon for further discussion (at least the examples now have current yarn.lock files thanks to @franciscocpg ). |
It turned out that having and maintaining both for the main repository adds a lot of overhead. So I'm in favor of keeping npm for the main repo, and yarn locks for the examples. |
Nope |
I'll close this now :) |
This is a request for decision
Description
Currently the (development) infrastructure of the plugin is aimed to use npm as packaging tool
and contains a npm 5 compatible package-lock.json. To have reproducible PR and implementation verifications, only tools that cope with the existing lock files can and should be used.
We should decide if we stick with npm or move to yarn as development package manager. Currently yarn cannot use package-lock files, so the decision would be an "either or", as otherwise (in case we commit both lockfiles) care has to be taken to keep them synchronized - and that each time anyone submits a PR that changes dependencies, as well as when a new version is published (the version number changes).
Here are some interesting links that might be beneficial for the discussion:
Should I commit yarn.lock and package-lock.json files?
Yarn: Idea: support package-lock.json from npm 5
DOES NPM 5 DEPRECATE YARN?
Yarn determinism
Thanks to @franciscocpg for bringing this up 🥇
The text was updated successfully, but these errors were encountered: