Commit Graph

355 Commits (1104c0d3ad13c5bddada9055ba7456640ac5280d)

Author SHA1 Message Date
Jonatan Nilsson 1104c0d3ad Migrating a bunch of tests to ecmamodule 2021-06-07 08:58:26 +00:00
Jonatan Nilsson 44a22ce6dd Move async to main dependancy 2020-06-02 10:36:58 +00:00
Jonatan Nilsson b824493aa6 Updated version to 1.0.0, updated changelog 2020-06-02 10:23:51 +00:00
Jonatan Nilsson 2f66137a81 Update package and readme 2020-06-02 10:21:30 +00:00
Jonatan Nilsson c8a8d29d63 Add package-lock to ignore 2020-06-02 10:15:21 +00:00
Jonatan Nilsson 455103a330 Remove argv and its huge yargs dependancy 2020-06-02 10:15:06 +00:00
renovate[bot] aad2c1e449 [dist] Update dependency yargs to v14 (#334) 2019-11-14 14:56:06 -05:00
renovate[bot] ee8e89c1b0 [dist] Update dependency eslint to v6 (#330) 2019-06-23 21:33:55 -04:00
renovate[bot] 0ee6938568 [dist] Update dependency yargs to v13 (#321) 2019-06-14 22:33:09 -04:00
Eric Bickle 7d625086ca Fix saveToFile tests on Windows. indexzero#325 (#329) 2019-06-14 22:11:34 -04:00
Eric Bickle 85edc9afad [fix] Jest as devDependency indexzero/nconf#327 (#328) 2019-06-14 22:03:35 -04:00
Indospace.io 20e00efd6c Change require fs (#313)
what is there now is bad, everyone will think they need the fs library, when they only need it for the last example.
2019-05-16 17:05:20 -04:00
renovate[bot] e6f27f5d2c [dist] Update dependency jest to v24 (#320) 2019-05-16 17:03:06 -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
renovate[bot] 10318c0098 Configure Renovate (#319)
* Add renovate.json

* [dist] Update renovate.json
2019-05-14 14:09:08 -04:00
indexzero 48c92ce989 [dist tiny] Remove unused CircleCI configs. 2019-05-13 23:23:50 -04:00
indexzero 52afef5218 [tiny dist] Regenerate package-lock.json file. 2019-05-13 23:14:22 -04:00
Charlie Robbins 75641ffaee
[dist] Drop unsupported versions of Node. No automated publishing just yet. (#318) 2019-05-13 23:10:23 -04:00
Matt Hamann 1bb9d091f1 Switch to circleci (#317) 2019-05-13 22:56:47 -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
Matt Hamann 17376d4d17
Update packages to resolve security vulnerabilities (#306) 2018-09-27 13:03:17 -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
Austin Burdine 6c5ba64db6 whitelist npm published files (#236)
- reduces files published to npm and downloaded with every install
2017-11-11 10:48:49 -05:00
Adrien Becchis c1e15681db Upgrading dependencies (#280)
* upgrade yargs and async dependencies.

were breaking change, but no impact according the tests

* upgrade yargs and package-lock.json

* add node 8 to the tested versions

* add node 8 to the allowed failures as requested

* add node 9 to travis build as acceptable failure and remove node 7
2017-11-06 11:15:12 -05:00
bryce-gibson b6699aba2d Don't do array lookups on strings. (#188)
`hasOwnProperty(number)` can return true for strings.

This is unlikely to be the desired usage, and can mean that odd
responses are returned by nconf.

Disable trying to check `hasOwnProperty` of strings.
2017-11-04 21:39:00 -04:00
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