Skip to content

Latest commit

 

History

History
303 lines (236 loc) · 11.4 KB

CHANGELOG.md

File metadata and controls

303 lines (236 loc) · 11.4 KB

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased

0.13.4 - 2023-11-22

0.13.3 - 2022-12-04

Please note that we had to update the MSRV for this crate from 1.56.0 to 1.59.0 for this patch release being possible, because a transitive dependency did update its MSRV.

0.13.2 - 2022-08-02

  • Backport of #316 to be testing with temp_env. The backport was necessary to be able to backport the next change. This change shouldn't be user-visible.
  • Backport of #353 to use TryInto for more permissive deserialization of integers
  • Backport of commit 518a3cafa1e62ba7405709e5c508247e328e0a18 from #362 to fix tests

0.13.1 - 2022-04-13

  • typo in doc comment for ConfigBuilder #299
  • dot in config file name handling fixed #306

0.13.0 - 2022-04-03

  • Prefix-Seperator support was added #292
  • Environment lists can now be parsed #255
  • Setting an overwrite from an Option was added #303
  • Option to keep the prefix from an environment variable was added #298
  • Some small doc/CI fixes #307, #309
  • MSRV was updated to 1.56.0 #304
  • Dependencies were updated #289, #301

0.12.0 - 2022-02-10

Format support changes in this version

  • HJSON support was removed #230
  • JSON5 format support #206
  • RON format support #202

Other noteworthy changes

  • A new ConfigBuilder interface for building configuration objects #196
  • Asynchronous sources #207
  • Custom ENV separators are now supported #185
  • Loads of dependency updates and bugfixes of course
  • Preserved map order #217
  • Support for parsing numbers from the environment #137
  • Support for unsigned integers #178
  • Format trait for (custom) file formats #219

Deprecated

  • Environment::new() - see #235
  • Large parts of the Config interface - see #196
    • Config::merge()
    • Config::with_merged()
    • Config::refresh()
    • Config::set_default()
    • Config::set()
    • Config::set_once()
    • Config::deserialize()

0.11.0 - 2021-03-17

  • The Config type got a builder-pattern with_merged() method #166.
  • A Config::set_once() function was added, to set an value that can be overwritten by Config::mergeing another configuration #172
  • serde_hjson is, if enabled, pulled in without default features. This is due to a bug in serde_hjson, see #169 for more information.
  • Testing is done on github actions #175

0.10.1 - 2019-12-07

  • Allow enums as configuration keys #119

0.10.0 - 2019-12-07

  • Remove lowercasing of keys (unless the key is coming from an environment variable).
  • Update nom to 5.x

0.9.3 - 2019-05-09

  • Support deserializing to a struct with #[serde(default)] #106

0.9.2 - 2019-01-03

  • Support reading enums from configuration. #85
  • Improvements to error path (attempting to propagate path). #89
  • Fix UB in monomorphic expansion. We weren't re-exporting dependent types. #91

0.9.1 - 2018-09-25

  • Allow Environment variable collection to ignore empty values. #78
    // Empty env variables will not be collected
    Environment::with_prefix("APP").ignore_empty(true)

0.9.0 - 2018-07-02

  • Breaking Change: Environment does not declare a separator by default.

    // 0.8.0
    Environment::with_prefix("APP")
    
    // 0.9.0
    Environment::with_prefix("APP").separator("_")
  • Add support for INI. #72

  • Add support for newtype structs. #71

  • Fix bug with array set by path. #69

  • Update to nom 4. #63

0.8.0 - 2018-01-26

  • Update lazy_static and yaml_rust

0.7.1 - 2018-01-26

  • Be compatible with nom's verbose_errors feature (#50)[#50]
  • Add derive(PartialEq) for Value (#54)[#54]

0.7.0 - 2017-08-05

  • Fix conflict with serde_yaml. #39
  • Implement Source for Config.

  • Implement serde::de::Deserializer for Config. my_config.deserialize may now be called as either Deserialize::deserialize(my_config) or my_config.try_into().

  • Remove ConfigResult. The builder pattern requires either .try_into as the final step or the initial Config::new() to be bound to a slot. Errors must also be handled on each call instead of at the end of the chain.

    let mut c = Config::new();
    c
        .merge(File::with_name("Settings")).unwrap()
        .merge(Environment::with_prefix("APP")).unwrap();
    let c = Config::new()
        .merge(File::with_name("Settings")).unwrap()
        .merge(Environment::with_prefix("APP")).unwrap()
        // LLVM should be smart enough to remove the actual clone operation
        // as you are cloning a temporary that is dropped at the same time
        .clone();
    let mut s: Settings = Config::new()
        .merge(File::with_name("Settings")).unwrap()
        .merge(Environment::with_prefix("APP")).unwrap()
        .try_into();

0.6.0 – 2017-06-22

  • Implement Source for Vec<T: Source> and Vec<Box<Source>>

    Config::new()
        .merge(vec![
            File::with_name("config/default"),
            File::with_name(&format!("config/{}", run_mode)),
        ])
  • Implement From<&Path> and From<PathBuf> for File

  • Remove namespace option for File

  • Add builder pattern to condense configuration

    Config::new()
        .merge(File::with_name("Settings"))
        .merge(Environment::with_prefix("APP"))
        .unwrap()
  • Parsing errors even for non required files – @Anthony25 ( #33 )

0.5.1 – 2017-06-16

  • Added config category to Cargo.toml

0.5.0 – 2017-06-16

  • config.get has been changed to take a type parameter and to deserialize into that type using serde. Old behavior (get a value variant) can be used by passing config::Value as the type parameter: my_config.get::<config::Value>(".."). Some great help here from @impowski in #25.
  • Propagate parse and type errors through the deep merge (remembering filename, line, etc.)
  • Remove directory traversal on File. This is likely temporary. I do want this behavior but I can see how it should be optional. See #35
  • Add File::with_name to get automatic file format detection instead of manual FileFormat::*@JordiPolo
  • Case normalization #26
  • Remove many possible panics #8
  • my_config.refresh() will do a full re-read from the source so live configuration is possible with some work to watch the file

0.4.0 - 2017-02-12

  • Remove global ( config::get ) API — It's now required to create a local configuration instance with config::Config::new() first.

    If you'd like to have a global configuration instance, use lazy_static! as follows:

    use std::sync::RwLock;
    use config::Config;
    
    lazy_static! {
        static ref CONFIG: RwLock<Config> = Default::default();
    }

0.3.0 - 2017-02-08

  • YAML from @tmccombs
  • Nested field retrieval
  • Deep merging of sources (was shallow)
  • config::File::from_str to parse and merge a file from a string
  • Support for retrieval of maps and slices — config::get_table and config::get_array

0.2.0 - 2017-01-29

Initial release.