Releases: lukaskubanek/OrderedDictionary
Releases · lukaskubanek/OrderedDictionary
4.0.1: Fix for Swift 5.5
This release fixes a compatibility issue with Swift 5.5 available in Xcode 13 beta.
4.0.0: MutableCollection & RandomAccessCollection
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 toMutableCollection
, 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 toRandomAccessCollection
instead ofBidirectionalCollection
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 theOrderedDictionary
with different key-value pairs. - Introduced
OrderedDictionary.filter(_:)
that actually returns anOrderedDictionary
instead of an array of key-value pairs. [#66] - Changed the type of
OrderedDictionary.orderedKeys
from a lazily evaluated collection type type-aliased withOrderedDictionaryKeys<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-levelOrderedDictionaryValues<Key, Value>
type alias, it now uses an inner type aliasOrderedDictionary.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
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
- 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
- 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
- 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 🙈
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
This patch should address the issue with package definition format reported in #51.
2.2.0: Support for Swift 5.0
- 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
- 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