feat(sdk): add stellar-sdk compatibility matrix (#1565) - #1706
Merged
Otaiki1 merged 2 commits intoSep 30, 2026
Merged
Conversation
- Declare @stellar/stellar-sdk >=14.0.0 <17.0.0 as a peerDependency in sdk/package.json (with peerDependenciesMeta optional: false) - Add sdk/jest.config.compat.cjs — compat-specific Jest config used by the matrix; excludes testnet/integration specs, same transformIgnorePatterns as the baseline config (safe across v14+v16) - Add .github/workflows/sdk-compat.yml — weekly matrix CI job that installs each supported major (14.3.0, 16.1.0) in isolation and runs typecheck + unit tests against it; also triggers on sdk/** changes - Add docs/STELLAR_SDK_COMPATIBILITY.md — support policy, v14 vs v16 differences (rpc namespace, ESM-only deps), upgrade/drop procedures, and explanation of why transformIgnorePatterns cannot be removed yet - Update sdk/README.md — add 'Stellar SDK peer dependency' section with compatibility table and link to the new guide
- sdk-compat.yml: use root pnpm.overrides patch + build @tikka/types before SDK tests (the workspace package has no pre-built dist on a fresh checkout; pnpm add --save-peer in sdk/ did not reliably override the resolved version) - event-subscription.ts: add endLedger:0 to startLedger request branch to satisfy stellar-sdk v14's required field (v16 made it optional; 0 is the 'omit on wire' sentinel so runtime behaviour is unchanged)
Contributor
|
Thanks for the contribution! This PR conflicted with recent changes on
Resolved and merged with PRmaster. Your commits are included in the merge. |
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
Closes #1565
The supported @stellar/stellar-sdk range was undeclared and untested.
This PR addresses all four items from the issue.
Changes
1. Peer dependency — sdk/package.json
Adds peerDependencies with range >=14.0.0 <17.0.0 and peerDependenciesMeta
marking it non-optional. The monorepo's own dependencies entry is kept;
the peer declaration is what external consumers see.
2. Compat Jest config — sdk/jest.config.compat.cjs
Used only by the matrix CI job. Excludes testnet/integration specs (need
live RPC) and applies the same transformIgnorePatterns as the baseline —
safe on v14 where the v16 ESM deps are absent, required on v16.
3. CI matrix — .github/workflows/sdk-compat.yml
runs typecheck + unit tests, uploads coverage artifact
4. Compatibility guide — docs/STELLAR_SDK_COMPATIBILITY.md
Documents the supported range, v14 vs v16 differences (rpc namespace,
ESM-only transitive deps), why transformIgnorePatterns cannot be removed
yet, and how to add/drop a major version.
5. SDK README — sdk/README.md
Adds a "Stellar SDK peer dependency" section with install commands,
compatibility table, and link to the guide.
Acceptance criteria