Repository navigation
closes #24/support env cascade loading - #75
Merged
Merged
Conversation
- Add `EnvFileCascade` class to manage environment file resolution - Implement environment name resolution with fallback to predefined variables - Add file path validation for safe environment names - Generate candidate file names based on environment and file hierarchy - Resolve existing file paths and handle missing files with configurable exceptions - Add comprehensive unit tests for all `EnvFileCascade` functionality - Include an `EnvironmentVariableScope` helper class for test isolation
- Add tests for default `EnvironmentCascade` and `EnvironmentName` values - Add tests for setting `EnvironmentCascade` with and without environment name - Add validation tests disallowing cascade with custom files and streams - Add tests ensuring file and stream set methods throw when cascade is enabled - Add tests allowing cascading with probe-based file resolution - Extend `DotEnvOptions` with cascade-related properties and methods - Implement cascade state validation in relevant methods
- Add `Reader.GetProbedEnvDirectory` method for directory-based cascade file resolution - Update `DotEnv.Read` to integrate cascade file path resolution logic - Extend `ResolveCascadeFilePaths` to probe directories and handle fallback - Modify exception messages in `Reader.cs` for candidate file name support - Add unit tests for directory-based probing with cascade files - Add unit tests for cascade file fallback and exception handling scenarios
- Add `environmentCascade` and `environmentName` descriptions - Document cascading behaviour and hierarchical file overrides - Update notes on option conflicts with `envFilePaths` and `envStreams` - Extend Fluent API table with cascade-related methods - Add examples for default and explicit environment name usage - Explain environment variable resolution for cascading
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #75 +/- ##
==========================================
+ Coverage 95.62% 95.73% +0.11%
==========================================
Files 7 8 +1
Lines 434 516 +82
Branches 120 141 +21
==========================================
+ Hits 415 494 +79
Misses 9 9
- Partials 10 13 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Add tests for `EnvironmentCascade` and `EnvironmentName` combinations - Add directory-based probing tests in `EnvFileCascade` - Validate unsafe names and conflicting options for cascade - Extend `Reader` tests to handle cascade probing and exceptions - Add support for layered file reading with cascade
This was referenced Sep 8, 2026
This was referenced Sep 16, 2026
This was referenced Sep 25, 2026
This was referenced Oct 2, 2026
This was referenced Oct 9, 2026
This was referenced Oct 9, 2026
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.