jprichardson / node-jsonfile

Easily read/write JSON files.
MIT License
1.2k stars 321 forks source link

Breaking change to fs-extra #26

Closed raymondfeng closed 9 years ago

raymondfeng commented 9 years ago

The commit https://github.com/jprichardson/node-jsonfile/commit/3ce00a504b11ee93af765916db8c75e88006a088 breaks https://github.com/jprichardson/node-fs-extra/blob/master/lib/index.js as this.spaces now refers to fs.spaces which is always undefined.

jprichardson commented 9 years ago

Ooops! Sorry, fixing...

jprichardson commented 9 years ago

Sorry about that. Published and fixed in 0.20.1.

jprichardson commented 9 years ago

Gah, I made the fix in fs-extra... :(

jprichardson commented 9 years ago

I'm not sure if there's anything to fix here.... If you feel differently, please reopen, but the fix exists in fs-extra@0.20.1.

jprichardson commented 9 years ago

As of jsonfile@2.2.0, you can no explicitly set spaces in the methods writeFile() or writeFileSync(). Just pass in locally {spaces: 2}. All you'd need to do is reinstall your current version of fs-extra that supports ^jsonfile@2.0.0.