Skip to content

Tags: Sayan-Development/Configurate

Tags

4.3.0

Toggle 4.3.0's commit message
Merge remote-tracking branch 'origin/feature/yaml-improvements'

# Conflicts:
#	format/yaml/build.gradle
#	gradle/libs.versions.toml

4.1.2

Toggle 4.1.2's commit message
release: Version 4.1.2

3.7.3

Toggle 3.7.3's commit message
release: Version 3.7.3

4.1.1

Toggle 4.1.1's commit message
Configurate 4.1.1

- Hotfix: Restore ability to write to final fields with the object
  mapper (SpongePowered#200)

4.1.0

Toggle 4.1.0's commit message
Configurate v4.1.0

This is a minor feature release to the Configurate v4 series that addresses a variety of bugfixes, small API additions, and Javadoc tweaks that have built up in the months since the 4.0.0 release.

Thanks to forresthopkinsa, jpenilla, and ItsTehBrian for their contributions to this release.

Added:

- core: `NodePath.plus` added to combine paths
- core: `AbstractListChildSerializer` is now part of Configurate's public API
- core: Added methods on `ConfigurationLoader` to load/save from strings
- core: Temporary files for writing are now prepended with a `.` so they appear hidden in file viewers
- core: Multi-release jar functionality is now used to take advantage of some collections and reflection API only available in newer Java versions
- core: Added analysis annotations to indicate contracts in `ConfigurationOptions` and `AbstractConfigurationLoader`
- core: Added `ConfigurationNode.require` methods for cases where a return value is known to be non-null, to avoid nullabilty warnings in IDEs
- core: Added `flags` field to the `@Matches` constrant annotation to pass through `Pattern` flags
- gson: Added serializers for JsonElement and its subtypes (accessible via `GsonConfigurationLoader.gsonSerializers()`)
- kotlin: Add supplier-defaulted get() extensions to `ConfigurationNode`

Fixed:

- core: Retry closing in AtomicFiles, to attempt better handling of Windows file locking
- core: Handling of integer keys in the map serializer (SpongePowered#184)
- core: Improve error messages when trying to get the object mapper to construct an object instance that it is unable to.
- core: Fix handling of absent primitive fields in the record object mapper
- core: Fix erasing target files when attempting to save a clearly invalid node (SpongePowered#189)
- core: Sets of enums are now deserialized as `EnumSet`s rather than `HashSet`s
- core: Add missing primitive types to `Types.box/unbox`
- core: Separate the concepts of a null value and being virtual, to correct handling of `null`-valued non-virtual nodes (SpongePowered#187)
- core: Correctly handle configuration files stored within symlinked directories
- core: Fixed improper floating-point precision testing (SpongePowered#198)
- hocon: Ensure leading spaces in comments are stripped
- kotlin: Correct the non-defaulted `get` method to use the appropriate Java overload of `get` (SpongePowered#185)

Deprecated:

- kotlin: The `NodePath.plus` extension function has been deprecated since it is replaced by the `plus` method in `NodePath` itself.

4.0.0

Toggle 4.0.0's commit message
build: Release version 4.0.0

3.7.2

Toggle 3.7.2's commit message
3.7.2

- Work around null values appearing when visiting
- Be more defensive when potentially returning null lists

3.7.1

Toggle 3.7.1's commit message
Configurate v3.7.1

- Fix saving JSON-format configurations starting from a non-root
  node (SpongePowered#163)
- Correctly handle removing a never-attached list element from its
  parent node
- Follow symbolic links when saving using `AtomicFiles` (default for
  most configuration loaders).

3.7

Toggle 3.7's commit message
Release version 3.7

After a long wait, v3.7 is finally here. The biggest feature in this release is the `ConfigurationReference` system and associated ability to automatically reload configurations, but it also contains a variety of bug fixes and deprecates some methods in preparation for 4.0. There is now also a collection of idiomatic Configurate examples included in the repository, under the `configurate-examples` folder that can be referenced for inspiration on how to effectively use the library.

Additionally, up-to-data Javadocs are now published at https://configurate.aoeu.xyz! It's been a while since javadocs were last updated, so the new revision brings a lot of improvements.

Thanks to @kashike for contributions to this release

- All `set*` methods in `ConfigurationOptions` have been deprecated, to be replaced with equivalent methods starting with `with___`.
- Accessors in `TypeSerializers` have been moved to `TypeSerializerCollection`, and `register____` methods have been renamed to `register`
- Modifying the global `TypeSerializerCollection` is deprecated behaviour. Any configurations that need custom type serializers should create their own child of the default collection and add to that.
- `ConfigurationNode.getAppendedChild()` should be replaced with `ConfigurationNode.appendListNode()`
- `hasListChildren()` and `hasMapChildren()` should be replaced with `isList()` and `isMap()` to more effectively express that they reflect the type of the node, not whether it has contents.
- As root node creation methods have been moved to the node interface, usage of the `Simple*` nod implementation classes is deprecated. They will be made package-private in 4.0.
- `ConfigurationNodeWalker` has been deprecated, to be replaced with the new more structured `ConfigurationVisitor` API.
- `ValueType` will be removed in 4.0. Its functionality is already covered by existing methods.

- New [configuration and value reference](https://github.com/SpongePowered/Configurate/blob/3.x/configurate-examples/src/main/java/ninja/leaping/configurate/examples/ValueReferences.java) system for automatically reloading configurations
- New module `configurate-ext-kotlin` with some basic utilities for using Configurate in Kotlin
- New module `configurate-tool` is a CLI tool to inspect configurations loaded through Configurate loaders`
- New module: `configurate-bom` can be imported to centralize Configurate version declaration across a project
- loader: Automatically create parent directories when trying to write a configuration
- objectmapping: New `TypeSerializer`s for arrays, `char`s, `Set`s, and `ConfigurationNode`s
- core: New method `isEmpty()` to determine if a node has contents, or exists but with an empty value.

- core: New `act` method on nodes that takes a `Consumer<ConfigurationNode>` to perform an action on the node
- core: New `setCommentIfAbsent` method on `CommentedConfigurationNode`s
- core: Abstract `TypeSerializer` implementations added for `Scalar`s and objects read from list nodes
- loader: Added functional helper methods for changing options and options' `TypeSerializerCollection` when building a loader
- core: New `getNode(Iterable<?>)` method will work the same as `getNode(Object...)`, but allow looking up nodes without having to convert existing collections to arrays.
- core: `AttributedConfigurationNode` now extends `CommentedConfigurationNode`
- xml: Load and save comments
- all: Configurate jars now include their license for easier compliance

- objectmapping: Preserve comments on map keys when round-tripping data through the type serializer for `Map`s
- gson: Correctly ignore null values in JSON files loaded from the Gson configuration loader
- objectmapping: Resolve type parameters in fields. For example, in a class `class MyConfig<T> { @setting private List<T> items;`, the list will be appropriately resolved as long as new object mapper factory methods that accept `TypeToken`s are used.
- objectmapping: Correctly reject interface types from being passed to `ObjectMappers` rather than throwing an exception
- objectmapping: Preserve configuration options when deserializing map keys
- hocon: Read empty lists as empty lists, to match behaviour when reading maps.
- loader: Don't read whole line to determine if file contains header. Resolves issues exceeding the mark limit on extremely long first lines, or files without line breaks (minified JSON, for example)
- objectmapping: The `TypeSerializer` for subclasses of `Number` will now attempt to coerce values to types native to the destination configuration when serializing.
- core: `AttributedConfigurationNodes` will now be attached as soon as attributes are set on them.
- core: The root configuration node's path is the empty array, and `getPath()` has been corrected to return this.

3.6.1

Toggle 3.6.1's commit message

Verified

This tag was signed with the committer’s verified signature. The key has expired.
gabizou Gabriel Harris-Rouquette
Version 3.6.1 bug fix.