Releases: ValveResourceFormat/ValveKeyValue
Releases · ValveResourceFormat/ValveKeyValue
v0.70.0
v0.65.0
Immutable
release. Only release title and notes can be modified.
- Breaking: Make KVDocument standalone
- Added Root property
- Added string indexer and implicit cast to KVObject for backwards compatibility, but you should use Root.
- Breaking: Remove AsSpan (returned blobs), add AsArraySpan for getting KV3 arrays
- Make root name and header nullable
v0.60.0
Immutable
release. Only release title and notes can be modified.
- Breaking: Made string indexer throw on unknown key, removed GetChild
- Breaking: Made casting null to string throw
- Breaking: Made casting null byte[] throw
- Breaking: Made (string null) constructor throw
- Breaking: Made this[int] throw on dictionaries
- Breaking: Made Remove/Clear on non-collections throw
- Breaking: Made setting null create a null object instead of removing
- Breaking: Enabled nullable annotations
- Added SkipHeader option for KV3
- Added support for (de)serializing into nullables
- Added support for read-only collection and dictionary interface types
- Added missing (u)short constructors
- Added byte[] explicit operator
- Added To* methods without formatter
- Added TryAdd
- Added IsCollection
- Fixed Nullable deserialization/serialization
- Fixed Add to throw on existing keys in dictionaries
- Fixed Add methods to not store raw nulls
- Fixed ToString() on null type return a "null" string
v0.51.0
Immutable
release. Only release title and notes can be modified.
- KVObject fields are now readonly (immutable after construction)
- Scalar type conversions now use checked casts (throws OverflowException instead of silent truncation)
- ToBoolean() explicitly supports integer/float/string types, throws for Collection/Array/Blob
- KVObject implements IReadOnlyDictionary<string, KVObject> instead of IEnumerable<KeyValuePair<string, KVObject>>
- Add Collection(capacity), ListCollection(capacity), Array(capacity) overloads
- Fix UInt64 conversions for ToDecimal, ToDouble, ToSingle
- Fix peeked value unboxing in KV3 token reader
- Throw on unclosed comments and invalid hex in KV3
- Optimize text/binary string writing
- Reuse StringBuilder and use SearchValues for faster scanning
v0.50.0
Immutable
release. Only release title and notes can be modified.
BREAKING CHANGES: This release is a second pass at improving the overall API. If you run into issues or unergonomic API, open a new issue.
- Merged KVValue into KVObject, this is now a single type.
- Name removed from KVObject, keys are stored in the parent container. Use KVDocument.Name for the root key name.
- Iteration yields KeyValuePair<string,KVObject> instead of KVObject.
- KVDocument is now the return type of Deserialize(), holding the root Name and Header.
- Added Keys and Values properties on KVObject
- Added KVObject.ListCollection(IEnumerable) factory for creating list-backed collections from existing data
- Added Implicit operators for byte and sbyte
v0.40.0
Immutable
release. Only release title and notes can be modified.
BREAKING CHANGES: This release changes how the API works to make it easier to iterate and modify values. If you run into issues or unergonomic API, open a new issue.
- Replaced KVArrayValue, KVCollectionValue, KVBinaryBlob, KVNullValue classes with a single KVValue readonly record struct (scalars stored inline, no boxing)
- KVObject string/int indexers now return KVObject instead of KVValue
- KVObject string indexer setter now takes KVObject instead of KVValue (implicit conversions from primitives)
- Added dictionary-backed collections for KV3 (KVObject.Collection()) with O(1) lookup
- Added KVObject.ListCollection() for explicit list-backed collections (KV1 duplicate key support)
- Added KVObject.Array() and KVObject.Blob() static factory methods
- Added TryGetChild(string, out KVObject)
- KVObject now implements IConvertible, Convert.ChangeType() works on indexer results
- KVValue.Flag is now init-only (use with expression to modify)
- Removed ChildrenValues property
- Renamed AddProperty to Add(string, KVValue)
- Typed deserialization now supports KV3 native arrays (List, T[], etc.)
- Typed deserialization now supports byte[] properties from binary blobs
- Typed deserialization now supports enum properties
- SetChild on list-backed collections now replaces in-place instead of remove + append
v0.31.0
Immutable
release. Only release title and notes can be modified.
- Improve KV3 formatting
v0.30.2
Immutable
release. Only release title and notes can be modified.
- Bumped to .NET 10
- Added KeyValues3 text implementation (ValveKeyValue.KeyValues3)
- Added KVFlag, KVHeader, KVNullValue
- KVCollectionValue is now public