hypercore 10.2.0 → 10.2.2
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/index.js +1 -1
- package/lib/bitfield.js +1 -5
- package/lib/core.js +1 -1
- package/package.json +7 -7
package/index.js
CHANGED
|
@@ -148,7 +148,7 @@ module.exports = class Hypercore extends EventEmitter {
|
|
|
148
148
|
if (!noiseStream) throw BAD_ARGUMENT('Invalid stream')
|
|
149
149
|
|
|
150
150
|
if (!noiseStream.userData) {
|
|
151
|
-
const protocol =
|
|
151
|
+
const protocol = Protomux.from(noiseStream)
|
|
152
152
|
|
|
153
153
|
if (opts.ondiscoverykey) {
|
|
154
154
|
protocol.pair({ protocol: 'hypercore/alpha' }, opts.ondiscoverykey)
|
package/lib/bitfield.js
CHANGED
|
@@ -42,11 +42,7 @@ module.exports = class Bitfield {
|
|
|
42
42
|
this.resumed = !!(buf && buf.byteLength >= 4)
|
|
43
43
|
|
|
44
44
|
const all = this.resumed
|
|
45
|
-
? new Uint32Array(
|
|
46
|
-
buf.buffer,
|
|
47
|
-
buf.byteOffset,
|
|
48
|
-
Math.floor(buf.byteLength / 4)
|
|
49
|
-
)
|
|
45
|
+
? new Uint32Array(buf.buffer, buf.byteOffset, Math.floor(buf.byteLength / 4))
|
|
50
46
|
: new Uint32Array(1024)
|
|
51
47
|
|
|
52
48
|
for (let i = 0; i < all.length; i += 1024) {
|
package/lib/core.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hypercore",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.2",
|
|
4
4
|
"description": "Hypercore is a secure, distributed append-only log",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"flat-tree": "^1.9.0",
|
|
44
44
|
"hypercore-crypto": "^3.2.1",
|
|
45
45
|
"is-options": "^1.0.1",
|
|
46
|
-
"protomux": "^3.
|
|
47
|
-
"random-access-file": "^
|
|
46
|
+
"protomux": "^3.4.0",
|
|
47
|
+
"random-access-file": "^4.0.0",
|
|
48
48
|
"random-array-iterator": "^1.0.0",
|
|
49
49
|
"safety-catch": "^1.0.1",
|
|
50
50
|
"sodium-universal": "^3.0.4",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"brittle": "^3.0.0",
|
|
57
|
-
"hyperswarm": "^4.
|
|
58
|
-
"random-access-memory": "^
|
|
59
|
-
"random-access-memory-overlay": "^
|
|
60
|
-
"standard": "^
|
|
57
|
+
"hyperswarm": "^4.3.0",
|
|
58
|
+
"random-access-memory": "^6.0.0",
|
|
59
|
+
"random-access-memory-overlay": "^3.0.0",
|
|
60
|
+
"standard": "^17.0.0",
|
|
61
61
|
"tmp-promise": "^3.0.2"
|
|
62
62
|
}
|
|
63
63
|
}
|