@adeu/core 1.12.1 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +16 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/engine.bugs.test.ts +20 -0
- package/src/engine.ts +28 -0
package/dist/index.cjs
CHANGED
|
@@ -3618,6 +3618,22 @@ var RedlineEngine = class {
|
|
|
3618
3618
|
return errors;
|
|
3619
3619
|
}
|
|
3620
3620
|
process_batch(changes, dry_run = false) {
|
|
3621
|
+
if (Array.isArray(changes)) {
|
|
3622
|
+
changes = changes.map((item) => {
|
|
3623
|
+
if (typeof item === "string") {
|
|
3624
|
+
try {
|
|
3625
|
+
const parsed = JSON.parse(item);
|
|
3626
|
+
if (parsed !== null && typeof parsed === "object") {
|
|
3627
|
+
return parsed;
|
|
3628
|
+
}
|
|
3629
|
+
return item;
|
|
3630
|
+
} catch {
|
|
3631
|
+
return item;
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3634
|
+
return item;
|
|
3635
|
+
});
|
|
3636
|
+
}
|
|
3621
3637
|
if (dry_run) {
|
|
3622
3638
|
const baselines = /* @__PURE__ */ new Map();
|
|
3623
3639
|
for (const part of this.doc.pkg.parts) {
|