Comparing version 2.5.2-34b3c14b8 to 2.5.2-96f14e429
@@ -44,3 +44,3 @@ /** | ||
*/ | ||
nodeInfo?: NodeInfo; | ||
nodeInfo?: Partial<NodeInfo>; | ||
/** | ||
@@ -47,0 +47,0 @@ * Addresses for transport listening and to advertise to the network |
@@ -22,2 +22,3 @@ import { publicKeyFromProtobuf } from '@libp2p/crypto/keys'; | ||
import { DefaultUpgrader } from './upgrader.js'; | ||
import { userAgent } from './user-agent.js'; | ||
import * as pkg from './version.js'; | ||
@@ -54,2 +55,4 @@ export class Libp2p extends TypedEventEmitter { | ||
this.services = {}; | ||
const nodeInfoName = init.nodeInfo?.name ?? pkg.name; | ||
const nodeInfoVersion = init.nodeInfo?.version ?? pkg.name; | ||
// @ts-expect-error defaultComponents is missing component types added later | ||
@@ -59,5 +62,6 @@ const components = this.components = defaultComponents({ | ||
privateKey: init.privateKey, | ||
nodeInfo: init.nodeInfo ?? { | ||
name: pkg.name, | ||
version: pkg.version | ||
nodeInfo: { | ||
name: nodeInfoName, | ||
version: nodeInfoVersion, | ||
userAgent: init.nodeInfo?.userAgent ?? userAgent(nodeInfoName, nodeInfoVersion) | ||
}, | ||
@@ -64,0 +68,0 @@ logger: this.logger, |
@@ -1,3 +0,3 @@ | ||
export declare const version = "2.5.2-34b3c14b8"; | ||
export declare const version = "2.5.2-96f14e429"; | ||
export declare const name = "js-libp2p"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -1,3 +0,3 @@ | ||
export const version = '2.5.2-34b3c14b8'; | ||
export const version = '2.5.2-96f14e429'; | ||
export const name = 'js-libp2p'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "libp2p", | ||
"version": "2.5.2-34b3c14b8", | ||
"version": "2.5.2-96f14e429", | ||
"description": "JavaScript implementation of libp2p, a modular peer to peer network stack", | ||
@@ -55,2 +55,6 @@ "license": "Apache-2.0 OR MIT", | ||
}, | ||
"./user-agent": { | ||
"types": "./dist/src/user-agent.d.ts", | ||
"import": "./dist/src/user-agent.js" | ||
}, | ||
"./version": { | ||
@@ -91,11 +95,11 @@ "types": "./dist/src/version.d.ts", | ||
"@chainsafe/netmask": "^2.0.0", | ||
"@libp2p/crypto": "5.0.10-34b3c14b8", | ||
"@libp2p/interface": "2.4.1-34b3c14b8", | ||
"@libp2p/interface-internal": "2.2.4-34b3c14b8", | ||
"@libp2p/logger": "5.1.7-34b3c14b8", | ||
"@libp2p/multistream-select": "6.0.12-34b3c14b8", | ||
"@libp2p/peer-collections": "6.0.16-34b3c14b8", | ||
"@libp2p/peer-id": "5.0.11-34b3c14b8", | ||
"@libp2p/peer-store": "11.0.16-34b3c14b8", | ||
"@libp2p/utils": "6.5.0-34b3c14b8", | ||
"@libp2p/crypto": "5.0.10-96f14e429", | ||
"@libp2p/interface": "2.4.1-96f14e429", | ||
"@libp2p/interface-internal": "2.2.4-96f14e429", | ||
"@libp2p/logger": "5.1.7-96f14e429", | ||
"@libp2p/multistream-select": "6.0.12-96f14e429", | ||
"@libp2p/peer-collections": "6.0.16-96f14e429", | ||
"@libp2p/peer-id": "5.0.11-96f14e429", | ||
"@libp2p/peer-store": "11.0.16-96f14e429", | ||
"@libp2p/utils": "6.5.0-96f14e429", | ||
"@multiformats/dns": "^1.0.6", | ||
@@ -133,13 +137,16 @@ "@multiformats/multiaddr": "^12.3.5", | ||
"sinon-ts": "^2.0.0", | ||
"uint8arraylist": "^2.4.8" | ||
"uint8arraylist": "^2.4.8", | ||
"wherearewe": "^2.0.1" | ||
}, | ||
"browser": { | ||
"./dist/src/connection-manager/constants.js": "./dist/src/connection-manager/constants.browser.js", | ||
"./dist/src/config/connection-gater.js": "./dist/src/config/connection-gater.browser.js" | ||
"./dist/src/config/connection-gater.js": "./dist/src/config/connection-gater.browser.js", | ||
"./dist/src/user-agent.js": "./dist/src/user-agent.browser.js" | ||
}, | ||
"react-native": { | ||
"./dist/src/connection-manager/constants.js": "./dist/src/connection-manager/constants.browser.js", | ||
"./dist/src/config/connection-gater.js": "./dist/src/config/connection-gater.browser.js" | ||
"./dist/src/config/connection-gater.js": "./dist/src/config/connection-gater.browser.js", | ||
"./dist/src/user-agent.js": "./dist/src/user-agent.react-native.js" | ||
}, | ||
"sideEffects": false | ||
} |
@@ -53,3 +53,3 @@ /** | ||
*/ | ||
nodeInfo?: NodeInfo | ||
nodeInfo?: Partial<NodeInfo> | ||
@@ -56,0 +56,0 @@ /** |
@@ -22,2 +22,3 @@ import { publicKeyFromProtobuf } from '@libp2p/crypto/keys' | ||
import { DefaultUpgrader } from './upgrader.js' | ||
import { userAgent } from './user-agent.js' | ||
import * as pkg from './version.js' | ||
@@ -68,2 +69,6 @@ import type { Components } from './components.js' | ||
this.services = {} | ||
const nodeInfoName = init.nodeInfo?.name ?? pkg.name | ||
const nodeInfoVersion = init.nodeInfo?.version ?? pkg.name | ||
// @ts-expect-error defaultComponents is missing component types added later | ||
@@ -73,5 +78,6 @@ const components = this.components = defaultComponents({ | ||
privateKey: init.privateKey, | ||
nodeInfo: init.nodeInfo ?? { | ||
name: pkg.name, | ||
version: pkg.version | ||
nodeInfo: { | ||
name: nodeInfoName, | ||
version: nodeInfoVersion, | ||
userAgent: init.nodeInfo?.userAgent ?? userAgent(nodeInfoName, nodeInfoVersion) | ||
}, | ||
@@ -78,0 +84,0 @@ logger: this.logger, |
@@ -1,2 +0,2 @@ | ||
export const version = '2.5.2-34b3c14b8' | ||
export const version = '2.5.2-96f14e429' | ||
export const name = 'js-libp2p' |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
991500
173
12358
15
+ Added@libp2p/crypto@5.0.10-96f14e429(transitive)
+ Added@libp2p/interface@2.4.1-96f14e429(transitive)
+ Added@libp2p/interface-internal@2.2.4-96f14e429(transitive)
+ Added@libp2p/logger@5.1.7-96f14e429(transitive)
+ Added@libp2p/multistream-select@6.0.12-96f14e429(transitive)
+ Added@libp2p/peer-collections@6.0.16-96f14e429(transitive)
+ Added@libp2p/peer-id@5.0.11-96f14e429(transitive)
+ Added@libp2p/peer-record@8.0.16-96f14e429(transitive)
+ Added@libp2p/peer-store@11.0.16-96f14e429(transitive)
+ Added@libp2p/utils@6.5.0-96f14e429(transitive)
- Removed@libp2p/crypto@5.0.10-34b3c14b8(transitive)
- Removed@libp2p/interface@2.4.1-34b3c14b8(transitive)
- Removed@libp2p/interface-internal@2.2.4-34b3c14b8(transitive)
- Removed@libp2p/logger@5.1.7-34b3c14b8(transitive)
- Removed@libp2p/multistream-select@6.0.12-34b3c14b8(transitive)
- Removed@libp2p/peer-collections@6.0.16-34b3c14b8(transitive)
- Removed@libp2p/peer-id@5.0.11-34b3c14b8(transitive)
- Removed@libp2p/peer-record@8.0.16-34b3c14b8(transitive)
- Removed@libp2p/peer-store@11.0.16-34b3c14b8(transitive)
- Removed@libp2p/utils@6.5.0-34b3c14b8(transitive)