Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1003 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 476 471 -5
=========================================
- Hits 476 471 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
The new logging format is a UX change that may reduce compatibility with existing log parsers/greps by removing stable [WARN]/[DEBUG] tokens and introducing Unicode glyphs. The missing .env.vault warning now risks printing null/undefined for the path, which is a user-facing regression.
Additional notes (2)
-
Readability |
lib/main.js:335-341
In this branchvaultPathis falsy, so the warning now renders... at null/undefined(depending on what_vaultPath()returns). That’s a user-facing regression and makes the message less actionable than before. -
Readability |
lib/main.js:288-292
These debug messages concatenate the path and error message without a delimiter; in practice this can read ambiguously (especially with paths containing spaces).
Summary of changes
Summary
- Updated log output formatting to match
dotenvx-style UX:_warn()now prints⚠ ${message} · dotenv@${version}._debug()now prints┆ ${message} · dotenv@${version}._log()now prints◇ ${message} · dotenv@${version}.
- Normalized several log messages to lowercase (e.g.,
loading env…,failed to load…, encoding message). - Simplified the missing-vault warning text when
DOTENV_KEYis set but no.env.vaultis found.
| function _warn (message) { | ||
| console.error(`[dotenv@${version}][WARN] ${message}`) | ||
| console.error(`⚠ ${message} · dotenv@${version}`) | ||
| } | ||
|
|
||
| function _debug (message) { | ||
| console.log(`[dotenv@${version}][DEBUG] ${message}`) | ||
| console.log(`┆ ${message} · dotenv@${version}`) | ||
| } | ||
|
|
||
| function _log (message) { | ||
| console.log(`[dotenv@${version}] ${message}`) | ||
| console.log(`◇ ${message} · dotenv@${version}`) | ||
| } |
There was a problem hiding this comment.
The new log format uses Unicode glyphs (⚠, ┆, ◇) and removes the explicit [WARN]/[DEBUG] tokens. That can break downstream tooling that greps for the previous stable prefixes (or for WARN/DEBUG), and Unicode output is still a real-world compatibility issue in some CI/log pipelines and Windows terminals.
Suggestion
Consider preserving a machine-parsable severity token (and/or providing an opt-in/opt-out) while keeping the new UX. For example:
function _warn (message) {
console.error(`⚠ [WARN] ${message} · dotenv@${version}`)
}
function _debug (message) {
console.log(`┆ [DEBUG] ${message} · dotenv@${version}`)
}
function _log (message) {
console.log(`◇ ${message} · dotenv@${version}`)
}Alternatively, gate the glyphs behind an env var like DOTENV_LOG_FORMAT=pretty|classic and default to classic in non-TTY contexts.
Reply with "@CharlieHelps yes please" if you'd like me to add a commit with this suggestion.
No description provided.