Skip to content

Releases: lukaskubanek/OrderedDictionary

4.0.1: Fix for Swift 5.5

18 Aug 13:44
v4.0.1
3bac27b
Compare
Choose a tag to compare

This release fixes a compatibility issue with Swift 5.5 available in Xcode 13 beta.

4.0.0: MutableCollection & RandomAccessCollection

05 Apr 15:43
v4.0.0
Compare
Choose a tag to compare

This is a major overhaul of OrderedDictionary's API that contains breaking changes. If you run into any issues upgrading from previous versions, please let me know.

  • OrderedDictionary now conforms to MutableCollection, which comes with the support for directly setting key-value pairs through a subscript as well as reordering of the whole collection or its slices.
  • OrderedDictionary now conforms to RandomAccessCollection instead of BidirectionalCollection only, making the index-based traversal more efficient. [#64]
  • Re-introduced a dedicated slice type OrderedDictionarySlice<Key, Value> and added support for replacing a certain range of the OrderedDictionary with different key-value pairs.
  • Introduced OrderedDictionary.filter(_:) that actually returns an OrderedDictionary instead of an array of key-value pairs. [#66]
  • Changed the type of OrderedDictionary.orderedKeys from a lazily evaluated collection type type-aliased with OrderedDictionaryKeys<Key, Value> to a [Key] array. The property directly exposes the internal backing storage, which makes accessing keys more comfortable and prevents unnecessary type conversions. [#67]
  • The type of OrderedDictionary.orderedValues is still a lazily evaluated collection, but instead of the top-level OrderedDictionaryValues<Key, Value> type alias, it now uses an inner type alias OrderedDictionary.LazyValues.
  • Deprecated OrderedDictionary.moveElement(forKey:to:) as it was based on a very specific move logic which turned out not to be generally applicable.
  • OrderedDictionary.update(_:at:) now returns a non-optional key-value pair (Element).
  • Improved performance of in-place sorting via OrderedDictionary.sort(by:).
  • Added conformance to Hashable.
  • Dropped support for Swift 4.2, OrderedDictionary now requires Swift ≥5.0.
  • Tweaked precondition messages and added invariant assertions.
  • Revamped the whole test suite.
  • Removed example playgrounds and moved examples directly to documentation comments.

3.0.1: Xcode Project Fix

28 May 09:17
v3.0.1
Compare
Choose a tag to compare

Re-added marketing version to the Xcode project as it’s used in a required key within the Info.plist (#62).

3.0.0: Swift <4.2 Support Drop & CI Setup

22 May 07:14
v3.0.0
Compare
Choose a tag to compare
  • Dropped support for Swift <4.2. (To use OrderedDictionary with Swift 4.0 or 4.1, please refer to the 2.x versions.)
  • Configured GitHub actions for CI but still kept Travis for older build configurations (Swift 4.2).

2.4.0: Capacity Reservation Support

02 Mar 11:04
Compare
Choose a tag to compare
  • Added support for capacity reservation (capacity, init(minimumCapacity:), reserveCapacity(_:)). Kudos to @GalCohen.
  • init(values:uniquelyKeyedBy:) now takes a throwing closure.

2.3.0: Mapping Values & Revamped Initializers

30 Jul 13:41
Compare
Choose a tag to compare
  • Introduced mapValues(_:) & compactMapValues(_:)
  • Renamed initializers to better convey their semantics
    • init(_:)init(uniqueKeysWithValues:)
    • init(values:keyedBy:)init(values:uniquelyKeyedBy:)
    • Added shims for the deprecated versions
  • Fixed warnings for Swift 5.0

2.2.2: Fixed Version Numbers 🙈

29 Apr 11:57
Compare
Choose a tag to compare

In version 2.2.1 I accidentally forgot to bump the version numbers. This is now fixed in this further patch release.

2.2.1: Package Definition Fix

29 Apr 11:16
Compare
Choose a tag to compare

This patch should address the issue with package definition format reported in #51.

2.2.0: Support for Swift 5.0

04 Apr 10:31
Compare
Choose a tag to compare
  • Added support for Swift 5.0 by making changes necessary for Xcode 10.2
  • This version should still work with Swift 4.0 & 4.2
  • Fixed an issue with reset flag for marking the code as safe for app extensions [#10, #50] (thanks to @graphiclife)

2.1.0: SPM, Optimizations & Additions

10 Jul 13:20
Compare
Choose a tag to compare
  • Added support for Swift Package Manager (thanks to @jnordberg)
  • Optimized lookup performace (thanks to @maicki)
  • Introduced Dictionary.sorted(by:)
  • Introduced popFirst(), popLast(), removeFirst(), removeLast() methods
  • Annotated sort methods with throws/rethrows keywords
  • Added note about no support for CocoaPods