Commit Graph

42 Commits (master)

Author SHA1 Message Date
Jonatan Nilsson 2ee285e1c4 argv: Add support for boolean flags when equal sign is used 2021-10-14 09:52:56 +00:00
Jonatan Nilsson 1014cdec86 Finished completely rewriting both library and unit tests 2021-06-22 19:25:00 +00:00
Jonatan Nilsson 455103a330 Remove argv and its huge yargs dependancy 2020-06-02 10:15:06 +00:00
Eric Bickle 7d625086ca Fix saveToFile tests on Windows. indexzero#325 (#329) 2019-06-14 22:11:34 -04:00
Matt Hamann d582066743
Upgraded encryption using CipherIV (#322)
* Remove package-lock.json from gitignore

* Update dependencies and fix repo url

* Fix test

* Update to cipheriv

* Bump version

* Sync package-lock

* Revert extraneous package changes

* Revert minor doc change
2019-05-15 23:27:38 -04:00
Adrien Becchis b8686aeff0 Migrating test to jest (#292)
* set up jest dependencies

* add parser option to eslint to support es6

* migrate first test to jest

* migrate the argv test to shpec

* convert the env and literal store tests

* convert the file-store tests

* convert the memory-store tests

* convert the hierarchy tests

* convert the provider-save test

* convert the complete test

* convert the provider test

* convert the conf test

* tweak a test that was no longer working (context changed)

* replace in place the helpers file

* remove vows dependency

* update the test invocation to rely on jest

* update the argv test to be able to use the jest --verbose option

* Some tweaks to the test to have them working

* Update node version tested (+10 +12 -9)

* Replace const by var until we drop 0.10/0.12/4 node

* Replace let by var until we drop 0.10/0.12/4 node
2019-04-29 22:26:02 -04:00
louis-murray 391665cc38 Enable writes env and argv stores with a flag (#285)
* added fucntionality to toggle readonly for env store

* fixed issue with using lint

* updated readme to reflect env options change

* updated tests to better test readOnly property

* added fucntionality to toggle readonly for env store

* fixed issue with using lint

* updated readme to reflect env options change

* updated tests to better test readOnly property

* updated tests to fix issues.

* updated argv to have readOnly toggle-able

* added tests for argv toggle-able readonly
2017-11-12 23:11:01 -05:00
Adrien Becchis b41c505c6e Save conf to dedicated file (#283)
* Added support for saving configuration to a specific file

Added support for saving configuration to a specific file

* add test to cover the save to file feature

* add posibility to specify a format to save to file

* add a test with nconf-yaml to ensure specifying a format works
2017-10-30 10:01:55 -04:00
AdrieanKhisbe fa215a44f1 add tests for the normal configuration of yargs via argv 2017-10-28 17:13:38 -04:00
AdrieanKhisbe 802a8d623f test for yargs custom instance (more flexible check isYargs) 2017-10-28 17:13:38 -04:00
Matt Hamann 35088a3313 Added nconf.any method (#278)
* Added nconf.any method

Fixes #126
Implemented on the Provider class
Takes an array of keys, or a variable argument list
Supports both callback and non-callback invocations

* Use an explicit search base in file store test

Fixes #224
Test file was created under process.env.HOME, but test was searching in
the current working directory. If the cwd was not on the same drive as
the home directory, the test would fail.

* Added some API documentation to README for 'any'

* Tweak `.any` documentation
2017-10-21 16:42:24 -04:00
Matt Hamann ca10d0eaf8 Add basic linting rules 2017-10-21 16:01:06 -04:00
Matt Hamann 532ac9cc57 Support parsing simple values from env/argv strings (#273)
* simple parse, indexzero/nconf#72

* documentation for tryParse option

* Combine JSON parsing and simple parsing
2017-10-21 15:39:16 -04:00
indexzero 0358545ae5 [test api] Make the format capable of sub-objects. 2015-09-20 00:26:34 -07:00
indexzero 04c0f3a001 [api test] Encrypt individual keys instead of entire stringified contents. Added basic unit tests. 2015-09-19 00:12:50 -07:00
indexzero af0e9fb7e7 [dist fix] Cleanup some whitespace. 2014-11-26 01:31:48 -05:00
Charlie Robbins c6d8f5d140 Merge pull request #79 from jfromaniello/master
Use optionally a different separator for memorystore
2014-11-26 01:04:35 -05:00
midknight41 6c1eb5e917 fixed white spacing and added (embarrassing absent) variable declarations 2013-10-26 20:40:12 +01:00
midknight41 6641ed234a made bom tests more meaningful 2013-10-03 15:58:13 +01:00
midknight41 2ce8aea8fc made bom tests more meaningful 2013-10-03 15:53:02 +01:00
midknight41 29f1ca281b added support for BOM in load() and loadSync() 2013-10-03 09:17:36 +01:00
Marcin Floryan ada15db9e3 Test that invalid file name is indicated 2013-04-29 21:36:26 +01:00
José F. Romaniello 039057c730 allow different separator for memorystore 2013-04-05 15:07:33 -03:00
Michael Hart bb57c497d3 Prefer this fix for #65 to 6045618 2012-12-20 18:12:42 -05:00
indexzero 0d795ecf81 [test] Better tests to show #65 2012-12-20 14:08:36 -05:00
indexzero f19f0b6c39 [test] Added failing test to illustrate #65 2012-12-20 14:01:04 -05:00
Michael Hart 3c08fad1c9 Changed to as it's more accurate 2012-06-21 18:04:37 +10:00
Michael Hart 8921d0502e Added support for nested configs via env 2012-06-21 16:46:10 +10:00
Maciej Małecki e0e070ab28 [test] Test if `File.saveSync()` returns store content
Tests #27.
2011-12-25 15:38:39 +01:00
Maciej Małecki d5ce1ed68f [test] Test `saveSync()` method of file store 2011-12-25 15:26:04 +01:00
indexzero 6c720ee109 [dist] Update Copyright and Author to Nodejitsu Inc. 2011-11-24 00:33:08 -05:00
indexzero 90b029782e [test] Update tests to use optional options API 2011-11-24 00:30:31 -05:00
indexzero a9c354032b [fix test] Fix overwritten tests in file-store-test.js 2011-11-24 00:30:19 -05:00
indexzero f4f1fdf464 [fix test] Update to respected `.sources` option correctly 2011-11-24 00:30:14 -05:00
indexzero 16a18bffe6 [refactor] Expose all store prototypes on `nconf.*`. Expose store instances on Provider.stores and Provider.sources 2011-11-24 00:29:43 -05:00
indexzero c3c315d648 [refactor] Refactor to make using nconf more fluent. 2011-11-24 00:29:15 -05:00
indexzero 1ef5797e83 [api test] Finished API and tests for hierarchical configuration storage. 2011-09-18 21:37:01 -04:00
indexzero a0638805ce [doc] Updated usage.js and README.md for the next hierarchical syntax. 2011-09-18 21:34:45 -04:00
indexzero 73bf78339f [api doc test] Finalize API. Add more test coverage 2011-04-02 03:03:16 -04:00
indexzero 772de110bb [test] More tests for nested object literals 2011-03-31 04:12:43 -04:00
indexzero 4c8e7a5b7f [api] More work on Redis store 2011-03-31 04:11:11 -04:00
indexzero 67b5c8ab2a [api test] First pass at implementation 2011-03-31 02:32:47 -04:00