From f7f809c05767e75c44d0204b14f99051256d48a3 Mon Sep 17 00:00:00 2001 From: fxwx23 Date: Thu, 4 Oct 2018 19:27:07 +0900 Subject: [PATCH 01/10] [Carthage] update dependencies --- Cartfile | 2 +- Cartfile.private | 2 +- Cartfile.resolved | 4 ++-- Carthage/Checkouts/APIKit | 2 +- Carthage/Checkouts/Result | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cartfile b/Cartfile index fa9f48b..1e95470 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "antitypical/Result" ~> 3.2.0 +github "antitypical/Result" ~> 4.0.0 diff --git a/Cartfile.private b/Cartfile.private index 8b3aa2a..0c7bd3e 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1 +1 @@ -github "ishkawa/APIKit" ~> 3.2.0 +github "ishkawa/APIKit" ~> 4.0.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index 3d02dae..0c1205e 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ -github "antitypical/Result" "3.2.4" -github "ishkawa/APIKit" "3.2.0" +github "antitypical/Result" "4.0.0" +github "ishkawa/APIKit" "4.0.0" diff --git a/Carthage/Checkouts/APIKit b/Carthage/Checkouts/APIKit index 0afa74d..dc4350d 160000 --- a/Carthage/Checkouts/APIKit +++ b/Carthage/Checkouts/APIKit @@ -1 +1 @@ -Subproject commit 0afa74dedff0df678af02fc2b474c4eafba37a67 +Subproject commit dc4350d686deb13e4c88418c5de1f2e1ecac0b82 diff --git a/Carthage/Checkouts/Result b/Carthage/Checkouts/Result index 7477584..8fc088d 160000 --- a/Carthage/Checkouts/Result +++ b/Carthage/Checkouts/Result @@ -1 +1 @@ -Subproject commit 7477584259bfce2560a19e06ad9f71db441fff11 +Subproject commit 8fc088dcf72802801efeecba76ea8fb041fb773d From 5c0571398350662ca896d9b12b30110d6f605611 Mon Sep 17 00:00:00 2001 From: fxwx23 Date: Thu, 4 Oct 2018 19:32:31 +0900 Subject: [PATCH 02/10] =?UTF-8?q?[Pods]=20increment=20dependency=E2=80=99s?= =?UTF-8?q?=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JSONRPCKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONRPCKit.podspec b/JSONRPCKit.podspec index 91337fe..e50bece 100644 --- a/JSONRPCKit.podspec +++ b/JSONRPCKit.podspec @@ -28,6 +28,6 @@ Pod::Spec.new do |s| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. LICENSE } - s.dependency "Result", "~> 3.2.0" + s.dependency "Result", "~> 4.0.0" end From 54b1c14b468035b77ba1922d236785d16b3d5a68 Mon Sep 17 00:00:00 2001 From: fxwx23 Date: Thu, 4 Oct 2018 19:35:39 +0900 Subject: [PATCH 03/10] [SwiftPM] update dependency --- Package.resolved | 4 ++-- Package.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Package.resolved b/Package.resolved index 3236c9e..dc09c89 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/antitypical/Result.git", "state": { "branch": null, - "revision": "7477584259bfce2560a19e06ad9f71db441fff11", - "version": "3.2.4" + "revision": "8fc088dcf72802801efeecba76ea8fb041fb773d", + "version": "4.0.0" } } ] diff --git a/Package.swift b/Package.swift index a1bec29..aed5491 100644 --- a/Package.swift +++ b/Package.swift @@ -9,7 +9,7 @@ let package = Package( .library(name: "JSONRPCKit", targets: ["JSONRPCKit"]), ], dependencies: [ - .package(url: "https://github.com/antitypical/Result.git", from: "3.2.0"), + .package(url: "https://github.com/antitypical/Result.git", from: "4.0.0"), ], targets: [ .target(name: "JSONRPCKit", dependencies: ["Result"]), From 92a825a52f5ff25b605dd60ed1809bf0d092fe1e Mon Sep 17 00:00:00 2001 From: fxwx23 Date: Thu, 4 Oct 2018 19:49:43 +0900 Subject: [PATCH 04/10] [SwiftPM] add Package@swift-4.2.swift --- Package@swift-4.2.swift | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Package@swift-4.2.swift diff --git a/Package@swift-4.2.swift b/Package@swift-4.2.swift new file mode 100644 index 0000000..68426c2 --- /dev/null +++ b/Package@swift-4.2.swift @@ -0,0 +1,23 @@ +// swift-tools-version:4.2 +import PackageDescription + +let package = Package( + name: "JSONRPCKit", + products: [ + .library(name: "JSONRPCKit", targets: ["JSONRPCKit"]), + ], + dependencies: [ + .package(url: "https://github.com/antitypical/Result.git", from: "4.0.0"), + ], + targets: [ + .target( + name: "JSONRPCKit", + dependencies: ["Result"] + ), + .testTarget( + name: "JSONRPCKitTests", + dependencies: ["JSONRPCKit"] + ), + ], + swiftLanguageVersions: [ .v4, .v4_2] +) From e4028049b85a8ef23cfb5a2b4431ac5166dd72d3 Mon Sep 17 00:00:00 2001 From: fxwx23 Date: Thu, 4 Oct 2018 19:59:44 +0900 Subject: [PATCH 05/10] [TravisCI] add Xcode10, Swift4.2 build matrix --- .travis.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.travis.yml b/.travis.yml index d4800cc..ab8bab2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,18 @@ matrix: - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk appletvsimulator -destination "name=Apple TV 1080p" | xcpretty -c - xcodebuild build -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk watchsimulator | xcpretty -c - pod lib lint + - os: osx + osx_image: xcode10 + language: objective-c + env: + - JOB=Xcode + script: + - set -o pipefail + - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit | xcpretty -c + - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk iphonesimulator -destination "name=iPhone SE" | xcpretty -c + - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk appletvsimulator -destination "name=Apple TV 1080p" | xcpretty -c + - xcodebuild build -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk watchsimulator | xcpretty -c + - pod lib lint - os: osx osx_image: xcode9 language: generic @@ -29,6 +41,15 @@ matrix: - swift --version - swift build - swift test + - os: osx + osx_image: xcode10 + language: generic + env: + - JOB=SPM + script: + - swift --version + - swift build + - swift test - os: linux language: generic env: @@ -42,6 +63,19 @@ matrix: dist: trusty install: - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)" + - os: linux + language: generic + env: + - JOB=Linux + - SWIFT_VERSION=4.2 + script: + - swift --version + - swift build + - swift test + sudo: required + dist: trusty + install: + - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)" notifications: email: false From 74e022fbae848be696a0ec68844a210b09b5ce3e Mon Sep 17 00:00:00 2001 From: fxwx23 Date: Thu, 4 Oct 2018 20:08:33 +0900 Subject: [PATCH 06/10] [Swift4.2] use `compactMap` instead --- Sources/JSONRPCKit/BatchElement.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/JSONRPCKit/BatchElement.swift b/Sources/JSONRPCKit/BatchElement.swift index c8e3649..a74edd0 100644 --- a/Sources/JSONRPCKit/BatchElement.swift +++ b/Sources/JSONRPCKit/BatchElement.swift @@ -82,7 +82,7 @@ internal extension BatchElementProcotol { internal func result(from objects: [Any]) -> Result { let matchedObject = objects - .flatMap { $0 as? [String: Any] } + .compactMap { $0 as? [String: Any] } .filter { $0["id"].flatMap(Id.init) == id } .first From e3f0eabdf95f5f86c3928bc359c02793f98cda12 Mon Sep 17 00:00:00 2001 From: fxwx23 Date: Thu, 4 Oct 2018 20:43:41 +0900 Subject: [PATCH 07/10] Revert "[Swift4.2] use `compactMap` instead" This reverts commit 74e022fbae848be696a0ec68844a210b09b5ce3e. --- Sources/JSONRPCKit/BatchElement.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/JSONRPCKit/BatchElement.swift b/Sources/JSONRPCKit/BatchElement.swift index a74edd0..c8e3649 100644 --- a/Sources/JSONRPCKit/BatchElement.swift +++ b/Sources/JSONRPCKit/BatchElement.swift @@ -82,7 +82,7 @@ internal extension BatchElementProcotol { internal func result(from objects: [Any]) -> Result { let matchedObject = objects - .compactMap { $0 as? [String: Any] } + .flatMap { $0 as? [String: Any] } .filter { $0["id"].flatMap(Id.init) == id } .first From 67267340301569135e8c34507c5cc796d08a0268 Mon Sep 17 00:00:00 2001 From: fxwx23 Date: Thu, 4 Oct 2018 21:45:52 +0900 Subject: [PATCH 08/10] Update the version number to `4.0.0` --- JSONRPCKit.podspec | 2 +- Sources/JSONRPCKit/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/JSONRPCKit.podspec b/JSONRPCKit.podspec index e50bece..68b40ca 100644 --- a/JSONRPCKit.podspec +++ b/JSONRPCKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "JSONRPCKit" - s.version = "3.0.0" + s.version = "4.0.0" s.summary = "JSONRPCKit is a JSON-RPC 2.0 library purely written in Swift." s.homepage = "https://github.com/bricklife/JSONRPCKit" diff --git a/Sources/JSONRPCKit/Info.plist b/Sources/JSONRPCKit/Info.plist index e0f4bf7..1bcfa6d 100644 --- a/Sources/JSONRPCKit/Info.plist +++ b/Sources/JSONRPCKit/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.0.0 + 4.0.0 CFBundleSignature ???? CFBundleVersion From ec1ceccd713e34206fd09b7fb0e49fedba528643 Mon Sep 17 00:00:00 2001 From: fxwx23 Date: Thu, 4 Oct 2018 23:31:18 +0900 Subject: [PATCH 09/10] [CI] temporary ignore `pod lib lint` --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ab8bab2..0c92833 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,6 @@ matrix: - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk iphonesimulator -destination "name=iPhone SE" | xcpretty -c - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk appletvsimulator -destination "name=Apple TV 1080p" | xcpretty -c - xcodebuild build -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk watchsimulator | xcpretty -c - - pod lib lint - os: osx osx_image: xcode10 language: objective-c @@ -31,7 +30,6 @@ matrix: - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk iphonesimulator -destination "name=iPhone SE" | xcpretty -c - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk appletvsimulator -destination "name=Apple TV 1080p" | xcpretty -c - xcodebuild build -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk watchsimulator | xcpretty -c - - pod lib lint - os: osx osx_image: xcode9 language: generic From 8faf73b69d1465c9a0c2f6fff0a9e6ce1063357f Mon Sep 17 00:00:00 2001 From: fxwx23 Date: Fri, 5 Oct 2018 00:02:24 +0900 Subject: [PATCH 10/10] [CI] fix destination name --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0c92833..3e260ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: - set -o pipefail - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit | xcpretty -c - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk iphonesimulator -destination "name=iPhone SE" | xcpretty -c - - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk appletvsimulator -destination "name=Apple TV 1080p" | xcpretty -c + - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk appletvsimulator -destination "name=Apple TV 4K (at 1080p)" | xcpretty -c - xcodebuild build -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk watchsimulator | xcpretty -c - os: osx osx_image: xcode10 @@ -28,7 +28,7 @@ matrix: - set -o pipefail - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit | xcpretty -c - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk iphonesimulator -destination "name=iPhone SE" | xcpretty -c - - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk appletvsimulator -destination "name=Apple TV 1080p" | xcpretty -c + - xcodebuild build-for-testing test-without-building -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk appletvsimulator -destination "name=Apple TV 4K (at 1080p)" | xcpretty -c - xcodebuild build -workspace JSONRPCKit.xcworkspace -scheme JSONRPCKit -sdk watchsimulator | xcpretty -c - os: osx osx_image: xcode9