diff --git a/lib/document.js b/lib/document.js index 79153756..fd8f672b 100644 --- a/lib/document.js +++ b/lib/document.js @@ -1,6 +1,6 @@ 'use strict'; -const cloneDeep = require('lodash/cloneDeep'); +const cloneDeep = require('rfdc')(); class Document { diff --git a/lib/model.js b/lib/model.js index b7db65cd..0e19c4af 100644 --- a/lib/model.js +++ b/lib/model.js @@ -1,7 +1,7 @@ 'use strict'; const { EventEmitter } = require('events'); -const cloneDeep = require('lodash/cloneDeep'); +const cloneDeep = require('rfdc')(); const Promise = require('bluebird'); const { parseArgs, getProp, setGetter, shuffle } = require('./util'); const Document = require('./document'); diff --git a/lib/schema.js b/lib/schema.js index cb8fb009..f9de7c64 100644 --- a/lib/schema.js +++ b/lib/schema.js @@ -652,7 +652,7 @@ class Schema { * @private */ _parseUpdate(updates) { - return (new UpdateParser(this.paths)).parseUpdate(updates); + return new UpdateParser(this.paths).parseUpdate(updates); } /** @@ -663,7 +663,7 @@ class Schema { * @private */ _execQuery(query) { - return (new QueryParser(this.paths)).execQuery(query); + return new QueryParser(this.paths).execQuery(query); } /** diff --git a/package.json b/package.json index bfd31b1b..683a9eb9 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "cuid": "^2.1.4", "graceful-fs": "^4.1.3", "is-plain-object": "^3.0.0", - "lodash": "^4.17.10" + "rfdc": "^1.1.4" }, "devDependencies": { "chai": "^4.2.0", @@ -37,6 +37,7 @@ "eslint": "^6.1.0", "eslint-config-hexo": "^3.0.0", "jsdoc": "^3.4.0", + "lodash": "^4.17.15", "minami": "^1.1.1", "mocha": "^6.0.2", "nyc": "^14.1.1",