fix: mark @xmtp/node-bindings peer as optional - #143
Merged
Conversation
Required-peer + autoInstallPeers fetches a registry-latest bindings build in consumers that pin bindings via pnpm.overrides only, planting a native addon compiled against a different node-sdk in the tree. convos-cli uses bindings for type-only imports; optional peers are not auto-installed and still resolve to the single in-graph instance.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped package-metadata fix that prevents pnpm from auto-installing a conflicting native bindings build while retaining the required node-sdk dependency. No application logic, schemas, or sensitive infrastructure are changed. You can add or adjust custom eligibility rules. Learn more. |
Merged
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.
Why
convos-cli's
@xmtp/node-bindingspeer is type-only (import type { ContentTypeId, EncodedContent }— erased at runtime; bindings actually arrive through@xmtp/node-sdk's exact-pinned dependency). But as a required peer, pnpm'sautoInstallPeersfetches a second, registry-latest bindings build in any workspace that pins bindings only viapnpm.overrides— i.e. convos-assistants, where the dev-release bump PR (xmtplabs/convos-assistants#3641) now fails its lockstep guard with two resolved bindings versions. Worse than the CI failure: the auto-installed instance is a native addon compiled against a different node-sdk than the one in the tree — exactly the sdk/bindings mismatch the lockstep checks exist to prevent. Nightly bumps only dodged this by coincidence (pinned nightly == registry-latest nightly).What
Add
peerDependenciesMetamarking@xmtp/node-bindingsoptional:.d.tstype imports keep working against the same bindings the workspace runs;@xmtp/node-sdkpeer, both ranges, and the lockstep test are unchanged.Patch changeset included. After release, renovate's grouped bump propagates this to convos-assistants and unblocks the dev-release bump flow.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Mark
@xmtp/node-bindingspeer dependency as optionalAdds
peerDependenciesMetain package.json to mark@xmtp/node-bindingsas optional. Package managers no longer error or warn when the dependency is absent. Adds a patch changeset for@xmtp/convos-cli.Macroscope summarized e45257d.