Skip to content

Commit 8e91334

Browse files
committed
chore: remove url from node globals
1 parent e69eba6 commit 8e91334

File tree

8 files changed

+5
-16
lines changed

8 files changed

+5
-16
lines changed

examples/libp2p-in-the-browser/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"libp2p-bootstrap": "^0.12.1",
2121
"libp2p-mplex": "^0.10.0",
2222
"libp2p-noise": "^2.0.0",
23-
"libp2p-webrtc-star": "^0.20.0",
23+
"libp2p-webrtc-star": "^0.22.0",
2424
"libp2p-websockets": "^0.15.0"
2525
},
2626
"devDependencies": {

examples/webrtc-direct/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"libp2p-bootstrap": "^0.12.1",
2525
"libp2p-mplex": "^0.10.1",
2626
"libp2p-noise": "^2.0.1",
27-
"libp2p-webrtc-direct": "^0.5.0",
27+
"libp2p-webrtc-direct": "^0.6.0",
2828
"peer-id": "^0.14.3"
2929
},
3030
"browser": {

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
"@types/varint": "^6.0.0",
138138
"abortable-iterator": "^3.0.0",
139139
"aegir": "^33.0.0",
140+
"buffer": "^6.0.3",
140141
"chai-bytes": "^0.1.2",
141142
"chai-string": "^1.5.0",
142143
"delay": "^5.0.0",
@@ -157,7 +158,7 @@
157158
"libp2p-mplex": "^0.10.1",
158159
"libp2p-noise": "^2.0.0",
159160
"libp2p-tcp": "^0.15.1",
160-
"libp2p-webrtc-star": "^0.21.2",
161+
"libp2p-webrtc-star": "^0.22.0",
161162
"libp2p-websockets": "^0.15.0",
162163
"multihashes": "^4.0.2",
163164
"nock": "^13.0.3",
@@ -167,7 +168,6 @@
167168
"rimraf": "^3.0.2",
168169
"sinon": "^10.0.0",
169170
"uint8arrays": "^2.1.3",
170-
"url": "^0.11.0",
171171
"util": "^0.12.3"
172172
},
173173
"contributors": [

scripts/node-globals.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
// @ts-nocheck
22
export const { Buffer } = require('buffer')
3-
export const url = require('url')

src/config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
const mergeOptions = require('merge-options')
4-
// @ts-ignore no types in multiaddr
4+
// @ts-ignore no types in multiaddr path
55
const { dnsaddrResolver } = require('multiaddr/src/resolvers')
66

77
const Constants = require('./constants')

src/index.js

-5
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,6 @@ class Libp2p extends EventEmitter {
192192
this._discovery = new Map() // Discovery service instances/references
193193

194194
// Create the Connection Manager
195-
// @ts-ignore deprecated, needs to be removed on breaking change
196-
if (this._options.connectionManager.minPeers) {
197-
// @ts-ignore deprecated, needs to be removed on breaking change
198-
this._options.connectionManager.minConnections = this._options.connectionManager.minPeers
199-
}
200195
this.connectionManager = new ConnectionManager(this, {
201196
autoDial: this._config.peerDiscovery.autoDial,
202197
...this._options.connectionManager

src/insecure/plaintext.js

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const lp = require('it-length-prefixed')
1010
const PeerId = require('peer-id')
1111
const { UnexpectedPeerError, InvalidCryptoExchangeError } = require('libp2p-interfaces/src/crypto/errors')
1212

13-
// @ts-ignore protons do not export types
1413
const { Exchange, KeyType } = require('./proto')
1514
const protocol = '/plaintext/2.0.0'
1615

src/metrics/stats.js

-4
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,13 @@ class Stats extends EventEmitter {
7272

7373
/**
7474
* Returns a clone of the current stats.
75-
*
76-
* @returns {Object}
7775
*/
7876
get snapshot () {
7977
return Object.assign({}, this._stats)
8078
}
8179

8280
/**
8381
* Returns a clone of the internal movingAverages
84-
*
85-
* @returns {typeof Object.assign}
8682
*/
8783
get movingAverages () {
8884
return Object.assign({}, this._movingAverages)

0 commit comments

Comments
 (0)