nuke-migrate
यह क्या करती है
यह स्किल Nuke इमेज लोडिंग लाइब्रेरी इस्तेमाल करने वाले Apple ऐप को वर्शन 14 पर अपग्रेड करने का मार्गदर्शन देती है। यह उन डेवलपर्स के लिए है जिन्हें अपग्रेड के बाद बिल्ड एरर दिखते हैं या जिन्हें लाइब्रेरी अपडेट करनी है।
कब इस्तेमाल करें
- ✓जब आप Apple ऐप में Nuke इमेज लाइब्रेरी का वर्शन बढ़ाते हैं।
- ✓जब Nuke अपग्रेड कंपाइल नहीं होता और आपको बदलाव के चरण चाहिए।
- ✓जब आप ऐप से NukeExtensions या पुराना Combine कोड हटाना चाहते हैं।
Skill का लिंक
https://github.com/kean/Nuke/blob/main/skills/nuke-migrate/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे iPhone ऐप को Nuke 13 से Nuke 14 पर अपग्रेड कीजिए, और ऐसा कोड जांचिए जो कंपाइल तो होता है पर अब काम नहीं करता।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह ऐप का वर्शन और प्लेटफ़ॉर्म लक्ष्य जांचती है, कंपाइलर द्वारा न पकड़े जाने वाले जोखिम भरे कोड की सूची बनाती है, फिर हर जगह को चरण-दर-चरण अपडेट करती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Migrating to Nuke 14
The compiler finds most of this migration, and its errors name the replacements. What it can't find is the dangerous part: code that keeps compiling and stops working. A green build doesn't mean the migration is done. Follow the steps in order.
1. Check that the app can move
grep -A6 '"identity" : "nuke"' Package.resolved *.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
grep -rnE 'IPHONEOS_DEPLOYMENT_TARGET|\.iOS\(' --include='*.pbxproj' --include='Package.swift' .
git ls-remote --tags https://github.com/kean/Nuke 'refs/tags/14.*'
If there's no Package.resolved, read the version from Package.swift. Nuke 14 needs iOS 16, tvOS 16, macOS 13, watchOS 9, or visionOS 1, and Xcode 26.0 with Swift 6.2. If the app deploys to something lower, stop and ask. The choice is between raising the target and staying on 13.x, which still gets fixes, and it isn't yours to make.
If the app is on 12.x or earlier, read From Nuke 12 or earlier as well.
2. List what the compiler won't report
Do this before you touch the dependency, and keep the list. Every hit gets resolved in step 5, whatever the build says.
# Every conformance to the pipeline delegate
grep -rnE 'ImagePipeline\.Delegate|ImagePipelineDelegate' --include='*.swift' .
# `nil` passed to a LazyImage modifier, and modifiers that take an optional
grep -rnE '\.(processors|priority)\(' --include='*.swift' .
# Error text that reaches people, and errors matched by type in NukeUI callbacks
grep -rn 'localizedDescription' --include='*.swift' .
grep -rnE 'onCompletion|onFailure|\.result|state\.error' --include='*.swift' .
# Views that start playing animations, and repeated loads that used to restart the task
grep -rnE 'LazyImage\(|LazyImageView|FetchImage|onStart' --include='*.swift' .
# Anything that plays, parses, or inspects the encoded data of an image
grep -rnE 'container\.data|imageContainer\?*\.data|\.type == \.gif|Gifu|FLAnimatedImage|SwiftyGif|SDAnimatedImage|makeImageView' --include='*.swift' .
# Queues and prefetchers set by hand, and decoders of your own
grep -rnE 'maxConcurrentRequestCount|ImageDecoding\b|isAsynchronous' --include='*.swift' .
The search can't see through a typealias, or a signature split over lines. Open each file and read it.
3. Update the dependency
from: "14.0.0" doesn't match a prerelease. If the tags from step 1 only have betas, pin one:
.package(url: "https://github.com/kean/Nuke", exact: "14.0.0-beta.1")
In an Xcode project, change the version rule of the package, and remove the Package.resolved entry if it won't update. The product names are the same.
4. Fix what the compiler reports
Widely used removed APIs have a stub, and the compiler error says what to do: follow it. @available(*, unavailable) stubs can't cover a removed enum case or a property of a removed type, and those are in this table.
| Nuke 13 | Nuke 14 |
|---|---|
Nuke_ImageDisplaying, nuke_display(image:data:) |
ImageDisplaying, nuke_display(_ container: ImageContainer?) |
ImagePipelineDelegate |
ImagePipeline.Delegate |
imageId, .imageIdKey |
imageID |
.scaleKey, .thumbnailKey |
request.scale, request.thumbnail |
A userInfo dictionary with those keys |
A var request with the properties set. It no longer needs userInfo |
maximumDecodedImageSize |
ImageRequest.ThumbnailOptions, per request |
ImageRequest(url:, userInfo:) |
request.userInfo = … on a var |
imagePublisher(with:) |
image(for:), or imageTask(with:) and task.previews |
FetchImage.load(publisher) |
load { try await … } |
case .started in a delegate |
imageTaskDidStart(_:pipeline:) |
Float(displayScale) for scale or maxPixelSize |
Remove the conversion, they're CGFloat |
@ObservedObject var progress: FetchImage.Progress |
let progress: ImageTask.Progress, or read state.progress in place |
state.error as? ImagePipeline.Error |
state.error, which is typed |
lazyImageView.imageTask = … |
Read-only. Call cancel() or reset() |
dataCache.flush(for: key) |
await dataCache.flush(), which writes everything |
dataCache.queue |
Removed. Use await dataCache.flush() to wait for writes |
dataCache.flush(), dataCache.sweep() |
await them, so the caller becomes async, and so do its callers |
[String: Any] for coreImageFilter(name:parameters:identifier:) |
`[Stri |
अक्सर पूछे जाने वाले सवाल
क्या हरा बिल्ड मतलब है कि अपग्रेड पूरा हो गया?
नहीं, स्किल कहती है कि हरा बिल्ड यह साबित नहीं करता कि माइग्रेशन पूरा हो गया है।
Nuke 14 को कौन से प्लेटफ़ॉर्म वर्शन चाहिए?
स्किल iOS 16, tvOS 16, macOS 13, watchOS 9 या visionOS 1 सूचीबद्ध करती है, साथ में Xcode 26।
अगर मेरा ऐप पुराना वर्शन इस्तेमाल करता है तो?
स्किल में Nuke 12 या उससे पुराने से अपग्रेड के लिए अलग खंड है।
जानकारी
लेखक का मूल विवरण
Upgrade an app to Nuke 14 from Nuke 13 or earlier. Use when bumping the Nuke, NukeUI, or NukeExtensions dependency, when a Nuke upgrade doesn't compile, or when asked to replace NukeExtensions, Combine publishers, or a hand-written GIF view with current Nuke APIs. Finds what the compiler can't report, such as pipeline delegate methods that compile and are never called.
repo: kean/Nuke
लोकप्रियता
- GitHub स्टार
- 8.7k
- रैंकिंग में स्थान
- #12332
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
मिलती-जुलती skills
android-clean-architecture
280kयह आपके एजेंट को Android projects को व्यवस्थित तरीके से संभालने देता है। यह code को ऐसा ढांचा देता है कि उसकी देखभाल और नए features जोड़ना आसान हो।
compose-multiplatform-patterns
280kKMP projects में Compose Multiplatform और Jetpack Compose patterns इस्तेमाल करने में आपके एजेंट की मदद करता है। इसमें state, navigation, theming और performance शामिल हैं।
dart-flutter-patterns
280kयह आपके एजेंट को Dart और Flutter apps के लिए code लिखने देता है। यह आधुनिक patterns इस्तेमाल करके मज़बूत और आसानी से संभलने वाले apps बनाता है।