Skip to content

Releases: TheElectronWill/night-config

3.7.2: TOML compliance fix

26 May 14:19
1a481ba
Compare
Choose a tag to compare

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

13 May 15:13
Compare
Choose a tag to compare

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 ✨

12 May 19:16
Compare
Choose a tag to compare

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

3.6.7

28 Aug 18:08
Compare
Choose a tag to compare

More bug fixes :)

What's Changed

  • Fixed #121
  • Generate jars as OSGi compliant bundles. by @mnlipp in #120
  • Update HoconWriter to stop putting newlines at the head of the file by @0x3C50 in #137

New Contributors

Full Changelog: v3.6.6...v3.6.7

3.6.6 bugfix release

30 Aug 20:33
Compare
Choose a tag to compare

Fixes include: #101, #113

3.6.5 bugfix release

02 Nov 13:17
Compare
Choose a tag to compare
v3.6.5

Update project dependencies and bump version

3.6.4!

07 Aug 20:04
Compare
Choose a tag to compare

Fix #87, fix #82

3.6 bugfix release

03 May 10:59
4ac1b3c
Compare
Choose a tag to compare

3.6 bugfix release

01 Nov 10:20
Compare
Choose a tag to compare

Insertion order preservation support for FileConfigBuilder and ConfigFormat

17 Apr 23:16
Compare
Choose a tag to compare

This release resolves the issue #62 by adding two methods to FileConfigBuilder:

  • preserveInsertionOrder()
  • backingMapCreator(Supplier<Map<String, Object>>)

And some other things around the backing map of configurations.

Breaking change if you implement your own ConfigFormat (for advanced users)

If you implement your own ConfigFormat, please note that the interface now requires you to implement the new method createConfig(Supplier<Map<String, Object>>).

The two methods createConfig() and createConcurrentConfig() are now default methods and don't need to be implemented. They both call createConfig(Supplier) with the result of Config.getDefaultMapCreator(boolean).

You can read the detailed changes here.

I don't implement my own ConfigFormat, what happens to me? (for normal users)

If you don't implement your own ConfigFormat then everything is fine! Just enjoy the new features. 😃