Skip to content

Commit

Permalink
chore: remove libp2p deps from webrtc transport (#2817)
Browse files Browse the repository at this point in the history
Moves integration-style testing to integration tests, runs the extra
tests against every transport and remove deps that mean a libp2p
release causes a webrtc release.
  • Loading branch information
achingbrain authored Nov 14, 2024
1 parent 844a8d2 commit c917314
Show file tree
Hide file tree
Showing 15 changed files with 341 additions and 923 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { yamux } from '@chainsafe/libp2p-yamux'
import { circuitRelayTransport } from '@libp2p/circuit-relay-v2'
import { identify } from '@libp2p/identify'
import { mockConnectionGater } from '@libp2p/interface-compliance-tests/mocks'
import { mplex } from '@libp2p/mplex'
import { plaintext } from '@libp2p/plaintext'
import { webRTC } from '@libp2p/webrtc'
Expand Down Expand Up @@ -32,7 +31,9 @@ export function createBaseOptions <T extends ServiceMap = Record<string, unknown
connectionEncrypters: [
plaintext()
],
connectionGater: mockConnectionGater(),
connectionGater: {
denyDialMultiaddr: async () => false
},
services: {
identify: identify()
}
Expand Down
3 changes: 1 addition & 2 deletions packages/interface-compliance-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,15 @@
"p-defer": "^4.0.1",
"p-event": "^6.0.1",
"p-limit": "^6.0.0",
"p-retry": "^6.2.0",
"p-wait-for": "^5.0.2",
"protons-runtime": "^5.4.0",
"race-signal": "^1.1.0",
"sinon": "^18.0.0",
"tdigest": "^0.1.2",
"uint8arraylist": "^2.4.8",
"uint8arrays": "^5.1.0"
},
"devDependencies": {
"@types/tdigest": "^0.1.4",
"protons": "^7.5.0"
}
}
18 changes: 0 additions & 18 deletions packages/interface-compliance-tests/src/mocks/connection-gater.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/interface-compliance-tests/src/mocks/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
export { mockConnectionGater } from './connection-gater.js'
export { mockConnectionManager, mockNetwork } from './connection-manager.js'
export { mockConnection, mockStream, streamPair, connectionPair } from './connection.js'
export { mockMultiaddrConnection, mockMultiaddrConnPair } from './multiaddr-connection.js'
export { mockMuxer } from './muxer.js'
export { mockRegistrar } from './registrar.js'
export { mockUpgrader } from './upgrader.js'
export { mockDuplex } from './duplex.js'
export { mockMetrics } from './metrics.js'
export type { MockUpgraderInit } from './upgrader.js'
export type { MockNetworkComponents, MockConnectionManagerComponents, MockNetwork } from './connection-manager.js'
export type { MockConnectionOptions, StreamInit, StreamPairInit } from './connection.js'
Expand Down
Loading

0 comments on commit c917314

Please sign in to comment.