Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wild-config

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wild-config - npm Package Compare versions

Comparing version 1.3.6 to 1.4.0

.prettierrc.js

3

index.js

@@ -24,3 +24,3 @@ /* eslint no-console: 0, global-require: 0 */

const argv = require('minimist')(process.argv.slice(2));
const configPath = argv.config || argv.c || false;
const configPath = process.env.NODE_CONFIG_PATH || argv.config || false;

@@ -203,3 +203,2 @@ events.setMaxListeners(0);

delete argv.config;
delete argv.c;

@@ -206,0 +205,0 @@ let walkConfig = (cParent, eParent) => {

{
"name": "wild-config",
"version": "1.3.6",
"version": "1.4.0",
"description": "Configuration management module",

@@ -13,3 +13,5 @@ "main": "index.js",

},
"keywords": ["config"],
"keywords": [
"config"
],
"author": "Andris Reinman",

@@ -22,13 +24,14 @@ "license": "MIT",

"dependencies": {
"deep-extend": "^0.5.0",
"glob": "^7.1.2",
"deep-extend": "^0.6.0",
"eslint-config-prettier": "^3.6.0",
"glob": "^7.1.3",
"minimist": "^1.2.0",
"toml": "^2.3.3"
"toml": "^2.3.5"
},
"devDependencies": {
"eslint-config-nodemailer": "^1.2.0",
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-eslint": "^20.1.0"
"grunt": "^1.0.3",
"grunt-cli": "^1.3.2",
"grunt-eslint": "^21.0.0"
}
}

@@ -5,8 +5,8 @@ # wild-config

- Config files use either [toml](https://github.com/toml-lang/toml), JSON or JavaScript syntax
- If the config file format is JavaScript, then the value must be exported with "module.exports = {...}"
- The application can have a config file for default values in ./config/default.toml
- Main config file path can be provided from a command line argument, eg. `--config=/etc/app.toml`
- Additionally command line arguments can be used to override any existing config option
- _wild-config_ detects SIGHUP and reloads configuration files automatically
- Config files use either [toml](https://github.com/toml-lang/toml), JSON or JavaScript syntax
- If the config file format is JavaScript, then the value must be exported with "module.exports = {...}"
- The application can have a config file for default values in ./config/default.toml
- Main config file path can be provided from a command line argument, eg. `--config=/etc/app.toml`
- Additionally command line arguments can be used to override any existing config option
- _wild-config_ detects SIGHUP and reloads configuration files automatically

@@ -17,5 +17,5 @@ ## Loading order

1. ./config/default.*
2. ./config/$NODE_ENV.*
3. `--config` or `-c` argument value
1. ./config/default.\*
2. ./config/\$NODE_ENV.\*
3. `NODE_CONFIG_PATH` environment value or `--config` argument value
4. command line arguments

@@ -72,7 +72,7 @@

- Included paths are resolved relative to the path of the configuration file where the include directive is used
- Included config files do not have to be toml files, any other supported format works as well
- If the included config file is a toml file then it can have its own includes
- If the config file returns an array then the array value will become the value of the parent key of the directive only if there are no other subkeys at the same level as the directive
- Special value `{ENV}` is replaced in all file paths by the NODE_ENV value
- Included paths are resolved relative to the path of the configuration file where the include directive is used
- Included config files do not have to be toml files, any other supported format works as well
- If the included config file is a toml file then it can have its own includes
- If the config file returns an array then the array value will become the value of the parent key of the directive only if there are no other subkeys at the same level as the directive
- Special value `{ENV}` is replaced in all file paths by the NODE_ENV value

@@ -102,3 +102,3 @@ ## Application config file

const config = require('wild-config');
config.on('reload', ()=>{
config.on('reload', () => {
console.log('New "server.enabled" value: %s', config.server.enabled);

@@ -110,8 +110,8 @@ });

- _'reload'_ emitted when SIGHUP is received and configuration is reloaded
- _'reload'_ emitted when SIGHUP is received and configuration is reloaded
### Limitations
- You can not use "on" as a root key. If you do then it is ignored. This key is reserved for the event emitter handler.
- When providing configuration options from command line then `--config` does not override `root.config` value (if it even exists). This argument is used only for defining the configuration file path.
- You can not use "on" as a root key. If you do then it is ignored. This key is reserved for the event emitter handler.
- When providing configuration options from command line then `--config` does not override `root.config` value (if it even exists). This argument is used only for defining the configuration file path.

@@ -118,0 +118,0 @@ ## Licese

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc