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.Json
version to6.0.10
per 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
StreamId
to go with the lower-levelStreamName
abstraction, 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.Json
dependency to silence security scanners - Pushes various pieces e.g.
Union
andTypeSafeEnum
(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 anITimelineEvent
given the additional properties to go with a set of baseline data from anIEventData
Core.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
: AddSerializeToStream
andDeserializeFromStream
#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 ofStreamName
pertaining to the{category}
portion (mainly moved fromStreamName
.* equivalents; see Changed) #100StreamName.Split
: Splits a StreamName into its{category}
and{streamId}
portions, usingStreamId
for the latter. ReplacesCategoryAndId
#100StreamName.tryFind
: Helper to implementStream.tryDecode
/Reactions.For
pattern (to implement validation of StreamId format when parsingStreamName
s). (See README) #100StringId, Comparable
: Base types for Strongly Typed Ids with string renditions #119SystemTextJson.CodecJsonElement
: Maps Unions to/from Events withJsonElement
Bodies asSystemTextJson.Codec
did in in2.x
#75SystemTextJson.Options.Create
: AddrejectNullStrings
option, which wires in aRejectNullStringConverter
#87 🙏 @nordfjordSystemTextJson.StringIdConverter
: Converter forStringId
#119SystemTextJson.StringIdOrDictionaryKeyConverter
: Converter forStringId
that enablesDictionary
values using aStringId
-derived type as a key to be used as a JSON Object Key #116SystemTextJson.ToUtf8Codec
: Adapter to map fromJsonElement
toReadOnlyMemory<byte>
Event Bodies (for interop scenarios; ideally one usesSystemTextJson.Codec
directly 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
TypeShape
reference to v10
, triggering minFSharp.Core
target moving to4.5.4
- replace all
FSharpFunc
usage withFunc
#92 #105 BREAKING: JsonPickler/JsonIsomorphism/UnionConverter
: Reduced greediness ofType
matching (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
/down
signature #83Codec 'Context
: replace'Context option
withContext
#82IEventCodec.TryDecode
: Rename toDecode
(to align with the primary assumption of aTry
prefix per BCL conventions: It won't throw, no matter what!) #107 🙏 @nordfjordNewtonsoftJson
: RenameSettings
toOptions
#60 #76NewtonsoftJson
: Upped minimumNewtonsoft.Json
version to13.0.3
per GitHub advisory database #109NewtonsoftJson.Codec
: Switched Event body type frombyte[]
toReadOnlyMemory<byte>
#75NewtonsoftJson.Options
: Change all settings (incCreateDefault
) to setDateParseHandling = DateParseHandling.None
in 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 fromJsonElement
toReadOnlyMemory<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.SystemTextJson
toFsCodec.Box
#75TypeSafeEnum
: Merged two impls fromSystemTextJson
andNewtonsoftJson
#102
Removed
Fixed
Core.Codec
: Changed default timestamp toDateTime.UtcNow
as per docs (was:DateTime.Now
) #104(NewtonsoftJson|SystemTextJson).TypeSafeEnum
: Merged/moved toFsCodec.TypeSafeEnum
#102NewtonsoftJson
: UppedRecyclableMemoryStream
to>= 3.0.0
to handle breaking change inGetStream
return 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.Default
to matchJsonSerializerSettings.Default
#73
Changed
SystemTextJson
: ReplaceautoUnion=true
with individually controllableautoTypeSafeEnumToJsonString
andautoUnionToJsonObject
settings 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 aTypeSafeEnumConverter
to all Discriminated Unions that support it, andUnionConverter
to all others #69SystemTextJson.Options(autoUnion = true)
: Automated wireup ofUnionOrTypeSafeEnumConverterFactory
#69SystemTextJson.UnionConverter
: Port ofNewtonsoftJson
equivalent started in #43 #59 🙏 @NickDarvey
Changed
Serdes
: ChangedSerdes
to be stateful, requiring a specific set ofOptions
/Settings
that are always applied consistently #70Serdes.DefaultSettings
: Updated README.md ASP.NET integration advice to reflect minor knock-on effect #70SystemTextJson
: TargetSystem.Text.Json
v6.0.1
,TypeShape
v9.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