chore(xc_admin): fix xc_admin dependencies #1739
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes some issues with the various xc_admin packages' dependencies. Specifically:
@certusone/wormhole-sdk
express
dependency forproposer_server
bn.js
dependency forxc_admin_common
@solana/web3.js
to move to the v1.93.0 -- this version upgradesrpc-websockets
to v9, which includes a significant change to the way that package is built which does not appear to be working with our codebase -- I'll have to investigate later@injectivelabs/sdk-ts
wasn't getting deployed bypnpm deploy
, causing the servers to fail to startThe last issue turned out to be super tricky and subtle. Essentially what's happening here is:
@certusone/wormhole-sdk
specifies@injectivelabs/sdk-ts
as an optional dependency@injectivelabs/sdk-ts
has transitive peer dependencies (namely, on React and a few other packages we use in the monorepo, but not packages we use in thexc_admin
services)@injectivelabs/sdk-ts
to be tagged against the peers that are in the monorepoxc_admin
packages (other thanxc_admin_frontend
) and so aren't included in thepnpm deploy
of those packages@injectivelabs/sdk-ts
package is tagged against those peers, and because it's marked as an optional dependency, pnpm concludes that it does not need to be deployed and omits it.@certusone/wormhole-sdk
package throws on import if it's not present.Possibly it could be argued that this is a bug in how
pnpm deploy
works with optional dependencies, and it's definitely a bug in@certusone/wormhole-sdk
's package manifest. However, adding an explicit dependency on@injectivelabs/sdk-ts
to each xc_admin server package (and removing it fromxc_admin_common
) is enough to force pnpm to unify the transitive dependency and force it to be included in the deploy.It's also worth noting that
@certusone/wormhole-sdk
is being deprecated and replaced with@wormhole-foundation/sdk
. We'll need to move over eventually and doing so will likely help resolve similar packaging issues, due to the new sdk being more modular, simpler, and having far fewer and better maintained dependencies.