@libp2p/interface-compliance-tests 5.1.2 → 5.1.3-2e464c099
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/matchers.d.ts +6 -0
- package/dist/src/matchers.d.ts.map +1 -0
- package/dist/src/matchers.js +8 -0
- package/dist/src/matchers.js.map +1 -0
- package/package.json +20 -12
- package/src/matchers.ts +11 -0
- package/dist/typedoc-urls.json +0 -38
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import Sinon from 'sinon';
|
|
2
|
+
import type { PeerId } from '@libp2p/interface';
|
|
3
|
+
import type { Multiaddr } from '@multiformats/multiaddr';
|
|
4
|
+
export declare function matchPeerId(peerId: PeerId): Sinon.SinonMatcher;
|
|
5
|
+
export declare function matchMultiaddr(ma: Multiaddr): Sinon.SinonMatcher;
|
|
6
|
+
//# sourceMappingURL=matchers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchers.d.ts","sourceRoot":"","sources":["../../src/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,wBAAgB,WAAW,CAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAE/D;AAED,wBAAgB,cAAc,CAAE,EAAE,EAAE,SAAS,GAAG,KAAK,CAAC,YAAY,CAEjE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Sinon from 'sinon';
|
|
2
|
+
export function matchPeerId(peerId) {
|
|
3
|
+
return Sinon.match(p => p.toString() === peerId.toString());
|
|
4
|
+
}
|
|
5
|
+
export function matchMultiaddr(ma) {
|
|
6
|
+
return Sinon.match(m => m.toString() === ma.toString());
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=matchers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchers.js","sourceRoot":"","sources":["../../src/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,UAAU,WAAW,CAAE,MAAc;IACzC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAA;AAC7D,CAAC;AAED,MAAM,UAAU,cAAc,CAAE,EAAa;IAC3C,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAA;AACzD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/interface-compliance-tests",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.3-2e464c099",
|
|
4
4
|
"description": "Compliance tests for JS libp2p interfaces",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/interface-compliance-tests#readme",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"bugs": {
|
|
12
12
|
"url": "https://github.com/libp2p/js-libp2p/issues"
|
|
13
13
|
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public",
|
|
16
|
+
"provenance": true
|
|
17
|
+
},
|
|
14
18
|
"keywords": [
|
|
15
19
|
"interface",
|
|
16
20
|
"libp2p"
|
|
@@ -56,6 +60,10 @@
|
|
|
56
60
|
"types": "./dist/src/is-valid-tick.d.ts",
|
|
57
61
|
"import": "./dist/src/is-valid-tick.js"
|
|
58
62
|
},
|
|
63
|
+
"./matchers": {
|
|
64
|
+
"types": "./dist/src/matchers.d.ts",
|
|
65
|
+
"import": "./dist/src/matchers.js"
|
|
66
|
+
},
|
|
59
67
|
"./mocks": {
|
|
60
68
|
"types": "./dist/src/mocks/index.d.ts",
|
|
61
69
|
"import": "./dist/src/mocks/index.js"
|
|
@@ -103,14 +111,14 @@
|
|
|
103
111
|
"test:electron-main": "aegir test -t electron-main"
|
|
104
112
|
},
|
|
105
113
|
"dependencies": {
|
|
106
|
-
"@libp2p/interface": "
|
|
107
|
-
"@libp2p/interface-internal": "
|
|
108
|
-
"@libp2p/logger": "
|
|
109
|
-
"@libp2p/multistream-select": "
|
|
110
|
-
"@libp2p/peer-collections": "
|
|
111
|
-
"@libp2p/peer-id": "
|
|
112
|
-
"@libp2p/peer-id-factory": "
|
|
113
|
-
"@libp2p/utils": "
|
|
114
|
+
"@libp2p/interface": "1.1.2-2e464c099",
|
|
115
|
+
"@libp2p/interface-internal": "1.0.7-2e464c099",
|
|
116
|
+
"@libp2p/logger": "4.0.5-2e464c099",
|
|
117
|
+
"@libp2p/multistream-select": "5.1.2-2e464c099",
|
|
118
|
+
"@libp2p/peer-collections": "5.1.5-2e464c099",
|
|
119
|
+
"@libp2p/peer-id": "4.0.5-2e464c099",
|
|
120
|
+
"@libp2p/peer-id-factory": "4.0.5-2e464c099",
|
|
121
|
+
"@libp2p/utils": "5.2.2-2e464c099",
|
|
114
122
|
"@multiformats/multiaddr": "^12.1.10",
|
|
115
123
|
"abortable-iterator": "^5.0.1",
|
|
116
124
|
"aegir": "^42.0.0",
|
|
@@ -121,8 +129,8 @@
|
|
|
121
129
|
"it-ndjson": "^1.0.3",
|
|
122
130
|
"it-pair": "^2.0.6",
|
|
123
131
|
"it-pipe": "^3.0.1",
|
|
124
|
-
"it-protobuf-stream": "^1.
|
|
125
|
-
"it-pushable": "^3.2.
|
|
132
|
+
"it-protobuf-stream": "^1.1.1",
|
|
133
|
+
"it-pushable": "^3.2.3",
|
|
126
134
|
"it-stream-types": "^2.0.1",
|
|
127
135
|
"it-to-buffer": "^4.0.2",
|
|
128
136
|
"merge-options": "^3.0.4",
|
|
@@ -132,7 +140,7 @@
|
|
|
132
140
|
"p-wait-for": "^5.0.2",
|
|
133
141
|
"protons-runtime": "^5.0.0",
|
|
134
142
|
"sinon": "^17.0.0",
|
|
135
|
-
"uint8arraylist": "^2.4.
|
|
143
|
+
"uint8arraylist": "^2.4.7",
|
|
136
144
|
"uint8arrays": "^5.0.0"
|
|
137
145
|
},
|
|
138
146
|
"devDependencies": {
|
package/src/matchers.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Sinon from 'sinon'
|
|
2
|
+
import type { PeerId } from '@libp2p/interface'
|
|
3
|
+
import type { Multiaddr } from '@multiformats/multiaddr'
|
|
4
|
+
|
|
5
|
+
export function matchPeerId (peerId: PeerId): Sinon.SinonMatcher {
|
|
6
|
+
return Sinon.match(p => p.toString() === peerId.toString())
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function matchMultiaddr (ma: Multiaddr): Sinon.SinonMatcher {
|
|
10
|
+
return Sinon.match(m => m.toString() === ma.toString())
|
|
11
|
+
}
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.connection.default.html",
|
|
3
|
-
"./connection:default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.connection.default.html",
|
|
4
|
-
"./connection-encryption:default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.connection_encryption.default.html",
|
|
5
|
-
"TestSetup": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.index.TestSetup.html",
|
|
6
|
-
".:TestSetup": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.index.TestSetup.html",
|
|
7
|
-
"isValidTick": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.is_valid_tick.isValidTick.html",
|
|
8
|
-
"./is-valid-tick:isValidTick": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.is_valid_tick.isValidTick.html",
|
|
9
|
-
"MockNetworkComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.mocks.MockNetworkComponents.html",
|
|
10
|
-
"MockUpgraderInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.mocks.MockUpgraderInit.html",
|
|
11
|
-
"mockNetwork": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface_compliance_tests.mocks.mockNetwork.html",
|
|
12
|
-
"connectionPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.connectionPair.html",
|
|
13
|
-
"mockConnection": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockConnection.html",
|
|
14
|
-
"mockConnectionGater": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockConnectionGater.html",
|
|
15
|
-
"mockConnectionManager": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockConnectionManager.html",
|
|
16
|
-
"mockDuplex": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockDuplex.html",
|
|
17
|
-
"mockMetrics": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockMetrics.html",
|
|
18
|
-
"mockMultiaddrConnPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockMultiaddrConnPair.html",
|
|
19
|
-
"mockMultiaddrConnection": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockMultiaddrConnection.html",
|
|
20
|
-
"mockMuxer": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockMuxer.html",
|
|
21
|
-
"mockRegistrar": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockRegistrar.html",
|
|
22
|
-
"mockStream": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockStream.html",
|
|
23
|
-
"mockUpgrader": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.mockUpgrader.html",
|
|
24
|
-
"streamPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.mocks.streamPair.html",
|
|
25
|
-
"./peer-discovery:default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.peer_discovery.default.html",
|
|
26
|
-
"./peers:default": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface_compliance_tests.peers.default.html",
|
|
27
|
-
"PubSubArgs": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubArgs.html",
|
|
28
|
-
"./pubsub:PubSubArgs": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubArgs.html",
|
|
29
|
-
"PubSubComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubComponents.html",
|
|
30
|
-
"./pubsub:PubSubComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubComponents.html",
|
|
31
|
-
"./pubsub:default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.pubsub.default.html",
|
|
32
|
-
"./stream-muxer:default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.stream_muxer.default.html",
|
|
33
|
-
"Connector": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.transport.Connector.html",
|
|
34
|
-
"./transport:Connector": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.transport.Connector.html",
|
|
35
|
-
"TransportTestFixtures": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.transport.TransportTestFixtures.html",
|
|
36
|
-
"./transport:TransportTestFixtures": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_compliance_tests.transport.TransportTestFixtures.html",
|
|
37
|
-
"./transport:default": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface_compliance_tests.transport.default.html"
|
|
38
|
-
}
|