Releases: krakenjs/confit
Releases · krakenjs/confit
v3.0.0
v2.3.0
2.2.1
- FIX:
load-jsonic-sync
doesn't account for files specified without their file extension. The original intent was that people could use "require-like" syntax, which implies no file extension. The unit tests didn't cover that use case so this wasn't caught.
2.2.0
- add feature for ignoring environment variables
- Use load-jsonic-sync to load json with comments and report position and filename in error messages
support for an array of handlers
New feature: support an array of handlers. See
Fixes
environment property env
makes config.get('env:env')
undefined
fix test idempotency
Resolving import on load of config.json and env.json. Babel cleanup
v2.0.0
Breaking Changes
-
The
import
shortstop handler is now resolved after the merging ofconfig.json
,[env].json
, and before the other shortstop handlers are resolved.
previously:import
handler resolved only once, before the rest of the shortstop handlers.
implementation 1, implementation 2, Issue, Pull RequestNew Behavior:
{ "main": "import:main.json" } // config/config.json { "key": "value", "otherKey": "otherValue" } // config/main.json { "main": { "key": "devValue" } } // config/dev.json { "main": { "key": "devValue", "otherKey": "otherValue" } } // result
-
Source priority, from highest to lowest (higher overrides lower), is now: command line arguments, environment variables,
[env].json
,config.json
, convenience (environment normalization andenv:*
keys).
previously: source priority order, from highest to lowest, was[env].json
,config.json
, convenience, environment variables, command line arguments.
Implementation, Pull RequestNew Behavior:
// config/config.json { "KEY": "fromConfig", "OTHER_KEY": "fromConfig", "THIRD_KEY": "fromConfig" }
OTHER_KEY=fromEnv THIRD_KEY=fromEnv node myApp.js --THIRD_KEY=fromArgv
// result { "KEY": "fromConfig", "OTHER_KEY": "fromEnv", "THIRD_KEY": "fromArgv" }