From a750197960c50221a2171ebab1b2d666f114ea8a Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Tue, 11 Dec 2018 06:48:55 +0000 Subject: [PATCH 1/2] chore: update dependencies License: MIT Signed-off-by: Alan Shaw --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 224d39882..2a4297a1d 100644 --- a/package.json +++ b/package.json @@ -47,14 +47,14 @@ "is-stream": "^1.1.0", "libp2p-crypto": "~0.14.0", "lodash": "^4.17.11", - "lru-cache": "^4.1.3", - "multiaddr": "^5.0.2", + "lru-cache": "^5.1.1", + "multiaddr": "^6.0.0", "multibase": "~0.6.0", "multihashes": "~0.4.14", "ndjson": "^1.5.0", "once": "^1.4.0", "peer-id": "~0.12.0", - "peer-info": "~0.14.1", + "peer-info": "~0.15.0", "promisify-es6": "^1.0.3", "pull-defer": "~0.2.3", "pull-pushable": "^2.2.0", @@ -66,7 +66,7 @@ "stream-to-pull-stream": "^1.7.2", "streamifier": "~0.1.1", "tar-stream": "^1.6.2", - "through2": "^2.0.3" + "through2": "^3.0.0" }, "engines": { "node": ">=8.0.0", From ca234e5d6de375cc5160016dda21b52322311d5f Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Tue, 11 Dec 2018 07:34:27 +0000 Subject: [PATCH 2/2] chore: fix LRU cache usage License: MIT Signed-off-by: Alan Shaw --- src/object/data.js | 2 +- src/object/get.js | 2 +- src/object/links.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/object/data.js b/src/object/data.js index ace3cc992..bbc43ebd6 100644 --- a/src/object/data.js +++ b/src/object/data.js @@ -8,7 +8,7 @@ const lruOptions = { max: 128 } -const cache = LRU(lruOptions) +const cache = new LRU(lruOptions) module.exports = (send) => { return promisify((cid, options, callback) => { diff --git a/src/object/get.js b/src/object/get.js index 28b208003..068d92237 100644 --- a/src/object/get.js +++ b/src/object/get.js @@ -11,7 +11,7 @@ const lruOptions = { max: 128 } -const cache = LRU(lruOptions) +const cache = new LRU(lruOptions) module.exports = (send) => { return promisify((cid, options, callback) => { diff --git a/src/object/links.js b/src/object/links.js index 943509e67..30196c3ec 100644 --- a/src/object/links.js +++ b/src/object/links.js @@ -9,7 +9,7 @@ const lruOptions = { max: 128 } -const cache = LRU(lruOptions) +const cache = new LRU(lruOptions) module.exports = (send) => { return promisify((multihash, options, callback) => {