-
Notifications
You must be signed in to change notification settings - Fork 403
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
Development: Use yarn instead of npm #433
Comments
Please don't, many people are migrating from Yarn back to npm now it has caught up. Yarn is not really appropriate for OSS since most people don't have it installed and it is not part of a standard Node.js environment. Besides, best practice is to |
Thanks for your answer! That's quite a big thread and with some different opinions. At what point was decided in this project to include package-lock.json? I'm still confused about the role that file is playing, so I might take some time next days to read that thread and come back with an informed opinion. |
@jaydenseric, could you expound on "a lockfile in development gives a false sense of stability."? How do we lock dependencies of this library so that users don't get minor version upgrades of our dependencies that may not be compatible? Use |
npm hard blacklists lockfiles from being published. If you have a lockfile in this repo, the only time it will be used is by yourself and other contributors when they clone the repo and npm install for local development of the package. The lockfile captures dependencies at a moment in time, and after a few days a fresh lockfile can have a large diff. You end up developing your package against what npm looked like days, weeks or even months ago, vs the npm your consumers install with now. Your tests may pass locally but your consumers might experience something totally broken. If CI uses the lockfile then the situation is even worse.
The only way is to pin the dependencies to exact versions (no The problem of patch versions creating issues is minor, but real. The most efficient solution is for consumers to update all their dependencies, test their project works ok then create a lockfile until the next time their are ready to update and test. |
Makes sense. Thanks for the explanation! |
I’ll delete the lock file and contributors can use whatever package manager suits them. |
Hey everybody,
I was beginning to work on a contribution and since there's a
package-lock.json
file I assumed the library is usingnpm
as a package manager, but after runningnpm install
I realized thepackage-lock.json
file gets regenerated, I was like: what? isn't the point of the lockfile to lock dependencies? what aboutshrinkwrap
? I'm confused now.So it seems like npm has not settled down what it really means to have this file, so I'm proposing to move from npm and use yarn as the package manager, this way dependencies are the same across contributor.
However, I guess I'm not understanding something right about npm, so if you have any ideas about what's going on please share on comments, maybe change the package manager is not necessary and I'm just wrong about it.
The text was updated successfully, but these errors were encountered: