chore(deps): update KeyboardShortcuts to 3.0.1 - #203
Merged
Merged
Conversation
The 3.0 breaking changes rename 'Name#defaultShortcut' to 'initialShortcut' and the 'Name' 'default:' parameter to 'initial:'. Neither is used here, so no source changes are required. Raises the package requirement to upToNextMajorVersion(3.0.1). KeyboardShortcuts 3.0 ships as a Swift 6.2 package using defaultIsolation(MainActor.self), which Xcode 26 (already required by the CI workflow) supports.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates KeyboardShortcuts from 2.4.0 to 3.0.1 (major).
Breaking changes in 3.0 — and why they don't affect us
Upstream made exactly two breaking changes:
Name#defaultShortcutrenamed toName#initialShortcutNamedefault:parameter renamed toinitial:This project uses neither. The full usage surface is:
BetterCapture/Model/KeyboardShortcutNames.swift:11-13— plainSelf("..."), nodefault:argumentBetterCapture/AppDelegate.swift:40,46,52—KeyboardShortcuts.onKeyUp(for:)BetterCapture/View/SettingsView.swift:45,49,50—KeyboardShortcuts.Recorder(_:name:)So this is a dependency-only change: no Swift source is modified.
Also worth noting
3.0 fixes two things relevant to a menu bar app:
NSMenuItem#setShortcut(for:)no longer overrides a hardcoded key equivalent when no global shortcut is set3.0.1 fixes a release-build crash with the Swift 6.3 compiler. We're on Swift 6.2 so we weren't hit by it, but it removes a landmine for the next toolchain bump.
Toolchain
3.0 ships as a
swift-tools-version:6.2package and enablesdefaultIsolation(MainActor.self),NonisolatedNonsendingByDefaultandInferIsolatedConformancesfor its own target. It requires Xcode 26, which.github/workflows/pull-request.ymlalready pins (XCODE_VERSION: '26.0'). The app target itself still builds atSWIFT_VERSION = 5.0, and the new isolation defaults produced no diagnostics at our call sites.Verification
xcodebuild build -configuration Debug— succeeded, no new warningsxcodebuild build -configuration Release— succeeded (checked explicitly given the 3.0.1 release-codegen fix)xcodebuild test— 144 tests in 11 suites passedswiftlint lint— 14 warnings, identical tomainRecording and triggering the three global shortcuts should still get a manual smoke test before merge.