Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(staking-sdk): fix staking-sdk build #2567

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

cprussin
Copy link
Collaborator

@cprussin cprussin commented Apr 6, 2025

This commit makes the following related changes:

  • Fix @pythnetwork/staking-sdk build -- the prior build process created an unusable package due to producing invalid references in package.json.
  • Clean up @pythnetwork/staking-sdk typescript configs, using nodenext for the target and module resolution strategy
  • Fix import statements in @pythnetwork/staking-sdk to properly work with nodenext resolution
  • Distribute @pythnetwork/staking-sdk as esm-only -- nowadays supporting cjs is making less sense and in particular some of the underlying solana libs are distributed as esm-only, so it really doesn't make sense for us to distribute cjs
  • Stop using nextjs's transpilePackages for apps that depend on monorepo packages -- this makes less sense nowadays with turbo watch and it has some major downsides, in particular it doesn't work if you have different tsconfig settings between apps and the packages they depend on.

This commit makes the following related changes:

- Fix `@pythnetwork/staking-sdk` build -- the prior build process created an
  unusable package due to producing invalid references in `package.json`.
- Clean up `@pythnetwork/staking-sdk` typescript configs, using nodenext for the
  target and module resolution strategy
- Fix import statements in `@pythnetwork/staking-sdk` to properly work with
  nodenext resolution
- Distribute `@pythnetwork/staking-sdk` as esm-only -- nowadays supporting cjs
  is making less sense and in particular some of the underlying solana libs are
  distributed as esm-only, so it really doesn't make sense for us to distribute
  cjs
- Stop using nextjs's `transpilePackages` for apps that depend on monorepo
  packages -- this makes less sense nowadays with [turbo
  watch](https://turbo.build/docs/reference/watch) and it has some major
  downsides, in particular it doesn't work if you have different tsconfig
  settings between apps and the packages they depend on.
@cprussin cprussin requested a review from keyvankhademi April 6, 2025 21:24
@cprussin cprussin requested a review from a team as a code owner April 6, 2025 21:24
Copy link

vercel bot commented Apr 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 9:30pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 9:30pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 9:30pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 9:30pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 9:30pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 9:30pm

@cprussin cprussin merged commit c9e6665 into main Apr 7, 2025
10 checks passed
@cprussin cprussin deleted the cprussin/fix-staking-sdk-build branch April 7, 2025 16:27
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.

2 participants