Skip to content

Commit e9b1e0a

Browse files
committed
Fix functions in preset settings
Closes GH-77.
1 parent daf03a0 commit e9b1e0a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/configuration.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
import assert from 'node:assert/strict'
8585
import path from 'node:path'
8686
import {fileURLToPath, pathToFileURL} from 'node:url'
87-
import structuredClone from '@ungap/structured-clone'
87+
import extend from 'extend'
8888
import createDebug from 'debug'
8989
import isPlainObj from 'is-plain-obj'
9090
import {resolvePlugin} from 'load-plugin'
@@ -349,7 +349,7 @@ async function merge(target, raw, options) {
349349
)
350350
}
351351

352-
target.settings = structuredClone({...target.settings, ...result.settings})
352+
target.settings = extend(true, target.settings, result.settings)
353353
}
354354

355355
/**
@@ -494,7 +494,7 @@ async function merge(target, raw, options) {
494494
*/
495495
function reconfigure(entry, value) {
496496
if (isPlainObj(entry[1]) && isPlainObj(value)) {
497-
value = structuredClone({...entry[1], ...value})
497+
value = extend(true, entry[1], value)
498498
}
499499

500500
entry[1] = value

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
"@types/is-empty": "^1.0.0",
3535
"@types/node": "^20.0.0",
3636
"@types/unist": "^3.0.0",
37-
"@ungap/structured-clone": "^1.0.0",
3837
"concat-stream": "^2.0.0",
3938
"debug": "^4.0.0",
39+
"extend": "^3.0.0",
4040
"glob": "^10.0.0",
4141
"ignore": "^5.0.0",
4242
"is-empty": "^1.0.0",
@@ -52,8 +52,8 @@
5252
"yaml": "^2.0.0"
5353
},
5454
"devDependencies": {
55+
"@types/extend": "^3.0.0",
5556
"@types/parse-json": "^4.0.0",
56-
"@types/ungap__structured-clone": "^1.0.0",
5757
"c8": "^9.0.0",
5858
"prettier": "^3.0.0",
5959
"remark": "^15.0.0",

0 commit comments

Comments
 (0)