Skip to content

Releases: OnTopicCMS/OnTopic-Data-Transfer

v2.0.0

03 Mar 00:41
Compare
Choose a tag to compare

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 on LastModified (2cfbc52, d0cb983).
  • Resolve Associations: The Import() now tracks any associations that it is not able to resolve and attempts to resolve them after the initial Import() 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 calling Import() 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: Marked DerivedTopicKey as deprecated, and no longer write it during Export() (4705b29, 6c33fb8).
  • AttributeData(Collection): Renamed AttributeData to RecordData and AttributeDataCollection to RecordDataCollection to maintain parity with the TrackedRecord(Collection) in OnTopic, and to provide base support for both attributes as well as topic references (a5df9b1).
  • RelationshipData(Collection): Renamed RelationshipData to KeyValuesPair and RelationshipDataCollection to MultiMap to maintain parity with the KeyValuesPair<T> and TopicRelationshipMultiMap in OnTopic (bc15631). The JSON now writes to Relationships: [{ …, Values: […]}] instead of Relationships: [{ …, Relationships: […]}].

Code Improvements

  • OnTopic Library: Updated to OnTopic 5.0.0, with accommodations for breaking changes, such as the rename of Topic.DerivedTopic to BaseTopic and Topic.Relationships.SetTopic() to SetValue() (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

09 Dec 22:23
Compare
Choose a tag to compare

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

30 May 21:40
Compare
Choose a tag to compare

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 to Topic.GetUniqueKey() on Export() (0993ea3) and then back to Topic.Id on Import() (37d7a82) in order to maintain referential integrity of topic references saved as attributes (2467351); this can be controlled through the new ExportOptions.TranslateTopicPointers option (b32304b).
  • Built-in support for resolving explicit references (such as relationships and DerivedTopics) which point to topics which haven't yet been Import()ed; the Import() will attempt to resolve these once the graph has been fully imported (96f1473).

Bug Fixes

  • Fixed bug in which ParentID and TopicID were included as part of Export(), which introduced referential integrity conflicts on Import(); this could result in DerivedTopics being updated to point to different topics (60ab46b).

Code Changes

  • Updated Export() to use newly centralized Topic.GetByUniqueKey() extension method instead of its own local helper function (930538e).
  • Updated Import() to use newly centralized AttributeValueCollection.IsDirty() instead of its own locally defined logic (b9143a5).
  • Updated Import() to use newly created Topic.IsNew property for detecting if topic references are valid (94f1efc).

Maintenance

  • Updated various internal dependencies