hypercore 10.0.0-alpha.13 → 10.0.0-alpha.14
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 -2
- package/package.json +5 -1
- package/.github/workflows/test-node.yml +0 -23
- package/UPGRADE.md +0 -15
- package/__snapshots__/test/storage.js.snapshot.cjs +0 -15
- package/examples/announce.js +0 -19
- package/examples/basic.js +0 -10
- package/examples/http.js +0 -123
- package/examples/lookup.js +0 -20
- package/test/basic.js +0 -90
- package/test/bitfield.js +0 -71
- package/test/core.js +0 -290
- package/test/encodings.js +0 -18
- package/test/encryption.js +0 -123
- package/test/extension.js +0 -71
- package/test/helpers/index.js +0 -23
- package/test/merkle-tree.js +0 -518
- package/test/mutex.js +0 -137
- package/test/oplog.js +0 -399
- package/test/preload.js +0 -72
- package/test/replicate.js +0 -372
- package/test/sessions.js +0 -183
- package/test/storage.js +0 -31
- package/test/streams.js +0 -55
- package/test/user-data.js +0 -47
package/index.js
CHANGED
|
@@ -131,7 +131,6 @@ module.exports = class Hypercore extends EventEmitter {
|
|
|
131
131
|
_passCapabilities (o) {
|
|
132
132
|
if (!this.sign) this.sign = o.sign
|
|
133
133
|
this.crypto = o.crypto
|
|
134
|
-
this.opened = o.opened
|
|
135
134
|
this.key = o.key
|
|
136
135
|
this.discoveryKey = o.discoveryKey
|
|
137
136
|
this.core = o.core
|
|
@@ -205,7 +204,7 @@ module.exports = class Hypercore extends EventEmitter {
|
|
|
205
204
|
async _openCapabilities (keyPair, storage, opts) {
|
|
206
205
|
if (opts.from) return this._openFromExisting(opts.from, opts)
|
|
207
206
|
|
|
208
|
-
|
|
207
|
+
this.storage = Hypercore.defaultStorage(opts.storage || storage)
|
|
209
208
|
|
|
210
209
|
this.core = await Core.open(this.storage, {
|
|
211
210
|
keyPair,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hypercore",
|
|
3
|
-
"version": "10.0.0-alpha.
|
|
3
|
+
"version": "10.0.0-alpha.14",
|
|
4
4
|
"description": "Hypercore 10",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -27,6 +27,10 @@
|
|
|
27
27
|
"url": "https://github.com/hypercore-protocol/hypercore/issues"
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/hypercore-protocol/hypercore#readme",
|
|
30
|
+
"files": [
|
|
31
|
+
"index.js",
|
|
32
|
+
"lib/**.js"
|
|
33
|
+
],
|
|
30
34
|
"dependencies": {
|
|
31
35
|
"@hyperswarm/secret-stream": "^5.0.0",
|
|
32
36
|
"b4a": "^1.1.0",
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
name: Build Status
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- master
|
|
6
|
-
pull_request:
|
|
7
|
-
branches:
|
|
8
|
-
- master
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
strategy:
|
|
12
|
-
matrix:
|
|
13
|
-
node-version: [lts/*]
|
|
14
|
-
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
15
|
-
runs-on: ${{ matrix.os }}
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v2
|
|
18
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
19
|
-
uses: actions/setup-node@v2
|
|
20
|
-
with:
|
|
21
|
-
node-version: ${{ matrix.node-version }}
|
|
22
|
-
- run: npm install
|
|
23
|
-
- run: npm test
|
package/UPGRADE.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Upgrade Notes
|
|
2
|
-
|
|
3
|
-
Notes for downstream developers who are upgrading their modules to new, breaking versions of hypercore.
|
|
4
|
-
|
|
5
|
-
## 10.0.0
|
|
6
|
-
|
|
7
|
-
- All number encodings are now LE
|
|
8
|
-
- Introduces an "oplog" to atomically track changes locally
|
|
9
|
-
- Updated merkle format that only requires a single signature (stored in the oplog)
|
|
10
|
-
|
|
11
|
-
## 9.0.0
|
|
12
|
-
|
|
13
|
-
- The format of signatures [has been changed](https://github.com/mafintosh/hypercore/issues/260). This is backwards-compatible (v9 can read v8 signatures), but forward-incompatible (v8 cannot read v9 signatures). If a v8 peer replicates with a v9 peer, it will emit a "REMOTE SIGNTURE INVALID" error on the replication stream.
|
|
14
|
-
- The encryption ([NOISE](https://github.com/emilbayes/noise-protocol)) handshake has been changed in an backwards- and forwards-incompatible way. v8 peers can not handshake with v9 peers, and vice-versa. A NOISE-related error is emitted on the replication stream.
|
|
15
|
-
- There is no way (yet) to detect whether a peer is running an incompatible version of hypercore at the replication level. One workaround for downstream developers is to include their own application-level handshake before piping to the replication stream, to communicate a "app protocol version" (maybe "v8" and "v9") and abort the connection if the peer is running an incompatible version.
|