@biffo/cli 0.324.8 → 0.324.9

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10722,9 +10722,11 @@ function findManagedRegion(source) {
10722
10722
  const bodyStart = startIdx + REGISTRY_START_MARKER.length;
10723
10723
  const endIdx = source.indexOf(REGISTRY_END_MARKER, bodyStart);
10724
10724
  if (endIdx === -1) return null;
10725
+ const lineStart = source.lastIndexOf("\n", endIdx - 1) + 1;
10726
+ const seam = lineStart >= bodyStart && /^[ \t]*$/.test(source.slice(lineStart, endIdx)) ? lineStart : endIdx;
10725
10727
  return {
10726
- region: { before: source.slice(0, bodyStart), after: source.slice(endIdx) },
10727
- body: source.slice(bodyStart, endIdx)
10728
+ region: { before: source.slice(0, bodyStart), after: source.slice(seam) },
10729
+ body: source.slice(bodyStart, seam)
10728
10730
  };
10729
10731
  }
10730
10732
  var SLUG_FIELD_PATTERN = /\bslug\s*:\s*(['"])([a-zA-Z0-9_-]+)\1/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.324.8",
3
+ "version": "0.324.9",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",