FileWatcher now comes with out-of-the-box debouncing, which improves the performance of autoreloading and autosaving configurations :zap:, see TheElectronWill/night-config#148
FileConfig instances are now actually thread-safe and work better with autoreload, which should prevent most of the corruption issues :shield:, see TheElectronWill/night-config#152
A new Serialization/Deserialization framework is available in the serde package :rocket:, see TheElectronWill/night-config#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.
NightConfig 3.7.0 is backward-compatible with previous releases, but I encourage you to upgrade to 3.7.0 in order to benefit from its many improvements.
Enhancements
Allow multiple spec conditions to be checked by @vaperion in TheElectronWill/night-config#151 (Note: this fix applies to the deprecated conversion package; the new serde package supports multiple @SerdeAssert conditions out of the box)
In ConfigSpec and in the new serde Deserializer, automatically apply some "risky" conversions (e.g. long -> int) when it is not lossy, close TheElectronWill/night-config#119
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps com.electronwill.night-config:toml from 3.6.7 to 3.7.0.
Release notes
Sourced from com.electronwill.night-config:toml's releases.
Commits
7285e06
Bump version to 3.7.007c866f
json: Disallow trailing data by default, close #167fc3df2a
Allow potentially risky number conversions during the deserialization5e7789b
core: Make ConfigSpec more lenient with ranges by applying some006dd91
core: More comments3777eef
core: Minor cleanupa2fcf42
core: Cleanup and documentation081ba32
core: Implement new annotation "SerdeAssert" to replace the previous "Spec" a...a3c4306
Merge pull request #168 from PaintNinja/custom-configspec-storage595b113
Allow custom Config storage in ConfigSpecDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show