Comparing version
@@ -5,4 +5,10 @@ # Changelog | ||
## [Unreleased](https://github.com/motdotla/dotenv/compare/v16.6.1...master) | ||
## [Unreleased](https://github.com/motdotla/dotenv/compare/v17.0.0...master) | ||
## [17.0.0](https://github.com/motdotla/dotenv/compare/v16.6.1...v17.0.0) (2025-06-27) | ||
### Changed | ||
- Default `quiet` to false - informational (file and keys count) runtime log message shows by default ([#875](https://github.com/motdotla/dotenv/pull/874)) | ||
## [16.6.1](https://github.com/motdotla/dotenv/compare/v16.6.0...v16.6.1) (2025-06-27) | ||
@@ -9,0 +15,0 @@ |
@@ -94,3 +94,3 @@ const fs = require('fs') | ||
function _warn (message) { | ||
console.log(`[dotenv@${version}][WARN] ${message}`) | ||
console.error(`[dotenv@${version}][WARN] ${message}`) | ||
} | ||
@@ -194,3 +194,3 @@ | ||
const debug = Boolean(options && options.debug) | ||
const quiet = options && 'quiet' in options ? options.quiet : true | ||
const quiet = Boolean(options && options.quiet) | ||
@@ -217,3 +217,3 @@ if (debug || !quiet) { | ||
const debug = Boolean(options && options.debug) | ||
const quiet = options && 'quiet' in options ? options.quiet : true | ||
const quiet = Boolean(options && options.quiet) | ||
@@ -280,3 +280,3 @@ if (options && options.encoding) { | ||
_log(`injecting env (${keysCount}) from ${shortPaths.join(',')}`) | ||
_log(`injecting env (${keysCount}) from ${shortPaths.join(',')} β π encrypt with dotenvx: https://dotenvx.com`) | ||
} | ||
@@ -283,0 +283,0 @@ |
{ | ||
"name": "dotenv", | ||
"version": "16.6.1", | ||
"version": "17.0.0", | ||
"description": "Loads environment variables from .env file", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -315,2 +315,25 @@ <div align="center"> | ||
##### quiet | ||
Default: `false` | ||
Suppress runtime logging message. | ||
```js | ||
// index.js | ||
require('dotenv').config({ quiet: false }) // change to true to suppress | ||
console.log(`Hello ${process.env.HELLO}`) | ||
``` | ||
```ini | ||
# .env | ||
.env | ||
``` | ||
```sh | ||
$ node index.js | ||
[dotenv@17.0.0] injecting env (1) from .env | ||
Hello World | ||
``` | ||
##### encoding | ||
@@ -317,0 +340,0 @@ |
77175
0.76%669
3.56%