Modernization#1444
Conversation
* Replace __USE_AXIOS__ dynamic require with static fetch default * Add babel and webpack aliasing to emit axios variant from shared source * Flip package.json exports: fetch default, /axios opt-in, drop /no-axios * Update vitest configs and test harness for TRANSPORT=axios variant * Update CI, README, and stale references for new fetch-default build matrix
* update eventsource to v4.1.0 and remove conditional import of eventsource * remove no-eventsource lib bundle as the eventsource dependency runs in the workerd runtime * remove the dom-monkeypatch as its now included in the tsconfig lib field * add additional tests for eventsource behavior
* add type: module in pkg.json and update js config files to esm style * build and export cjs and esm build varients, remove export of umd bundles * remove unused dependency (causing issue with hook files being cjs format)
* replace webpack + babel dependencies for rollup * migrate build tools to rollup
* move stellar-base src under src/base * add unit tests from stellar-base * port xdr and makefile for generating xdr * port manual type declarations for js only dependencies * inline js-xdr for node esm compatibility * disable bundle_size workflow
* migrate from classic yarn to pnpm * add pnpm setup action to git workflows
* remove randomBytes for universal crypto.getRandomValues * replace sha.js with noble/hashes and update to version 2.2.0 * update BigNumber to v11.0.0 * replace noble/curves with noble/ed25519 for reduced bundle size * move tsconfig project root * replace toml with smol-toml
* refactor: replace URI usage for native URL + URLSearchParam objects * remove usage of non-null assertion * allow expandUriTemplate to handle relative templated links
* test src code directly instead of the built lib
…p nyc (#1408) * Update husky config + remove nyc * Root .nvmrc + bump Node to v22 * pnpm minimumReleaseAge config * Cleanup
* TypeDoc setup * TS tags cleanup * Update link syntax * More comments cleanup * Add @category * ESLint cleanup * Cleanup * From category to file-path routing * Comment cleanup * More source TSDoc cleanup * Per-symbol rendering for reference docs * Tag rendering for reference docs * docs/ skeleton with landing page and placeholder guides * LLMs sitemap and full-content bundle * Astro/Starlight site scaffold * Polish LLMs head link, public/ bundles, robots.txt * Retire JSDoc pipeline * Refresh CONTRIBUTING with docs guide * Render class/interface members and pin source links to evergreen ref * Trim CI: vitest coverage scope and bundle_size workflow * Fix tests * UI polishes * Make docs site agent-friendly; centralize site config * Fixed URL in MD siblings * .htaccess file * readme updates + UI fix * Add sub-page description * htaccess update * Apply SDS theme * Apply SDS fonts * Cleanup * Use default font size * Update tests action * Upgrade playwright + attempt to fix tests for 24 * Fix build docs script * Updated version guide * Update wording * Fix dead anchor links * Update readme
* Update XDR base URLs and improve Makefile for TypeScript definitions
* pull and regenerate xdr definitions for p27
* handle signing the new SorobanCredential varients
* add CAP-71 delegate-credential signing helpers
- buildAuthorizationEntryPreimage: expose the signature payload (authorizeEntry
now builds its preimage through it)
- buildWithDelegatesEntry: wrap ADDRESS/ADDRESS_V2 into ADDRESS_WITH_DELEGATES,
sorting + de-duping delegates; top-level signature defaults to Void
- authorizeEntry: optional forAddress to fill a specific node (top-level or a
delegate) instead of always the top-level
- export the new helpers + DelegateSignature/BuildWithDelegatesParams from base
* Update readme * Cleanup * Pre-push hook + updated docs * Update pre-push hook * pre-push updates * Add @stellar/stellar-base migration guide to the installation docs * Map xdr.HashIdPreimage in typedoc to fix docs:reference build * Revert typedoc dead-link workaround * Fix broken link * Readme tweaks --------- Co-authored-by: oceans404 <so.orpilla@gmail.com>
* Implement TransactionSource interface for Account and MuxedAccount classes; update TransactionBuilder to use TransactionSource
* merge master
* add back AuthFlag namespace * fix: update build types script for axios to ensure generated types are copied correctly
* add p27 guide
…nternal-link tooling (#1434) * docs: add internal-link tooling (base-prefix rewriting + dead-link validation) * docs: add connect-and-fund and send-a-payment guides * docs: add issue-an-asset guide * docs: refine issue-an-asset guide (token framing, typed helper, review fixes) * docs: add query-and-stream guide * docs: add handle-errors guide * docs: link guides 02-04 to the handle-errors guide Add error-handling pointers now that guide 05 exists (sibling-link upgrade): a primary pointer in guide 02's submit section and lighter pointers in 03/04. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: add invoke-a-contract guide (06) Teaches invoking a deployed Soroban contract from JS with contract.Client and AssembledTransaction: connect over RPC, preview a call by simulation, then sign and send a state change. Uses the increment contract; deployment is linked out to the Stellar CLI tutorial. Regenerate llms bundles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: add contract-auth guide (07) Covers signing Soroban contract authorization for an account other than the transaction source, framed for AddressV2 (CAP-0071-02) readiness: the same code is correct on the legacy ADDRESS credential today and on AddressV2 after the Protocol 28 flip. Distinguishes envelope signing from authorization-entry signing, and gives a before/after migration for hand-rolled signers (buildAuthorizationEntryPreimage / authorizeEntry). Also upgrades the Invoke a Contract guide's closing link to point at this guide, replaces numbered guide references with named links, and regenerates the llms bundles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: fold versioning into the home page, drop it as a guide Versioning and compatibility is reference material, not a task how-to, so it moves out of the guides nav into a 'Versioning and compatibility' section on the home page (README -> index). Repoints the agents.md reference to the new home-page anchor and regenerates index.md + llms bundles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: add migration guide (00) A versioned breaking-changes guide for upgrading to the v16 modernization release (base fold-in, native fetch, ESM, Node 22) and Protocol 27 / 28 Soroban auth (AddressV2). Modeled on viem's migration guide: one section per version, one entry per change, with before/after diffs. Sorts first in the guides nav and opens with a pointer to the home-page versioning section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: link API references in migration guide (00) Link the first mention of each documented symbol (Keypair, the auth helpers, contract.Client/basicNodeSigner/signAuthEntries, rpc.Server/Horizon.Server, getLatestLedger, BalanceResponse, SigningCallback) to its reference page, base-agnostic, matching guide 07. Anchors verified against the rendered reference pages; internal link check passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * regen docs * Text tweaks * cleanup and add missing migration details --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Ryan Yang <ryan.yang@stellar.org> Co-authored-by: Iveta <iveta@stellar.org>
* docs: update changelog for v16.0.0-rc.1 * update package version to 16.0.0-rc.1
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 18a91dc6ea
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ], | ||
| "main": "./lib/cjs/index.js", | ||
| "module": "./lib/esm/index.js", | ||
| "types": "./lib/esm/index.d.ts", |
There was a problem hiding this comment.
Expose ambient js-xdr declarations to consumers
When publishing the new generated declarations via ./lib/esm/index.d.ts, the public .d.ts graph still imports @stellar/js-xdr (for example from src/base/index.ts and the large-int helpers), but the added ambient declaration under types/stellar__js-xdr is only visible to this repo through typeRoots. Downstream TypeScript projects do not automatically load arbitrary types/ folders from dependencies, so consumers without their own shim for @stellar/js-xdr will get missing-declaration errors as soon as they import the SDK types. Please wire this shim into the emitted declaration graph or otherwise make the @stellar/js-xdr types resolvable from the published package.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b51c0759b7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "sideEffects": [ | ||
| "./lib/esm/base/scval.js", | ||
| "./lib/cjs/base/scval.js" | ||
| ], |
There was a problem hiding this comment.
Preserve scval side effects for axios builds
When consumers bundle @stellar/stellar-sdk/axios with tree-shaking and import only xdr or other exports that don't directly use the scval helpers, this whitelist only protects the non-axios scval.js files. The axios build emits separate files under lib/axios/esm/base/scval.js and lib/axios/cjs/base/scval.js, and those contain the xdr.scvSortedMap = scvSortedMap compatibility mutation; because they are not listed here, bundlers may discard the axios scval module as an unused re-export, leaving xdr.scvSortedMap undefined for the axios entrypoint. Please add the axios scval paths or use a glob that covers both builds.
Useful? React with 👍 / 👎.
What
Major modernization release (v16) that merges
@stellar/stellar-baseinto@stellar/stellar-sdkand overhauls the toolchain, HTTP layer, and build outputs.Codebase & types
stellar-basein TypeScript and merged it into this repo — everything now lives insrc/base/, with proper type definitions replacing the hand-maintainedones. (Base Migration #1399)
ADDRESS_V2and delegated credential types. (P27 updates #1429, P27 guide #1440, Auth flag namespace #1441)Build & packaging
lib/esm/,lib/cjs/, andlib/axios/*. (Webpack to rollup #1397)HTTP & runtime
fetchthe default HTTP client; axios is now opt-in via@stellar/stellar-sdk/axios. ([Modernization] Make fetch default #1394)eventsourceto v4 and removed theno-eventsourcebuild. (Update eventsource and remove no-eventsource build #1395)urijswith the nativeURLAPI. (replace URI for native URL #1402)Tooling
minimumReleaseAge; dropped nyc. (Tooling modernization: Node 22, husky v9, pnpm minimumReleaseAge, drop nyc #1408)src/directly instead of builtlib/. (test src code directly instead of the built lib #1403)Docs
llms.txtgeneration, and internal-link tooling. (New docs #1413, Update readme + pre-push check for docs #1430, docs: add task-oriented guides (connect-and-fund, send-a-payment) + internal-link tooling #1434)@internal→@ignorecleanup. (v16 changelog #1443, TSDoc: Replace @internal with @ignore tag #1436)