Comparing version 5.0.1 to 5.0.2
@@ -40,3 +40,5 @@ var path = require('path') | ||
{ | ||
var cfg, file = path.resolve(dir, filename + '.' + ext); | ||
// TODO: Because https://github.com/zeit/ncc/issues/444 | ||
var fileWithExt = filename + '.' + ext; | ||
var cfg, file = path.resolve(dir, fileWithExt); | ||
@@ -43,0 +45,0 @@ if (fs.existsSync(file)) |
{ | ||
"name": "configly", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"description": "A developer-friendly lightweight replacement for the 'config' module that works with custom config directories and pluggable parsers", | ||
"main": "default.js", | ||
"scripts": { | ||
"lint": "eslint *.js test/*.js", | ||
"pretest": "is-node-modern 8 && ncc run test/ncc_webpack_bundler_test.js || is-node-not-modern 8", | ||
"lint": "is-node-modern 8 && eslint *.js test/*.js || is-node-not-modern 8", | ||
"pretest": "is-node-modern 10 && ncc run test/ncc_webpack_bundler_test.js || is-node-not-modern 10", | ||
"test": "nyc --reporter=lcov --reporter=text --check-coverage --lines 99 --functions 99 --branches 99 tape test/*.js | tap-spec", | ||
@@ -58,3 +58,3 @@ "debug": "tape test/*.js | tap-spec" | ||
"compare-property": "^2.0.0", | ||
"deeply": "3.0.0", | ||
"deeply": "^3.1.0", | ||
"fulcon": "^2.0.0", | ||
@@ -65,21 +65,21 @@ "precise-typeof": "^2.0.1", | ||
"devDependencies": { | ||
"@zeit/ncc": "^0.11.0", | ||
"coffeescript": "^2.3.2", | ||
"coveralls": "^3.0.2", | ||
"@zeit/ncc": "^0.20.2", | ||
"coffeescript": "^2.4.1", | ||
"coveralls": "^3.0.4", | ||
"cson": "^5.1.0", | ||
"eslint": "^5.9.0", | ||
"eslint": "^6.0.1", | ||
"hjson": "^3.1.2", | ||
"ini": "^1.3.4", | ||
"ini": "^1.3.5", | ||
"is-node-modern": "^1.0.0", | ||
"js-yaml": "^3.6.1", | ||
"js-yaml": "^3.13.1", | ||
"json5": "^2.1.0", | ||
"moment": "^2.22.2", | ||
"nyc": "^13.1.0", | ||
"pre-commit": "^1.1.3", | ||
"moment": "^2.24.0", | ||
"nyc": "^14.1.1", | ||
"pre-commit": "^1.2.2", | ||
"properties": "^1.2.1", | ||
"sinon": "^7.1.1", | ||
"sinon": "^7.3.2", | ||
"tap-spec": "^5.0.0", | ||
"tape": "^4.6.2", | ||
"toml": "^2.3.5" | ||
"tape": "^4.11.0", | ||
"toml": "^3.0.0" | ||
} | ||
} |
@@ -5,5 +5,5 @@ # configly [![NPM Module](https://img.shields.io/npm/v/configly.svg?style=flat)](https://www.npmjs.com/package/configly) | ||
[![Linux Build](https://img.shields.io/travis/alexindigo/configly/master.svg?label=linux:6.x-11.x&style=flat)](https://travis-ci.org/alexindigo/configly) | ||
[![MacOS Build](https://img.shields.io/travis/alexindigo/configly/master.svg?label=macos:6.x-11.x&style=flat)](https://travis-ci.org/alexindigo/configly) | ||
[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/configly/master.svg?label=windows:6.x-11.x&style=flat)](https://ci.appveyor.com/project/alexindigo/configly) | ||
[![Linux Build](https://img.shields.io/travis/alexindigo/configly/master.svg?label=linux:6.x-12.x&style=flat)](https://travis-ci.org/alexindigo/configly) | ||
[![MacOS Build](https://img.shields.io/travis/alexindigo/configly/master.svg?label=macos:6.x-12.x&style=flat)](https://travis-ci.org/alexindigo/configly) | ||
[![Windows Build](https://img.shields.io/travis/alexindigo/configly/master.svg?label=windows:6.x-12.x&style=flat)](https://travis-ci.org/alexindigo/configly) | ||
@@ -185,2 +185,46 @@ [![Coverage Status](https://img.shields.io/coveralls/alexindigo/configly/master.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/configly?branch=master) | ||
### Config Files Resolution Order | ||
Configly scans config directory for number of config files, then loads and merges them in specific order. | ||
It always starts with `default` file, as it's the place for all project's defaults, it will try load `default` with extensions for provided parsers (out of the box it will be `.js` and `.json`). | ||
Then it will search for environment specific files, specified via `NODE_ENV` (in case it's omitted falls back to `development`). After that it searches for files related to the runtime's hostname. It closes off "static" config files with `local` file, which usually being git-ignored and meant for local overrides of the checked in configuration options. | ||
After that configly proceeds to search for dynamic/meta config files – `custom-include-files` and `custom-environment-variables`... | ||
Last file to read would be `runtime` file, and meant for deployment target local configuration rather than being checked into the code repository. | ||
Example ordered list of files that will be read, in `NODE_ENV=production` environment on `dev382.corp.example.com` host: | ||
``` | ||
default.js | ||
default.json | ||
default-production.js | ||
default-production.json | ||
production.js | ||
production.json | ||
dev382.js | ||
dev382.json | ||
dev382-production.js | ||
dev382-production.json | ||
dev382.corp.example.com.js | ||
dev382.corp.example.com.json | ||
dev382.corp.example.com-production.js | ||
dev382.corp.example.com-production.json | ||
local.js | ||
local.json | ||
local-production.js | ||
local-production.json | ||
custom-include-files.js | ||
custom-include-files.json | ||
custom-include-files-production.js | ||
custom-include-files-production.json | ||
custom-environment-variables.js | ||
custom-environment-variables.json | ||
custom-environment-variables-production.js | ||
custom-environment-variables-production.json | ||
runtime.js | ||
runtime.json | ||
runtime-production.js | ||
runtime-production.json | ||
``` | ||
### Custom Files | ||
@@ -187,0 +231,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50865
948
568
+ Addeddeeply@3.1.0(transitive)
- Removeddeeply@3.0.0(transitive)
Updateddeeply@^3.1.0