-
Notifications
You must be signed in to change notification settings - Fork 27
feat!: add upgrader options #290
feat!: add upgrader options #290
Conversation
Per #292 (comment) Fixes: libp2p/js-libp2p#1382 and #287 Enables WebTransport: https://github.com/libp2p/js-libp2p-webtransport/ |
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@libp2p/interface-stream-muxer", | |||
"version": "2.0.2", | |||
"version": "2.0.3", |
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.
Should we avoid this too for the same reason as: #290 (comment) ?
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.
ah, sorry. Will fix
@MarcoPolo wouldn't we have to update the patch version since we have added features? |
@achingbrain made it sound like the version numbers are handled by CI during release. I don't know much more. |
If you added a feature, a minor version should be updated. But in this case, since the title contains "feat:", CI will automatically update versions where needed. |
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.
LGTM, just needs the extra boolean option adding.
IMPORTANT: this is a breaking change. Before merging the following needs to happen:
- The title of this PR needs to change from
feat: add upgrader options
tofeat!: add upgrader options
- The commit message needs to have the following added to it when this PR is squashed and merged (the format is important -
"BREAKING CHANGE: "
followed by a one-line sentence - this will be added to the release notes and changelog):
BREAKING CHANGE: the return type of StreamMuxer.newStream can now return a promise
Either one of the above two changes will make semantic-release
rev the version numbers correctly when CI runs on master after merge. Both changes will make doubly sure it doesn't miss it.
@@ -18,7 +18,7 @@ export interface StreamMuxer extends Duplex<Uint8Array> { | |||
* Initiate a new stream with the given name. If no name is | |||
* provided, the id of the stream will be used. | |||
*/ | |||
newStream: (name?: string) => Stream | |||
newStream: (name?: string) => Stream | Promise<Stream> |
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.
Based on our learnings from #295 this is a breaking change.
Making this change locally with libp2p master indeed fails to compile.
I don't know why GH isn't showing the actions that have run on this PR but the build is failing. Can you please ensure you can run the build, lint and test npm scripts successfully. |
@achingbrain that is an older commit. I can run build, lint, and test successfully. |
BREAKING CHANGE: the return type of StreamMuxer.newStream can now return a promise async new stream fix mocks Update packages/interface-transport/package.json Co-authored-by: Marco Munizaga <marco@marcopolo.io> test fix versioning fix lint
edfc77c
to
1ea2e47
Compare
@achingbrain Could you merge this? I don't have permissions to merge. |
Yes, I was just waiting for CI to be green. |
It's here, still not sure why it doesn't appear on this PR: https://github.com/libp2p/js-libp2p-interfaces/actions/runs/3197326618 |
## [@libp2p/interface-stream-muxer-v3.0.0](https://github.com/libp2p/js-libp2p-interfaces/compare/@libp2p/interface-stream-muxer-v2.0.2...@libp2p/interface-stream-muxer-v3.0.0) (2022-10-06) ### ⚠ BREAKING CHANGES * the return type of StreamMuxer.newStream can now return a promise Co-authored-by: Marco Munizaga <marco@marcopolo.io> ### Features * add upgrader options ([#290](#290)) ([c502b66](c502b66))
🎉 This PR is included in version @libp2p/interface-stream-muxer-v3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [@libp2p/interface-stream-muxer-compliance-tests-v5.0.0](https://github.com/libp2p/js-libp2p-interfaces/compare/@libp2p/interface-stream-muxer-compliance-tests-v4.0.0...@libp2p/interface-stream-muxer-compliance-tests-v5.0.0) (2022-10-06) ### ⚠ BREAKING CHANGES * the return type of StreamMuxer.newStream can now return a promise Co-authored-by: Marco Munizaga <marco@marcopolo.io> ### Features * add upgrader options ([#290](#290)) ([c502b66](c502b66)) ### Dependencies * update sibling dependencies ([66b4993](66b4993))
🎉 This PR is included in version @libp2p/interface-stream-muxer-compliance-tests-v5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [@libp2p/interface-transport-v2.0.0](https://github.com/libp2p/js-libp2p-interfaces/compare/@libp2p/interface-transport-v1.0.4...@libp2p/interface-transport-v2.0.0) (2022-10-06) ### ⚠ BREAKING CHANGES * the return type of StreamMuxer.newStream can now return a promise Co-authored-by: Marco Munizaga <marco@marcopolo.io> ### Features * add upgrader options ([#290](#290)) ([c502b66](c502b66)) ### Dependencies * update sibling dependencies ([66b4993](66b4993)) * update sibling dependencies ([5de9728](5de9728))
🎉 This PR is included in version @libp2p/interface-transport-v2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [@libp2p/interface-mocks-v6.0.0](https://github.com/libp2p/js-libp2p-interfaces/compare/@libp2p/interface-mocks-v5.1.0...@libp2p/interface-mocks-v6.0.0) (2022-10-06) ### ⚠ BREAKING CHANGES * the return type of StreamMuxer.newStream can now return a promise Co-authored-by: Marco Munizaga <marco@marcopolo.io> ### Features * add upgrader options ([#290](#290)) ([c502b66](c502b66)) ### Dependencies * update sibling dependencies ([0fae3ee](0fae3ee)) * update sibling dependencies ([8a89a05](8a89a05)) * update sibling dependencies ([66b4993](66b4993))
🎉 This PR is included in version @libp2p/interface-mocks-v6.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Allow upgrader to accept a StreamMuxerFactory and skip encryption for transports that inherently support encryption and/or multiplexing (WebRTC, WebTransport, etc.)