3 ms·
I may be missing something, but it sounds like the only benefit to Yarn is that the lock file is less noisy, while NPM has better guarantees. Who wants to deal
by jazoom 9y ago
I may be missing something, but it sounds like the only benefit to Yarn is that the lock file is less noisy, while NPM has better guarantees.
Who wants to deal with keeping absolutely every developer and every build/production system on exactly the same version of Yarn?
- horsawlarway 9y agoI mostly agree with you, but two points: 1. The amount of noise in the lock file likely does matter for teams of any modest size 2. Yarn doesn't guarantee determinism for hoisting between different versions, but... in reality there's no reason to expect different behavior simply because there's a version difference. The second point is pretty key, because it means yarn can deal with the issue through fairly standard means (like versioning, documentation, warnings, etc). Plus, most orgs already handle versioning and compatibility between tools in some form or other. Finally, NPM 5 doesn't actually guarantee hoisting is deterministic between versions, they just have enough information that they COULD guarantee it. For all we know, NPM 6 will change the format of the file entirely... or perform new hoisting optimizations based on the lockfile that are incompatible with the logic in 5.