I personally prefer using tabs for indentation, since it seems more rational to me. I also use them in my package.jsons.
When I apm publish:
apm changes the indentation of my package.jsonThis means that every version apm publishes has a diff of +-30 lines, which is quite annoying in version control.
I know this issue is old, but by the looks of it, I think your package.json file is modified here: https://github.com/atom/apm/blob/master/src/publish.coffee#L236
It stringifies the object into a JSON with 2 spaces. npm also follows this convention where it formats the package.json with 2 spaces.
Unfortunately, I have a feeling apm might want to stick to the same convention as npm. Even on the npm repo, they refused to respect package.json formatting: https://github.com/npm/npm/issues/4718
Sure, I do get that. NPM however doesn't force me to let it touch my files at all. I manually update the version number and everything is fine. APM however forces me to let it reformat my package.json and then automatically commits to git, preventing me from fixing it before pushing to the repo, causing a mess in that file's history.
Also they could make this better by adding an indentation key which stores the users preferences or command line flags. Both wouldn't "break compatibility" with NPM's way of doing this.
For this reason I do a manual version update, tag it and then publish with apm publish --tag v1.2.3.
+1 to everything that's been said here. That forced change of indentation is precisely the reason I do as @jerone does and tag/publish manually.
Most helpful comment
Sure, I do get that. NPM however doesn't force me to let it touch my files at all. I manually update the version number and everything is fine. APM however forces me to let it reformat my package.json and then automatically commits to git, preventing me from fixing it before pushing to the repo, causing a mess in that file's history.