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

Commit

Permalink
deps(dev): bump aegir from 38.1.8 to 39.0.5 (#196)
Browse files Browse the repository at this point in the history
* deps(dev): bump aegir from 38.1.8 to 39.0.5

Bumps [aegir](https://github.com/ipfs/aegir) from 38.1.8 to 39.0.5.
- [Release notes](https://github.com/ipfs/aegir/releases)
- [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
- [Commits](ipfs/aegir@v38.1.8...v39.0.5)

---
updated-dependencies:
- dependency-name: aegir
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* chore: fix linting

---------

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 May 4, 2023
1 parent e0efcd7 commit 1db5304
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"@libp2p/interface-peer-discovery-compliance-tests": "^2.0.1",
"@libp2p/interface-peer-id": "^2.0.1",
"@libp2p/peer-id-factory": "^2.0.0",
"aegir": "^38.1.2",
"aegir": "^39.0.5",
"p-wait-for": "^5.0.0",
"ts-sinon": "^2.0.2"
}
Expand Down
16 changes: 6 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import multicastDNS from 'multicast-dns'
import { symbol } from '@libp2p/interface-peer-discovery'
import { CustomEvent, EventEmitter } from '@libp2p/interfaces/events'
import { logger } from '@libp2p/logger'
import multicastDNS from 'multicast-dns'
import * as query from './query.js'
import type { PeerDiscovery, PeerDiscoveryEvents } from '@libp2p/interface-peer-discovery'
import type { PeerInfo } from '@libp2p/interface-peer-info'
import { symbol } from '@libp2p/interface-peer-discovery'
import { stringGen } from './utils.js'
import type { AddressManager } from '@libp2p/interface-address-manager'
import type { PeerDiscovery, PeerDiscoveryEvents } from '@libp2p/interface-peer-discovery'
import type { PeerInfo } from '@libp2p/interface-peer-info'

const log = logger('libp2p:mdns')

Expand Down Expand Up @@ -55,13 +55,9 @@ class MulticastDNS extends EventEmitter<PeerDiscoveryEvents> implements PeerDisc
this._onMdnsResponse = this._onMdnsResponse.bind(this)
}

get [symbol] (): true {
return true
}
readonly [symbol] = true

get [Symbol.toStringTag] (): '@libp2p/mdns' {
return '@libp2p/mdns'
}
readonly [Symbol.toStringTag] = '@libp2p/mdns'

isStarted (): boolean {
return Boolean(this.mdns)
Expand Down
4 changes: 2 additions & 2 deletions src/query.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PeerInfo } from '@libp2p/interface-peer-info'
import { logger } from '@libp2p/logger'
import { peerIdFromString } from '@libp2p/peer-id'
import { multiaddr, Multiaddr } from '@multiformats/multiaddr'
import { multiaddr, type Multiaddr } from '@multiformats/multiaddr'
import type { PeerInfo } from '@libp2p/interface-peer-info'
import type { Answer, StringAnswer, TxtAnswer } from 'dns-packet'
import type { MulticastDNS, QueryPacket, ResponsePacket } from 'multicast-dns'

Expand Down
6 changes: 3 additions & 3 deletions test/compliance.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-env mocha */

import tests from '@libp2p/interface-peer-discovery-compliance-tests'
import { multiaddr } from '@multiformats/multiaddr'
import { CustomEvent } from '@libp2p/interfaces/events'
import { createEd25519PeerId } from '@libp2p/peer-id-factory'
import { multiaddr } from '@multiformats/multiaddr'
import { stubInterface } from 'ts-sinon'
import { mdns } from '../src/index.js'
import type { AddressManager } from '@libp2p/interface-address-manager'
import { CustomEvent } from '@libp2p/interfaces/events'
import { stubInterface } from 'ts-sinon'
import type { PeerDiscovery } from '@libp2p/interface-peer-discovery'

let discovery: PeerDiscovery
Expand Down
14 changes: 7 additions & 7 deletions test/multicast-dns.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/* eslint-env mocha */

import { expect } from 'aegir/chai'
import type { Multiaddr } from '@multiformats/multiaddr'
import { multiaddr } from '@multiformats/multiaddr'
import { start, stop } from '@libp2p/interfaces/startable'
import { createEd25519PeerId } from '@libp2p/peer-id-factory'
import { multiaddr } from '@multiformats/multiaddr'
import { expect } from 'aegir/chai'
import pWaitFor from 'p-wait-for'
import { mdns, MulticastDNSComponents } from './../src/index.js'
import type { PeerId } from '@libp2p/interface-peer-id'
import type { PeerInfo } from '@libp2p/interface-peer-info'
import { stubInterface } from 'ts-sinon'
import { mdns, type MulticastDNSComponents } from './../src/index.js'
import type { AddressManager } from '@libp2p/interface-address-manager'
import { start, stop } from '@libp2p/interfaces/startable'
import type { PeerId } from '@libp2p/interface-peer-id'
import type { PeerInfo } from '@libp2p/interface-peer-info'
import type { Multiaddr } from '@multiformats/multiaddr'

function getComponents (peerId: PeerId, multiaddrs: Multiaddr[]): MulticastDNSComponents {
const addressManager = stubInterface<AddressManager>()
Expand Down

0 comments on commit 1db5304

Please sign in to comment.