Skip to content

Releases: TheElectronWill/night-config

v3.9.0 with TOML v1.1 support!

Choose a tag to compare

@TheElectronWill TheElectronWill released this 06 Jun 16:24
d91d791

What's Changed

How to choose between TOML v1.0 / v1.1

To select the version of TOML, manually build the TomlParser and call setTomlVersion.
Example:

var parser = new TomlParser();
parser.setTomlVersion(TomlVersion.v1_1);

For now, the default version is TOML 1.0.

New Contributors

Full Changelog: v3.8.4...v3.9.0

3.8.4 The Return of the Bugfix

Choose a tag to compare

@TheElectronWill TheElectronWill released this 23 Mar 12:20

Quick fix for #201

Full Changelog: v3.8.3...v3.8.4

3.8.3 more fixes

Choose a tag to compare

@TheElectronWill TheElectronWill released this 08 Aug 20:08

What's Changed (since 3.8.1)

  • Retry Files.move on AccessDeniedException by @TheElectronWill in #184
  • Set FileWatcher executor threads to be daemon threads by @sciwhiz12 in #189
  • Update parse exception message "invalid value" -> "invalid integer" by @ShE3py in #192
  • Fix #195: NoSuchFileException when writing config to relative path with ATOMIC_REPLACE by @Technici4n in #198

New Contributors

Full Changelog: v3.8.1...v3.8.3

3.8.1 Async config fixes

Choose a tag to compare

@TheElectronWill TheElectronWill released this 31 Jul 12:43

What's Changed

Full Changelog: v3.8.0...v3.8.1

3.8.0: API enhancements

Choose a tag to compare

@TheElectronWill TheElectronWill released this 30 Jun 12:56
64a63d7

What's Changed

  • FileWatcher offers new methods that return a CompletableFuture
  • Every FileConfig is now a ConcurrentConfig
  • Some warnings have been fixed.

Full Changelog: v3.7.4...v3.8.0

3.7.4: FileWatcher fix

Choose a tag to compare

@TheElectronWill TheElectronWill released this 26 Jun 11:49
dde2b2d

Fixes

This minor release fixes a bug that caused the FileWatcher to close when a directory containing watched files was deleted. Also, an exception is now raised early if the FileWatcher is used in an unsupported manner.

Full Changelog: v3.7.3...v3.7.4

3.7.3: FileConfig fix

Choose a tag to compare

@TheElectronWill TheElectronWill released this 16 Jun 21:36
1ae4261

Fixes

This minor release fixes a bad interaction between AsyncFileConfig and StampedConfig, and between SyncFileConfig, SynchronizedConfig and TomlParser, which resulted in some TOML configurations to be mis-loaded. Thanks to @Technici4n for discovering the bug!

Full Changelog: v3.7.2...v3.7.3

3.7.2: TOML compliance fix

Choose a tag to compare

@TheElectronWill TheElectronWill released this 26 May 14:19
1a481ba

TOML Fixes

The TOML implementation is now more robust thanks to toml-test. We don't call the binary, but rather include the repository as a Git submodule in order to grab all the test files.

Compatibility note: the TOML parser of NightConfig now rejects some files that it would have previously accepted (even though they were invalid). This is intended, and we encourage all users to fix their invalid TOML files.

Please read the release notes of v3.7.0 ✨ to learn what has changed since v3.6.x.

Full Changelog: v3.7.1...v3.7.2

3.7.1 Gradle fix

Choose a tag to compare

@TheElectronWill TheElectronWill released this 13 May 15:13

Fixes

  • Resolve a misconfiguration of the Gradle build, see #173 for more details
  • Fix a minor issue with the new options of JsonParser

You should use v3.7.1 instead of v3.7.0.
Please read the release notes of v3.7.0 ✨ to learn what has changed since v3.6.x.

Full Changelog: v3.7.0...v3.7.1

3.7.0: NightConfig rejuvenated ✨

Choose a tag to compare

@TheElectronWill TheElectronWill released this 12 May 19:16

Major changes

  • FileWatcher now comes with out-of-the-box debouncing, which improves the performance of autoreloading and autosaving configurations ⚡, see #148
  • FileConfig instances are now actually thread-safe and work better with autoreload, which should prevent most of the corruption issues 🛡️, see #152
  • A new Serialization/Deserialization framework is available in the serde package 🚀, see #163.
    Unlike the old ObjectConverter, the new ObjectSerializer and ObjectDeserializer are modular and extensible: you can register your own serializers and deserializers. Deserializers (config -> object) are chosen based on the generic type of the field to set and the type of the config value to deserialize. This allows for fine-grained deserialization. The old ObjectConverter still works but is now deprecated. The goal is to remove the old conversion package in version 4.0.0.

Enhancements

  • Allow multiple spec conditions to be checked by @vaperion in #151 (Note: this fix applies to the deprecated conversion package; the new serde package supports multiple @SerdeAssert conditions out of the box)
  • Support UTF-16 and UTF-8 BOM by @TheElectronWill in 68502b9
  • In ConfigSpec and in the new serde Deserializer, automatically apply some "risky" conversions (e.g. long -> int) when it is not lossy, close #119
  • Allow custom Config storage in ConfigSpec, by @PaintNinja in #168
  • More unit tests, on Java 8, Java 11 and Java 17, by @TheElectronWill

Bug fixes

Compatibility Note

NightConfig 3.7.0 is backward-compatible with previous releases, therefore I encourage you to upgrade your dependency on NightConfig in order to benefit from the new version.

Binary-wise, the backward-compatibility has been checked with japicmp.
Source-wise, there is one small incompatible change: FileWatcher#addWatch no longers throws an IOException, which can result in a compiler error unreachable code on the associated try/catch (example in forge).

New Contributors

Thank you everyone!

Full Changelog: v3.6.7...v3.7.0