Commit graph

330 commits

Author SHA1 Message Date
Adrien Becchis
467ab753c8 Regex as env separator (#288)
* use regexp as env separator (support shorthand specification)

* add test to cover the env separator
2017-11-04 21:30:56 -04:00
Adrien Becchis
e5db2ef6d7 Argv store separator (#291)
* argv store now accept a separator argument to create nested values

* remove stub file that shouldnt have been commited

* write a test to ensure separator is working well and use delete rather than undefined assign
2017-11-04 21:30:14 -04:00
Ahmed Ayoub
3607767f90 fixes #258 chainable .required() (#259)
* fixes #258 chainable .required()

* fixes #258 use var instead of let for travis builds
2017-11-04 00:34:27 -04:00
Matt Hamann
bac910a6df 0.9.1 2017-11-03 23:52:19 -04:00
Adrien Becchis
2bdf7e1a32 Clean Argv Store options (#290)
* unset parse/transform from options and ensure they are not yargs options

* use delete rather than undefined assignement
2017-11-03 23:41:23 -04:00
Adrien Becchis
b9321b200a transformer can now return an undefined key (#289) 2017-11-03 23:22:13 -04:00
Matt Hamann
81ce0be01e Update changelog 2017-10-31 20:20:27 -04:00
Augusto Franzoia
b1ee63cfa4 fix error in transform function when dealing with dropped entries (#287) 2017-10-31 17:12:31 -04:00
Matt Hamann
9f70ba148f [doc] Update changelog 2017-10-30 11:27:11 -04:00
Matt Hamann
8afcf991eb [dist] Version bump. 0.9.0 2017-10-30 10:26:30 -04: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
Matt Hamann
52e0a3566e Update changelog 2017-10-28 21:16:03 -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
Nicolas Deveaud
3e26bb2756 Add posibility to pass a yargs instance to argv() method 2017-10-28 17:13:38 -04:00
Matt Hamann
856fdf8dff First pass at transform functions (#279) 2017-10-25 22:57:58 -04:00
Matt Hamann
b9c345bf96 Fix parseValues option name 2017-10-21 21:58:30 -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
Brian Harrington
bfb0220fe1 Remove unused module (#277)
crypto is no longer used in file.js
2017-10-21 15:47:41 -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
Matt Hamann
b8402d4eab Enable support for parsing JSON environment variables (#272)
* Add support for applying JSON string

* only take JSON Object or JSON Array into consideration

* Add tests and make JSON-parsing opt-in
2017-09-27 16:32:26 -04:00
Matt Hamann
f46c449a9e 0.8.5 2017-08-15 23:59:31 -04:00
Matt Hamann
552300a687 [doc] Document lowerCase option in .env(options) (#268)
- Add missing documentation about the lowerCase option
2017-08-15 23:58:13 -04:00
evoye
5e8a34d6cf enable use with webpack by removing unnecessary fs call (#252) 2017-08-15 23:39:34 -04:00
Chris Manson
608b607782 Add test for merging with defaults (#255)
* implementing a test for merging with defaults

* bypassing strange common tests

* trying to fix travis build in node 7

* adding node 8 to tests

* removing node 8
2017-08-15 23:37:19 -04:00
Charlie Robbins
0c5774fec7 Merge pull request #211 from vanjan/fix-env-ignore-case
Copy `process.env` before lower-casing the keys
2016-08-25 12:48:47 -04:00
Charlie Robbins
011be49a5c Merge pull request #222 from katacarbix/patch-1
Fixed some issues with code escaping in README.md
2016-06-15 05:52:32 -04:00
Charter Jacobson
d70b6a0335 Fixed some issues with code escaping 2016-05-14 14:55:23 -05:00
Jan Klosinski
392c6022c9 Copy process.env before lower-casing the keys
`process.env` is read-only in GitBash (and potentially other consoles),
so the `lowerCase` flag had no effect.
2016-03-01 17:08:35 +00:00
Jarrett Cruger
3d4e589578 [dist] Version bump. 0.8.4 2016-02-03 00:39:12 -08:00
Charlie Robbins
b065c4ccd9 Merge pull request #209 from indexzero/better-DX
[fix] handle buffers
2016-02-02 21:46:14 -08:00
Jarrett Cruger
4431c33162 [fix] handle buffers so we dont get ambiguous errors when we dont strictly read the file as utf8 2016-02-02 16:38:48 -08:00
Jarrett Cruger
54cab2059a [dist] Version bump. 0.8.3 2016-02-01 22:26:12 -08:00
Charlie Robbins
f554382435 Merge pull request #208 from indexzero/clean-secure
[fix] cleanup secure with new module
2016-02-02 01:24:49 -05:00
Jarrett Cruger
b447268097 [fix] cleanup secure with new module 2016-02-01 22:21:15 -08:00
Jarrett Cruger
3d4682a62f Merge pull request #207 from moberemk/patch-1
Update README.md
2016-01-27 12:32:26 -05:00
Mark Oberemk
de551d42ec Update README.md
Add basic documentation explaining the `nconf.required` method
2016-01-27 12:29:26 -05:00
Charlie Robbins
4a59c9b577 Merge pull request #191 from wturyn/feature-mandatory-keys
Feature: mandatory keys - required() method
2016-01-27 09:20:20 -08:00
Charlie Robbins
e58d55429d Merge pull request #195 from AdrieanKhisbe/features/improved-ci
Improved CI
2015-12-22 14:21:07 -05:00
AdrieanKhisbe
c242f777a6 [travis test] setup coveralls config + update README badges 2015-12-03 08:18:44 +01:00
AdrieanKhisbe
c8dbede0ca [test] setup istanbul coverage 2015-12-03 08:03:12 +01:00
AdrieanKhisbe
bdecdc29cf [travis] add v5 to node version tested 2015-12-03 07:48:52 +01:00
Wojtek Turyn
5d6e236b73 fixed 2015-10-15 10:44:26 +02:00
Wojtek Turyn
37a84ae8df required() method 2015-10-15 10:16:33 +02:00
indexzero
ddee9bc8f5 [dist] Version bump. 0.8.2 2015-10-07 15:32:55 -04:00
indexzero
86bfd7c5bc [fix] Do not trim \n from files read in. 2015-10-07 15:31:53 -04:00
indexzero
ff0f174520 [dist] Version bump. 0.8.1 2015-10-02 01:01:20 -07:00
indexzero
11b2448471 [fix] Correct property path. Trim read secret keys from disk. 2015-10-02 01:00:55 -07:00
indexzero
438a2c8ef5 [doc] Remove node@0.8.0 from travis. Drop nodeci because it is 503 atm`. 2015-09-21 17:11:52 -07:00