chore: declare dbus-next as optional peer dependency#80
Closed
stoprocent wants to merge 1 commit into
Closed
Conversation
Replaces undocumented prose-only requirement with a machine-readable version range so Renovate/Dependabot/`npm ls` can track supported versions. Marked optional so npm doesn't auto-install on Mac/Win. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
dbus-next: ^0.10.0underpeerDependencieswithpeerDependenciesMeta.optional: truerequireerror message) with a machine-readable version rangerequiresdbus-nextand falls back to a friendly install error if missingWhy
@stoprocent/bluetooth-hci-socketis inoptionalDependenciesbecause it's a native build that breaks installs on macOS/Windows.dbus-nextis pure JS but Linux-only by purpose — making it a hard or optional dependency would pull a Linux-only library onto every Mac/Win install. The peer-optional pattern is the standard idiom for plug-in backends (eslint plugins, vite plugins, jest reporters, etc.) and gives us:npm lsvisibility into the supported version rangetry/catcharoundrequire('dbus-next')still surfaces the install hintThe intent already leaked into
lib/dbus/bindings.js:37("dbus-next is an optional peer of this Linux-only backend"); this just makes the manifest reflect that.Test plan
npm test— 17 suites, 654 tests passnpm run lint— cleannpm install --dry-run— manifest validatesnpm ls dbus-nextwarns appropriately when the D-Bus backend is selected withoutdbus-nextinstalled (manual, Linux)🤖 Generated with Claude Code