Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

Commit 3585146

Browse files
authored
fix: update all deps (#184)
1 parent 8c7841a commit 3585146

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@
135135
"release": "aegir release"
136136
},
137137
"dependencies": {
138-
"@libp2p/interface-transport": "^1.0.0",
139-
"@libp2p/interfaces": "^3.0.2",
138+
"@libp2p/interface-transport": "^1.0.3",
139+
"@libp2p/interfaces": "^3.0.3",
140140
"@libp2p/logger": "^2.0.0",
141-
"@libp2p/utils": "^2.0.0",
141+
"@libp2p/utils": "^3.0.1",
142142
"@libp2p/webrtc-peer": "^2.0.0",
143143
"@multiformats/mafmt": "^11.0.2",
144144
"@multiformats/multiaddr": "^10.1.7",
@@ -152,13 +152,15 @@
152152
"wherearewe": "^1.0.1"
153153
},
154154
"devDependencies": {
155-
"@libp2p/interface-mocks": "^2.0.1",
156-
"@libp2p/interface-transport-compliance-tests": "^2.0.0",
155+
"@libp2p/interface-mocks": "^4.0.1",
156+
"@libp2p/interface-transport-compliance-tests": "^2.0.5",
157157
"@mapbox/node-pre-gyp": "^1.0.8",
158158
"aegir": "^37.2.0",
159159
"it-all": "^1.0.6",
160160
"it-pipe": "^2.0.3",
161+
"it-stream-types": "^1.0.4",
161162
"multiaddr": "^10.0.0",
163+
"uint8arraylist": "^2.3.2",
162164
"wrtc": "^0.4.6"
163165
},
164166
"browser": {

test/dial.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,20 @@ import { fromString } from 'uint8arrays/from-string'
88
import { mockRegistrar, mockUpgrader } from '@libp2p/interface-mocks'
99
import type { WebRTCDirect } from '../src/index.js'
1010
import type { Upgrader } from '@libp2p/interface-transport'
11+
import type { Uint8ArrayList } from 'uint8arraylist'
12+
import type { Source } from 'it-stream-types'
1113

1214
// this node is started in aegir.cjs before the test run
1315
const REMOTE_MULTIADDR_IP4 = multiaddr('/ip4/127.0.0.1/tcp/12345/http/p2p-webrtc-direct')
1416
const REMOTE_MULTIADDR_IP6 = multiaddr('/ip6/::1/tcp/12346/http/p2p-webrtc-direct')
15-
1617
const ECHO_PROTOCOL = '/echo/1.0.0'
1718

19+
async function * toBytes (source: Source<Uint8ArrayList>) {
20+
for await (const list of source) {
21+
yield * list
22+
}
23+
}
24+
1825
export default (create: () => Promise<WebRTCDirect>) => {
1926
describe('dial', function () {
2027
this.timeout(20 * 1000)
@@ -44,6 +51,7 @@ export default (create: () => Promise<WebRTCDirect>) => {
4451
const values = await pipe(
4552
[data],
4653
stream,
54+
toBytes,
4755
async (source) => await all(source)
4856
)
4957

@@ -64,6 +72,7 @@ export default (create: () => Promise<WebRTCDirect>) => {
6472
const values = await pipe(
6573
[data],
6674
stream,
75+
toBytes,
6776
async (source) => await all(source)
6877
)
6978

@@ -97,6 +106,7 @@ export default (create: () => Promise<WebRTCDirect>) => {
97106
const values = await pipe(
98107
[data],
99108
stream,
109+
toBytes,
100110
async (source) => await all(source)
101111
)
102112

0 commit comments

Comments
 (0)