From dd9f93d158c668622f5b6fb44ff4b45cb9ab4c6b Mon Sep 17 00:00:00 2001 From: mkg20001 Date: Thu, 7 Sep 2017 19:37:42 +0200 Subject: [PATCH] Updates - Use protons instead of protocol-buffers (see ipfs/js-ipfs#991) --- package-lock.json | 204 ++++++++++++++-------------------- package.json | 2 +- zeronet-common/package.json | 2 +- zeronet-protocol/lib/index.js | 2 +- zeronet-protocol/package.json | 2 +- zeronet-swarm/package.json | 8 +- 6 files changed, 93 insertions(+), 127 deletions(-) diff --git a/package-lock.json b/package-lock.json index 16c66b2..0c873a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1860,6 +1860,28 @@ "pull-defer": "0.2.2", "pull-stream": "3.6.0", "uuid": "3.1.0" + }, + "dependencies": { + "libp2p-crypto": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.9.4.tgz", + "integrity": "sha1-ZKWTfez+d7QMgI3uPnUIpaVto1c=", + "requires": { + "asn1.js": "4.9.1", + "async": "2.5.0", + "browserify-aes": "1.0.8", + "keypair": "1.0.1", + "libp2p-crypto-secp256k1": "0.2.2", + "multihashing-async": "0.4.6", + "nodeify": "1.0.1", + "pem-jwk": "1.5.1", + "protocol-buffers": "3.2.1", + "rsa-pem-to-jwk": "1.1.3", + "safe-buffer": "5.1.1", + "tweetnacl": "1.0.0", + "webcrypto-shim": "github:dignifiedquire/webcrypto-shim#effe03d3401ccbfb4837191bc393bb347e0c0f0a" + } + } } }, "ip": { @@ -2182,24 +2204,24 @@ } }, "libp2p": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.12.3.tgz", - "integrity": "sha512-HalB+IAdJasuD2j80zDvh1770uBuTPcR05Ctigz82pbWEsDe0uFXZ+HnUbqk6aUHYJBc/BPgRj2+Q1T+EYuqhA==", + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.12.4.tgz", + "integrity": "sha512-u5ZgtZjET6XHwQA61PyP8urQfMcbsrR7NQxbrpzeDGGXTXWrHgtRnsekhjfOl59+8GRNrqkkbkYG1SCYqrfGug==", "requires": { "async": "2.5.0", "libp2p-ping": "0.6.0", - "libp2p-swarm": "0.32.2", + "libp2p-swarm": "0.32.3", "mafmt": "3.0.1", "multiaddr": "3.0.1", "peer-book": "0.5.0", - "peer-id": "0.10.0", + "peer-id": "0.10.1", "peer-info": "0.11.0" } }, "libp2p-crypto": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.9.4.tgz", - "integrity": "sha1-ZKWTfez+d7QMgI3uPnUIpaVto1c=", + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.10.3.tgz", + "integrity": "sha512-E03YpbwOOQzEunR0OpWtuU8LPcBJnVZEfwCsVP17ngLH5pMhzIy3t9imEOkMT6vLnsxe25Q/HIiipNgRDxyd5g==", "requires": { "asn1.js": "4.9.1", "async": "2.5.0", @@ -2207,11 +2229,9 @@ "keypair": "1.0.1", "libp2p-crypto-secp256k1": "0.2.2", "multihashing-async": "0.4.6", - "nodeify": "1.0.1", "pem-jwk": "1.5.1", - "protocol-buffers": "3.2.1", + "protons": "1.0.0", "rsa-pem-to-jwk": "1.1.3", - "safe-buffer": "5.1.1", "tweetnacl": "1.0.0", "webcrypto-shim": "github:dignifiedquire/webcrypto-shim#effe03d3401ccbfb4837191bc393bb347e0c0f0a" } @@ -2234,7 +2254,7 @@ "integrity": "sha512-9Cv86QKBWGbyBgO1pj70+tSqcYttovH6D7YuZtM9MeP03qMIAnpPdBHIYWTs0e9M9if55xayRfiULc6LjAX62A==", "requires": { "multiaddr": "3.0.1", - "peer-id": "0.10.0", + "peer-id": "0.10.1", "peer-info": "0.11.0", "protons": "1.0.0", "pull-length-prefixed": "1.3.0", @@ -2242,9 +2262,9 @@ } }, "libp2p-kad-dht": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/libp2p-kad-dht/-/libp2p-kad-dht-0.5.0.tgz", - "integrity": "sha512-aSfYsGPfPg3vUtWZFdJLDBkJnR3yrsgZJgrA3ldBksTuIiEcqcrG5EIJ01FYo5SQdxwKeI8f2/9qM16729AEAw==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/libp2p-kad-dht/-/libp2p-kad-dht-0.5.1.tgz", + "integrity": "sha512-dhsqNAlAszCH6D7BZxtiEgQa6d+40SxuwI2L4STjgc9ew87amu7wSvof0QJ2FGxftjvjvvevKYm0j1MtGmdQzQ==", "requires": { "async": "2.5.0", "base32.js": "0.1.0", @@ -2257,10 +2277,10 @@ "libp2p-crypto": "0.10.3", "libp2p-record": "0.5.1", "multihashing-async": "0.4.6", - "peer-id": "0.10.0", + "peer-id": "0.10.1", "peer-info": "0.11.0", "priorityqueue": "0.2.0", - "protocol-buffers": "3.2.1", + "protons": "1.0.0", "pull-length-prefixed": "1.3.0", "pull-stream": "3.6.0", "safe-buffer": "5.1.1", @@ -2275,24 +2295,6 @@ "requires": { "ms": "2.0.0" } - }, - "libp2p-crypto": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.10.3.tgz", - "integrity": "sha512-E03YpbwOOQzEunR0OpWtuU8LPcBJnVZEfwCsVP17ngLH5pMhzIy3t9imEOkMT6vLnsxe25Q/HIiipNgRDxyd5g==", - "requires": { - "asn1.js": "4.9.1", - "async": "2.5.0", - "browserify-aes": "1.0.8", - "keypair": "1.0.1", - "libp2p-crypto-secp256k1": "0.2.2", - "multihashing-async": "0.4.6", - "pem-jwk": "1.5.1", - "protons": "1.0.0", - "rsa-pem-to-jwk": "1.1.3", - "tweetnacl": "1.0.0", - "webcrypto-shim": "github:dignifiedquire/webcrypto-shim#effe03d3401ccbfb4837191bc393bb347e0c0f0a" - } } } }, @@ -2304,7 +2306,7 @@ "libp2p-tcp": "0.11.0", "multiaddr": "3.0.1", "multicast-dns": "6.1.1", - "peer-id": "0.10.0", + "peer-id": "0.10.1", "peer-info": "0.11.0" } }, @@ -2345,26 +2347,6 @@ "libp2p-crypto": "0.10.3", "pull-handshake": "1.1.4", "pull-stream": "3.6.0" - }, - "dependencies": { - "libp2p-crypto": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.10.3.tgz", - "integrity": "sha512-E03YpbwOOQzEunR0OpWtuU8LPcBJnVZEfwCsVP17ngLH5pMhzIy3t9imEOkMT6vLnsxe25Q/HIiipNgRDxyd5g==", - "requires": { - "asn1.js": "4.9.1", - "async": "2.5.0", - "browserify-aes": "1.0.8", - "keypair": "1.0.1", - "libp2p-crypto-secp256k1": "0.2.2", - "multihashing-async": "0.4.6", - "pem-jwk": "1.5.1", - "protons": "1.0.0", - "rsa-pem-to-jwk": "1.1.3", - "tweetnacl": "1.0.0", - "webcrypto-shim": "github:dignifiedquire/webcrypto-shim#effe03d3401ccbfb4837191bc393bb347e0c0f0a" - } - } } }, "libp2p-railing": { @@ -2376,7 +2358,7 @@ "debug": "3.0.1", "lodash": "4.17.4", "multiaddr": "3.0.1", - "peer-id": "0.10.0", + "peer-id": "0.10.1", "peer-info": "0.11.0" }, "dependencies": { @@ -2400,7 +2382,7 @@ "left-pad": "1.1.3", "multihashes": "0.4.9", "multihashing-async": "0.4.6", - "peer-id": "0.10.0", + "peer-id": "0.10.1", "protons": "1.0.0" } }, @@ -2414,7 +2396,7 @@ "interface-connection": "0.3.2", "libp2p-crypto": "0.10.3", "multihashing-async": "0.4.6", - "peer-id": "0.10.0", + "peer-id": "0.10.1", "protons": "1.0.0", "pull-defer": "0.2.2", "pull-handshake": "1.1.4", @@ -2429,24 +2411,6 @@ "requires": { "ms": "2.0.0" } - }, - "libp2p-crypto": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.10.3.tgz", - "integrity": "sha512-E03YpbwOOQzEunR0OpWtuU8LPcBJnVZEfwCsVP17ngLH5pMhzIy3t9imEOkMT6vLnsxe25Q/HIiipNgRDxyd5g==", - "requires": { - "asn1.js": "4.9.1", - "async": "2.5.0", - "browserify-aes": "1.0.8", - "keypair": "1.0.1", - "libp2p-crypto-secp256k1": "0.2.2", - "multihashing-async": "0.4.6", - "pem-jwk": "1.5.1", - "protons": "1.0.0", - "rsa-pem-to-jwk": "1.1.3", - "tweetnacl": "1.0.0", - "webcrypto-shim": "github:dignifiedquire/webcrypto-shim#effe03d3401ccbfb4837191bc393bb347e0c0f0a" - } } } }, @@ -2463,9 +2427,9 @@ } }, "libp2p-swarm": { - "version": "0.32.2", - "resolved": "https://registry.npmjs.org/libp2p-swarm/-/libp2p-swarm-0.32.2.tgz", - "integrity": "sha512-eevJz4As1bn7ESnKug77t9OlqBoWNANSLVlcAmwv3odLAosSB7FYi631/skQg99hF4olGUnjuUC+OemK5GTvgw==", + "version": "0.32.3", + "resolved": "https://registry.npmjs.org/libp2p-swarm/-/libp2p-swarm-0.32.3.tgz", + "integrity": "sha512-NvMkvJFTaCXeK91JbwXVyTfFAcxuVJbNXo9XW9LesU/AqEU2jsEF4CquI4i4JeOZHycnJ5aXuUaVzFSeJuIPeA==", "requires": { "async": "2.5.0", "browserify-zlib-next": "1.0.1", @@ -2477,7 +2441,7 @@ "multiaddr": "3.0.1", "multistream-select": "0.13.5", "once": "1.4.0", - "peer-id": "0.10.0", + "peer-id": "0.10.1", "peer-info": "0.11.0", "pull-stream": "3.6.0" }, @@ -2520,7 +2484,7 @@ "mafmt": "3.0.1", "multiaddr": "3.0.1", "once": "1.4.0", - "peer-id": "0.10.0", + "peer-id": "0.10.1", "peer-info": "0.11.0", "socket.io-client": "2.0.3", "socket.io-pull-stream": "0.1.1", @@ -2534,24 +2498,6 @@ "requires": { "ms": "2.0.0" } - }, - "libp2p-crypto": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.10.3.tgz", - "integrity": "sha512-E03YpbwOOQzEunR0OpWtuU8LPcBJnVZEfwCsVP17ngLH5pMhzIy3t9imEOkMT6vLnsxe25Q/HIiipNgRDxyd5g==", - "requires": { - "asn1.js": "4.9.1", - "async": "2.5.0", - "browserify-aes": "1.0.8", - "keypair": "1.0.1", - "libp2p-crypto-secp256k1": "0.2.2", - "multihashing-async": "0.4.6", - "pem-jwk": "1.5.1", - "protons": "1.0.0", - "rsa-pem-to-jwk": "1.1.3", - "tweetnacl": "1.0.0", - "webcrypto-shim": "github:dignifiedquire/webcrypto-shim#effe03d3401ccbfb4837191bc393bb347e0c0f0a" - } } } }, @@ -4989,6 +4935,26 @@ "peer-info": "0.10.0" }, "dependencies": { + "libp2p-crypto": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.9.4.tgz", + "integrity": "sha1-ZKWTfez+d7QMgI3uPnUIpaVto1c=", + "requires": { + "asn1.js": "4.9.1", + "async": "2.5.0", + "browserify-aes": "1.0.8", + "keypair": "1.0.1", + "libp2p-crypto-secp256k1": "0.2.2", + "multihashing-async": "0.4.6", + "nodeify": "1.0.1", + "pem-jwk": "1.5.1", + "protocol-buffers": "3.2.1", + "rsa-pem-to-jwk": "1.1.3", + "safe-buffer": "5.1.1", + "tweetnacl": "1.0.0", + "webcrypto-shim": "github:dignifiedquire/webcrypto-shim#effe03d3401ccbfb4837191bc393bb347e0c0f0a" + } + }, "multiaddr": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-2.3.0.tgz", @@ -5026,12 +4992,12 @@ } }, "peer-id": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.10.0.tgz", - "integrity": "sha512-R2b6X466FdvPFO8Sz6Nf5HP3zxRd3FIvyE7wuXT4u7O7yOKa/xz5KxJfYssy5OfJ/p/Gqz7xACCE/x1hIWHOPQ==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.10.1.tgz", + "integrity": "sha512-03fh28UPzQR1FWUyqR4TT7KaSUDMmkpOkQixd32AKlM20NVZhOciTLq+PhBI5fcjAghWO4GVEe01Eu4dhgASVg==", "requires": { "async": "2.5.0", - "libp2p-crypto": "0.9.4", + "libp2p-crypto": "0.10.3", "lodash": "4.17.4", "multihashes": "0.4.9" } @@ -5043,7 +5009,7 @@ "requires": { "lodash.uniqby": "4.7.0", "multiaddr": "3.0.1", - "peer-id": "0.10.0" + "peer-id": "0.10.1" } }, "peer-request": { @@ -6203,14 +6169,6 @@ "integrity": "sha512-DBp0lSvX5G9KGRDTkR/R+a29H+Wk2xItOF+MpZLLNDWbEV9tGPnqLPxHEYjmiz8xGtJHRIqmI+hCjmNzqoA4nQ==", "dev": true }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -6230,6 +6188,14 @@ "ipaddr.js": "1.5.2" } }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -6708,7 +6674,7 @@ "ip": "1.1.5", "merge-recursive": "0.0.3", "multiaddr": "3.0.1", - "peer-id": "0.10.0", + "peer-id": "0.10.1", "peer-info": "0.11.0", "pull-defer": "0.2.2", "pull-queue": "0.1.3", @@ -6764,7 +6730,7 @@ "msgpack5": "3.5.1", "once": "1.4.0", "peer-request": "0.1.2", - "protocol-buffers": "3.2.1", + "protons": "1.0.0", "pull-catch": "1.0.0", "pull-protocol-buffers": "0.1.1", "pull-queue": "0.1.3", @@ -6791,21 +6757,21 @@ "requires": { "async": "2.5.0", "interface-connection": "0.3.2", - "libp2p": "0.12.3", - "libp2p-kad-dht": "0.5.0", + "libp2p": "0.12.4", + "libp2p-kad-dht": "0.5.1", "libp2p-mdns": "0.9.0", "libp2p-multiplex": "0.5.0", "libp2p-railing": "0.7.0", "libp2p-secio": "0.8.1", "libp2p-spdy": "0.11.0", - "libp2p-swarm": "0.32.2", + "libp2p-swarm": "0.32.3", "libp2p-websocket-star-multi": "github:mkg20001/js-libp2p-websocket-star-multi#0ad2555ff72b0d048e60db0850bf0b77922ebb41", "mafmt": "3.0.1", "multiaddr": "3.0.1", "multiplex": "github:mkg20001/multiplex#574b34aeddf291d1fc48fe422a78c5dd3d18dc01", "nat-upnp": "1.1.0", "once": "1.4.0", - "peer-id": "0.10.0", + "peer-id": "0.10.1", "peer-info": "0.11.0", "request": "2.81.0", "uuid": "3.1.0", diff --git a/package.json b/package.json index 3724ebd..86a8809 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "mockery": "^2.1.0", "moment": "^2.18.1", "node-bash-title": "0.0.2", - "peer-id": "^0.10.0", + "peer-id": "^0.10.1", "zeronet-client": "file:zeronet-client", "zeronet-common": "file:zeronet-common", "zeronet-crypto": "file:zeronet-crypto", diff --git a/zeronet-common/package.json b/zeronet-common/package.json index fd12554..6b73468 100644 --- a/zeronet-common/package.json +++ b/zeronet-common/package.json @@ -30,7 +30,7 @@ "ip": "^1.1.5", "merge-recursive": "0.0.3", "multiaddr": "^3.0.1", - "peer-id": "^0.10.0", + "peer-id": "^0.10.1", "peer-info": "^0.11.0", "pull-defer": "^0.2.2", "pull-queue": "^0.1.3", diff --git a/zeronet-protocol/lib/index.js b/zeronet-protocol/lib/index.js index 57101f7..416f921 100644 --- a/zeronet-protocol/lib/index.js +++ b/zeronet-protocol/lib/index.js @@ -1,6 +1,6 @@ "use strict" -const protobuf = require("protocol-buffers") +const protobuf = require("protons") const assert = require("assert") const PeerRequest = require("peer-request") const validate = require("zeronet-common/lib/verify").verifyProtocol diff --git a/zeronet-protocol/package.json b/zeronet-protocol/package.json index 4d35062..a671de7 100644 --- a/zeronet-protocol/package.json +++ b/zeronet-protocol/package.json @@ -29,7 +29,7 @@ "msgpack5": "^3.5.1", "once": "^1.4.0", "peer-request": "^0.1.2", - "protocol-buffers": "^3.2.1", + "protons": "^1.0.0", "pull-catch": "^1.0.0", "pull-protocol-buffers": "^0.1.1", "pull-queue": "^0.1.3", diff --git a/zeronet-swarm/package.json b/zeronet-swarm/package.json index 96e7e49..cb4c4ce 100644 --- a/zeronet-swarm/package.json +++ b/zeronet-swarm/package.json @@ -31,21 +31,21 @@ "dependencies": { "async": "^2.5.0", "interface-connection": "^0.3.2", - "libp2p": "^0.12.3", - "libp2p-kad-dht": "^0.5.0", + "libp2p": "^0.12.4", + "libp2p-kad-dht": "^0.5.1", "libp2p-mdns": "^0.9.0", "libp2p-multiplex": "^0.5.0", "libp2p-railing": "^0.7.0", "libp2p-secio": "^0.8.1", "libp2p-spdy": "^0.11.0", - "libp2p-swarm": "^0.32.2", + "libp2p-swarm": "^0.32.3", "libp2p-websocket-star-multi": "github:mkg20001/js-libp2p-websocket-star-multi", "mafmt": "^3.0.1", "multiaddr": "^3.0.1", "multiplex": "github:mkg20001/multiplex", "nat-upnp": "^1.1.0", "once": "^1.4.0", - "peer-id": "^0.10.0", + "peer-id": "^0.10.1", "peer-info": "^0.11.0", "request": "^2.81.0", "uuid": "^3.1.0",