diff --git a/lib/configuration.js b/lib/configuration.js index 6c800b0..d2e0f8f 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -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' @@ -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) } /** @@ -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 diff --git a/package.json b/package.json index fb5acf7..debeb7c 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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",