-
Notifications
You must be signed in to change notification settings - Fork 215
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
Patch @cosmjs/math for SES compatibility #9583
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
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.
how about putting the test in cosmic-proto?
// A test to verify that importing @cosmsjs/math into an ESM via bundleSource | ||
// can see the exported Decimal constructor, which was at time of writing obscured | ||
// by https://github.com/endojs/endo/pull/2330, temporarily mitigated by a patch. | ||
// Placed here only because Agoric CLI depends on both bundleSource and CosmJS math. |
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.
seems like it should go in cosmic-proto.
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.
done
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.
Looks like it was copied rather than moved.
I trust you'll get rid of the copy in agoric-cli before merging.
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.
Thank you for spotting. This wasn’t obvious locally.
d697b4f
to
e985d4f
Compare
e985d4f
to
0fdf898
Compare
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 trust you'll prune the duplicate test before merging
// A test to verify that importing @cosmsjs/math into an ESM via bundleSource | ||
// can see the exported Decimal constructor, which was at time of writing obscured | ||
// by https://github.com/endojs/endo/pull/2330, temporarily mitigated by a patch. | ||
// Placed here only because Agoric CLI depends on both bundleSource and CosmJS math. |
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.
Looks like it was copied rather than moved.
I trust you'll get rid of the copy in agoric-cli before merging.
0fdf898
to
6acdcef
Compare
6acdcef
to
5852855
Compare
How does this address the original issue. A patch in agoric-sdk won't affect dapps if the dapp uses packages installed from NPM |
The fix for the underlying issue is endojs/endo#2330 |
refs: #9408 ## Description cosmjs deps add a lot of size and complicates our builds (#9583) At runtime we only need `Decimal` so this vendors that (just the subset necessary) and drops all other runtime deps. ### Security Considerations less supply chain ### Scaling Considerations none ### Documentation Considerations Maybe get this upstream to reduce maintenance. ### Testing Considerations CI suffices? ### Upgrade Considerations None, not on chain.
closes: #9408
Description
Pending endojs/endo#2330, we patch
@cosmjs/math
such that imports from ESM reflect the exported types.Security Considerations
None.
Scaling Considerations
None.
Documentation Considerations
None.
Testing Considerations
Included test.
Upgrade Considerations
None.