Skip to content

Commit 57bad7f

Browse files
authored
Rename: swift-valkey -> valkey-swift (#101)
1 parent 4380a49 commit 57bad7f

File tree

86 files changed

+1771
-761
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1771
-761
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Convert coverage files
4444
run: |
4545
llvm-cov export -format="lcov" \
46-
.build/debug/swift-valkeyPackageTests.xctest \
46+
.build/debug/valkey-swiftPackageTests.xctest \
4747
-ignore-filename-regex="\/Tests\/" \
4848
-instr-profile .build/debug/codecov/default.profdata > info.lcov
4949
- name: Upload to codecov.io

Benchmarks/ValkeyBenchmarks/ValkeyBenchmarks.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the swift-valkey open source project
3+
// This source file is part of the valkey-swift open source project
44
//
5-
// Copyright (c) 2025 the swift-valkey project authors
5+
// Copyright (c) 2025 the valkey-swift project authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9-
// See CONTRIBUTORS.txt for the list of swift-valkey project authors
9+
// See CONTRIBUTORS.txt for the list of valkey-swift project authors
1010
//
1111
// SPDX-License-Identifier: Apache-2.0
1212
//

Notice.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

2-
The Swift-Valkey Project
2+
The valkey-swift Project
33
====================
44

5-
Please visit the Swift-Valkey web site for more information:
5+
Please visit the valkey-swift web site for more information:
66

7-
* https://github.com/adam-fowler/swift-valkey
7+
* https://github.com/adam-fowler/valkey-swift
88

9-
Copyright 2025 The Swift-Valkey Project
9+
Copyright 2025 The valkey-swift Project
1010

11-
The Swift-Valkey Project licenses this file to you under the Apache License,
11+
The valkey-swift Project licenses this file to you under the Apache License,
1212
version 2.0 (the "License"); you may not use this file except in compliance
1313
with the License. You may obtain a copy of the License at:
1414

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import PackageDescription
55

66
let package = Package(
7-
name: "swift-valkey",
7+
name: "valkey-swift",
88
platforms: [.macOS(.v15)],
99
products: [
1010
.library(name: "Valkey", targets: ["Valkey"]),

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# swift-valkey
1+
# valkey-swift
22

33
Valkey client
44

55
## Usage
66

7-
The swift-valkey project uses a connection pool, which requires a background process to manage it. You can either run it using a Task group
7+
The valkey-swift project uses a connection pool, which requires a background process to manage it. You can either run it using a Task group
88

99
```swift
1010
let valkeyClient = ValkeyClient(.hostname("localhost", port: 6379), logger: logger)
@@ -47,4 +47,4 @@ let (setResponse, getResponse) = try await connection.pipeline(
4747

4848
## Redis compatibilty
4949

50-
As Valkey is a fork of Redis v7.2.4, swift-valkey is compatible with Redis databases up to v7.2.4. There is a chance the v7.2.4 features will still be compatible in later versions of Redis, but these are now considered two different projects and they will diverge. Swift-valkey uses the RESP3 protocol.
50+
As Valkey is a fork of Redis v7.2.4, valkey-swift is compatible with Redis databases up to v7.2.4. There is a chance the v7.2.4 features will still be compatible in later versions of Redis, but these are now considered two different projects and they will diverge. valkey-swift uses the RESP3 protocol.

Sources/Valkey/Cluster/HashSlot.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the swift-valkey project
3+
// This source file is part of the valkey-swift project
44
//
5-
// Copyright (c) 2025 the swift-valkey authors
5+
// Copyright (c) 2025 the valkey-swift authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9-
// See swift-valkey/CONTRIBUTORS.txt for the list of swift-valkey authors
9+
// See valkey-swift/CONTRIBUTORS.txt for the list of valkey-swift authors
1010
//
1111
// SPDX-License-Identifier: Apache-2.0
1212
//
@@ -46,10 +46,10 @@ public struct HashSlot: Hashable, Sendable {
4646

4747
/// The maximum valid hash slot value (16,383).
4848
public static let max = HashSlot(.hashSlotMax)
49-
49+
5050
/// The minimum valid hash slot value (0).
5151
public static let min = HashSlot(.hashSlotMin)
52-
52+
5353
/// The total number of hash slots in a Valkey cluster (16,384).
5454
public static let count: Int = 16384
5555

@@ -266,7 +266,7 @@ extension HashSlot {
266266
/// Calculates the CRC16 checksum for a sequence of bytes using the XMODEM algorithm.
267267
///
268268
/// This is the specific CRC16 implementation used by Valkey/Redis for hash slot calculation.
269-
///
269+
///
270270
/// - Parameter bytes: A sequence of bytes to compute the CRC16 value for
271271
/// - Returns: The computed CRC16 value
272272
package static func crc16<Bytes: Sequence>(_ bytes: Bytes) -> UInt16 where Bytes.Element == UInt8 {

Sources/Valkey/Cluster/HashSlotShardMap.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the swift-valkey project
3+
// This source file is part of the valkey-swift project
44
//
5-
// Copyright (c) 2025 the swift-valkey authors
5+
// Copyright (c) 2025 the valkey-swift authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9-
// See swift-valkey/CONTRIBUTORS.txt for the list of swift-valkey authors
9+
// See valkey-swift/CONTRIBUTORS.txt for the list of valkey-swift authors
1010
//
1111
// SPDX-License-Identifier: Apache-2.0
1212
//

Sources/Valkey/Cluster/ValkeyClusterError.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the swift-valkey project
3+
// This source file is part of the valkey-swift project
44
//
5-
// Copyright (c) 2025 the swift-valkey authors
5+
// Copyright (c) 2025 the valkey-swift authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9-
// See swift-valkey/CONTRIBUTORS.txt for the list of swift-valkey authors
9+
// See valkey-swift/CONTRIBUTORS.txt for the list of valkey-swift authors
1010
//
1111
// SPDX-License-Identifier: Apache-2.0
1212
//
@@ -26,4 +26,3 @@ package enum ValkeyClusterError: Error {
2626
case clusterHasNoNodes
2727
case clusterClientIsShutDown
2828
}
29-

Sources/Valkey/Cluster/ValkeyMovedError.swift

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the swift-valkey project
3+
// This source file is part of the valkey-swift project
44
//
5-
// Copyright (c) 2025 the swift-valkey authors
5+
// Copyright (c) 2025 the valkey-swift authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9-
// See swift-valkey/CONTRIBUTORS.txt for the list of swift-valkey authors
9+
// See valkey-swift/CONTRIBUTORS.txt for the list of valkey-swift authors
1010
//
1111
// SPDX-License-Identifier: Apache-2.0
1212
//
@@ -51,34 +51,35 @@ extension RESPToken {
5151
/// Attempts to parse a RESP error token as a Valkey MOVED error.
5252
///
5353
/// This method extracts the hash slot, endpoint, and port information from a RESP error
54-
/// token if it represents a Valkey MOVED error. MOVED errors are returned by Valkey cluster
54+
/// token if it represents a Valkey MOVED error. MOVED errors are returned by Valkey cluster
5555
/// nodes when a client attempts to access a key that belongs to a different node.
5656
///
5757
/// The error format is expected to be: `"MOVED <slot> <endpoint>:<port>"`
5858
///
5959
/// - Returns: A `ValkeyMovedError` if the token represents a valid MOVED error, or `nil` otherwise.
6060
@usableFromInline
6161
func parseMovedError() -> ValkeyMovedError? {
62-
let byteBuffer: ByteBuffer? = switch self.value {
63-
case .bulkError(let byteBuffer),
64-
.simpleError(let byteBuffer):
65-
byteBuffer
66-
67-
case .simpleString,
68-
.bulkString,
69-
.verbatimString,
70-
.number,
71-
.double,
72-
.boolean,
73-
.bigNumber,
74-
.array,
75-
.attribute,
76-
.map,
77-
.set,
78-
.push,
79-
.null:
80-
nil
81-
}
62+
let byteBuffer: ByteBuffer? =
63+
switch self.value {
64+
case .bulkError(let byteBuffer),
65+
.simpleError(let byteBuffer):
66+
byteBuffer
67+
68+
case .simpleString,
69+
.bulkString,
70+
.verbatimString,
71+
.number,
72+
.double,
73+
.boolean,
74+
.bigNumber,
75+
.array,
76+
.attribute,
77+
.map,
78+
.set,
79+
.push,
80+
.null:
81+
nil
82+
}
8283

8384
guard var byteBuffer else {
8485
return nil
@@ -114,4 +115,3 @@ extension RESPToken {
114115
return ValkeyMovedError(slot: slot, endpoint: String(endpoint), port: port)
115116
}
116117
}
117-

Sources/Valkey/Cluster/ValkeyNodeConnectionPool.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the swift-valkey project
3+
// This source file is part of the valkey-swift project
44
//
5-
// Copyright (c) 2025 the swift-valkey authors
5+
// Copyright (c) 2025 the valkey-swift authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9-
// See swift-valkey/CONTRIBUTORS.txt for the list of swift-valkey authors
9+
// See valkey-swift/CONTRIBUTORS.txt for the list of valkey-swift authors
1010
//
1111
// SPDX-License-Identifier: Apache-2.0
1212
//

0 commit comments

Comments
 (0)