-
Notifications
You must be signed in to change notification settings - Fork 11.5k
[apps][part 2] use common utilities from @mysten/core inside the wallet and explorer #8632
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Ignored Deployments
|
e552fc5
to
8a34df9
Compare
5f4f522
to
6c205db
Compare
8a34df9
to
665af92
Compare
665af92
to
6d0624b
Compare
.npmrc
Outdated
@@ -1,2 +1,3 @@ | |||
strict-peer-dependencies=false | |||
auto-install-peers=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a slightly tricky issue where the dependency for react-query
in @mysten/core
created a separate module installation in pnpm-lock.yaml
resulting in two different react-query contexts (one for the wallet/explorer and one for @mysten/core
).
The fix for this was to make react
, react-dom
, and react-query
peer dependencies in @mysten/core
, and so I flipped auto-install-peers
to true so we can actually use those modules inside our core library. I figured this would be fine since regular npm automatically installs peer dependencies by default 🤷🏼♂️ , but LMK otherwise if there are any concerns here! cc @Jordan-Mysten
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love this, I think we either should:
- Enforce single versions of packages, which is generally pretty easy to do by making sure versions in package.json match then using
pnpm-deduplicate
. - Disable this setting, add all peer deps as dev deps (letting them be used in anything we do in core easily), and ensure peers are correctly setup.
I generally prefer 1 here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhhh I figured out why two separate entries were being created in pnpm-lock.yaml
, I missed adding react-dom
as a dependency to @mysten/core
🤦🏼♂️. I reverted the change to .npmrc
, so I think we should be good here.
There should be only a single version of react-query
now:
/@tanstack/react-query/4.22.0_biqbaboplfbrettd7655fr4n2y:
resolution: {integrity: sha512-P9o+HjG42uB/xHR6dMsJaPhtZydSe4v0xdG5G/cEj1oHZAXelMlm67/rYJNQGKgBamKElKogj+HYGF+NY2yHYg==}
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
react-native: '*'
peerDependenciesMeta:
react-dom:
optional: true
react-native:
optional: true
dependencies:
'@tanstack/query-core': 4.22.0
react: 18.2.0
react-dom: [email protected]
use-sync-external-store: [email protected]
dev: false
9a5976f
to
63b287c
Compare
f2f0cc4
to
79fb0ad
Compare
Description
This is a follow-up to #8623, so now we're actually using
useRpcClient
,SentryRpcClient
, anduseFormatCoin
from@mysten/core
in our frontend applications. If you're building features right now, you'll need to rebase and make sure you're usinguseRpcClient
from@mysten/core
when making RPC calls!(Also apologies in advance for this size of this changeset, it's mostly updating imports)
Test Plan
If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.
Type of Change (Check all that apply)
Release notes
N/A