Releases: OnTopicCMS/OnTopic-Data-Transfer
v2.0.0
OnTopic Data Transfer 2.0.0 is a major release primarily focused on support for OnTopic 5.0.0's new topic references feature. It includes changes to the JSON serialization format—though it also maintains backward compatibility with the legacy format.
New Features
General
- Topic References: Full integration of OnTopic 5.0.0's new topic references feature, including support for
BaseTopic
and merging topic references based onLastModified
(2cfbc52, d0cb983). - Resolve Associations: The
Import()
now tracks any associations that it is not able to resolve and attempts to resolve them after the initialImport()
has completed, thus accounting for associations to topics that weren't yet imported because they occur later in the interchange data (4a75ff6). This prevents the need for callingImport()
twice to ensure that there aren't any unresolved associations.
NuGet Package
- SourceLink: Configured
SourceLink
with references to GitHub commits so that packages can be properly debugged by implementers (8e1a5cc). - IntelliSense: The NuGet packages now include the XML documentation, thus allowing implementers to benefit from IntelliSense annotations in Visual Studio (cbc66d4).
- Icon: Added icon to NuGet packages to make them easier to recognize, and consistently branded (d65a81a).
Breaking Changes
The following changes impact the interchange format, but maintain backward compatibility for derserializing legacy JSON files.
DerivedTopicKey
: MarkedDerivedTopicKey
as deprecated, and no longer write it duringExport()
(4705b29, 6c33fb8).AttributeData(Collection)
: RenamedAttributeData
toRecordData
andAttributeDataCollection
toRecordDataCollection
to maintain parity with theTrackedRecord(Collection)
in OnTopic, and to provide base support for both attributes as well as topic references (a5df9b1).RelationshipData(Collection)
: RenamedRelationshipData
toKeyValuesPair
andRelationshipDataCollection
toMultiMap
to maintain parity with theKeyValuesPair<T>
andTopicRelationshipMultiMap
in OnTopic (bc15631). The JSON now writes toRelationships: [{ …, Values: […]}]
instead ofRelationships: [{ …, Relationships: […]}]
.
Code Improvements
- OnTopic Library: Updated to OnTopic 5.0.0, with accommodations for breaking changes, such as the rename of
Topic.DerivedTopic
toBaseTopic
andTopic.Relationships.SetTopic()
toSetValue()
(2f75a73). - JSON (De)Serialization: Updated to
System.Json.Text
5.0.0, which allows us to take advantage of .NET 5 annotations, such as[JsonInclude]
and[JsonIgnore()]
, while maintaining compatibility with .NET Core 3.x (439b41c). - Code Analysis: Implemented the latest version of Microsoft's code analysis library (
NetAnalyzers
), as well as the feedback it exposed, including nullable reference annotations (7fa983c).
v1.2.1
Minor maintenance release with an emphasis on updating the code to utilize new C# 9.0 capabilities and apply the latest version of code contracts. While some of these updates may improve reliability, they do not resolve any known bugs or introduce any new functionality.
Code Improvements
- Updated development dependencies, including GitVersion and the .NET Test Framework (89fd11e)
- Updated to C# 9.0 and implemented new capabilities such as target-typed object creation and improved pattern matching (5e34b68)
- Updated to new
Microsoft.CodeAnalysis.NetAnalyzers
and implemented new recommendations (d81de85) - Marked assemblies as CLS Compliant (6f05bd9, 7b8227a)
v1.2.0
This update builds off of OnTopic Library 4.3.0 in improving performance and reliability when importing and saving large topic graphs. Most notably, this includes the ability to dynamically update the content type and attribute schemas based on the in-memory topic graph, thus addressing potential conflicts between the current configuration and the imported configuration. This is especially critical when bootstrapping an empty database with a reference configuration, which is now supported. In addition, a number of updated have been made to better maintain referential integrity, such as support for implicit topic references—i.e., references that point to other topics. Those are now translated to unique topic keys on Export()
, and then translated back to topic identifiers on Import()
.
Features
- Support translating implicit topic references from
Topic.Id
toTopic.GetUniqueKey()
onExport()
(0993ea3) and then back toTopic.Id
onImport()
(37d7a82) in order to maintain referential integrity of topic references saved as attributes (2467351); this can be controlled through the newExportOptions.TranslateTopicPointers
option (b32304b). - Built-in support for resolving explicit references (such as relationships and
DerivedTopic
s) which point to topics which haven't yet beenImport()
ed; theImport()
will attempt to resolve these once the graph has been fully imported (96f1473).
Bug Fixes
- Fixed bug in which
ParentID
andTopicID
were included as part ofExport()
, which introduced referential integrity conflicts onImport()
; this could result inDerivedTopic
s being updated to point to different topics (60ab46b).
Code Changes
- Updated
Export()
to use newly centralizedTopic.GetByUniqueKey()
extension method instead of its own local helper function (930538e). - Updated
Import()
to use newly centralizedAttributeValueCollection.IsDirty()
instead of its own locally defined logic (b9143a5). - Updated
Import()
to use newly createdTopic.IsNew
property for detecting if topic references are valid (94f1efc).
Maintenance
- Updated various internal dependencies