|
346 | 346 | * be stored on the `result` field of {@link VFile `VFile`}. |
347 | 347 | */ |
348 | 348 |
|
349 | | -import structuredClone from '@ungap/structured-clone' |
350 | 349 | import {bail} from 'bail' |
| 350 | +import extend from 'extend' |
351 | 351 | import {ok as assert} from 'devlop' |
352 | 352 | import isPlainObj from 'is-plain-obj' |
353 | 353 | import {trough} from 'trough' |
@@ -507,7 +507,7 @@ export class Processor extends CallableInstance { |
507 | 507 | destination.use(...attacher) |
508 | 508 | } |
509 | 509 |
|
510 | | - destination.data(structuredClone(this.namespace)) |
| 510 | + destination.data(extend(true, {}, this.namespace)) |
511 | 511 |
|
512 | 512 | return destination |
513 | 513 | } |
@@ -1115,10 +1115,7 @@ export class Processor extends CallableInstance { |
1115 | 1115 | addList(result.plugins) |
1116 | 1116 |
|
1117 | 1117 | if (result.settings) { |
1118 | | - namespace.settings = { |
1119 | | - ...namespace.settings, |
1120 | | - ...structuredClone(result.settings) |
1121 | | - } |
| 1118 | + namespace.settings = extend(true, namespace.settings, result.settings) |
1122 | 1119 | } |
1123 | 1120 | } |
1124 | 1121 |
|
@@ -1166,7 +1163,7 @@ export class Processor extends CallableInstance { |
1166 | 1163 | let [primary, ...rest] = parameters |
1167 | 1164 | const currentPrimary = attachers[entryIndex][1] |
1168 | 1165 | if (isPlainObj(currentPrimary) && isPlainObj(primary)) { |
1169 | | - primary = structuredClone({...currentPrimary, ...primary}) |
| 1166 | + primary = extend(true, currentPrimary, primary) |
1170 | 1167 | } |
1171 | 1168 |
|
1172 | 1169 | attachers[entryIndex] = [plugin, primary, ...rest] |
|
0 commit comments