Comparing version 6.2.0-rc1 to 6.2.0
@@ -7,2 +7,8 @@ # Change Log | ||
## [6.2.0] - 2018-12-03 | ||
### Added | ||
- Support preload configuration via environment variables ([#351](https://github.com/motdotla/dotenv/issues/351)) | ||
## [6.1.0] - 2018-10-08 | ||
@@ -36,3 +42,3 @@ | ||
- Testing aginst Node v7 | ||
- Testing against Node v7 | ||
@@ -103,3 +109,4 @@ | ||
[Unreleased]: https://github.com/motdotla/dotenv/compare/v6.1.0...HEAD | ||
[Unreleased]: https://github.com/motdotla/dotenv/compare/v6.2.0...HEAD | ||
[6.2.0]: https://github.com/motdotla/dotenv/compare/v6.1.0...v6.2.0 | ||
[6.1.0]: https://github.com/motdotla/dotenv/compare/v6.0.0...v6.1.0 | ||
@@ -106,0 +113,0 @@ [6.0.0]: https://github.com/motdotla/dotenv/compare/v5.0.0...v6.0.0 |
@@ -5,4 +5,8 @@ /* @flow */ | ||
require('./lib/main').config( | ||
require('./lib/cli-options')(process.argv) | ||
Object.assign( | ||
{}, | ||
require('./lib/env-options'), | ||
require('./lib/cli-options')(process.argv) | ||
) | ||
) | ||
})() |
{ | ||
"name": "dotenv", | ||
"version": "6.2.0-rc1", | ||
"version": "6.2.0", | ||
"description": "Loads environment variables from .env file", | ||
"main": "lib/main.js", | ||
"scripts": { | ||
"dtslint": "dtslint types", | ||
"flow": "flow", | ||
@@ -30,4 +29,3 @@ "lint": "standard", | ||
"devDependencies": { | ||
"@types/node": "^10.12.0", | ||
"dtslint": "^0.3.0", | ||
"decache": "^4.5.0", | ||
"flow-bin": "^0.84.0", | ||
@@ -47,4 +45,3 @@ "sinon": "^6.3.5", | ||
] | ||
}, | ||
"types": "types" | ||
} | ||
} |
@@ -56,3 +56,3 @@ # dotenv | ||
You can use the `--require` (`-r`) command line option to preload dotenv. By doing this, you do not need to require and load dotenv in your application code. This is the preferred approach when using `import` instead of `require`. | ||
You can use the `--require` (`-r`) [command line option](https://nodejs.org/api/cli.html#cli_r_require_module) to preload dotenv. By doing this, you do not need to require and load dotenv in your application code. This is the preferred approach when using `import` instead of `require`. | ||
@@ -69,2 +69,12 @@ ```bash | ||
Additionally, you can use environment variables to set configuration options. Command line arguments will precede these. | ||
```bash | ||
$ DOTENV_CONFIG_<OPTION>=value node -r dotenv/config your_script.js | ||
``` | ||
```bash | ||
$ DOTENV_CONFIG_ENCODING=base64 node -r dotenv/config your_script.js dotenv_config_path=/custom/path/to/.env | ||
``` | ||
## Config | ||
@@ -217,6 +227,4 @@ | ||
For `dotenv@2.x.x`: Use [dotenv-expand](https://github.com/motdotla/dotenv-expand). | ||
Try [dotenv-expand](https://github.com/motdotla/dotenv-expand) | ||
For `dotenv@1.x.x`: We haven't been presented with a compelling use case for expanding variables and believe it leads to env vars that are not "fully orthogonal" as [The Twelve-Factor App](http://12factor.net/config) outlines.<sup>[[1](https://github.com/motdotla/dotenv/issues/39)][[2](https://github.com/motdotla/dotenv/pull/97)]</sup> Please open an issue if you have a compelling use case. | ||
### How do I use dotenv with `import`? | ||
@@ -223,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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6
1
296
0
19568
8
117