-
Notifications
You must be signed in to change notification settings - Fork 43
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!: @waku/relay #1316
feat!: @waku/relay #1316
Conversation
@@ -74,7 +74,6 @@ | |||
"node": ">=16" | |||
}, | |||
"dependencies": { |
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.
removes libp2p-gossipsub
dependency from core
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.
Did you double check whether any other dependency can be removed such as @libp2p/interface-pubsub
?
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 catch!
We could possibly use something like https://github.com/depcheck/depcheck to achieve receiving updates on unused dependency errors.
size-limit report 📦
|
4ce6fd6
to
5bcbcea
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.
Looks good
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 really agree with some constant move. We don't want waku utils to become a dumping ground. Will provide a second review shortly.
@@ -74,7 +74,6 @@ | |||
"node": ">=16" | |||
}, | |||
"dependencies": { |
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.
Did you double check whether any other dependency can be removed such as @libp2p/interface-pubsub
?
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 see some of the constant location as a potential issue/tech debt and would prefer to have it sorted with this PR.
"fast-check": "^3.8.1" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^24.1.0", |
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 would expect to see the @libp2p/interface-pubsub dependency here,no?
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.
Correct, weird as the check
/build
did not fail. Encountered something similar the other day as well.
Worth opening an issue? We wrote a fix for this, correct?
(could be cool: https://github.com/depcheck/depcheck)
cc @weboko
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.
That's indeed strange, I've been tracking that issue and checking similar scenarios that were caught by the eslint
rule.
Added an issue with some description - #1337
6dcc445
to
8646f7c
Compare
packages/core/src/constants/index.ts
Outdated
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.
Just make it constants.ts
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.
Changed.
I had created a folder constants
to future-proof in case we want to add more constant files in the future. But if a case like this arises, we can create the folder then :)
} | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"lib/*": [ | ||
"dist/lib/*" | ||
], | ||
"constants/*": [ |
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.
Any reason why is constants
out of the lib
dir?
I said move it in the lib
dir. We can remove the lib
dir if it bothers you.
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.
imo @waku/core/constants
made it easier to read/import compared to importing directly from @waku/core
And @waku/core/lib/constants
is a bigger import path and intuitively constants
don't feel right to import from lib
I have removed it as a separate export path, and exporting directly out of @waku/core
-- we can change this in the future if necessary :)
packages/create/package.json
Outdated
@@ -51,6 +51,7 @@ | |||
"@chainsafe/libp2p-noise": "^11.0.0", | |||
"@libp2p/mplex": "^7.1.1", | |||
"@libp2p/websockets": "^5.0.3", | |||
"@waku/relay": "^0.0.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.
@weboko didn't we say we would keep *
for packages in the mono repo? I can see the other package have a specified version too.
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 have addressed this as part of this PR: 41ffc35
I'm curious if we could possibly make this change automatically part of the pre-commit hook maybe
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.
did some digging; tracking here: #1346
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.
@fryorcraken , right now we have a mix: some are using asterisk and some version.
Honestly I can't remember on what we settled but it seems to me now we agreed that version will be changed / maintained by release-please
to specific version instead of asterisk - last release.
@danisharora099 I believe the task is not needed except if we want to define versions to private packages, I think they won't be changed automatically by the release CI. That can be done manually it seems.
3bdb71a
to
a61a5ca
Compare
Problem
#1151
Solution
Moves
relay
functionality into a separate package of the monorepoNotes
@waku/core
#1151