Skip to content

Commit

Permalink
deps: bump @libp2p/identify from 1.0.21 to 2.0.0 (#528)
Browse files Browse the repository at this point in the history
* deps: bump @libp2p/identify from 1.0.21 to 2.0.0

Bumps [@libp2p/identify](https://github.com/libp2p/js-libp2p) from 1.0.21 to 2.0.0.
- [Release notes](https://github.com/libp2p/js-libp2p/releases)
- [Changelog](https://github.com/libp2p/js-libp2p/blob/main/.release-please.json)
- [Commits](libp2p/js-libp2p@identify-v1.0.21...perf-v2.0.0)

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

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

* chore: configure push

* chore: update dep version

* chore: dedupe agent version

---------

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 committed May 2, 2024
1 parent a8fdfc2 commit 9fa2427
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion benchmarks/transports/package.json
Expand Up @@ -19,7 +19,7 @@
"@helia/unixfs": "^3.0.3",
"@ipld/dag-pb": "^4.1.0",
"@libp2p/circuit-relay-v2": "^1.0.21",
"@libp2p/identify": "^1.0.20",
"@libp2p/identify": "^2.0.0",
"@libp2p/interface": "^1.3.0",
"@libp2p/logger": "^4.0.11",
"@libp2p/tcp": "^9.0.23",
Expand Down
2 changes: 1 addition & 1 deletion packages/helia/package.json
Expand Up @@ -65,7 +65,7 @@
"@libp2p/bootstrap": "^10.0.16",
"@libp2p/circuit-relay-v2": "^1.0.16",
"@libp2p/dcutr": "^1.0.13",
"@libp2p/identify": "^1.0.15",
"@libp2p/identify": "^2.0.0",
"@libp2p/interface": "^1.1.4",
"@libp2p/kad-dht": "^12.0.8",
"@libp2p/keychain": "^4.0.9",
Expand Down
9 changes: 7 additions & 2 deletions packages/helia/src/utils/libp2p-defaults.browser.ts
Expand Up @@ -5,7 +5,7 @@ import { autoNAT } from '@libp2p/autonat'
import { bootstrap } from '@libp2p/bootstrap'
import { circuitRelayTransport } from '@libp2p/circuit-relay-v2'
import { dcutr } from '@libp2p/dcutr'
import { type Identify, identify } from '@libp2p/identify'
import { type Identify, identify, identifyPush } from '@libp2p/identify'
import { type KadDHT, kadDHT } from '@libp2p/kad-dht'
import { keychain, type Keychain } from '@libp2p/keychain'
import { mplex } from '@libp2p/mplex'
Expand All @@ -32,6 +32,8 @@ export interface DefaultLibp2pServices extends Record<string, unknown> {
}

export function libp2pDefaults (options: Libp2pDefaultsOptions = {}): Libp2pOptions<DefaultLibp2pServices> {
const agentVersion = `${name}/${version} ${libp2pInfo.name}/${libp2pInfo.version} UserAgent=${globalThis.navigator.userAgent}`

return {
peerId: options.peerId,
dns: options.dns,
Expand Down Expand Up @@ -73,7 +75,10 @@ export function libp2pDefaults (options: Libp2pDefaultsOptions = {}): Libp2pOpti
}
}),
identify: identify({
agentVersion: `${name}/${version} ${libp2pInfo.name}/${libp2pInfo.version} UserAgent=${globalThis.navigator.userAgent}`
agentVersion
}),
identifyPush: identifyPush({
agentVersion
}),
keychain: keychain(options.keychain),
ping: ping()
Expand Down
9 changes: 7 additions & 2 deletions packages/helia/src/utils/libp2p-defaults.ts
Expand Up @@ -5,7 +5,7 @@ import { autoNAT } from '@libp2p/autonat'
import { bootstrap } from '@libp2p/bootstrap'
import { circuitRelayTransport, circuitRelayServer, type CircuitRelayService } from '@libp2p/circuit-relay-v2'
import { dcutr } from '@libp2p/dcutr'
import { type Identify, identify } from '@libp2p/identify'
import { type Identify, identify, identifyPush } from '@libp2p/identify'
import { type KadDHT, kadDHT } from '@libp2p/kad-dht'
import { keychain, type Keychain } from '@libp2p/keychain'
import { mdns } from '@libp2p/mdns'
Expand Down Expand Up @@ -36,6 +36,8 @@ export interface DefaultLibp2pServices extends Record<string, unknown> {
}

export function libp2pDefaults (options: Libp2pDefaultsOptions = {}): Libp2pOptions<DefaultLibp2pServices> {
const agentVersion = `${name}/${version} ${libp2pInfo.name}/${libp2pInfo.version} UserAgent=${process.version}`

return {
peerId: options.peerId,
dns: options.dns,
Expand Down Expand Up @@ -79,7 +81,10 @@ export function libp2pDefaults (options: Libp2pDefaultsOptions = {}): Libp2pOpti
}
}),
identify: identify({
agentVersion: `${name}/${version} ${libp2pInfo.name}/${libp2pInfo.version} UserAgent=${globalThis.process.version}`
agentVersion
}),
identifyPush: identifyPush({
agentVersion
}),
keychain: keychain(options.keychain),
ping: ping(),
Expand Down

0 comments on commit 9fa2427

Please sign in to comment.