Skip to content

Rapid 3.0.0

Latest
Compare
Choose a tag to compare
@kaascevich kaascevich released this 08 Sep 23:19
· 4 commits to main since this release

Hello, I still exist! Sorry for not updating for... oh my god, has it actually been a year and a week since I last made a release?

A bunch of this update is dedicated to bringing Rapid up-to-date with all the fancy-schmancy newness of Swift 6.

Full Changelog: v2.3.0...v3.0.0

Additions

  • ~= operator for Regex
  • !! operator for calling a never-returning function when optional unwrapping fails
  • AnyType and Nothing typealiases for Any.Type and Void, respectively
  • sum() and product() methods for Numeric sequences
  • compacted() method for Sequence
  • ** and **= operators
  • ExpressibleByEmptyArrayLiteral and ExpressibleByEmptyDictionaryLiteral protocols

Updates

  • Updated ?! operator with typed throws

Deprecations

  • There's now a count(where:) method in the standard library, rendering one of Rapid's count(of:) methods obsolete. This method has thus been deprecated, and will be removed in Rapid 4.
    • count(where:) should work as a drop-in replacement for your projects -- and if you were using trailing closures, you might not even have to update your code at all!
    • The overload of count(of:) that takes an element instead of a predicate was kept, since the standard library doesn't have a direct equivalent to it (yet).

Removals

  • ++, --, &++, and &-- operators

Breaking Changes

  • Changed the count parameter of String.*(_:_:) to be a UInt instead of an Int

Other

  • Changed license from the GNU GPL v3 to the MIT License
    • What this practically means is that, from this version (3.0.0) onwards, Rapid can now legally be used in software that isn't open source (as well as some other things that stem from or alongside this). No existing users should be affected by this change.
  • General documentation polish
  • Migrated tests from Quick/Nimble to swift-testing