-
Notifications
You must be signed in to change notification settings - Fork 49
fix!: remove @libp2p/components #360
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
fix!: remove @libp2p/components #360
Conversation
Updates all `@libp2p/*` deps to the latest versions and configures dependabot - for some reason it wasn't turned on for dev deps. BREAKING CHANGE: updates @libp2p/components to the latest major
The latest |
@wemeetagain looks like the e2e test timed out in CI? |
`@libp2p/components` is a choke-point for our dependency graph as it depends on every interface, meaning when one interface revs a major `@libp2p/components` major has to change too which means every module depending on it also needs a major. Switch instead to constructor injection of simple objects that let modules declare their dependencies on interfaces directly instead of indirectly via `@libp2p/components` Refs libp2p/js-libp2p-components#6 BREAKING CHANGE: modules no longer implement `Initializable` instead switching to constructor injection
@@ -361,7 +375,7 @@ export class GossipSub extends EventEmitter<GossipsubEvents> implements Initiali | |||
cancel: () => void | |||
} | null = null | |||
|
|||
constructor(options: Partial<GossipsubOpts> = {}) { | |||
constructor(components: GossipSubComponents, options: Partial<GossipsubOpts> = {}) { |
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.
This is a breaking change?
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.
Yeah, as noted in the PR title & description
@libp2p/components
is a choke-point for our dependency graph as it depends on every interface, meaning when one interface revs a major@libp2p/components
major has to change too which means every module depending on it also needs a major.Switch instead to constructor injection of simple objects that let modules declare their dependencies on interfaces directly instead of
indirectly via
@libp2p/components
Refs libp2p/js-libp2p-components#6
BREAKING CHANGE: modules no longer implement
Initializable
instead switching to constructor injection