Releases: jet/FsCodec
Add FsCodec.Encoding (generalized from FsCodec.Compression)
Adds Brotli compression for FsCodec.SystemTextJson, with support for conditionally compressing based on the EventType
Equinox.DynamoStore externalized compression and encoding from the outset via the FsCodec.Compression helpers in FsCodec.Box (which remain for full binary backcompat with 3.x, but are Obsoleted). These helpers now move into FsCodec as FsCodec.Encoding, with some minor renaming and polish.
These generalizations allow that same scheme to be applied in conjunction with Equinox.CosmosStore v 4.1.0 and later (which no longer duplicates this functionality internally as versions prior to that did)
Added
SystemTextJson: Remove vulnerable default dep
Added
TimelineEvent.ToString: Render Unfold/Event state, EventType, Index #123
Changed
SystemTextJson: Dropped minimumSystem.Text.Jsonversion to6.0.10per CVE-2024-43485 #125
Full Changelog: 3.0.2...3.0.3
SystemTextJson: Update min System.Text.Json for non vulnerable default
What's Changed
- chore(SystemTextJson, deps): Target minimum non vulnerable ver: 8.0.4 #122
Full Changelog: 3.0.0...3.0.2
Switch to ValueTuple/Func/ReadOnlyMemory; Add StreamId, StringId, Union
NOTE: These release notes summarize the more detailed ones per -rc increment included in the CHANGELOG.md
TL;DR this release adds features and applies some associated tweaks with the following objectives:
- Exposes a
StreamIdto go with the lower-levelStreamNameabstraction, which forms part of the Equinox V4 Programming Model, streamlining how identity types get mapped to stream names - Migrates from
byte[]Event Bodies toSystem.ReadOnlyMemory- this is the default body types for most Equinox V4 stores, and for Propulsion V3 - Updates minimum
Newtonsoft.Jsondependency to silence security scanners - Pushes various pieces e.g.
UnionandTypeSafeEnum(which started life as independent implementations per concrete Codec) to the core module - Removes usage of F#-specific and/or otherwise deprecated types from the public interface (
FSharpFunc->Func,System.Tuple->System.ValueTuple)
Added
Codec.Create: Exposed low level overload for infrastructure useCore.EventData/TimelineEvent/EventCodec.Map: Exposed building blocks for mapping event envelopes and/or codecs over Body Format types #77Core.TimelineEvent.Create: Add overload to create anITimelineEventgiven the additional properties to go with a set of baseline data from anIEventDataCore.EventData/TimelineEvent: Exposed default ctors #83NewtonsoftJson.StringEnumConverter.Create: Small wrapper to smooth construction syntax #111NewtonsoftJson.Serdes.Deserialize<'T>(Newtonsoft.Json.Linq.JObject): One liner #111NewtonsoftJson.StringIdConverter: Converter forStringId#119Serdes: AddSerializeToStreamandDeserializeFromStream#83 🙏 @deviousastiStreamId: type-tagged wrapper for the streamId portion of aStreamName#100StreamName.Category+category: Extracts the category portion of a streamName #85StreamName.Category: covers aspects ofStreamNamepertaining to the{category}portion (mainly moved fromStreamName.* equivalents; see Changed) #100StreamName.Split: Splits a StreamName into its{category}and{streamId}portions, usingStreamIdfor the latter. ReplacesCategoryAndId#100StreamName.tryFind: Helper to implementStream.tryDecode/Reactions.Forpattern (to implement validation of StreamId format when parsingStreamNames). (See README) #100StringId, Comparable: Base types for Strongly Typed Ids with string renditions #119SystemTextJson.CodecJsonElement: Maps Unions to/from Events withJsonElementBodies asSystemTextJson.Codecdid in in2.x#75SystemTextJson.Options.Create: AddrejectNullStringsoption, which wires in aRejectNullStringConverter#87 🙏 @nordfjordSystemTextJson.StringIdConverter: Converter forStringId#119SystemTextJson.StringIdOrDictionaryKeyConverter: Converter forStringIdthat enablesDictionaryvalues using aStringId-derived type as a key to be used as a JSON Object Key #116SystemTextJson.ToUtf8Codec: Adapter to map fromJsonElementtoReadOnlyMemory<byte>Event Bodies (for interop scenarios; ideally one usesSystemTextJson.Codecdirectly in the first instance) #75TimelineEvent.Size: Enables stores to surface the stored size at the point of loading #82TypeSafeEnum.caseValues<'t>: Yields all values of a union (that is aTypeSafeEnum) #115TypeSafeEnum.tryParseF/parseF: parameterizes matching of the Union Case name (to enable e.g. case insensitive matching) #101Union: Exposed internal type, featuringisUnion,isNullary, andcaseName(that's not tied toTypeSafeEnum), #102
Changed
- Rename
Deflate.EncodeTryDeflate->Compression.EncodeTryCompress#105 #80 🙏 @nordfjord - updated
TypeShapereference to v10, triggering minFSharp.Coretarget moving to4.5.4 - replace all
FSharpFuncusage withFunc#92 #105 BREAKING: JsonPickler/JsonIsomorphism/UnionConverter: Reduced greediness ofTypematching (only honors tags placed on the type being serialized, not parents) #113Compression: Switched encoding to use Brotli Compression (Deflate compressed content can still be inflated, but will no longer be generated) #105Option/Tuple: Replace withValueOption/ValueTuple#82Codec.Create: Made timestamp mandatory in low levelup/downsignature #83Codec 'Context: replace'Context optionwithContext#82IEventCodec.TryDecode: Rename toDecode(to align with the primary assumption of aTryprefix per BCL conventions: It won't throw, no matter what!) #107 🙏 @nordfjordNewtonsoftJson: RenameSettingstoOptions#60 #76NewtonsoftJson: Upped minimumNewtonsoft.Jsonversion to13.0.3per GitHub advisory database #109NewtonsoftJson.Codec: Switched Event body type frombyte[]toReadOnlyMemory<byte>#75NewtonsoftJson.Options: Change all settings (incCreateDefault) to setDateParseHandling = DateParseHandling.Nonein order to work around the hare-brained default #110NewtonsoftJson.TypeSafeEnum: Sync withSystemTextJson.TypeSafeEnum#91StreamName: breaking changes to reflect introduction of strongly typedStreamId#100StreamName.trySplitCategoryAndId: renames:trySplitCategoryAndStreamId->Internal.tryParse;splitCategoryAndStreamId->split;CategoryAndId->Split;Categorized|NotCategorized->Internal.*;category->Category.ofStreamName,IdElements->StreamId.Parse#100SystemTextJson.Codec: Switched Event body type fromJsonElementtoReadOnlyMemory<byte>#75SystemTextJson.Options: Move custom converters after specified options #111SystemTextJson.UnionOrTypeSafeEnumConverterFactory: Allow specific converters to override global policy #101ToByteArrayCodec: now adapts aReadOnlyMemory<byte>encoder (was fromJsonElement) (tobyte[]bodies); Moved fromFsCodec.SystemTextJsontoFsCodec.Box#75TypeSafeEnum: Merged two impls fromSystemTextJsonandNewtonsoftJson#102
Removed
Fixed
Core.Codec: Changed default timestamp toDateTime.UtcNowas per docs (was:DateTime.Now) #104(NewtonsoftJson|SystemTextJson).TypeSafeEnum: Merged/moved toFsCodec.TypeSafeEnum#102NewtonsoftJson: UppedRecyclableMemoryStreamto>= 3.0.0to handle breaking change inGetStreamreturn type #118
New Contributors
- @deviousasti made their first contribution in #83
- @nordfjord made their first contribution in #87
- @Mousaka made their first contribution in #88
- @olivercoad made their first contribution in #74
Full Changelog: 2.3.2...3.0.0
Add Options.Default, Split autoUnion option
Fast-follow release with breaking changes vs 2.3.1, which (along with 2.3.0) is unlisted
Added
SystemTextJson: AddOptions.Defaultto matchJsonSerializerSettings.Default#73
Changed
SystemTextJson: ReplaceautoUnion=truewith individually controllableautoTypeSafeEnumToJsonStringandautoUnionToJsonObjectsettings re #71 #73
See CHANGELOG
SystemTextJson: Fix autoUnion mode to not handle `list` and `option`
Stateful Serdes, System.Text.Json UnionEncoder, STJ autoUnion mode
NOTE: Unlisted in favor of 2.3.1, which has a critical fix for autoUnion mode's handling of option and list types.
Added
SystemTextJson.UnionOrTypeSafeEnumConverterFactory: Global converter that automatically applies aTypeSafeEnumConverterto all Discriminated Unions that support it, andUnionConverterto all others #69SystemTextJson.Options(autoUnion = true): Automated wireup ofUnionOrTypeSafeEnumConverterFactory#69SystemTextJson.UnionConverter: Port ofNewtonsoftJsonequivalent started in #43 #59 🙏 @NickDarvey
Changed
Serdes: ChangedSerdesto be stateful, requiring a specific set ofOptions/Settingsthat are always applied consistently #70Serdes.DefaultSettings: Updated README.md ASP.NET integration advice to reflect minor knock-on effect #70SystemTextJson: TargetSystem.Text.Jsonv6.0.1,TypeShapev9.0.0#68
See CHANGELOG
Fix CI AssemblyVersion stamping
2.2.0
- Added:
NewtonsoftJson.Serdes.DefaultSettings: Exposes default settings (for use with ASP.NET Core .AddNewtonsoftJson) #63 - Added:
SystemTextJson.Serdes.DefaultOptions: Exposes default options (for use with ASP.NET Core .AddJsonOptions) #63 - Fixed: Clarify StreamName.parse exception message #58 🙏 @dharmaturtle
- Fixed: Remove erroneous Converters from FsCodec.SystemTextJson.Converters.JsonOptionConverter namespacing
See CHANGELOG