Commit Graph

29 Commits (af0e9fb7e7a36d51e6d43764b7954d706eac85cd)

Author SHA1 Message Date
indexzero af0e9fb7e7 [dist fix] Cleanup some whitespace. 2014-11-26 01:31:48 -05:00
Martin Heidegger c8b6c98c7a Adding helpful information in case parsing failed.
I stumbled over 2 slight problems of broken configuration files:

1) It said that a error in my JSON file existed (even though it was a yaml file, parsed by libyaml)
2) It didn't tell me which error occured.

both should be fixed with this PR
2014-03-09 21:40:10 +09:00
midknight41 6c1eb5e917 fixed white spacing and added (embarrassing absent) variable declarations 2013-10-26 20:40:12 +01:00
midknight41 29f1ca281b added support for BOM in load() and loadSync() 2013-10-03 09:17:36 +01:00
Marcin Floryan 0135d95a06 Additional error information when JSON config file cannot be read 2013-04-29 16:34:48 +01:00
Christian Tellnes 83440f9956 fix spelling in error message 2012-05-24 07:27:19 +02:00
Maciej Małecki 87b0dd01c9 [minor] Use `fs.exists` when available
`path.exists*` was moved to `fs` module in
joyent/node@e10ed097cb.
2012-05-15 11:02:46 +02:00
Pavan Kumar Sunkara 29eb5f905d [minor] Fix whitespaces 2012-04-15 00:58:55 +05:30
Jordan Harband 6ce0b7aef3 Surfacing additional JSON.stringify arguments in formats.json.stringify, and adding the json_spacing option to the File constructor. 2012-04-13 13:22:42 -07:00
Maciej Małecki b3699314cf [minor] Use `fs.existsSync` when available
`path.exists*` was moved to `fs` module in
joyent/node@e10ed097cb.
2012-03-29 13:13:16 +02:00
Maciej Małecki 963387cfd4 [api] `File.saveSync()` should return store content
Fixes #27.
2011-12-25 15:30:48 +01:00
indexzero 6c720ee109 [dist] Update Copyright and Author to Nodejitsu Inc. 2011-11-24 00:33:08 -05:00
indexzero bbcb2712f1 [api fix] Dont eagerly create config files in `.load()` and `.loadSync()` 2011-11-24 00:30:11 -05:00
indexzero 2e33082f0b [api] Automatically search for a file if `options.search` is true in File store 2011-10-22 02:36:45 -04:00
indexzero 1ef5797e83 [api test] Finished API and tests for hierarchical configuration storage. 2011-09-18 21:37:01 -04:00
indexzero fb392ddc51 [api test] Updated test/provider-test.js and associated merge implementation 2011-08-28 08:50:26 -04:00
indexzero a6533aa7bf [dist api test] Finished integrating features from reconf and updating associated tests 2011-08-23 06:38:51 -04:00
indexzero add8922c04 [api dist] Begin to integrate features from reconf 2011-08-22 20:17:28 -04:00
indexzero d8b5a80280 [minor] Small style updates to the File store 2011-06-24 03:31:26 -04:00
Marak Squires c43685160d [refactor]: Cleaned up error handling on File.loadSync and File.load
[refactor]: Using path module to determine if file exists instead of throwing error
[api]: File.load and File.loadSync will now automatically create the requested JSON file path if no file is found.
2011-06-23 18:06:26 -07:00
Dominic Tarr 6c6887a850 move callback outside of try / catch
it's dangerous to callback inside try, because you may catch unexpected throws in callback.
2011-06-12 15:45:02 -07:00
indexzero 76db254740 [fix test] Update nconf.stores.File to respond with an error when loading malformed JSON async 2011-06-08 00:06:58 -04:00
avian e7c216e970 [minor] Clarified error message returned when a config file contains invalid JSON. 2011-05-20 01:16:22 -07:00
indexzero d65922dc7a [api] Add `.saveSync()` and `.loadSync()` methods to File store 2011-04-20 01:57:56 -04:00
indexzero 067d58a99d [minor test] Add tests for File store `save()`. Improve default file format to pretty print the JSON output 2011-04-19 17:32:13 -04:00
indexzero 752bb980ac [api] Improve the `.use()` method. Use the memory engine by default 2011-04-02 19:17:04 -04:00
indexzero 09b8c75383 [api test doc] Internal fixes from testing. More tests and docs 2011-04-02 04:31:20 -04:00
indexzero 73bf78339f [api doc test] Finalize API. Add more test coverage 2011-04-02 03:03:16 -04:00
indexzero 67b5c8ab2a [api test] First pass at implementation 2011-03-31 02:32:47 -04:00