@savvy-web/silk 3.7.6 → 3.7.8

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.
@@ -2339,7 +2339,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
2339
2339
  }
2340
2340
  };
2341
2341
  //#endregion
2342
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/BunExtension.js
2342
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/BunExtension.js
2343
2343
  /**
2344
2344
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2345
2345
  * when the format is `"bun"`.
@@ -5473,7 +5473,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
5473
5473
  }
5474
5474
  };
5475
5475
  //#endregion
5476
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/ImporterDependency.js
5476
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/ImporterDependency.js
5477
5477
  /**
5478
5478
  * One declared dependency of one workspace importer, as the lockfile records it.
5479
5479
  *
@@ -5511,7 +5511,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
5511
5511
  depType: DependencyField
5512
5512
  }) {};
5513
5513
  //#endregion
5514
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/LockfileImporter.js
5514
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/LockfileImporter.js
5515
5515
  /**
5516
5516
  * One workspace importer's declared dependencies, as the lockfile records them.
5517
5517
  *
@@ -5535,7 +5535,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
5535
5535
  dependencies: effect.Schema.Array(ImporterDependency)
5536
5536
  }) {};
5537
5537
  //#endregion
5538
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/ResolvedPackage.js
5538
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/ResolvedPackage.js
5539
5539
  const EMPTY_DEPENDENCIES = {};
5540
5540
  /**
5541
5541
  * A package resolved from a lockfile.
@@ -5570,7 +5570,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
5570
5570
  dependencies: effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY_DEPENDENCIES)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY_DEPENDENCIES)))
5571
5571
  }) {};
5572
5572
  //#endregion
5573
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/WorkspaceDependency.js
5573
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/WorkspaceDependency.js
5574
5574
  /**
5575
5575
  * A directed dependency edge between two workspace packages as recorded in
5576
5576
  * the lockfile.
@@ -5592,7 +5592,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
5592
5592
  constraint: effect.Schema.String
5593
5593
  }) {};
5594
5594
  //#endregion
5595
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/PnpmExtension.js
5595
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/PnpmExtension.js
5596
5596
  /**
5597
5597
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
5598
5598
  * when the format is `"pnpm"`.
@@ -5617,7 +5617,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
5617
5617
  }))
5618
5618
  }) {};
5619
5619
  //#endregion
5620
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/LockfileFormat.js
5620
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/LockfileFormat.js
5621
5621
  /**
5622
5622
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
5623
5623
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -5655,7 +5655,7 @@ const FILENAMES = {
5655
5655
  */
5656
5656
  const filenameFor = (format) => FILENAMES[format][0];
5657
5657
  //#endregion
5658
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/internal/shared.js
5658
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/internal/shared.js
5659
5659
  /**
5660
5660
  * The four dependency sections of a manifest, in a stable order — the shared
5661
5661
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -7584,7 +7584,7 @@ var JsoncModifier = class {
7584
7584
  });
7585
7585
  };
7586
7586
  //#endregion
7587
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/internal/bun.js
7587
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/internal/bun.js
7588
7588
  const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
7589
7589
  const BunWorkspaceEntry = effect.Schema.Struct({
7590
7590
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -7677,7 +7677,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
7677
7677
  };
7678
7678
  });
7679
7679
  //#endregion
7680
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/internal/npm.js
7680
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/internal/npm.js
7681
7681
  const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
7682
7682
  const NpmPackageEntry = effect.Schema.Struct({
7683
7683
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -7775,7 +7775,7 @@ const toFields$2 = (raw) => effect.Effect.gen(function* () {
7775
7775
  };
7776
7776
  });
7777
7777
  //#endregion
7778
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/YamlNode.js
7778
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/YamlNode.js
7779
7779
  /**
7780
7780
  * YAML scalar presentation styles.
7781
7781
  *
@@ -7895,12 +7895,19 @@ var YamlScalar = class extends effect.Schema.TaggedClass()("YamlScalar", {
7895
7895
  * A YAML alias AST node, referencing a previously defined anchor by name
7896
7896
  * (without the leading `*`).
7897
7897
  *
7898
+ * Carries the same comment triple as every other node class — see
7899
+ * {@link YamlScalar} for the field semantics. An alias is a node like any
7900
+ * other and a comment can legally sit above or after one.
7901
+ *
7898
7902
  * @public
7899
7903
  */
7900
7904
  var YamlAlias = class extends effect.Schema.TaggedClass()("YamlAlias", {
7901
7905
  name: effect.Schema.String,
7902
7906
  offset: effect.Schema.Number,
7903
- length: effect.Schema.Number
7907
+ length: effect.Schema.Number,
7908
+ commentBefore: effect.Schema.optionalKey(effect.Schema.String),
7909
+ comment: effect.Schema.optionalKey(effect.Schema.String),
7910
+ spaceBefore: effect.Schema.optionalKey(effect.Schema.Boolean)
7904
7911
  }) {
7905
7912
  /** See `YamlScalar.find`. Pure. */
7906
7913
  find(path) {
@@ -7943,20 +7950,18 @@ const YamlNode = effect.Schema.suspend(() => effect.Schema.Union([
7943
7950
  * A YAML key-value pair AST node, representing one entry within a mapping.
7944
7951
  * `value` is `null` when absent (e.g. `key:` with no value).
7945
7952
  *
7946
- * - `commentBefore` own-line comment text directly above the pair's key
7947
- * (multiple consecutive comment lines join with `\n`).
7948
- * - `comment` trailing comment text on the pair's line (strictly trailing).
7949
- * - `spaceBefore` `true` when a blank line precedes the pair (and its
7950
- * `commentBefore` block, when present) in the source.
7953
+ * A pair carries **no comment fields**. Comments belong to the pair's `key`
7954
+ * and `value` nodes, which have one comment slot each: an own-line comment
7955
+ * above the entry leads the `key`, and a trailing comment on the entry's line
7956
+ * follows the `value`. Two slots rather than one is what lets `a: # kc` keep
7957
+ * its comment where the author wrote it instead of relocating it onto the
7958
+ * value's line.
7951
7959
  *
7952
7960
  * @public
7953
7961
  */
7954
7962
  var YamlPair = class extends effect.Schema.TaggedClass()("YamlPair", {
7955
7963
  key: effect.Schema.suspend(() => YamlNode),
7956
- value: effect.Schema.NullOr(effect.Schema.suspend(() => YamlNode)),
7957
- commentBefore: effect.Schema.optionalKey(effect.Schema.String),
7958
- comment: effect.Schema.optionalKey(effect.Schema.String),
7959
- spaceBefore: effect.Schema.optionalKey(effect.Schema.Boolean)
7964
+ value: effect.Schema.NullOr(effect.Schema.suspend(() => YamlNode))
7960
7965
  }) {};
7961
7966
  /**
7962
7967
  * A YAML mapping AST node, representing a collection of {@link YamlPair}
@@ -8211,7 +8216,7 @@ function nodeToValue(node, anchors, budget, counting = false) {
8211
8216
  return null;
8212
8217
  }
8213
8218
  //#endregion
8214
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/diagnostics.js
8219
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/diagnostics.js
8215
8220
  /** Error codes emitted by the lexer stage. */
8216
8221
  const YAML_LEX_ERROR_CODES = [
8217
8222
  "UnexpectedCharacter",
@@ -8298,7 +8303,7 @@ function isFatalCode(code) {
8298
8303
  return FATAL_CODES.has(code);
8299
8304
  }
8300
8305
  //#endregion
8301
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/YamlDiagnostic.js
8306
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/YamlDiagnostic.js
8302
8307
  /**
8303
8308
  * Error codes emitted by the lexer stage.
8304
8309
  *
@@ -8419,7 +8424,7 @@ function lineChar(text, offset) {
8419
8424
  };
8420
8425
  }
8421
8426
  //#endregion
8422
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/lexer.js
8427
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/lexer.js
8423
8428
  /**
8424
8429
  * Create a new YAML scanner for the given source text.
8425
8430
  *
@@ -9382,7 +9387,7 @@ function lexAll(text) {
9382
9387
  return tokens;
9383
9388
  }
9384
9389
  //#endregion
9385
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/cst-parser.js
9390
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/cst-parser.js
9386
9391
  /**
9387
9392
  * Hardening: cap CST nesting so hostile inputs cannot overflow the stack
9388
9393
  * while the tree is being BUILT. Set slightly above the composer's
@@ -10103,7 +10108,7 @@ function parseCSTAll(text) {
10103
10108
  return parseDocuments(lexAll(text), text);
10104
10109
  }
10105
10110
  //#endregion
10106
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/anchors.js
10111
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/anchors.js
10107
10112
  /**
10108
10113
  * Check if a pending anchor is being applied to an alias node (invalid in YAML 1.2 §3.2.2).
10109
10114
  * Aliases represent references to existing anchored nodes and cannot have their own anchors.
@@ -10171,7 +10176,7 @@ function scanName(text, start) {
10171
10176
  return text.slice(start, end);
10172
10177
  }
10173
10178
  //#endregion
10174
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/comments.js
10179
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/comments.js
10175
10180
  /** True when there is no line break between `start` and `end` in `text`. */
10176
10181
  function sameLineSpan(text, start, end) {
10177
10182
  if (start < 0) return false;
@@ -10195,6 +10200,31 @@ function isOwnLineAt(text, offset) {
10195
10200
  return true;
10196
10201
  }
10197
10202
  /**
10203
+ * True when the only thing before `offset` on its line is a block indicator —
10204
+ * `?`, `:` or `-` — plus whitespace. Such a comment sits on an indicator line
10205
+ * with its node BELOW, so it leads that node rather than trailing whatever
10206
+ * came before (`? # c` / ` - seq1`). Without this, the `? ` prefix makes the
10207
+ * comment look like a trailing comment on the previous entry.
10208
+ */
10209
+ function isAfterIndicatorOnly(text, offset) {
10210
+ let i = offset - 1;
10211
+ let sawIndicator = false;
10212
+ while (i >= 0) {
10213
+ const ch = text[i];
10214
+ if (ch === " " || ch === " ") {
10215
+ i--;
10216
+ continue;
10217
+ }
10218
+ if (!sawIndicator && (ch === "?" || ch === "-" || ch === ":")) {
10219
+ sawIndicator = true;
10220
+ i--;
10221
+ continue;
10222
+ }
10223
+ return sawIndicator && (ch === "\n" || ch === "\r");
10224
+ }
10225
+ return sawIndicator;
10226
+ }
10227
+ /**
10198
10228
  * True when the line immediately above the line containing `offset` is blank
10199
10229
  * (empty or horizontal whitespace only). Purely local — see
10200
10230
  * {@link isOwnLineAt} for why span-based gap checks are not used.
@@ -10304,8 +10334,8 @@ function columnAt(text, offset) {
10304
10334
  /**
10305
10335
  * Rebuild `node` with the given comment fields merged in (existing fields are
10306
10336
  * kept unless overridden; `commentBefore`/`comment` join with a newline when
10307
- * both sides are present). Aliases are returned unchanged they carry no
10308
- * comment fields.
10337
+ * both sides are present). Every node class carries the triple, aliases
10338
+ * included.
10309
10339
  */
10310
10340
  function withCommentFields(node, fields) {
10311
10341
  if (node instanceof YamlScalar) return new YamlScalar({
@@ -10341,7 +10371,12 @@ function withCommentFields(node, fields) {
10341
10371
  offset: node.offset,
10342
10372
  length: node.length
10343
10373
  });
10344
- return node;
10374
+ return new YamlAlias({
10375
+ name: node.name,
10376
+ ...mergedCommentFields(node, fields),
10377
+ offset: node.offset,
10378
+ length: node.length
10379
+ });
10345
10380
  }
10346
10381
  function mergedCommentFields(existing, incoming) {
10347
10382
  const commentBefore = incoming.commentBefore !== void 0 ? existing.commentBefore !== void 0 ? `${existing.commentBefore}\n${incoming.commentBefore}` : incoming.commentBefore : existing.commentBefore;
@@ -10354,7 +10389,7 @@ function mergedCommentFields(existing, incoming) {
10354
10389
  };
10355
10390
  }
10356
10391
  //#endregion
10357
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/state.js
10392
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/state.js
10358
10393
  let lineStartsText;
10359
10394
  let lineStartsCache = [];
10360
10395
  function getLineStarts(text) {
@@ -10474,7 +10509,7 @@ function exitNesting(state) {
10474
10509
  state.depth--;
10475
10510
  }
10476
10511
  //#endregion
10477
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/tags.js
10512
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/tags.js
10478
10513
  /**
10479
10514
  * Resolve a tag shorthand using the document's %TAG directives.
10480
10515
  * For example, with `%TAG !! tag:example.com,2000:app/`, the tag `!!int`
@@ -10560,7 +10595,7 @@ function validateTagHandlesInDocument(docCst, state) {
10560
10595
  }
10561
10596
  }
10562
10597
  //#endregion
10563
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/scalars.js
10598
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/scalars.js
10564
10599
  const NULL_RE$1 = /^(?:null|Null|NULL|~)$/;
10565
10600
  const TRUE_RE$1 = /^(?:true|True|TRUE)$/;
10566
10601
  const FALSE_RE$1 = /^(?:false|False|FALSE)$/;
@@ -11486,7 +11521,7 @@ function shouldPreserveRaw(rawValue, value) {
11486
11521
  return false;
11487
11522
  }
11488
11523
  //#endregion
11489
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/block.js
11524
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/block.js
11490
11525
  /**
11491
11526
  * Compose a block map from its CST children, with an optional external first key.
11492
11527
  *
@@ -11983,6 +12018,29 @@ function buildPairs(items, pairs, text, escaped) {
11983
12018
  let lastNode;
11984
12019
  let contentColumn = -1;
11985
12020
  const nodeEnd = (n) => n.offset + n.length;
12021
+ /**
12022
+ * Rebuild `pair` with `text` appended to the trailing comment of whichever
12023
+ * node owns the pair's last line: the value when present, otherwise the key.
12024
+ */
12025
+ const withTrailingComment = (pair, text, onKey = false) => pair.value !== null && !onKey ? new YamlPair({
12026
+ key: pair.key,
12027
+ value: withCommentFields(pair.value, { comment: text })
12028
+ }) : new YamlPair({
12029
+ key: withCommentFields(pair.key, { comment: text }),
12030
+ value: pair.value
12031
+ });
12032
+ /**
12033
+ * Finish a pair: the pending leading fields go to its KEY node, the entry's
12034
+ * trailing comment to whichever node owns the last line. The one place the
12035
+ * node-level split is applied, so no construction site has to know it.
12036
+ */
12037
+ const pushPair = (pair, leading, trailing, trailingOnKey = false) => {
12038
+ const withLeading = Object.keys(leading).length === 0 ? pair : new YamlPair({
12039
+ key: withCommentFields(pair.key, leading),
12040
+ value: pair.value
12041
+ });
12042
+ return trailing === void 0 ? withLeading : withTrailingComment(withLeading, trailing, trailingOnKey);
12043
+ };
11986
12044
  const noteContentColumn = (offset) => {
11987
12045
  if (contentColumn < 0 && offset >= 0) contentColumn = columnAt(text, offset);
11988
12046
  };
@@ -12020,15 +12078,9 @@ function buildPairs(items, pairs, text, escaped) {
12020
12078
  if (item.kind === "comment") {
12021
12079
  const cOff = item.offset ?? -1;
12022
12080
  const cText = item.comment ?? "";
12023
- if (!(cOff < 0 ? true : isOwnLineAt(text, cOff)) && pairs.length > 0) {
12081
+ if (!(cOff < 0 ? true : isOwnLineAt(text, cOff) || isAfterIndicatorOnly(text, cOff)) && pairs.length > 0) {
12024
12082
  const last = pairs[pairs.length - 1];
12025
- if (last) pairs[pairs.length - 1] = new YamlPair({
12026
- key: last.key,
12027
- value: last.value,
12028
- ...last.commentBefore !== void 0 ? { commentBefore: last.commentBefore } : {},
12029
- comment: last.comment !== void 0 ? `${last.comment}\n${cText}` : cText,
12030
- ...last.spaceBefore !== void 0 ? { spaceBefore: last.spaceBefore } : {}
12031
- });
12083
+ if (last) pairs[pairs.length - 1] = withTrailingComment(last, cText);
12032
12084
  } else {
12033
12085
  const blankAbove = cOff >= 0 && hasBlankLineAbove(text, cOff) && !blankAboveIsKeepChompContent(text, cOff, lastNode);
12034
12086
  if (blankAbove && pending.length === 0 && lastEnd >= 0) pendingSpace = true;
@@ -12054,20 +12106,18 @@ function buildPairs(items, pairs, text, escaped) {
12054
12106
  length: 0
12055
12107
  });
12056
12108
  if (valueNode) {
12057
- pairs.push(new YamlPair({
12109
+ pairs.push(pushPair(new YamlPair({
12058
12110
  key: nullKey,
12059
- value: valueNode.node ?? null,
12060
- ...pendingFields
12061
- }));
12111
+ value: valueNode.node ?? null
12112
+ }), pendingFields, void 0));
12062
12113
  i = valueNode.nextIdx;
12063
12114
  lastEnd = valueNode.node ? nodeEnd(valueNode.node) : valueSepOffset + 1;
12064
12115
  lastNode = valueNode.node ?? void 0;
12065
12116
  } else {
12066
- pairs.push(new YamlPair({
12117
+ pairs.push(pushPair(new YamlPair({
12067
12118
  key: nullKey,
12068
- value: null,
12069
- ...pendingFields
12070
- }));
12119
+ value: null
12120
+ }), pendingFields, void 0));
12071
12121
  lastEnd = valueSepOffset + 1;
12072
12122
  lastNode = void 0;
12073
12123
  }
@@ -12105,32 +12155,26 @@ function buildPairs(items, pairs, text, escaped) {
12105
12155
  for (const c of valueResult.sameLineComments) pairTrailing = joinComments(pairTrailing, c);
12106
12156
  let valNode = valueResult.node;
12107
12157
  if (valNode !== null && valueResult.leadingComments.length > 0) valNode = withCommentFields(valNode, { commentBefore: valueResult.leadingComments.join("\n") });
12108
- pairs.push(new YamlPair({
12158
+ pairs.push(pushPair(new YamlPair({
12109
12159
  key: keyOrNull(),
12110
- value: valNode,
12111
- ...pendingFields,
12112
- ...pairTrailing !== void 0 ? { comment: pairTrailing } : {}
12113
- }));
12160
+ value: valNode
12161
+ }), pendingFields, pairTrailing, keyIsSimple(keyNode) && (valNode === null || !sameLineSpan(text, sepOffset, valNode.offset))));
12114
12162
  i = valueResult.nextIdx;
12115
12163
  lastEnd = valNode ? nodeEnd(valNode) : sepOffset + 1;
12116
12164
  lastNode = valNode ?? void 0;
12117
12165
  } else {
12118
- pairs.push(new YamlPair({
12166
+ pairs.push(pushPair(new YamlPair({
12119
12167
  key: keyOrNull(),
12120
- value: null,
12121
- ...pendingFields,
12122
- ...pairTrailing !== void 0 ? { comment: pairTrailing } : {}
12123
- }));
12168
+ value: null
12169
+ }), pendingFields, pairTrailing));
12124
12170
  lastEnd = sepOffset + 1;
12125
12171
  lastNode = void 0;
12126
12172
  }
12127
12173
  } else {
12128
- pairs.push(new YamlPair({
12174
+ pairs.push(pushPair(new YamlPair({
12129
12175
  key: keyOrNull(),
12130
- value: null,
12131
- ...pendingFields,
12132
- ...pairTrailing !== void 0 ? { comment: pairTrailing } : {}
12133
- }));
12176
+ value: null
12177
+ }), pendingFields, pairTrailing));
12134
12178
  lastEnd = keyNode ? nodeEnd(keyNode) : lastEnd;
12135
12179
  if (keyNode) lastNode = keyNode;
12136
12180
  }
@@ -12155,6 +12199,17 @@ function buildPairs(items, pairs, text, escaped) {
12155
12199
  }
12156
12200
  return withLeadingBlank(pending);
12157
12201
  }
12202
+ /**
12203
+ * True when a key renders in implicit `key: value` form, so the `:` sits on
12204
+ * the key's own line. A multi-line or block-scalar key forces the explicit
12205
+ * `? key` / `: value` spelling, where the `:` gets a line of its own.
12206
+ */
12207
+ function keyIsSimple(keyNode) {
12208
+ if (keyNode instanceof YamlAlias) return true;
12209
+ if (!(keyNode instanceof YamlScalar)) return false;
12210
+ if (typeof keyNode.value === "string" && keyNode.value.includes("\n")) return false;
12211
+ return keyNode.style !== "block-literal" && keyNode.style !== "block-folded";
12212
+ }
12158
12213
  function consumeValueNode(items, startIdx, text, sepOffset) {
12159
12214
  let peek = startIdx;
12160
12215
  while (peek < items.length && items[peek]?.kind === "comment") peek++;
@@ -12163,13 +12218,17 @@ function consumeValueNode(items, startIdx, text, sepOffset) {
12163
12218
  let i = startIdx;
12164
12219
  const sameLineComments = [];
12165
12220
  const leadingComments = [];
12221
+ let firstOwnLineIdx = -1;
12166
12222
  while (i < items.length) {
12167
12223
  const item = items[i];
12168
12224
  if (!item) break;
12169
12225
  if (item.kind === "comment") {
12170
12226
  const cText = item.comment ?? "";
12171
12227
  if (item.offset !== void 0 && sameLineSpan(text, sepOffset, item.offset)) sameLineComments.push(cText);
12172
- else leadingComments.push(cText);
12228
+ else {
12229
+ if (firstOwnLineIdx < 0) firstOwnLineIdx = i;
12230
+ leadingComments.push(cText);
12231
+ }
12173
12232
  i++;
12174
12233
  continue;
12175
12234
  }
@@ -12181,6 +12240,12 @@ function consumeValueNode(items, startIdx, text, sepOffset) {
12181
12240
  };
12182
12241
  break;
12183
12242
  }
12243
+ if (firstOwnLineIdx >= 0) return {
12244
+ node: null,
12245
+ nextIdx: firstOwnLineIdx,
12246
+ sameLineComments,
12247
+ leadingComments: []
12248
+ };
12184
12249
  return i > startIdx ? {
12185
12250
  node: null,
12186
12251
  nextIdx: i,
@@ -12199,10 +12264,12 @@ function consumeValueNode(items, startIdx, text, sepOffset) {
12199
12264
  */
12200
12265
  function consumeValueNodeForNullKey(items, startIdx, text, valueSepOffset) {
12201
12266
  let i = startIdx;
12267
+ let firstOwnLineIdx = -1;
12202
12268
  while (i < items.length) {
12203
12269
  const item = items[i];
12204
12270
  if (!item) break;
12205
12271
  if (item.kind === "comment") {
12272
+ if (firstOwnLineIdx < 0 && item.offset !== void 0 && !sameLineSpan(text, valueSepOffset, item.offset)) firstOwnLineIdx = i;
12206
12273
  i++;
12207
12274
  continue;
12208
12275
  }
@@ -12218,6 +12285,10 @@ function consumeValueNodeForNullKey(items, startIdx, text, valueSepOffset) {
12218
12285
  }
12219
12286
  break;
12220
12287
  }
12288
+ if (firstOwnLineIdx >= 0) return {
12289
+ node: null,
12290
+ nextIdx: firstOwnLineIdx
12291
+ };
12221
12292
  return i > startIdx ? {
12222
12293
  node: null,
12223
12294
  nextIdx: i
@@ -12823,7 +12894,7 @@ function composeFlatBlockMap(children, startIdx, parentCst, state, externalFirst
12823
12894
  return map;
12824
12895
  }
12825
12896
  //#endregion
12826
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/flow.js
12897
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/flow.js
12827
12898
  /**
12828
12899
  * Validate that flow collection entries are separated by commas.
12829
12900
  *
@@ -12895,7 +12966,7 @@ function validateFlowContentIndent(cst, state, parentBlockColumn) {
12895
12966
  i++;
12896
12967
  continue;
12897
12968
  }
12898
- if (i - lineStart <= parentBlockColumn) {
12969
+ if (i - lineStart <= parentBlockColumn && !isClosersOnly(text, i, end)) {
12899
12970
  state.errors.push({
12900
12971
  code: "InvalidIndentation",
12901
12972
  message: "Flow content continuation line must be indented past the parent block",
@@ -12909,6 +12980,26 @@ function validateFlowContentIndent(cst, state, parentBlockColumn) {
12909
12980
  i++;
12910
12981
  }
12911
12982
  }
12983
+ /**
12984
+ * True when everything from `start` to the end of that line (bounded by `end`)
12985
+ * is flow closing punctuation — `}`, `]`, separating commas and whitespace.
12986
+ * Such a line closes the collection rather than carrying content, so the
12987
+ * continuation-indent floor does not apply to it.
12988
+ */
12989
+ function isClosersOnly(text, start, end) {
12990
+ let sawCloser = false;
12991
+ for (let i = start; i < end && i < text.length; i++) {
12992
+ const ch = text[i];
12993
+ if (ch === "\n") break;
12994
+ if (ch === "}" || ch === "]") {
12995
+ sawCloser = true;
12996
+ continue;
12997
+ }
12998
+ if (ch === "," || ch === " " || ch === " " || ch === "\r") continue;
12999
+ return false;
13000
+ }
13001
+ return sawCloser;
13002
+ }
12912
13003
  function composeFlowMap(cst, state, meta, parentBlockColumn) {
12913
13004
  if (!enterNesting(state, cst)) return new YamlMap({
12914
13005
  items: [],
@@ -13287,7 +13378,7 @@ function composeFlowSeqInner(cst, state, meta, parentBlockColumn) {
13287
13378
  return seq;
13288
13379
  }
13289
13380
  //#endregion
13290
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/document.js
13381
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/document.js
13291
13382
  /** The flow-composer dispatch wired into every state this module creates. */
13292
13383
  const FLOW = {
13293
13384
  composeFlowMap,
@@ -13413,7 +13504,10 @@ function composeDocument(cst, state, hasSubsequentDocuments = false, nextDocCst)
13413
13504
  let documentComment;
13414
13505
  let documentCommentAfter;
13415
13506
  let lastLeadingCommentOffset = -1;
13507
+ let lastAfterMarkerCommentOffset = -1;
13416
13508
  let sawDocEndMarker = false;
13509
+ let sawDocStartMarker = false;
13510
+ let afterMarkerComment;
13417
13511
  const hasDocStart = children.some((c) => c.type === "whitespace" && c.source === "---");
13418
13512
  let i = 0;
13419
13513
  const meta = {};
@@ -13450,6 +13544,7 @@ function composeDocument(cst, state, hasSubsequentDocuments = false, nextDocCst)
13450
13544
  if (child.type === "newline" && hasMeta(meta)) sawNewlineSinceMeta = true;
13451
13545
  if (child.type === "whitespace" || child.type === "newline") {
13452
13546
  if (child.type === "whitespace" && child.source === "...") sawDocEndMarker = true;
13547
+ if (child.type === "whitespace" && child.source === "---") sawDocStartMarker = true;
13453
13548
  if (child.type === "whitespace" && (child.source === "]" || child.source === "}")) state.errors.push({
13454
13549
  code: "MalformedFlowCollection",
13455
13550
  message: `Unexpected flow indicator '${child.source}' at document level`,
@@ -13461,9 +13556,15 @@ function composeDocument(cst, state, hasSubsequentDocuments = false, nextDocCst)
13461
13556
  }
13462
13557
  if (child.type === "comment" && contents === null && !sawDocEndMarker) {
13463
13558
  const text = rawCommentText(child.source);
13464
- if (documentComment !== void 0 && hasBlankLineAbove(state.text, child.offset)) documentComment = `${documentComment}\n`;
13465
- documentComment = documentComment === void 0 ? text : `${documentComment}\n${text}`;
13466
- lastLeadingCommentOffset = child.offset;
13559
+ if (sawDocStartMarker) {
13560
+ if (afterMarkerComment !== void 0 && hasBlankLineAbove(state.text, child.offset)) afterMarkerComment = `${afterMarkerComment}\n`;
13561
+ afterMarkerComment = afterMarkerComment === void 0 ? text : `${afterMarkerComment}\n${text}`;
13562
+ lastAfterMarkerCommentOffset = child.offset;
13563
+ } else {
13564
+ if (documentComment !== void 0 && hasBlankLineAbove(state.text, child.offset)) documentComment = `${documentComment}\n`;
13565
+ documentComment = documentComment === void 0 ? text : `${documentComment}\n${text}`;
13566
+ lastLeadingCommentOffset = child.offset;
13567
+ }
13467
13568
  i++;
13468
13569
  continue;
13469
13570
  }
@@ -13690,17 +13791,32 @@ function composeDocument(cst, state, hasSubsequentDocuments = false, nextDocCst)
13690
13791
  }
13691
13792
  }
13692
13793
  if (documentComment !== void 0 && contents !== null && hasBlankLineBelow(state.text, lastLeadingCommentOffset)) documentComment = `${documentComment}\n`;
13794
+ if (afterMarkerComment !== void 0 && contents !== null && hasBlankLineBelow(state.text, lastAfterMarkerCommentOffset)) afterMarkerComment = `${afterMarkerComment}\n`;
13693
13795
  state.escapedComments.length = 0;
13796
+ if (documentCommentAfter === void 0 && contents !== null && contents.comment !== void 0) {
13797
+ if ((contents instanceof YamlMap || contents instanceof YamlSeq) && contents.style !== "flow") {
13798
+ documentCommentAfter = contents.comment;
13799
+ contents = stripOwnComment(contents);
13800
+ }
13801
+ }
13802
+ let headerForDocument;
13803
+ let decorated = contents;
13804
+ if (documentComment !== void 0) {
13805
+ if (hasDocStart || contents === null) headerForDocument = documentComment;
13806
+ else decorated = attachHeaderToFirstEntry(contents, documentComment);
13807
+ }
13808
+ if (afterMarkerComment !== void 0 && decorated !== null) decorated = withCommentFields(decorated, { commentBefore: afterMarkerComment });
13809
+ else if (afterMarkerComment !== void 0) headerForDocument = headerForDocument === void 0 ? afterMarkerComment : `${headerForDocument}\n${afterMarkerComment}`;
13694
13810
  return {
13695
- contents,
13811
+ contents: decorated,
13696
13812
  errors: [...state.errors],
13697
13813
  warnings: [...state.warnings],
13698
13814
  directives,
13699
13815
  hasDocumentStart: hasDocStart,
13700
13816
  hasDocumentEnd: hasDocEnd,
13701
13817
  hasDocumentStartTab: hasDocStartTab,
13702
- ...documentComment !== void 0 ? { comment: documentComment } : {},
13703
- ...documentCommentAfter !== void 0 ? { commentAfter: documentCommentAfter } : {}
13818
+ ...headerForDocument !== void 0 ? { commentBefore: headerForDocument } : {},
13819
+ ...documentCommentAfter !== void 0 ? { comment: documentCommentAfter } : {}
13704
13820
  };
13705
13821
  }
13706
13822
  /**
@@ -13877,8 +13993,7 @@ function decorateSourceMultiline(node, text) {
13877
13993
  if (node instanceof YamlMap) {
13878
13994
  const newItems = node.items.map((pair) => new YamlPair({
13879
13995
  key: decorateSourceMultiline(pair.key, text) ?? pair.key,
13880
- value: pair.value === null ? null : decorateSourceMultiline(pair.value, text),
13881
- ...commentProps(pair)
13996
+ value: pair.value === null ? null : decorateSourceMultiline(pair.value, text)
13882
13997
  }));
13883
13998
  const multiline = isSourceMultiline(text, node.offset, node.length);
13884
13999
  return new YamlMap({
@@ -13916,8 +14031,8 @@ function decorateDocumentSourceMultiline(doc, text) {
13916
14031
  errors: doc.errors,
13917
14032
  warnings: doc.warnings,
13918
14033
  directives: doc.directives,
14034
+ ...doc.commentBefore !== void 0 ? { commentBefore: doc.commentBefore } : {},
13919
14035
  ...doc.comment !== void 0 ? { comment: doc.comment } : {},
13920
- ...doc.commentAfter !== void 0 ? { commentAfter: doc.commentAfter } : {},
13921
14036
  hasDocumentStart: doc.hasDocumentStart,
13922
14037
  hasDocumentEnd: doc.hasDocumentEnd,
13923
14038
  hasDocumentStartTab: doc.hasDocumentStartTab
@@ -13988,8 +14103,74 @@ function composeAllDocuments(text, options) {
13988
14103
  streamErrors: crossDocState.errors
13989
14104
  };
13990
14105
  }
14106
+ /**
14107
+ * Attach a marker-less document header to the FIRST entry of the content — the
14108
+ * first pair's key for a mapping, the first item for a sequence, the node
14109
+ * itself for a scalar. Without a `---` boundary the header is just the first
14110
+ * own-line comment in the document's item stream, so it forward-attributes
14111
+ * like any other.
14112
+ */
14113
+ function attachHeaderToFirstEntry(contents, header) {
14114
+ if (contents instanceof YamlMap && contents.items.length > 0) {
14115
+ const first = contents.items[0];
14116
+ const items = [...contents.items];
14117
+ items[0] = new YamlPair({
14118
+ key: withCommentFields(first.key, { commentBefore: header }),
14119
+ value: first.value
14120
+ });
14121
+ return new YamlMap({
14122
+ items,
14123
+ style: contents.style,
14124
+ ...contents.tag !== void 0 ? { tag: contents.tag } : {},
14125
+ ...contents.anchor !== void 0 ? { anchor: contents.anchor } : {},
14126
+ ...contents.commentBefore !== void 0 ? { commentBefore: contents.commentBefore } : {},
14127
+ ...contents.comment !== void 0 ? { comment: contents.comment } : {},
14128
+ ...contents.spaceBefore !== void 0 ? { spaceBefore: contents.spaceBefore } : {},
14129
+ ...contents.sourceMultiline !== void 0 ? { sourceMultiline: contents.sourceMultiline } : {},
14130
+ offset: contents.offset,
14131
+ length: contents.length
14132
+ });
14133
+ }
14134
+ if (contents instanceof YamlSeq && contents.items.length > 0) {
14135
+ const items = [...contents.items];
14136
+ items[0] = withCommentFields(items[0], { commentBefore: header });
14137
+ return new YamlSeq({
14138
+ items,
14139
+ style: contents.style,
14140
+ ...contents.tag !== void 0 ? { tag: contents.tag } : {},
14141
+ ...contents.anchor !== void 0 ? { anchor: contents.anchor } : {},
14142
+ ...contents.commentBefore !== void 0 ? { commentBefore: contents.commentBefore } : {},
14143
+ ...contents.comment !== void 0 ? { comment: contents.comment } : {},
14144
+ ...contents.spaceBefore !== void 0 ? { spaceBefore: contents.spaceBefore } : {},
14145
+ ...contents.sourceMultiline !== void 0 ? { sourceMultiline: contents.sourceMultiline } : {},
14146
+ offset: contents.offset,
14147
+ length: contents.length
14148
+ });
14149
+ }
14150
+ return withCommentFields(contents, { commentBefore: header });
14151
+ }
14152
+ /** Rebuild a collection without its own trailing `comment`. */
14153
+ function stripOwnComment(node) {
14154
+ const shared = {
14155
+ style: node.style,
14156
+ ...node.tag !== void 0 ? { tag: node.tag } : {},
14157
+ ...node.anchor !== void 0 ? { anchor: node.anchor } : {},
14158
+ ...node.commentBefore !== void 0 ? { commentBefore: node.commentBefore } : {},
14159
+ ...node.spaceBefore !== void 0 ? { spaceBefore: node.spaceBefore } : {},
14160
+ ...node.sourceMultiline !== void 0 ? { sourceMultiline: node.sourceMultiline } : {},
14161
+ offset: node.offset,
14162
+ length: node.length
14163
+ };
14164
+ return node instanceof YamlMap ? new YamlMap({
14165
+ items: node.items,
14166
+ ...shared
14167
+ }) : new YamlSeq({
14168
+ items: node.items,
14169
+ ...shared
14170
+ });
14171
+ }
13991
14172
  //#endregion
13992
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/fold.js
14173
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/fold.js
13993
14174
  /**
13994
14175
  * Column-based line folding for a single logical scalar line (YAML 1.2 flow
13995
14176
  * folding, §7.3 / §8.2.1). Breaks the content at "safe" single-space
@@ -14237,7 +14418,7 @@ function renderBlockFolded(s, indent, explicitChomp, explicitIndent) {
14237
14418
  return `>${indentIndicator}${chomp}\n${outputLines.join("\n")}`;
14238
14419
  }
14239
14420
  //#endregion
14240
- //#region ../../node_modules/.pnpm/@effected+yaml@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/stringifier.js
14421
+ //#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/stringifier.js
14241
14422
  /**
14242
14423
  * Thrown by the stringifier on its failure paths (circular references). The
14243
14424
  * facade catches this and materializes the public stringify error.
@@ -15273,7 +15454,7 @@ function deepEqualValues(a, b) {
15273
15454
  return false;
15274
15455
  }
15275
15456
  //#endregion
15276
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/internal/documents.js
15457
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/internal/documents.js
15277
15458
  /**
15278
15459
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
15279
15460
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -15343,7 +15524,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
15343
15524
  };
15344
15525
  });
15345
15526
  //#endregion
15346
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/internal/pnpm.js
15527
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/internal/pnpm.js
15347
15528
  const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
15348
15529
  specifier: effect.Schema.String,
15349
15530
  version: effect.Schema.String
@@ -15468,7 +15649,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
15468
15649
  };
15469
15650
  });
15470
15651
  //#endregion
15471
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/internal/yarn.js
15652
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/internal/yarn.js
15472
15653
  const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
15473
15654
  const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
15474
15655
  const YarnEntry = effect.Schema.Struct({
@@ -15591,7 +15772,7 @@ const cleanYarnDeps = (deps) => {
15591
15772
  return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
15592
15773
  };
15593
15774
  //#endregion
15594
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/Lockfile.js
15775
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/Lockfile.js
15595
15776
  const EMPTY_IMPORTERS = [];
15596
15777
  /**
15597
15778
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -15835,7 +16016,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
15835
16016
  }
15836
16017
  };
15837
16018
  //#endregion
15838
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._0858c2cd87fcfa2cb556a350de7e385b/node_modules/@effected/lockfiles/LockfileIntegrity.js
16019
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/LockfileIntegrity.js
15839
16020
  /**
15840
16021
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
15841
16022
  * lockfile against: a package name plus the four optional dependency maps.
@@ -18648,7 +18829,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
18648
18829
  }
18649
18830
  };
18650
18831
  //#endregion
18651
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspacePackage.js
18832
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspacePackage.js
18652
18833
  const EMPTY$1 = Object.freeze(Object.create(null));
18653
18834
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
18654
18835
  /**
@@ -19246,7 +19427,7 @@ var Walker$1 = class {
19246
19427
  static findRoot = findRoot$1;
19247
19428
  };
19248
19429
  //#endregion
19249
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceRoot.js
19430
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceRoot.js
19250
19431
  /**
19251
19432
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
19252
19433
  *
@@ -19433,7 +19614,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
19433
19614
  static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
19434
19615
  };
19435
19616
  //#endregion
19436
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/limits.js
19617
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/limits.js
19437
19618
  /**
19438
19619
  * Hard ceiling on directories the enumerator will visit for one pattern set.
19439
19620
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -19451,7 +19632,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
19451
19632
  */
19452
19633
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
19453
19634
  //#endregion
19454
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/traverse.js
19635
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/traverse.js
19455
19636
  /** Directory names never descended into. */
19456
19637
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
19457
19638
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -19541,7 +19722,7 @@ var Traversal = class {
19541
19722
  }
19542
19723
  };
19543
19724
  //#endregion
19544
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/enumerate.js
19725
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/enumerate.js
19545
19726
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
19546
19727
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
19547
19728
  /**
@@ -19611,7 +19792,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
19611
19792
  return results;
19612
19793
  });
19613
19794
  //#endregion
19614
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/patterns.js
19795
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/patterns.js
19615
19796
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
19616
19797
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
19617
19798
  const pnpmPatternsOf = (document) => {
@@ -19668,7 +19849,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
19668
19849
  return manifestPatternsOf(manifest);
19669
19850
  });
19670
19851
  //#endregion
19671
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceDiscovery.js
19852
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceDiscovery.js
19672
19853
  /**
19673
19854
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
19674
19855
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -20124,7 +20305,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
20124
20305
  };
20125
20306
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
20126
20307
  //#endregion
20127
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/DependencyGraph.js
20308
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/DependencyGraph.js
20128
20309
  /**
20129
20310
  * Raised when the workspace dependency graph cannot be topologically ordered
20130
20311
  * because it contains a cycle.
@@ -23820,7 +24001,7 @@ var Git = class Git extends effect.Context.Service()("@effected/git/Git") {
23820
24001
  static layerTest = (overrides = {}) => effect.Layer.succeed(Git, Git.makeTest(overrides));
23821
24002
  };
23822
24003
  //#endregion
23823
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/ChangeDetector.js
24004
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/ChangeDetector.js
23824
24005
  /**
23825
24006
  * Which git refs to compare, and whether to fold in the working tree.
23826
24007
  *
@@ -23954,7 +24135,7 @@ Object.freeze({
23954
24135
  npmjs: "https://registry.npmjs.org/"
23955
24136
  });
23956
24137
  //#endregion
23957
- //#region ../../node_modules/.pnpm/@pnpm+error@1100.1.1/node_modules/@pnpm/error/lib/index.js
24138
+ //#region ../../node_modules/.pnpm/@pnpm+error@1100.1.2/node_modules/@pnpm/error/lib/index.js
23958
24139
  var PnpmError = class extends Error {
23959
24140
  code;
23960
24141
  hint;
@@ -23969,7 +24150,7 @@ var PnpmError = class extends Error {
23969
24150
  }
23970
24151
  };
23971
24152
  //#endregion
23972
- //#region ../../node_modules/.pnpm/@pnpm+catalogs.config@1100.0.4/node_modules/@pnpm/catalogs.config/lib/getCatalogsFromWorkspaceManifest.js
24153
+ //#region ../../node_modules/.pnpm/@pnpm+catalogs.config@1100.0.5/node_modules/@pnpm/catalogs.config/lib/getCatalogsFromWorkspaceManifest.js
23973
24154
  function getCatalogsFromWorkspaceManifest(workspaceManifest) {
23974
24155
  if (workspaceManifest == null) return {};
23975
24156
  checkDefaultCatalogIsDefinedOnce(workspaceManifest);
@@ -23982,7 +24163,7 @@ function checkDefaultCatalogIsDefinedOnce(manifest) {
23982
24163
  if (manifest.catalog != null && manifest.catalogs?.default != null) throw new PnpmError("INVALID_CATALOGS_CONFIGURATION", "The 'default' catalog was defined multiple times. Use the 'catalog' field or 'catalogs.default', but not both.");
23983
24164
  }
23984
24165
  //#endregion
23985
- //#region ../../node_modules/.pnpm/@pnpm+catalogs.config@1100.0.4/node_modules/@pnpm/catalogs.config/lib/mergeCatalogs.js
24166
+ //#region ../../node_modules/.pnpm/@pnpm+catalogs.config@1100.0.5/node_modules/@pnpm/catalogs.config/lib/mergeCatalogs.js
23986
24167
  /**
23987
24168
  * Deep-merges catalog definitions, later arguments taking precedence over
23988
24169
  * earlier ones at the individual entry level. Use it to fold the catalog
@@ -24076,7 +24257,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
24076
24257
  };
24077
24258
  }
24078
24259
  //#endregion
24079
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/catalogs.js
24260
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/catalogs.js
24080
24261
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
24081
24262
  const inlineCatalogs = (manifest) => {
24082
24263
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -24140,7 +24321,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
24140
24321
  });
24141
24322
  };
24142
24323
  //#endregion
24143
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/ConfigDependencyHooks.js
24324
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/ConfigDependencyHooks.js
24144
24325
  /** Whether `value` is a non-null, non-array object. */
24145
24326
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
24146
24327
  /**
@@ -24554,7 +24735,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
24554
24735
  }));
24555
24736
  };
24556
24737
  //#endregion
24557
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/PackageManagerName.js
24738
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/PackageManagerName.js
24558
24739
  /**
24559
24740
  * The four package managers this package understands.
24560
24741
  *
@@ -24929,7 +25110,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
24929
25110
  static layerTest = (overrides = {}) => effect.Layer.succeed(PackageManagerDetector, PackageManagerDetector.makeTest(overrides));
24930
25111
  };
24931
25112
  //#endregion
24932
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/LockfileReader.js
25113
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/LockfileReader.js
24933
25114
  /**
24934
25115
  * Raised when the workspace's lockfile cannot be read off disk.
24935
25116
  *
@@ -25109,7 +25290,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
25109
25290
  static layerTest = (overrides = {}) => effect.Layer.succeed(LockfileReader, LockfileReader.makeTest(overrides));
25110
25291
  };
25111
25292
  //#endregion
25112
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/Publishability.js
25293
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/Publishability.js
25113
25294
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
25114
25295
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
25115
25296
  /**
@@ -25268,7 +25449,7 @@ var PublishabilityDetector = class extends effect.Context.Service()("@effected/w
25268
25449
  static layerNone = effect.Layer.succeed(this, this.none);
25269
25450
  };
25270
25451
  //#endregion
25271
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/importerVersions.js
25452
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/importerVersions.js
25272
25453
  /**
25273
25454
  * Strip pnpm's peer-disambiguation suffix from a recorded importer version.
25274
25455
  *
@@ -25354,7 +25535,7 @@ const unanimousVersionOf = (index, dependency) => {
25354
25535
  return agreed;
25355
25536
  };
25356
25537
  //#endregion
25357
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceCatalogs.js
25538
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceCatalogs.js
25358
25539
  /**
25359
25540
  * An immutable, fully-normalized catalog collection — the one catalog
25360
25541
  * resolution semantic in the package.
@@ -25881,7 +26062,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
25881
26062
  }));
25882
26063
  };
25883
26064
  //#endregion
25884
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
26065
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
25885
26066
  const EMPTY = Object.freeze(Object.create(null));
25886
26067
  const DependencyMap = effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY)));
25887
26068
  /**
@@ -26104,7 +26285,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
26104
26285
  }
26105
26286
  };
26106
26287
  //#endregion
26107
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceSnapshots.js
26288
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceSnapshots.js
26108
26289
  /** Whether `value` is a non-null, non-array object. */
26109
26290
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
26110
26291
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -26381,7 +26562,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
26381
26562
  static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceSnapshots, WorkspaceSnapshots.makeTest(overrides));
26382
26563
  };
26383
26564
  //#endregion
26384
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/Workspaces.js
26565
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/Workspaces.js
26385
26566
  const compose = (options, catalogsFactory) => {
26386
26567
  const roots = WorkspaceRoot.layer;
26387
26568
  const detector = PackageManagerDetector.layer;
@@ -52986,34 +53167,32 @@ var VersionFiles = class VersionFiles {
52986
53167
  * @returns Array of workspace packages with versions
52987
53168
  */
52988
53169
  static discoverVersions(cwd, packages) {
52989
- const resolvedCwd = (0, node_path.resolve)(cwd);
52990
- const results = [];
52991
- const seen = /* @__PURE__ */ new Set();
52992
- for (const pkg of packages) {
52993
- if (seen.has(pkg.path) || !pkg.version) continue;
52994
- seen.add(pkg.path);
52995
- results.push({
52996
- name: pkg.name,
52997
- path: pkg.path,
52998
- version: pkg.version
52999
- });
53000
- }
53001
- if (!seen.has(resolvedCwd)) {
53002
- const version = readPackageVersion(resolvedCwd);
53003
- if (version) {
53004
- let rootName = "root";
53005
- try {
53006
- const pkg = JSON.parse((0, node_fs.readFileSync)((0, node_path.join)(resolvedCwd, "package.json"), "utf-8"));
53007
- if (pkg.name) rootName = pkg.name;
53008
- } catch {}
53170
+ return effect.Effect.gen(function* () {
53171
+ const resolvedCwd = (0, node_path.resolve)(cwd);
53172
+ const results = [];
53173
+ const seen = /* @__PURE__ */ new Set();
53174
+ for (const pkg of packages) {
53175
+ if (seen.has(pkg.path) || !pkg.version) continue;
53176
+ seen.add(pkg.path);
53009
53177
  results.push({
53010
- name: rootName,
53011
- path: resolvedCwd,
53012
- version
53178
+ name: pkg.name,
53179
+ path: pkg.path,
53180
+ version: pkg.version
53013
53181
  });
53014
53182
  }
53015
- }
53016
- return results;
53183
+ if (!seen.has(resolvedCwd)) {
53184
+ const version = yield* readPackageVersion(resolvedCwd);
53185
+ if (version) {
53186
+ const rootName = yield* readPackageName(resolvedCwd);
53187
+ results.push({
53188
+ name: rootName,
53189
+ path: resolvedCwd,
53190
+ version
53191
+ });
53192
+ }
53193
+ }
53194
+ return results;
53195
+ });
53017
53196
  }
53018
53197
  /**
53019
53198
  * Determine which workspace version applies to a given file path
@@ -53108,16 +53287,19 @@ var VersionFiles = class VersionFiles {
53108
53287
  * @see {@link VersionFiles.applyVersionEdit} for the per-path edit
53109
53288
  */
53110
53289
  static updateFile(filePath, jsonPaths, version) {
53111
- const original = (0, node_fs.readFileSync)(filePath, "utf-8");
53112
- const { content, previousValues, totalChanged } = VersionFiles.computeUpdate(original, jsonPaths, version);
53113
- if (totalChanged === 0) return;
53114
- (0, node_fs.writeFileSync)(filePath, content, "utf-8");
53115
- return {
53116
- filePath,
53117
- jsonPaths,
53118
- version,
53119
- previousValues
53120
- };
53290
+ return effect.Effect.gen(function* () {
53291
+ const fs = yield* effect.FileSystem.FileSystem;
53292
+ const original = yield* fs.readFileString(filePath);
53293
+ const { content, previousValues, totalChanged } = VersionFiles.computeUpdate(original, jsonPaths, version);
53294
+ if (totalChanged === 0) return;
53295
+ yield* fs.writeFileString(filePath, content);
53296
+ return {
53297
+ filePath,
53298
+ jsonPaths,
53299
+ version,
53300
+ previousValues
53301
+ };
53302
+ });
53121
53303
  }
53122
53304
  /**
53123
53305
  * Compute the full update for a document without touching the filesystem:
@@ -53214,30 +53396,15 @@ var VersionFiles = class VersionFiles {
53214
53396
  */
53215
53397
  static processVersionFiles(cwd, configs, dryRun = false, packages = []) {
53216
53398
  return effect.Effect.gen(function* () {
53217
- const workspaces = VersionFiles.discoverVersions(cwd, packages);
53399
+ const workspaces = yield* VersionFiles.discoverVersions(cwd, packages);
53218
53400
  const rootVersion = workspaces.find((ws) => ws.path === (0, node_path.resolve)(cwd))?.version ?? "0.0.0";
53219
53401
  const resolved = yield* VersionFiles.resolveGlobs(configs, cwd);
53220
53402
  const updates = [];
53221
53403
  for (const [filePath, config] of resolved) {
53222
53404
  const jsonPaths = config.paths ?? ["$.version"];
53223
53405
  const version = config.package ? workspaces.find((ws) => ws.name === config.package)?.version ?? rootVersion : VersionFiles.resolveVersion(filePath, workspaces, rootVersion);
53224
- try {
53225
- if (dryRun) {
53226
- const content = (0, node_fs.readFileSync)(filePath, "utf-8");
53227
- const { previousValues, totalChanged } = VersionFiles.computeUpdate(content, jsonPaths, version);
53228
- if (totalChanged > 0) updates.push({
53229
- filePath,
53230
- jsonPaths,
53231
- version,
53232
- previousValues
53233
- });
53234
- } else {
53235
- const result = VersionFiles.updateFile(filePath, jsonPaths, version);
53236
- if (result) updates.push(result);
53237
- }
53238
- } catch (error) {
53239
- throw new Error(`Failed to update ${filePath}: ${error instanceof Error ? error.message : String(error)}`);
53240
- }
53406
+ const result = yield* VersionFiles.applyOne(filePath, jsonPaths, version, dryRun).pipe(effect.Effect.orDie);
53407
+ if (result) updates.push(result);
53241
53408
  }
53242
53409
  return updates;
53243
53410
  });
@@ -53264,28 +53431,61 @@ var VersionFiles = class VersionFiles {
53264
53431
  * @internal
53265
53432
  */
53266
53433
  static processResolvedVersionFiles(scopes, dryRun = false) {
53267
- const updates = [];
53268
- for (const scope of scopes) for (const vf of scope.versionFiles) {
53269
- const jsonPaths = vf.paths.length > 0 ? vf.paths : ["$.version"];
53270
- for (const filePath of vf.matchedFiles) try {
53271
- if (dryRun) {
53272
- const content = (0, node_fs.readFileSync)(filePath, "utf-8");
53273
- const { previousValues, totalChanged } = VersionFiles.computeUpdate(content, jsonPaths, scope.version);
53274
- if (totalChanged > 0) updates.push({
53275
- filePath,
53276
- jsonPaths,
53277
- version: scope.version,
53278
- previousValues
53279
- });
53280
- } else {
53281
- const result = VersionFiles.updateFile(filePath, jsonPaths, scope.version);
53434
+ return effect.Effect.gen(function* () {
53435
+ const updates = [];
53436
+ for (const scope of scopes) for (const vf of scope.versionFiles) {
53437
+ const jsonPaths = vf.paths.length > 0 ? vf.paths : ["$.version"];
53438
+ for (const filePath of vf.matchedFiles) {
53439
+ const result = yield* VersionFiles.applyOne(filePath, jsonPaths, scope.version, dryRun);
53282
53440
  if (result) updates.push(result);
53283
53441
  }
53284
- } catch (error) {
53285
- throw new Error(`Failed to update ${filePath}: ${error instanceof Error ? error.message : String(error)}`);
53286
53442
  }
53443
+ return updates;
53444
+ });
53445
+ }
53446
+ /**
53447
+ * Apply one version file's update, shared by both process entry points.
53448
+ *
53449
+ * @remarks
53450
+ * Fails TYPED with `VersionFileError`, carrying the offending `filePath`. The two callers then
53451
+ * choose their own posture, which is not the same and must not be unified:
53452
+ * {@link VersionFiles.processVersionFiles} (legacy) turns it into a DEFECT,
53453
+ * matching the synchronous throw it had under `node:fs`, while
53454
+ * {@link VersionFiles.processResolvedVersionFiles} leaves it typed because
53455
+ * `ReleasePlanner.apply` converts it to a `ReleasePlanError` — a defect there
53456
+ * would bypass the inspector's catch and crash `apply()`.
53457
+ *
53458
+ * @internal
53459
+ */
53460
+ static applyOne(filePath, jsonPaths, version, dryRun) {
53461
+ return effect.Effect.gen(function* () {
53462
+ if (dryRun) {
53463
+ const content = yield* (yield* effect.FileSystem.FileSystem).readFileString(filePath);
53464
+ const { previousValues, totalChanged } = VersionFiles.computeUpdate(content, jsonPaths, version);
53465
+ return totalChanged > 0 ? {
53466
+ filePath,
53467
+ jsonPaths,
53468
+ version,
53469
+ previousValues
53470
+ } : void 0;
53471
+ }
53472
+ return yield* VersionFiles.updateFile(filePath, jsonPaths, version);
53473
+ }).pipe(effect.Effect.mapError((error) => new VersionFileError({
53474
+ filePath,
53475
+ reason: VersionFiles.describeFailure(error)
53476
+ })), effect.Effect.catchDefect((defect) => effect.Effect.fail(new VersionFileError({
53477
+ filePath,
53478
+ reason: VersionFiles.describeFailure(defect)
53479
+ }))));
53480
+ }
53481
+ /** Render a `PlatformError` the way the old `node:fs` catch rendered an `Error`. */
53482
+ static describeFailure(error) {
53483
+ if (typeof error === "object" && error !== null) {
53484
+ const e = error;
53485
+ if (typeof e.message === "string") return e.message;
53486
+ if (typeof e.reason === "string") return e.reason;
53287
53487
  }
53288
- return updates;
53488
+ return String(error);
53289
53489
  }
53290
53490
  };
53291
53491
  /**
@@ -53334,12 +53534,32 @@ function expandGlob(source, cwd) {
53334
53534
  *
53335
53535
  * @internal
53336
53536
  */
53537
+ /**
53538
+ * Read the `name` field from a `package.json` in the given directory, falling
53539
+ * back to `"root"` when it is absent, unreadable, or malformed.
53540
+ *
53541
+ * @param dir - Absolute path to the directory containing `package.json`
53542
+ * @returns The package name, or `"root"`
53543
+ *
53544
+ * @internal
53545
+ */
53546
+ function readPackageName(dir) {
53547
+ return effect.Effect.gen(function* () {
53548
+ const raw = yield* (yield* effect.FileSystem.FileSystem).readFileString((0, node_path.join)(dir, "package.json"));
53549
+ return yield* effect.Effect.try({
53550
+ try: () => JSON.parse(raw).name,
53551
+ catch: (e) => e
53552
+ });
53553
+ }).pipe(effect.Effect.map((name) => name ?? "root"), effect.Effect.orElseSucceed(() => "root"));
53554
+ }
53337
53555
  function readPackageVersion(dir) {
53338
- try {
53339
- return JSON.parse((0, node_fs.readFileSync)((0, node_path.join)(dir, "package.json"), "utf-8")).version;
53340
- } catch {
53341
- return;
53342
- }
53556
+ return effect.Effect.gen(function* () {
53557
+ const raw = yield* (yield* effect.FileSystem.FileSystem).readFileString((0, node_path.join)(dir, "package.json"));
53558
+ return yield* effect.Effect.try({
53559
+ try: () => JSON.parse(raw).version,
53560
+ catch: (e) => e
53561
+ });
53562
+ }).pipe(effect.Effect.orElseSucceed(() => void 0));
53343
53563
  }
53344
53564
  //#endregion
53345
53565
  //#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.5/node_modules/fdir/dist/index.mjs
@@ -70078,13 +70298,10 @@ function applyEffect(root, dryRun, changelogModules, inspector, fs) {
70078
70298
  version: fresh
70079
70299
  } : p;
70080
70300
  });
70081
- versionFileUpdates = yield* effect.Effect.try({
70082
- try: () => scopes.length > 0 ? VersionFiles.processResolvedVersionFiles(scopes, dryRun) : [],
70083
- catch: (e) => new ReleasePlanError({
70084
- phase: "apply",
70085
- reason: errMsg(e)
70086
- })
70087
- });
70301
+ versionFileUpdates = scopes.length > 0 ? yield* VersionFiles.processResolvedVersionFiles(scopes, dryRun).pipe(effect.Effect.provideService(effect.FileSystem.FileSystem, fs), effect.Effect.mapError((e) => new ReleasePlanError({
70302
+ phase: "apply",
70303
+ reason: errMsg(e)
70304
+ }))) : [];
70088
70305
  }
70089
70306
  return {
70090
70307
  dryRun,