Skip to content

SwiftCollections v1.0.5

Choose a tag to compare

@mrdav30 mrdav30 released this 08 Jun 04:03
· 167 commits to main since this release
202c367

This release brings several important improvements across the collection types, enhanced .NET 8 compatibility, and expanded serialization support.

✨ New Features

  • SwiftQueue

    • Added TryDequeue and TryPeek methods for safer dequeue/peek patterns.
    • Now implements ICollection for improved interoperability and serializer compatibility.
  • SwiftStack

    • Added a custom JsonConverter to ensure proper serialization of stack order under System.Text.Json.
  • SwiftHashSet

    • Renamed Remove to TryRemove for consistent API semantics with other SwiftCollections types.
    • ICollection.Remove mapped to TryRemove.
  • SwiftDictionary

    • Improved indexer behavior — now triggers resize checks when adding new keys via indexer assignment, matching Add behavior.

🔄 Refactors

  • Array3D

    • Reworked internal storage to use a flattened array, improving performance, cache locality, and simplifying future serialization.
    • Added custom JsonConverter for correct and efficient System.Text.Json serialization.
  • Array2D

    • Added custom JsonConverter for efficient and correct serialization under System.Text.Json.

🛠 General Updates

  • SwiftExtensions / HashHelper

    • Added new utility functions to support the recent refactors and conversions.
  • .NET 8 Support

    • SwiftCollections now officially supports targeting .NET 8 in addition to existing frameworks.

Summary

This release makes SwiftCollections more modern, more compatible with .NET 8, and improves performance and API ergonomics across the board. If you are using SwiftQueue, SwiftStack, SwiftDictionary, SwiftHashSet, Array2D, or Array3D, we recommend upgrading to benefit from these improvements.