Skip to content
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 #1427

Merged
merged 5 commits into from Oct 14, 2022
Merged

Conversation

achingbrain
Copy link
Member

@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

Fixes libp2p/js-libp2p-components#6

BREAKING CHANGE: modules no longer implement Initializable instead switching to constructor injection

`@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`

Fixes libp2p/js-libp2p-components#6

BREAKING CHANGE: modules no longer implement `Initializable` instead switching to constructor injection
],
connectionEncryption: [
new Noise(),
new Plaintext()
() => () => new Noise(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed until ChainSafe/js-libp2p-noise#229 is released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

This module needs to go away
1 participant