-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v0.16 new API #123
v0.16 new API #123
Commits on Aug 29, 2024
-
`set::env_set_var` is unsafe in the 2024 edition. All functions calling it are marked as unsafe.
Configuration menu - View commit details
-
Copy full SHA for a45eeda - Browse repository at this point
Copy the full SHA a45eedaView commit details
Commits on Sep 4, 2024
-
- dotenv moved to dotenvy folder - dotenvy-macros crate created for runtime macros - temporary 2024 edition to check for unsafe `set_var` usage - new API with `EnvLoader` builder, `load`, and `load_and_modify` - `load` attribute macro that is thread-safe and async-compatible - many examples added - some irrelevant tests removed
Configuration menu - View commit details
-
Copy full SHA for fa19b77 - Browse repository at this point
Copy the full SHA fa19b77View commit details
Commits on Sep 5, 2024
-
This naming better reflects the fact that we are configuring a loader with an optional path, with deferred I/O.
Configuration menu - View commit details
-
Copy full SHA for 5012a99 - Browse repository at this point
Copy the full SHA 5012a99View commit details -
New
Error
type withNotPresent(String)
This removes the `EnvVar` variant which wraps `VarError`. The internals of `VarError` are now variants in `Error`. This makes it more ergonomic for users who are propogating errors to know which varaible is truly missing.
Configuration menu - View commit details
-
Copy full SHA for 0f9ad5f - Browse repository at this point
Copy the full SHA 0f9ad5fView commit details -
Add
dotenvy::var
with new error typeThis reintroduces `var` as a copy of `std::env::var` with more info. The signature is different because in this crate, we only handle valid UTF-8. Calling `var` now gives the key name in the error.
Configuration menu - View commit details
-
Copy full SHA for b585c41 - Browse repository at this point
Copy the full SHA b585c41View commit details -
Make a
EnvMap
a newtype withEnvMap::var
This change `EnvMap` to a newtype with a `var` function that returns `Result`. This mirrors the behaviour of `dotenvy::var`.
Configuration menu - View commit details
-
Copy full SHA for 13231f6 - Browse repository at this point
Copy the full SHA 13231f6View commit details
Commits on Sep 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2fac955 - Browse repository at this point
Copy the full SHA 2fac955View commit details -
Add required and override to CLI
This makes the CLI feature aligned with the attribute macro. The optional example is also updated to be similar to the CLI. `Path::exists` is no longer used because of a potential race condition.
Configuration menu - View commit details
-
Copy full SHA for 6334ceb - Browse repository at this point
Copy the full SHA 6334cebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ad1045 - Browse repository at this point
Copy the full SHA 9ad1045View commit details -
Configuration menu - View commit details
-
Copy full SHA for c4263c8 - Browse repository at this point
Copy the full SHA c4263c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81dd772 - Browse repository at this point
Copy the full SHA 81dd772View commit details
Commits on Sep 8, 2024
-
Add file path to IO error variant
This creates an internal `ParseBufError` to handle line parsing errors without the path context. Loading a file reports the file path error if an attempt was made to read from it and it is not found.
Configuration menu - View commit details
-
Copy full SHA for cb5be8d - Browse repository at this point
Copy the full SHA cb5be8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 312fac6 - Browse repository at this point
Copy the full SHA 312fac6View commit details -
Add
path
setter for reader error context`EnvLoader::path` is a setter that can be used to specify the path. If `with_reader` is used, the path can be specified for error context. If both reader and path are present, load will use the reader as input.
Configuration menu - View commit details
-
Copy full SHA for 9b3e9ad - Browse repository at this point
Copy the full SHA 9b3e9adView commit details -
Configuration menu - View commit details
-
Copy full SHA for d7d0128 - Browse repository at this point
Copy the full SHA d7d0128View commit details -
Configuration menu - View commit details
-
Copy full SHA for c788494 - Browse repository at this point
Copy the full SHA c788494View commit details -
Now that we only use paths and there is also reader input, we don't need to test with temp file creating and deleting.
Configuration menu - View commit details
-
Copy full SHA for fe46d1d - Browse repository at this point
Copy the full SHA fe46d1dView commit details -
Remove panics from parse unit tests
The tests are also rewritten for clarity.
Configuration menu - View commit details
-
Copy full SHA for b426cbf - Browse repository at this point
Copy the full SHA b426cbfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b05ea8 - Browse repository at this point
Copy the full SHA 3b05ea8View commit details -
Use safe API in mutiline tests
Tests are also moved from separate files to the `EnvLoader` module.
Configuration menu - View commit details
-
Copy full SHA for ec0b6a3 - Browse repository at this point
Copy the full SHA ec0b6a3View commit details -
The integration tests are no longer being used. Testing is done at lower levels and will be stored as modules.
Configuration menu - View commit details
-
Copy full SHA for d07c421 - Browse repository at this point
Copy the full SHA d07c421View commit details -
Configuration menu - View commit details
-
Copy full SHA for f72df37 - Browse repository at this point
Copy the full SHA f72df37View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa2a0e1 - Browse repository at this point
Copy the full SHA aa2a0e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 20847a4 - Browse repository at this point
Copy the full SHA 20847a4View commit details -
Unit tests run in parallel and may clobber each other. temp-env is now a dev dependency to ensure that unit tests run in isolated enviornments. Some tests are added for `load` and `load_and_modify`.
Configuration menu - View commit details
-
Copy full SHA for befc817 - Browse repository at this point
Copy the full SHA befc817View commit details -
Configuration menu - View commit details
-
Copy full SHA for faeba1b - Browse repository at this point
Copy the full SHA faeba1bView commit details -
This is to build with clap_builder v4.5.17, which requires 17.4.0. 1.74.0 came out November 2023, so this is less than one year ago.
Configuration menu - View commit details
-
Copy full SHA for 92158d9 - Browse repository at this point
Copy the full SHA 92158d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b4313a - Browse repository at this point
Copy the full SHA 5b4313aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 23aade4 - Browse repository at this point
Copy the full SHA 23aade4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f4dec21 - Browse repository at this point
Copy the full SHA f4dec21View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6822a04 - Browse repository at this point
Copy the full SHA 6822a04View commit details -
`cmd.exec` was accessible to the Windows code path, while also being unreachable do to `exit(1)`.
Configuration menu - View commit details
-
Copy full SHA for 9663c8a - Browse repository at this point
Copy the full SHA 9663c8aView commit details
Commits on Sep 9, 2024
-
We consistenly use "env file" across the repo now.
Configuration menu - View commit details
-
Copy full SHA for 43a167e - Browse repository at this point
Copy the full SHA 43a167eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ab5b754 - Browse repository at this point
Copy the full SHA ab5b754View commit details -
`override` argument named to `override_` because it is a keyword.
Configuration menu - View commit details
-
Copy full SHA for a8ff414 - Browse repository at this point
Copy the full SHA a8ff414View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b3db89 - Browse repository at this point
Copy the full SHA 9b3db89View commit details -
Configuration menu - View commit details
-
Copy full SHA for deb2b49 - Browse repository at this point
Copy the full SHA deb2b49View commit details -
Configuration menu - View commit details
-
Copy full SHA for 169a60e - Browse repository at this point
Copy the full SHA 169a60eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2070b0 - Browse repository at this point
Copy the full SHA c2070b0View commit details