Skip to content

Commit

Permalink
remove obsolete StateType requirements (#48)
Browse files Browse the repository at this point in the history
* remove obsolete StateType requirements

* add line to changelog

* pin ReSwift requirement to 6.1.0

* use ReSwift 6.1.0 in Cartfile
  • Loading branch information
DivineDominion authored Aug 20, 2021
1 parent 88ec928 commit f3658f6
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

**API Changes:**

- Remove deprecated `StateType` protocol requirement (#48) - @DivineDominion, @mjarvis

**Fixes:**

# 2.0.1
Expand Down
4 changes: 3 additions & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
github "ReSwift/ReSwift" ~> 6.0.0
# github "ReSwift/ReSwift" ~> 6.1.0
# Use master until new version is ready
github "ReSwift/ReSwift" "master"
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReSwift/ReSwift" "6.0.0"
github "ReSwift/ReSwift" "95b81b75f26d467bb624939a92189b1bae3e7b27"
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let package = Package(
.library(name: "ReSwiftThunkTesting", targets: ["ReSwiftThunkTesting"])
],
dependencies: [
.package(url: "https://github.com/ReSwift/ReSwift", .upToNextMajor(from: "6.0.0"))
.package(url: "https://github.com/ReSwift/ReSwift", .upToNextMajor(from: "6.1.0"))
],
targets: [
.target(
Expand Down
4 changes: 2 additions & 2 deletions ReSwift-Thunk/createThunkMiddleware.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ public func createThunkMiddleware<State>() -> Middleware<State> {

// swiftlint:disable identifier_name
@available(*, deprecated, renamed: "createThunkMiddleware")
func ThunkMiddleware<State: StateType>() -> Middleware<State> {
func ThunkMiddleware<State>() -> Middleware<State> {
return createThunkMiddleware()
}
// swiftlint:enable identifier_name

@available(*, deprecated, renamed: "createThunkMiddleware")
func createThunksMiddleware<State: StateType>() -> Middleware<State> {
func createThunksMiddleware<State>() -> Middleware<State> {
return createThunkMiddleware()
}
2 changes: 1 addition & 1 deletion ReSwift-ThunkTests/ExpectThunk.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private struct ExpectThunkAssertion<T> {
}
}

public class ExpectThunk<State: StateType> {
public class ExpectThunk<State> {
private var dispatch: DispatchFunction {
return { action in
self.dispatched.append(action)
Expand Down
2 changes: 1 addition & 1 deletion ReSwift-ThunkTests/Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import XCTest

import ReSwift

private struct FakeState: StateType {}
private struct FakeState {}
private struct FakeAction: Action {}
private struct AnotherFakeAction: Action, Equatable {}
private func fakeReducer(action: Action, state: FakeState?) -> FakeState {
Expand Down
5 changes: 3 additions & 2 deletions ReSwiftThunk.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

Pod::Spec.new do |spec|
spec.name = "ReSwiftThunk"
spec.version = "2.0.1"
spec.version = "2.1.0"
spec.summary = "Thunk middleware for ReSwift."
spec.description = <<-DESC
ReSwift-Thunk allows you to write action creators that return a function instead of an action. Instead of dispatching an `Action` directly, you can dispatch a `Thunk` that creates an action at a later time, for example after a network request finishes.
Expand Down Expand Up @@ -37,5 +38,5 @@ Pod::Spec.new do |spec|

spec.default_subspec = "Core"

spec.dependency "ReSwift", "~> 6.0"
spec.dependency "ReSwift", "~> 6.1"
end

0 comments on commit f3658f6

Please sign in to comment.