Skip to content

Epic: js-stellar-sdk modernization #1388

@Ryang-21

Description

@Ryang-21

Goal

Modernize the js-stellar-sdk toolchain and runtime dependencies to align with current JavaScript ecosystem standards. The end state is an ESM-first library with zero HTTP dependencies, a Rollup-based build pipeline, and a consolidated codebase that absorbs the migrated TypeScript js-stellar-base.

Motivation

  • axios and feaxios add bundle weight and maintenance surface that modern runtimes no longer require — fetch is available in Node 18+, all evergreen browsers, Deno, Bun, and Cloudflare Workers.
  • CommonJS constructs block ESM consumers, tree-shaking, and modern bundler optimizations.
  • The existing Webpack/Babel pipeline is slow, complex, and produces suboptimal ESM output. Rollup is the standard for library builds.
  • Keeping js-stellar-base as a separate package forces dual releases, cross-repo coordination, and redundant CI. Consolidating into a single repo simplifies versioning, typing, and contributor onboarding.

Success Criteria

  • No runtime HTTP dependencies in package.json.
  • "type": "module" with working dual ESM/CJS exports map.
  • Rollup produces ESM, CJS, and browser bundles; published package installs and resolves cleanly across Node, browser, and bundler consumers.
  • js-stellar-base lives in this repo; downstream @stellar/stellar-sdk consumers depend on a single package.
  • All existing tests pass; published artifacts import successfully in a fresh Node ESM, Node CJS, and bundled browser project.

Tasks (in order)

Out of Scope

  • API redesign of public SDK surfaces (Horizon, RPC, contract, webauth).
  • Migrating off Vitest.
  • Changes to the CLI (src/cli/) beyond what the ESM/Rollup migration requires.
  • Deprecating or removing existing public exports.

Sequencing Notes

Each task should ship as its own release (minor or major as semver dictates) so regressions can be bisected cleanly. Tasks 1 and 2 can overlap in review but should land in that order to keep diffs tractable. Task 4 must land last because absorbing base multiplies the surface affected by any earlier refactor.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Todo (Ready for Dev)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions