Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
deps!: update stream types
Browse files Browse the repository at this point in the history
libp2p streams are now explicit about the types of sync/sources they provide, showing that they are
`AsyncGenerator`s and not just `AsyncIterable`s.

Refs: achingbrain/it-stream-types#45

BREAKING CHANGE: the type of the source/sink properties have changed
  • Loading branch information
achingbrain committed Apr 18, 2023
1 parent 0f39f47 commit accc252
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dist
node_modules
package-lock.json
yarn.lock
.vscode
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- [Connection](#connection)
- [API Docs](#api-docs)
- [License](#license)
- [Contribute](#contribute)
- [Contribution](#contribution)

## Install

Expand Down Expand Up @@ -60,10 +60,10 @@ await node.start()
await node.dial('/ip4/127.0.0.1/tcp/9090/ws')
```

| Name | Type | Description | Default |
| -------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| upgrader | [`Upgrader`](https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-interfaces/src/transport#upgrader) | connection upgrader object with `upgradeOutbound` and `upgradeInbound` | **REQUIRED** |
| filter | `(multiaddrs: Array<Multiaddr>) => Array<Multiaddr>` | override transport addresses filter | **Browser:** DNS+WSS multiaddrs / **Node.js:** DNS+[WS, WSS] multiaddrs |
| Name | Type | Description | Default |
| -------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| upgrader | [`Upgrader`](https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-interfaces/src/transport#upgrader) | connection upgrader object with `upgradeOutbound` and `upgradeInbound` | **REQUIRED** |
| filter | `(multiaddrs: Array<Multiaddr>) => Array<Multiaddr>` | override transport addresses filter | **Browser:** DNS+WSS multiaddrs / **Node.js:** DNS+\[WS, WSS] multiaddrs |

You can create your own address filters for this transports, or rely in the filters [provided](./src/filters.js).

Expand Down Expand Up @@ -125,6 +125,6 @@ Licensed under either of
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

## Contribute
## Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,32 +159,32 @@
"docs": "aegir docs"
},
"dependencies": {
"@libp2p/interface-connection": "^4.0.0",
"@libp2p/interface-transport": "^2.0.0",
"@libp2p/interface-connection": "^5.0.0",
"@libp2p/interface-transport": "^3.0.0",
"@libp2p/interfaces": "^3.0.3",
"@libp2p/logger": "^2.0.0",
"@libp2p/utils": "^3.0.2",
"@multiformats/mafmt": "^12.0.0",
"@multiformats/multiaddr": "^12.0.0",
"@multiformats/multiaddr-to-uri": "^9.0.2",
"abortable-iterator": "^4.0.2",
"it-ws": "^5.0.6",
"abortable-iterator": "^5.0.0",
"it-ws": "^6.0.0",
"p-defer": "^4.0.0",
"p-timeout": "^6.0.0",
"wherearewe": "^2.0.1",
"ws": "^8.12.1"
},
"devDependencies": {
"@libp2p/interface-mocks": "^9.1.3",
"@libp2p/interface-mocks": "^10.0.0",
"@libp2p/interface-transport-compliance-tests": "^3.0.0",
"@types/ws": "^8.2.2",
"aegir": "^38.1.7",
"is-loopback-addr": "^2.0.1",
"it-all": "^3.0.1",
"it-drain": "^2.0.0",
"it-drain": "^3.0.1",
"it-goodbye": "^4.0.1",
"it-pipe": "^2.0.3",
"it-stream-types": "^1.0.4",
"it-pipe": "^3.0.1",
"it-stream-types": "^2.0.1",
"p-wait-for": "^5.0.0",
"uint8arraylist": "^2.3.2",
"uint8arrays": "^4.0.2"
Expand Down

0 comments on commit accc252

Please sign in to comment.