npm/npm — pull request #4760 by ljharb (2014-02-22 21:42:44+00:00)
Title: Less package json changes

Per #3299 and #3180 - this branch uses a module of mine, `json-file-plus`, to handle reading and writing to/from `package.json` files. The benefit of preserving formatting is that there will be fewer `package.json` diffs when using the `--save` option for developers who don't choose to use 2-space indentation. In addition, said developers may have decided they simply can't use `--save` due to this issue - this change will enable them to use it without fear of their style choices being rampantly overrun :-)

In addition, this results in less code in `lib/version`

The downsides are that it's another dependency.

If this is slated to be accepted, I'll happily do more PRs that use the `json-file-plus` module and cover every place package.json is read from and written to throughout `npm`.