-
Notifications
You must be signed in to change notification settings - Fork 28
feat: split out code, convert to typescript #111
Conversation
e9d383a
to
85f8dfc
Compare
85f8dfc
to
2909163
Compare
2909163
to
0fedfa0
Compare
* Splits implementations out from interfaces so we can depend on interfaces module without pulling in crypto, etc (fixes #110) * Converts code to typescript (fixes #101) * Adds types for PeerData and Registrar - these will need to be fleshed out properly in a subsequent PR BREAKING CHANGE: not all fields from concrete classes have been added to the interfaces
0fedfa0
to
42e2ed5
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.
This is amazing ❤️ could only do a quick review, but looks great
"bugs": { | ||
"url": "https://github.com/libp2p/js-libp2p-interfaces/issues" | ||
}, | ||
"homepage": "https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-connection#readme#readme", |
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.
Can we add a placeholder Readme file?
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.
Done!
🎉 This PR is included in version @libp2p/interfaces-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @libp2p/topology-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @libp2p/connection-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @libp2p/pubsub-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I've tried to break some of the circular dependencies in the interfaces (e.g. libp2p depends on pubsub, which depends on libp2p, which depends on pubsub, etc). This hasn't been possible in the tests so I've added
@ts-expect-error
where we access these properties with the aim to revisit it once this has been rolled up to libp2p itself.BREAKING CHANGE: not all fields from concrete classes have been added to the interfaces, some adjustment may be necessary as this gets rolled out