-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat: protobuf-es #1245
feat: protobuf-es #1245
Conversation
size-limit report 📦
|
ee33ec8
to
b3e5e41
Compare
b3e5e41
to
02d44a5
Compare
packages/interfaces/src/message.ts
Outdated
@@ -32,7 +20,7 @@ export interface IMessage { | |||
} | |||
|
|||
export interface IMetaSetter { | |||
(message: IProtoMessage & { meta: undefined }): Uint8Array; | |||
(message: proto_message.WakuMessage & { meta: undefined }): Uint8Array; |
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.
maybe have a type IProtoMessage = proto_message.WakuMessage
and re-export it. Less changes across the code base and fair to make the type easier to access
@@ -42,7 +37,7 @@ export type StoreQueryOptions = { | |||
* Cursor as an index to start a query from. Must be generated from a Waku | |||
* Message. | |||
*/ | |||
cursor?: Cursor; | |||
cursor?: proto_store.Index; |
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 think we should expose proto class to the user. We should keep the Cursor
interface.
@@ -1,4 +1,4 @@ | |||
import { IProtoMessage } from "@waku/interfaces"; | |||
import { proto_message } from "@waku/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.
Good reason to re-export proto_message.WakuMessage
from @waku/interfaces
as IProtoMessage
.
rateLimitProof: undefined, | ||
timestamp: undefined, | ||
meta: undefined, | ||
version: undefined, | ||
ephemeral: undefined, |
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.
not needed anymore
"@bufbuild/buf": "^1.15.0-1", | ||
"@bufbuild/protobuf": "^1.1.1", | ||
"@bufbuild/protoc-gen-es": "^1.1.1" |
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 assumed two of these deps are devDependencies
, no?
packages/peer-exchange/package.json
Outdated
@@ -53,6 +53,7 @@ | |||
"@libp2p/interface-peer-discovery": "^1.0.5", | |||
"@libp2p/interfaces": "^3.3.1", | |||
"@waku/enr": "*", | |||
"@waku/interfaces": "*", |
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.
Why? it should only contain types and hence remain a devDepedencies
item
packages/peer-exchange/src/rpc.ts
Outdated
@@ -1,3 +1,4 @@ | |||
import { PeerExchangeQueryParams } from "@waku/interfaces"; |
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.
import { PeerExchangeQueryParams } from "@waku/interfaces"; | |
import type { PeerExchangeQueryParams } from "@waku/interfaces"; |
Boom, 13% size increase |
2473da8
to
ddcf16b
Compare
Problem
#335