Skip to content

Commit

Permalink
chore(release): Release v1.3.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakertack committed Feb 19, 2018
1 parent f1fd172 commit 909653a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [1.3.0] - 2018-02-20
### Added
- Add `override` configuration option, which controls whether variables that are already pre-existing in the environment should be overriden or not.

## [1.2.4] - 2017-08-19
### Changed
- Adjusted test script commands.
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/sneakertack/nvar.svg?branch=master)](https://travis-ci.org/sneakertack/nvar) ![A static test-count badge (dynamise one day)](https://img.shields.io/badge/tests-49%2F49-brightgreen.svg) [![Coverage Status](https://coveralls.io/repos/github/sneakertack/nvar/badge.svg?branch=master)](https://coveralls.io/github/sneakertack/nvar?branch=master)
[![Build Status](https://travis-ci.org/sneakertack/nvar.svg?branch=master)](https://travis-ci.org/sneakertack/nvar) ![A static test-count badge (dynamise one day)](https://img.shields.io/badge/tests-55%2F55-brightgreen.svg) [![Coverage Status](https://coveralls.io/repos/github/sneakertack/nvar/badge.svg?branch=master)](https://coveralls.io/github/sneakertack/nvar?branch=master)

## Intro

Expand Down Expand Up @@ -50,7 +50,8 @@ require('nvar')({
path: '../somedir/set-env.sh', // Filepath to envfile
source: 'FOO=BAR', // Alternatively, provide the envfile source directly.
target: module.exports, // Assign to something else besides process.env instead.
enoent: 'warn' // What should happen if the envfile was not found? Set to null|'warn'|'error'.
enoent: 'warn', // What should happen if the envfile was not found? Set to null|'warn'|'error'.
override: 'all' // Whether to override pre-existing variables. Set to 'all'|'empty'|'none'.
});
```

Expand Down Expand Up @@ -116,6 +117,7 @@ Option | Default | Description
`source`&nbsp;<sup>v1.0</sup> | `null` | Alternatively, pass in the assignments directly as text, e.g. `'EGGS=halfboiled\nTOAST=kaya'`. `path` is ignored if `source` is set.
`target`&nbsp;<sup>v1.0</sup> | `process.env` | Where to save the assignments to.
`enoent`&nbsp;<sup>v1.1</sup> | `'warn'` if relying on default `path`, `'error'` if path was specified | Whether to throw an error, log a warning to stderr, or do nothing if the file was not found. Irrelevant if using `source` instead of `path`.
`override`&nbsp;<sup>v1.3</sup> | `'all'` | If a variable already exists in the environment, should `nvar` override it? `'all'` means the environment can be overriden (default). `'empty'` means only empty `''` or unset variables can be set. `'none'` means only unset variables can be set.<br/><br/><small>_Advanced needs: Need even more control? Pass in a custom function (params `(key, env)`) that returns `true` or `false` instead. E.g. setting `override` to `(key) => !/[A-Z]/.test(key)` overrides variables written in lowercase only._</small>

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nvar",
"version": "1.2.4",
"version": "1.3.0",
"description": "Reads shell environment variables from a file and assigns them to `process.env` (or anywhere else).",
"main": "lib/index.js",
"engines": {
Expand Down

0 comments on commit 909653a

Please sign in to comment.