Skip to content

Releases: ph3at/libenvpp

v1.4.1

23 Apr 13:08
Compare
Choose a tag to compare

Bug fixes to string handling

The libenvpp internal string handling on windows was treating empty strings as not present which lead to unexpected exceptions being thrown. Issue reported in #7.

This release also hardens against string conversion failures, so that they don't crash irrecoverably.

v1.4.0

29 Dec 15:00
Compare
Choose a tag to compare

More versatile bool parsing

The internal bool parser has been extended to be more versatile. Previously only 0/false and 1/true (case-sensitive) were supported. Now libenvpp can natively parse 0/false/off/no and 1/true/on/yes as bool in a case-insensitive way.

v1.3.0

10 Aug 16:25
Compare
Choose a tag to compare

New interface register_deprecated

A new interface has been added to allow marking certain environment variables as deprecated and providing a message to the user on what to do.

Usage example:

auto pre = env::prefix("APP");
pre.register_deprecated("FEATURE", "The option 'APP_FEATURE' has been deprecated since version x.y. Please use SOMETHING instead.");

v1.2.0

24 Jul 10:32
Compare
Choose a tag to compare

New overload for env::scoped_test_environment

Constructing a scoped test environment now requires less code. For the use-case where only one variable is required there's now a specific overload that allows construction like this:

const auto _ = env::scoped_test_environment("MYPROG_ENV_VAR", "value");

and for more than one variable this syntax can be used:

const auto _ = env::scoped_test_environment({
    {"MYPROG_LOG_FILE_PATH", "/dev/null"},
    {"MYPROG_NUM_THREADS", "8"},
});

v1.1.0

13 Mar 14:04
Compare
Choose a tag to compare

Better unit testing support

This release adds a global testing environment and fixes some bugs.

Global Testing Environment

The global testing environment allows environment variables to be set programatically without interfering with the system environment variables. Libenvpp will automatically retrieve variables from the testing environment, if any are available. This allows programs that use libenvpp to be unit tested without having to modify the programs themselves. This is especially useful when using complex custom parsers/validators.

Bug fixes

Some compilers had issues with noexcept. This release makes use of conditional noexcept to work around this issue.

v1.0.0

22 Dec 14:48
Compare
Choose a tag to compare

Initial release

This is the initial release of libenvpp.