Skip to content

Commit

Permalink
feat(ts-bindings): use upcoming stellar-sdk@12rc3
Browse files Browse the repository at this point in the history
Uses the in-progress branch at
stellar/js-stellar-sdk#962, which will be merged
and released as 12rc3 soon. This PR can be updated to use the release at
that point.

Note that using the new `import { Client } from
'@stellar/stellar-sdk/ContractClient` entrypoint requires getting rid
of the "build the TS Bindings for both Common JS and ES Modules"
behavior we had before. I think this is fine. From [TypeScript's
`moduleResolution`
documentation](https://www.typescriptlang.org/docs/handbook/modules/theory.html#module-resolution-for-libraries):

> When compiling a library, you don’t know where the output code will
> run, but you’d like it to run in as many places as possible. Using
> `"module": "nodenext"` (along with the implied `"moduleResolution":
> "nodenext"`) is the best bet for maximizing the compatibility of the
> output JavaScript’s module specifiers, since it will force you to comply
> with Node.js’s stricter rules for import module resolution.

We also don't really need these generated NPM modules to be more
flexible than stellar-sdk itself, and it doesn't do the
build-to-cjs-and-esm thing.
  • Loading branch information
chadoh committed May 14, 2024
1 parent 8d9c479 commit d5d4a59
Show file tree
Hide file tree
Showing 3 changed files with 741 additions and 0 deletions.
Loading

0 comments on commit d5d4a59

Please sign in to comment.