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

Commit

Permalink
deps: bump @libp2p/interface-transport from 3.0.0 to 4.0.0 (#269)
Browse files Browse the repository at this point in the history
* deps(dev): bump @libp2p/interface-transport-compliance-tests

Bumps [@libp2p/interface-transport-compliance-tests](https://github.com/libp2p/js-libp2p-interfaces) from 3.0.13 to 4.0.0.
- [Release notes](https://github.com/libp2p/js-libp2p-interfaces/releases)
- [Commits](https://github.com/libp2p/js-libp2p-interfaces/compare/@libp2p/interface-transport-compliance-tests-v3.0.13...@libp2p/interface-transport-compliance-tests-v4.0.0)

---
updated-dependencies:
- dependency-name: "@libp2p/interface-transport-compliance-tests"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* deps(dev): bump @libp2p/interface-mocks from 10.0.3 to 11.0.0

Bumps [@libp2p/interface-mocks](https://github.com/libp2p/js-libp2p-interfaces) from 10.0.3 to 11.0.0.
- [Release notes](https://github.com/libp2p/js-libp2p-interfaces/releases)
- [Commits](https://github.com/libp2p/js-libp2p-interfaces/compare/@libp2p/interface-mocks-v10.0.3...@libp2p/interface-mocks-v11.0.0)

---
updated-dependencies:
- dependency-name: "@libp2p/interface-mocks"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* deps: bump @libp2p/interface-transport from 3.0.0 to 4.0.0

Bumps [@libp2p/interface-transport](https://github.com/libp2p/js-libp2p-interfaces) from 3.0.0 to 4.0.0.
- [Release notes](https://github.com/libp2p/js-libp2p-interfaces/releases)
- [Commits](https://github.com/libp2p/js-libp2p-interfaces/compare/@libp2p/interface-transport-v3.0.0...@libp2p/interface-transport-v4.0.0)

---
updated-dependencies:
- dependency-name: "@libp2p/interface-transport"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: achingbrain <alex@achingbrain.net>
  • Loading branch information
dependabot[bot] and achingbrain authored Apr 24, 2023
1 parent a33e662 commit 1b06059
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"dependencies": {
"@libp2p/interface-connection": "^5.0.0",
"@libp2p/interface-metrics": "^4.0.0",
"@libp2p/interface-transport": "^3.0.0",
"@libp2p/interface-transport": "^4.0.0",
"@libp2p/interfaces": "^3.2.0",
"@libp2p/logger": "^2.0.0",
"@libp2p/utils": "^3.0.2",
Expand All @@ -152,8 +152,8 @@
"stream-to-it": "^0.2.2"
},
"devDependencies": {
"@libp2p/interface-mocks": "^10.0.0",
"@libp2p/interface-transport-compliance-tests": "^3.0.0",
"@libp2p/interface-mocks": "^11.0.0",
"@libp2p/interface-transport-compliance-tests": "^4.0.0",
"aegir": "^38.1.0",
"it-all": "^3.0.1",
"it-pipe": "^3.0.1",
Expand Down
5 changes: 4 additions & 1 deletion test/connection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ import { multiaddr } from '@multiformats/multiaddr'
import { mockUpgrader } from '@libp2p/interface-mocks'
import type { Connection } from '@libp2p/interface-connection'
import type { Transport, Upgrader } from '@libp2p/interface-transport'
import { EventEmitter } from '@libp2p/interfaces/events'

describe('valid localAddr and remoteAddr', () => {
let transport: Transport
let upgrader: Upgrader

beforeEach(() => {
transport = tcp()()
upgrader = mockUpgrader()
upgrader = mockUpgrader({
events: new EventEmitter()
})
})

const ma = multiaddr('/ip4/127.0.0.1/tcp/0')
Expand Down
8 changes: 6 additions & 2 deletions test/listen-dial.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import type { Transport, Upgrader } from '@libp2p/interface-transport'
import pDefer from 'p-defer'
import type { MultiaddrConnection } from '@libp2p/interface-connection'
import { EventEmitter } from '@libp2p/interfaces/events'

const isCI = process.env.CI

Expand All @@ -20,7 +21,9 @@ describe('listen', () => {

beforeEach(() => {
transport = tcp()()
upgrader = mockUpgrader()
upgrader = mockUpgrader({
events: new EventEmitter()
})
})

afterEach(async () => {
Expand Down Expand Up @@ -171,7 +174,8 @@ describe('dial', () => {
)
})
upgrader = mockUpgrader({
registrar
registrar,
events: new EventEmitter()
})

transport = tcp()()
Expand Down
5 changes: 4 additions & 1 deletion test/max-connections-close.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { mockUpgrader } from '@libp2p/interface-mocks'
import { multiaddr } from '@multiformats/multiaddr'
import { tcp } from '../src/index.js'
import type { TCPListener } from '../src/listener.js'
import { EventEmitter } from '@libp2p/interfaces/events'

describe('close server on maxConnections', () => {
const afterEachCallbacks: Array<() => Promise<any> | any> = []
Expand All @@ -21,7 +22,9 @@ describe('close server on maxConnections', () => {
const seenRemoteConnections = new Set<string>()
const trasnport = tcp({ closeServerOnMaxConnections: { listenBelow, closeAbove } })()

const upgrader = mockUpgrader()
const upgrader = mockUpgrader({
events: new EventEmitter()
})
const listener = trasnport.createListener({ upgrader }) as TCPListener
// eslint-disable-next-line @typescript-eslint/promise-function-async
afterEachCallbacks.push(() => listener.close())
Expand Down
5 changes: 4 additions & 1 deletion test/max-connections.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { promisify } from 'node:util'
import { mockUpgrader } from '@libp2p/interface-mocks'
import { multiaddr } from '@multiformats/multiaddr'
import { tcp } from '../src/index.js'
import { EventEmitter } from '@libp2p/interfaces/events'

describe('maxConnections', () => {
const afterEachCallbacks: Array<() => Promise<any> | any> = []
Expand All @@ -20,7 +21,9 @@ describe('maxConnections', () => {
const seenRemoteConnections = new Set<string>()
const transport = tcp({ maxConnections })()

const upgrader = mockUpgrader()
const upgrader = mockUpgrader({
events: new EventEmitter()
})
const listener = transport.createListener({ upgrader })
// eslint-disable-next-line @typescript-eslint/promise-function-async
afterEachCallbacks.push(() => listener.close())
Expand Down

0 comments on commit 1b06059

Please sign in to comment.