Closed wiese closed 3 years ago
When installing @npmcli/arborist (on npm 6.14.8) this bumped the package-lock.json
to "lockfileVersion": 2
- I can try to undo this if that's an issue, but maybe let's first discuss if the core idea behind this PR is an option for you to begin with.
related to #15
Finally found some time to take a look. Looks good to me. :+1: Thx a lot for your contribution
Minimize the diffs when saving package.json by leveraging the original npm method. It determines the pre-existing indentation and newline style used in the file and re-applies it to the updated content (with limitations, cf. 1).
An alternative would have been to look for solutions which operate comparable to the manipulation of binary files, exchanging only the differing bits, but this seems much more involved (i.e. risky) and possibly in vain if npm would - sooner or later - overwrite them anyway.
Resolves #15