Skip to content

Commit

Permalink
fix: use defu instead of defaults-deep
Browse files Browse the repository at this point in the history
  • Loading branch information
pooya parsa committed Feb 7, 2019
1 parent 28d2878 commit 3dc0535
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -19,7 +19,7 @@
"src"
],
"dependencies": {
"defaults-deep": "^0.2.4"
"defu": "^0.0.1"
},
"devDependencies": {
"axios": "^0.18.0",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
@@ -1,11 +1,11 @@
const path = require('path')
const defaultsDeep = require('defaults-deep')
const defu = require('defu')

const defaults = require('./defaults')

module.exports = function createServePlaceholder (_options) {
// Assign default options
const options = defaultsDeep({}, _options, defaults)
const options = defu(_options, defaults)

return function servePlaceholderMiddleware (req, res, next) {
// Get url from req object
Expand Down
28 changes: 6 additions & 22 deletions yarn.lock
Expand Up @@ -1052,15 +1052,6 @@ default-require-extensions@^2.0.0:
dependencies:
strip-bom "^3.0.0"

defaults-deep@^0.2.4:
version "0.2.4"
resolved "https://registry.yarnpkg.com/defaults-deep/-/defaults-deep-0.2.4.tgz#a479cfeafce025810fb93aa8d2dde0ee2d677cc6"
integrity sha512-V6BtqzcMvn0EPOy7f+SfMhfmTawq+7UQdt9yZH0EBK89+IHo5f+Hse/qzTorAXOBrQpxpwb6cB/8OgtaMrT+Fg==
dependencies:
for-own "^0.1.3"
is-extendable "^0.1.1"
lazy-cache "^0.2.3"

define-properties@^1.1.2:
version "1.1.3"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
Expand Down Expand Up @@ -1090,6 +1081,11 @@ define-property@^2.0.2:
is-descriptor "^1.0.2"
isobject "^3.0.1"

defu@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/defu/-/defu-0.0.1.tgz#74dc4d64e401d7f95c6755fe98bc5cd688833a8f"
integrity sha512-Pz9yznbSzVTNA67lcfqVnktROx2BrrBBcmQqGrfe0zdiN5pl5GQogLA4uaP3U1pR1LHIZpEYTAh2sn+v4rH1dA==

del@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5"
Expand Down Expand Up @@ -1643,18 +1639,11 @@ follow-redirects@^1.3.0:
dependencies:
debug "=3.1.0"

for-in@^1.0.1, for-in@^1.0.2:
for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=

for-own@^0.1.3:
version "0.1.5"
resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=
dependencies:
for-in "^1.0.1"

forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
Expand Down Expand Up @@ -2850,11 +2839,6 @@ kleur@^3.0.0:
resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.1.tgz#4f5b313f5fa315432a400f19a24db78d451ede62"
integrity sha512-P3kRv+B+Ra070ng2VKQqW4qW7gd/v3iD8sy/zOdcYRsfiD+QBokQNOps/AfP6Hr48cBhIIBFWckB9aO+IZhrWg==

lazy-cache@^0.2.3:
version "0.2.7"
resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-0.2.7.tgz#7feddf2dcb6edb77d11ef1d117ab5ffdf0ab1b65"
integrity sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=

lcid@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
Expand Down

0 comments on commit 3dc0535

Please sign in to comment.