Skip to content

deprecation(dotenv): deprecate load(), loadSync() and @std/dotenv/load#7248

Open
tomas-zijdemans wants to merge 1 commit into
denoland:mainfrom
tomas-zijdemans:deprecate-dotenv-loaders
Open

deprecation(dotenv): deprecate load(), loadSync() and @std/dotenv/load#7248
tomas-zijdemans wants to merge 1 commit into
denoland:mainfrom
tomas-zijdemans:deprecate-dotenv-loaders

Conversation

@tomas-zijdemans

Copy link
Copy Markdown
Contributor

Deprecates the loaders in favor of the runtime's --env-file flag, per #7246. parse() and stringify() are untouched.

  • @deprecated tags on load(), loadSync(), LoadOptions and the /load side-effect module, removal slated for 0.227.0
  • Module docs rewritten into a migration guide covering the verified behavioral differences: optional-file handling, $ in double-quoted values, ${KEY:-default} expansion, and platforms without a CLI

The parity check backing this is in #7246 (comment): core semantics match on Deno 2.9.3, every divergence is in the expansion family, where parse() remains.

Closes #7246

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.00%. Comparing base (ad7c87b) to head (68b63f2).

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #7248    +/-   ##
========================================
  Coverage   95.00%   95.00%            
========================================
  Files         617      617            
  Lines       51674    51422   -252     
  Branches     9326     9277    -49     
========================================
- Hits        49093    48855   -238     
+ Misses       2038     2029     -9     
+ Partials      543      538     -5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: deprecate load(), loadSync() and @std/dotenv/load in favor of --env-file

1 participant