From 0065b0a49e1b5403cda2ef77d4d9a94f00c01c73 Mon Sep 17 00:00:00 2001 From: Masahiro Saito Date: Sat, 30 Jun 2018 07:38:19 +0900 Subject: [PATCH] chore: fix out of date npms (#21) --- package.json | 6 +++--- src/keychain.js | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 73598b9f..6526a147 100644 --- a/package.json +++ b/package.json @@ -43,14 +43,14 @@ "homepage": "https://github.com/libp2p/js-libp2p-keychain#readme", "dependencies": { "async": "^2.6.0", - "deepmerge": "^1.5.2", "interface-datastore": "~0.4.2", - "libp2p-crypto": "~0.12.0", + "libp2p-crypto": "~0.13.0", + "lodash.merge": "^4.6.1", "pull-stream": "^3.6.1", "sanitize-filename": "^1.6.1" }, "devDependencies": { - "aegir": "^12.4.0", + "aegir": "^13.0.7", "chai": "^4.1.2", "chai-string": "^1.4.0", "datastore-fs": "~0.4.2", diff --git a/src/keychain.js b/src/keychain.js index 41f5c1c4..0ec392a6 100644 --- a/src/keychain.js +++ b/src/keychain.js @@ -2,7 +2,7 @@ 'use strict' const sanitize = require('sanitize-filename') -const deepmerge = require('deepmerge') +const deepmerge = require('lodash.merge') const crypto = require('libp2p-crypto') const DS = require('interface-datastore') const pull = require('pull-stream') @@ -104,7 +104,8 @@ class Keychain { } this.store = store - const opts = deepmerge(defaultOptions, options) + const opts = {} + deepmerge(opts, defaultOptions, options) // Enforce NIST SP 800-132 if (!opts.passPhrase || opts.passPhrase.length < 20) {