Repository navigation
Conversation
@mysten/hashi requires @mysten/sui ^3.0.0, which the previous 2.20.0 pin did not satisfy. Ticket: SCAAS-12511
|
@claude review this pr |
|
Claude finished @arvind-bg's task in 24s —— View job Review of #10325: bump
|
There was a problem hiding this comment.
I reviewed this PR and didn't find any bugs. It moves sdk-coin-sui to a new major version of @ mysten/sui, and that path has a CODEOWNER, so a human look is still worthwhile.
What was reviewed:
- The grpcClient.ts refactor. Both the browser and Node paths now build their transport and pass it to one
SuiGrpcClientconstructor. The transport is stored in a WeakMap keyed by client.closeSuiGrpcClientevicts the cache entry before it closes the transport, and it does nothing when no transport was recorded. - The tests now check the SDK-built transport with instanceOf instead of reading the private
_transportfield. - Not checked: whether the 3.1.1 constructor and the
GrpcWebFetchTransportexport match the structural types in grpcClient.ts. The package isn't installed in this checkout. The PR says the browser bundle build and a real testnet transaction weren't tested either.
Extended reasoning...
The change bumps @ mysten/sui from 2.20.0 to 3.1.1 (exact pin) in sdk-coin-sui and regenerates yarn.lock, pulling in graphql 17, valibot 1.6 and @ mysten/bcs 2.1.4. It reworks how grpcClient.ts builds and closes the gRPC transport. It touches no auth or crypto code directly, but this client is the module's node-interaction path. Browser callers must now pass an absolute http(s) URL. I deferred because CODEOWNERS assigns modules/sdk-coin-sui/ and package.json to specific teams, and because a major SDK upgrade can only be fully checked against the 3.x types and a browser build, which this checkout can't provide.
Description
Bumps
@mysten/suiinmodules/sdk-coin-suifrom2.20.0to3.1.1, keeping the exact pin.@mysten/hashiis built against@mysten/sui3.x. Moving the SDK onto the same line keeps the two libraries on the versions they are released together for, so later Sui and Hashi updates can be taken without a major upgrade in between.sdk-coin-sui
package.json:@mysten/suiis pinned to3.1.1.src/lib/grpcClient.ts: Sui 3.x wraps the transport that is passed to its client. The SDK now builds the gRPC transport itself for the browser and Node paths, keeps a reference to it, and closes that reference incloseSuiGrpcClient.test/unit/utils.ts: the browser transport test passes anhttps://URL, because Sui 3.x rejects a bare host as the browser endpoint. The transport tests check the transport the SDK built.yarn.lock: regenerated. Sui's own dependencies move with it (graphql17,valibot1.6,@mysten/bcs2.1.4).Behaviour changes that come with Sui 3.x
http(s)URL. The configured node URLs already are.format: 'text'.x-sui-client-protocol-versionheader. The public testnet and mainnet nodes accepted it.Issue Number
SCAAS-12511
Type of change
This is a dependency upgrade, so none of the standard types fits exactly. It is not marked as a breaking change: the SDK's public API is unchanged and the configured node URLs keep working. The one behaviour difference is the browser URL rule described above.
How Has This Been Tested?
npm run unit-testinmodules/sdk-coin-sui: 281 passing, the same result as on2.20.0. Two suites that need local test credentials (test/unit/sui.ts,test/unit/suiToken.ts) did not run.npx tsc --noEmit,npx eslinton the changed files andnpx prettier --check: clean.3.1.1as on2.20.0.3.1.1as on2.20.0.