Skip to content

Update dotenv 16.6.1 → 17.2.1 (major)#593

Merged
canova merged 2 commits intomasterfrom
depfu/update/yarn/dotenv-17.2.1
Aug 4, 2025
Merged

Update dotenv 16.6.1 → 17.2.1 (major)#593
canova merged 2 commits intomasterfrom
depfu/update/yarn/dotenv-17.2.1

Conversation

@depfu
Copy link
Copy Markdown
Contributor

@depfu depfu bot commented Aug 1, 2025

Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ dotenv (16.6.1 → 17.2.1) · Repo · Changelog

Release Notes

17.2.1 (from changelog)

Changed

  • Fix clickable tip links by removing parentheses (#897)

17.2.0 (from changelog)

Added

  • Optionally specify DOTENV_CONFIG_QUIET=true in your environment or .env file to quiet the runtime log (#889)
  • Just like dotenv any DOTENV_CONFIG_ environment variables take precedence over any code set options like ({quiet: false})
# .env
DOTENV_CONFIG_QUIET=true
HELLO="World"
// index.js
require('dotenv').config()
console.log(`Hello ${process.env.HELLO}`)

17.1.0 (from changelog)

Added

  • Add additional security and configuration tips to the runtime log (#884)
  • Dim the tips text from the main injection information text
const TIPS = [
  '🔐 encrypt with dotenvx: https://dotenvx.com',
  '🔐 prevent committing .env to code: https://dotenvx.com/precommit',
  '🔐 prevent building .env in docker: https://dotenvx.com/prebuild',
  '🛠️  run anywhere with `dotenvx run -- yourcommand`',
  '⚙️  specify custom .env file path with { path: \'/custom/path/.env\' }',
  '⚙️  enable debug logging with { debug: true }',
  '⚙️  override existing env vars with { override: true }',
  '⚙️  suppress all logs with { quiet: true }',
  '⚙️  write to custom object with { processEnv: myObject }',
  '⚙️  load multiple .env files with { path: [\'.env.local\', \'.env\'] }'
]

17.0.1 (from changelog)

Changed

  • Patched injected log to count only populated/set keys to process.env (#879)

17.0.0 (from changelog)

Changed

  • Default quiet to false - informational (file and keys count) runtime log message shows by default (#875)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 41 commits:


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot requested a review from canova as a code owner August 1, 2025 02:42
@depfu depfu bot added the dependencies Pull requests that update a dependency file label Aug 1, 2025
@canova
Copy link
Copy Markdown
Member

canova commented Aug 4, 2025

Oof, this is interesting. With this major update, it looks like the dotenv package is now printing an ad at the startup of the app:

[dotenv@17.2.1] injecting env (3) from .env -- tip: 📡 observe env with Radar: https://dotenvx.com/radar

It looks unprofessional, but besides that, it uses console.log to print the message. I'm assuming that this will break our mozlog parser if we deploy it.

At least it looks like there is a way to disable it by passing .config({quiet: true}). So I will do this in this PR to prevent the ads. But I think it would be good to remove this package later.

I see that node has util.parseEnv now, but it's still in active development. It would be good to switch to it once it's stable. I'll file an issue for it.

Copy link
Copy Markdown
Member

@canova canova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+ with the newly added { quiet: true } config param.

@canova canova merged commit 210e23b into master Aug 4, 2025
9 checks passed
@depfu depfu bot deleted the depfu/update/yarn/dotenv-17.2.1 branch August 4, 2025 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant