Releases: natesilva/big-config
Releases · natesilva/big-config
Release list
v6.1.0
v6.0.0
v5.4.0
- feat: allow directly specifying the env 5e66940
- You can now specify the
envto use, by passing it as an option to the constructor. This overrides anyNODE_ENVenvironment variable that is set. Previously,NODE_ENVwas the only way to select an env.- example:
const config = new Config({ env: 'your-env' });
- example:
- You can now specify the
- fix: disallow env names that conflict with builtin names f32ac48
- env name
defaultis disallowed because it conflicts with theconfig/defaultdirectory name - env name
localis disallowed ifloadLocalConfigis enabled, because it conflicts with theconfig/localdirectory name
- env name
- fix: properly handle env in the CLI utility 4a4cbb1
- the CLI utility will now actually use the --env option
Other changes:
v5.3.0
v5.2.0
- feat: return the available keys for a config setting 885a2b2
API:
// get all the top-level keys for your config tree
const topKeys = config.keys();
// get the keys for the db section of your config tree
const dbKeys = config.keys('db');Command-line:
# get the keys for the logging section of your config tree, as JSON
npx big-config keys logging --jsonv5.1.0
- feat: ✨ add command-line utility e7239ff
To use the new big-config command line utility, type npx big-config.
There are many ways to use it. Here are some examples:
# show the available options
npx big-config --help
# get a specific config item (example: get development db settings)
npx big-config get db.development
# output JSON (example: get logging settings, print them as JSON)
npx big-config --json get logging
# output YAML (example: get AWS settings, print them as YAML)
npx big-config --yaml get aws
# get the entire config tree for the production environment as JSON — may be large
npx big-config get --env production --json
# show the default environment that will be used by big-config
npx big-config envv5.0.0
- feat: option to control whether local settings are loaded 6f64c4c
- chore: upgrade dependencies 817dad4
local directory will be loaded by default (similar to versions earlier than v4.0.0).
BIG_CONFIG_ENABLE_LOCAL environment variable is no longer supported.
If you depend on BIG_CONFIG_ENABLE_LOCAL, do this for backward compatibility:
const shouldLoadLocalConfig = process.env['BIG_CONFIG_ENABLE_LOCAL'] === 'true';
const config = new Config({ loadLocalConfig: shouldLoadLocalConfig });v4.0.0
- Breaking change: You now must set the environment variable
BIG_CONFIG_ENABLE_LOCAL=trueto use thelocalconfig directory. This change makes it safe to check files fromlocalinto Git. This allows you to set overrides inlocalfor your developers, and those overrides won’t apply on your deployed environments.