-
Notifications
You must be signed in to change notification settings - Fork 208
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
cosmic-proto export patterns #9310
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
@turadg 🎉 LGTM - i am going to apply a small patch as I'd like to depend on this. --- a/packages/cosmic-proto/test/test-vatsafe.js
+++ b/packages/cosmic-proto/test/test-vatsafe.js
@@ -3,7 +3,7 @@
import test from '@endo/ses-ava/prepare-endo.js';
import { cosmos } from '@agoric/cosmic-proto';
-import { MsgDelegate } from '@agoric/cosmic-proto/cosmos/staking/v1beta1/tx';
+import { MsgDelegate } from '@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js';
// @ts-expect-error
cosmos.staking.v1beta1.MsgDelegate.missing; --- a/packages/boot/test/bootstrapTests/test-vat-orchestration.ts
+++ b/packages/boot/test/bootstrapTests/test-vat-orchestration.ts
@@ -6,7 +6,7 @@ import {
MsgDelegate,
MsgDelegateResponse,
} from '@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js';
-import { Any } from '@agoric/cosmic-proto/google/protobuf/any';
+import { Any } from '@agoric/cosmic-proto/google/protobuf/any.js';
import type { ChainAccount, OrchestrationService } from '@agoric/orchestration';
import { decodeBase64 } from '@endo/base64';
import { M, matches } from '@endo/patterns'; |
aacd8a1
to
ab45386
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.
To answer your posed questions, yes, please also export dist/codegen/agoric
as /agoric/*
(but do not yet remove the lifted swingset, vstorage, etc), and yes, please use the .js
suffix on the exports.
@@ -24,21 +24,17 @@ | |||
"default": "./dist/vatsafe.js" |
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.
Should ./vatsafe
get the same treatment?
"./vatsafe/*.js": {
"types": "./dist/codegen/vatsafe/*.d.ts",
"default": "./dist/codegen/vatsafe/*.js"
}
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.
it's meant to be one module
I approved, but removed the |
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.
Thanks for the issue and work-around for the current Endo bundler limitation, and thanks for documenting in package.json.md
. That could be A Thing™.
refs: #9307
Description
Simplify codegen exports using exports subpath patterns
Reviewers,
.js
?agoric
like the others?Security Considerations
Scaling Considerations
Documentation Considerations
Testing Considerations
Upgrade Considerations