Socket
Socket
Sign inDemoInstall

feathers-configuration

Package Overview
Dependencies
5
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.0 to 0.4.1

12

CHANGELOG.md
# Change Log
## [v0.4.0](https://github.com/feathersjs/feathers-configuration/tree/v0.4.0) (2016-10-22)
[Full Changelog](https://github.com/feathersjs/feathers-configuration/compare/v0.3.3...v0.4.0)
**Implemented enhancements:**
- implement node-config [\#27](https://github.com/feathersjs/feathers-configuration/pull/27) ([slajax](https://github.com/slajax))
**Closed issues:**
- Deprecate v1 in favour of node-config [\#25](https://github.com/feathersjs/feathers-configuration/issues/25)
- Make this repo more about managing configuration [\#24](https://github.com/feathersjs/feathers-configuration/issues/24)
## [v0.3.3](https://github.com/feathersjs/feathers-configuration/tree/v0.3.3) (2016-09-12)

@@ -4,0 +16,0 @@ [Full Changelog](https://github.com/feathersjs/feathers-configuration/compare/v0.3.2...v0.3.3)

3

lib/index.js

@@ -7,3 +7,3 @@ 'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

@@ -26,3 +26,2 @@ var _debug = require('debug');

return function () {
var app = this;

@@ -29,0 +28,0 @@

{
"name": "feathers-configuration",
"description": "A small configuration module for your Feathers application.",
"version": "0.4.0",
"version": "0.4.1",
"homepage": "https://github.com/feathersjs/feathers-configuration",

@@ -37,6 +37,14 @@ "main": "lib/",

"watch": "babel --watch -d lib/ src/",
"jshint": "jshint src/. test/. --config",
"lint": "eslint-if-supported semistandard --fix",
"mocha": "NODE_CONFIG_DIR=./test/config/ NODE_ENV=testing mocha test/ --compilers js:babel-core/register",
"test": "npm run jshint && npm run mocha && nsp check"
"test": "npm run lint && npm run mocha && nsp check"
},
"semistandard": {
"env": [
"mocha"
],
"ignore": [
"/lib"
]
},
"directories": {

@@ -54,7 +62,8 @@ "lib": "lib"

"babel-preset-es2015": "^6.1.4",
"eslint-if-supported": "^1.0.1",
"feathers": "^2.0.0",
"jshint": "^2.8.0",
"mocha": "^3.0.0",
"nsp": "^2.2.0"
"nsp": "^2.2.0",
"semistandard": "^9.1.0"
}
}

@@ -9,10 +9,26 @@ # feathers-configuration

This release of `feathers-configuration` simply acts as a wrapped around [node-config](https://github.com/lorenwest/node-config).
The v0.4.x release of `feathers-configuration` is a breaking version and implementations that were made with earlier versions of the module may be required to make some minor changes. Please see the [migrating](#migrating) section for specifics.
By default this implementation will look in `config/*` for `default.json`.
This module is a simple wrapped on [node-config](https://github.com/lorenwest/node-config) that adds a bit of convenience. By default this implementation will look in `config/*` for `default.json` which retains convention. As per the [config docs](https://github.com/lorenwest/node-config/wiki/Configuration-Files) you can organize *"hierarchical configurations for your app deployments"*. See the usage section below for better information how to implement this.
As per the [config docs](https://github.com/lorenwest/node-config/wiki/Configuration-Files) this is highly configurable.
Please note: future releases will also include the ability to define adapters which will allow you to use external configuration storage like [vault](https://www.vaultproject.io/) or [etcd](https://github.com/coreos/etcd).
Future releases will also include adapters for external configuration storage.
## Migrating
Moving from 0.3.x to 0.4.x should be *mostly* backwards compatible. The main change is that instead of passing the location of your configuration into the module constructor like this:
```js
let config = require('feathers-configuration')(root, env, deepAssign);
```
The module now simply inherits from `NODE_ENV` and `NODE_CONFIG_DIR` as per the [config docs](https://github.com/lorenwest/node-config/wiki/Configuration-Files):
```js
$ NODE_ENV=development NODE_CONFIG_DIR=./config/ node app.js
```
If you are currently setting your configurations via construction arguments, you will need to move these values out of your app into these environment variables.
With the implementation of node-config we also now have the ability to set a `custom-environment-variables.json` file which will allow you to define which variables to override from `process.env`. See below for examples.
## Usage

@@ -96,3 +112,3 @@

```
PORT=8080 MONGOHQ_URL=mongodb://localhost:27017/production NODE_ENV=production node app
$ PORT=8080 MONGOHQ_URL=mongodb://localhost:27017/production NODE_ENV=production node app
// -> path/to/app/public/dist

@@ -99,0 +115,0 @@ // -> myapp.com

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc