Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Update Nuke dependency to v11 #58

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## Nuke WebP Plugin v7.0.0

- Support [Nuke 12.0](https://github.com/kean/Nuke/releases/tag/9.0)

## Nuke WebP Plugin v6.1.1

- Support [Nuke 11.0](https://github.com/kean/Nuke/releases/tag/9.0)


## Nuke WebP Plugin v5.0.0

- Support [Nuke 9.0](https://github.com/kean/Nuke/releases/tag/9.0)
Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "kean/Nuke" ~> 9.0
github "kean/Nuke" ~> 12.0
git "https://chromium.googlesource.com/webm/libwebp" "v1.1.0"
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
git "https://chromium.googlesource.com/webm/libwebp" "v1.1.0"
github "kean/Nuke" "9.1.1"
github "kean/Nuke" "12.1.0"
6 changes: 3 additions & 3 deletions Demo/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ PODS:
- libwebp/mux (1.1.0):
- libwebp/demux
- libwebp/webp (1.1.0)
- Nuke (9.1.1)
- Nuke-WebP-Plugin (5.0.0):
- Nuke (11.1.0)
- Nuke-WebP-Plugin (6.1.0):
- libwebp (= 1.1.0)
- Nuke (~> 9.0)
- Nuke (~> 11.0)

DEPENDENCIES:
- Nuke-WebP-Plugin (from `../`)
Expand Down
4 changes: 2 additions & 2 deletions Nuke-WebP-Plugin.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "Nuke-WebP-Plugin"
s.version = "6.0.1"
s.version = "6.1.0"
s.summary = "Nuke's WebP plugin which can load and display WebP"

s.homepage = "https://github.com/ryokosuge/Nuke-WebP-Plugin"
Expand Down Expand Up @@ -112,7 +112,7 @@ Pod::Spec.new do |s|
s.module_name = 'NukeWebPPlugin'

s.dependency 'libwebp', '1.1.0'
s.dependency 'Nuke', '~> 9.0'
s.dependency 'Nuke', '~> 11.0'
s.xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '$(inherited) $(SRCROOT)/libwebp/src' }

end
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/kean/Nuke.git",
"state": {
"branch": null,
"revision": "fdde04a80497b54e2773c5e5d02dfbb9bdbe99a9",
"version": "9.2.3"
"revision": "f4d9b95788679d0654c032961f73e7e9c16ca6b4",
"version": "12.1.0"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let package = Package(
.library(name: "NukeWebPPlugin", targets: ["NukeWebPPlugin"]),
],
dependencies: [
.package(url: "https://github.com/kean/Nuke.git", .upToNextMajor(from: "9.2.3")),
.package(url: "https://github.com/kean/Nuke.git", .upToNextMajor(from: "12.0.0")),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ github 'ryokosuge/Nuke-WebP-Plugin'

| [Nuke](https://github.com/kean/Nuke) | [libwebp](https://chromium.googlesource.com/webm/libwebp) |
|:---:|:---:|
| >= 9.0 | v1.0.0 |
| >= 11.0 | v1.1.0 |

## Author

Expand Down
8 changes: 4 additions & 4 deletions Source/WebPImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ import Nuke
import NukeWebPPluginC
#endif

public class WebPImageDecoder: Nuke.ImageDecoding {
public class WebPImageDecoder: Nuke.ImageDecoding, @unchecked Sendable {

private lazy var decoder: WebPDataDecoder = WebPDataDecoder()

public init() {
}

public func decode(_ data: Data) -> ImageContainer? {
guard data.isWebPFormat else { return nil }
guard let image = _decode(data) else { return nil }
public func decode(_ data: Data) throws -> Nuke.ImageContainer {
guard data.isWebPFormat else { throw Nuke.ImageDecodingError.unknown }
guard let image = _decode(data) else { throw Nuke.ImageDecodingError.unknown }
return ImageContainer(image: image)
}

Expand Down