Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Feb 11, 2025

This PR contains the following updates:

Package Update Change
apple/swift-algorithms minor from: "1.0.0" -> from: "1.2.1"

Release Notes

apple/swift-algorithms (apple/swift-algorithms)

v1.2.1

Compare Source

Changes
  • The package now has a minimum Swift version of Swift 5.7. ([#​240])
  • Adds a project for building with Xcode. ([#​246])
Fixes

The 1.2.1 release includes contributions from [b1ackturtle], [CheATSlark], [dabrahams], [glessard], [j-f1], [marcosgriselli], [mrs1669], [natecook1000], [rex4539], and [schlagelk]. Thank you!

v1.2.0

Compare Source

Additions
  • Sequences have new grouped(by:) and keyed(by:) methods, which simplify
    building dictionaries based on sequence elements: ([#​197])

    let evensOdds = (1...10).grouped(by: { $0.isMultiple(of: 2) ? "even" : "odd" })
    // ["even": [2, 4, 6, 8, 10], "odd": [1, 3, 5, 7, 9]]
    
    let animals = ["Aardvark", "Alpaca", "Armadillo", "Barracuda", "Buffalo", ...]
    let alphaAnimals = animals.keyed(by: \.first!, resolvingConflictsWith: { _, first, _ in first })
    // ["A": "Aardvark", "B": "Barracuda", ...]
  • The endOfPrefix(while:) and startOfSuffix(while) methods are now public.
    These methods were previously implementation details of the trimming group
    of methods. ([#​211])

Fixes

The 1.2.0 release includes contributions from [amomchilov], [mattyoung], [natecook1000], [stephentyrone], and [ttsugriy].
Thank you!


v1.1.0

Compare Source

Additions
  • New nonmutating partitioned(by:) methods that return both the failing and passing elements of a sequence or collection in separate arrays. ([#​152])

    let cast = ["Vivien", "Marlon", "Kim", "Karl"]
    let (longNames, shortNames) = cast.partitioned(by: { $0.count < 5 })
    
    print(longNames)
    // Prints "["Vivien", "Marlon"]"
    print(shortNames)
    // Prints "["Kim", "Karl"]"
  • A new evenlyChunked(in:) method that chunks a sequence or collection into the specified number of evenly-sized subsequences. ([#​96])

    let numbers = Array(0..<10) 
    for chunk in numbers.evenlyChunked(in: 4) {
        print(chunk)
    }
    // Prints: 
    // [0, 1, 2]
    // [3, 4, 5]
    // [6, 7]
    // [8, 9]
Changes
  • The package now has a minimum Swift version of Swift 5.4.
Fixes
  • Improvements to documentation, including a new DocC-based documentation structure.

The 1.1.0 release includes contributions from [dickoff], [gwynne], [mdznr], [natecook1000], [ole], [stephentyrone], and [timvermeulen].
Thank you!



Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant