Skip to content

feat(sdk): add stellar-sdk compatibility matrix (#1565) - #1706

Merged
Otaiki1 merged 2 commits into
crackedstudio:masterfrom
aristotle224:feat/sdk-stellar-compat-matrix
Sep 30, 2026
Merged

Otaiki1 merged 2 commits into
crackedstudio:masterfrom
aristotle224:feat/sdk-stellar-compat-matrix

Conversation

@aristotle224

Copy link
Copy Markdown
Contributor

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 weekly (Monday 03:00 UTC) and on sdk/** changes
  • Matrix over [14.3.0, 16.1.0] with fail-fast: false
  • Installs each version in isolation, asserts installed version,
    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

  • Supported range declared as peerDependencies
  • Each version in the range tested in CI
  • Range documented in README and compatibility guide
  • transformIgnorePatterns workarounds examined and explained

- 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)
@Otaiki1
Otaiki1 merged commit 54aec81 into crackedstudio:master Sep 30, 2026
3 checks passed
@Otaiki1

Otaiki1 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution! This PR conflicted with recent changes on master, so the conflicts were resolved during merge:

  • sdk/README.md: Combined the target branch's update describing the SDK as a TypeScript SDK with this PR's new Stellar SDK peer dependency section.
  • sdk/package.json: I combined the target branch's configuration, scripts, and optional peer dependencies with this PR's stellar-sdk peer dependency and metadata.

Resolved and merged with PRmaster. Your commits are included in the merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sdk] Add a compatibility matrix test across supported Stellar SDK versions

2 participants