Skip to content

Commit

Permalink
Fix functions in preset settings
Browse files Browse the repository at this point in the history
Closes GH-77.
  • Loading branch information
wooorm committed Apr 24, 2024
1 parent daf03a0 commit e9b1e0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/configuration.js
Expand Up @@ -84,7 +84,7 @@
import assert from 'node:assert/strict'
import path from 'node:path'
import {fileURLToPath, pathToFileURL} from 'node:url'
import structuredClone from '@ungap/structured-clone'
import extend from 'extend'
import createDebug from 'debug'
import isPlainObj from 'is-plain-obj'
import {resolvePlugin} from 'load-plugin'
Expand Down Expand Up @@ -349,7 +349,7 @@ async function merge(target, raw, options) {
)
}

target.settings = structuredClone({...target.settings, ...result.settings})
target.settings = extend(true, target.settings, result.settings)
}

/**
Expand Down Expand Up @@ -494,7 +494,7 @@ async function merge(target, raw, options) {
*/
function reconfigure(entry, value) {
if (isPlainObj(entry[1]) && isPlainObj(value)) {
value = structuredClone({...entry[1], ...value})
value = extend(true, entry[1], value)
}

entry[1] = value
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -34,9 +34,9 @@
"@types/is-empty": "^1.0.0",
"@types/node": "^20.0.0",
"@types/unist": "^3.0.0",
"@ungap/structured-clone": "^1.0.0",
"concat-stream": "^2.0.0",
"debug": "^4.0.0",
"extend": "^3.0.0",
"glob": "^10.0.0",
"ignore": "^5.0.0",
"is-empty": "^1.0.0",
Expand All @@ -52,8 +52,8 @@
"yaml": "^2.0.0"
},
"devDependencies": {
"@types/extend": "^3.0.0",
"@types/parse-json": "^4.0.0",
"@types/ungap__structured-clone": "^1.0.0",
"c8": "^9.0.0",
"prettier": "^3.0.0",
"remark": "^15.0.0",
Expand Down

0 comments on commit e9b1e0a

Please sign in to comment.