@codedrifters/configulator 0.0.390 → 0.0.392

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/lib/index.js CHANGED
@@ -15024,8 +15024,9 @@ function renderUnblockDependentsSection(ud) {
15024
15024
  "",
15025
15025
  "1. Searches open issues for `Depends on: #<closed>` references in",
15026
15026
  " their body.",
15027
- "2. For each match, re-reads every dependency listed in the",
15028
- " `Depends on:` line and checks whether they are all closed.",
15027
+ "2. For each match, re-reads every dependency listed across",
15028
+ " **all** `Depends on:` lines in the body (bodies routinely list",
15029
+ " one dependency per line) and checks whether they are all closed.",
15029
15030
  "3. If **all** dependencies are closed, flips the dependent from",
15030
15031
  " `status:blocked` to `status:ready` and posts a one-line comment",
15031
15032
  " citing the resolving issue.",
@@ -15164,14 +15165,17 @@ function renderUnblockDependentsScript(ud) {
15164
15165
  "",
15165
15166
  "# \u2500\u2500 helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
15166
15167
  "",
15167
- '# Extract issue numbers from a "Depends on:" line.',
15168
- '# Returns space-separated numbers, or empty string for "(none)".',
15168
+ '# Extract issue numbers from a "Depends on:" text. The argument may be a',
15169
+ '# single line ("Depends on: #1, #2, #3") OR several Depends-on lines',
15170
+ "# joined into one string: bodies routinely list one dependency per line",
15171
+ "# (issue #881), so callers union every matching line before calling this.",
15172
+ "# Returns the space-separated union of every #<n> reference, or an empty",
15173
+ '# string when the text has no concrete references (e.g. a lone "(none)"',
15174
+ '# sentinel). References are extracted directly, so a stray "(none)"',
15175
+ "# concatenated with a real dep line never suppresses the real dependency",
15176
+ "# \u2014 only reference-free text counts as having no dependencies.",
15169
15177
  "parse_deps() {",
15170
15178
  ' local line="$1"',
15171
- ` if echo "$line" | grep -qi '(none)'; then`,
15172
- ' echo ""',
15173
- " return",
15174
- " fi",
15175
15179
  ` echo "$line" | grep -oE '#[0-9]+' | tr -d '#' | tr '\\n' ' ' || echo ""`,
15176
15180
  "}",
15177
15181
  "",
@@ -15228,11 +15232,12 @@ function renderUnblockDependentsScript(ud) {
15228
15232
  " exit 0",
15229
15233
  "fi",
15230
15234
  "",
15231
- "# Extract the `Depends on:` line per candidate and stream as",
15232
- "# tab-separated number / title / dep-line tuples.",
15235
+ "# Union every `Depends on:` line per candidate (a body may list one",
15236
+ "# dependency per line) into a single space-joined dep string and stream",
15237
+ "# as tab-separated number / title / dep-line tuples.",
15233
15238
  `matches=$(echo "$dependents" | jq -r '`,
15234
15239
  " .[] |",
15235
- ' (.body | split("\\n") | map(select(test("Depends on:"; "i"))) | .[0] // "") as $dep_line |',
15240
+ ' (.body | split("\\n") | map(select(test("Depends on:"; "i"))) | join(" ")) as $dep_line |',
15236
15241
  ' "\\(.number)\\t\\(.title)\\t\\($dep_line)"',
15237
15242
  "')",
15238
15243
  "",
@@ -15404,14 +15409,17 @@ function buildCheckBlockedScript(tiers, scopeGate, _runRatio) {
15404
15409
  "",
15405
15410
  "# \u2500\u2500 helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
15406
15411
  "",
15407
- '# Extract issue numbers from a "Depends on:" line.',
15408
- '# Returns space-separated numbers, or empty string for "(none)".',
15412
+ '# Extract issue numbers from a "Depends on:" text. The argument may be a',
15413
+ '# single line ("Depends on: #1, #2, #3") OR several Depends-on lines',
15414
+ "# joined into one string: bodies routinely list one dependency per line",
15415
+ "# (issue #881), so callers union every matching line before calling this.",
15416
+ "# Returns the space-separated union of every #<n> reference, or an empty",
15417
+ '# string when the text has no concrete references (e.g. a lone "(none)"',
15418
+ '# sentinel). References are extracted directly, so a stray "(none)"',
15419
+ "# concatenated with a real dep line never suppresses the real dependency",
15420
+ "# \u2014 only reference-free text counts as having no dependencies.",
15409
15421
  "parse_deps() {",
15410
15422
  ' local line="$1"',
15411
- ` if echo "$line" | grep -qi '(none)'; then`,
15412
- ' echo ""',
15413
- " return",
15414
- " fi",
15415
15423
  ` echo "$line" | grep -oE '#[0-9]+' | tr -d '#' | tr '\\n' ' ' || echo ""`,
15416
15424
  "}",
15417
15425
  "",
@@ -15459,7 +15467,7 @@ function buildCheckBlockedScript(tiers, scopeGate, _runRatio) {
15459
15467
  " local issue_data",
15460
15468
  ` issue_data=$(echo "$issues" | jq -r '`,
15461
15469
  " .[] |",
15462
- ' (.body | split("\\n") | map(select(test("Depends on:"; "i"))) | .[0] // "") as $dep_line |',
15470
+ ' (.body | split("\\n") | map(select(test("Depends on:"; "i"))) | join(" ")) as $dep_line |',
15463
15471
  ' "\\(.number)\\t\\($dep_line)"',
15464
15472
  " ')",
15465
15473
  "",
@@ -15559,13 +15567,18 @@ function buildCheckBlockedScript(tiers, scopeGate, _runRatio) {
15559
15567
  " local issue_data",
15560
15568
  ` issue_data=$(echo "$issues" | jq -r '`,
15561
15569
  " .[] |",
15562
- ' (.body | split("\\n") | map(select(test("Depends on:"; "i"))) | .[0] // "") as $dep_line |',
15570
+ ' (.body | split("\\n") | map(select(test("Depends on:"; "i"))) | join(" ")) as $dep_line |',
15563
15571
  ' (.labels | map(.name) | map(select(startswith("type:"))) | .[0] // "") as $type_label |',
15564
- ' "\\(.number)\\t\\(.title)\\t\\($dep_line)\\t\\($type_label)"',
15572
+ ' "\\(.number)\\t\\(.title)\\t\\($type_label)\\t\\($dep_line)"',
15565
15573
  " ')",
15566
15574
  "",
15567
15575
  ' local results=""',
15568
- " while IFS=$'\\t' read -r num title dep_line type_label; do",
15576
+ " # Field order: number, title, type_label, dep_line. dep_line is the",
15577
+ " # only optional field, so it MUST stay last: an absent Depends-on line",
15578
+ " # yields an empty trailing field, whereas an empty non-last field",
15579
+ " # collapses under IFS=tab and shifts every later field left, dropping",
15580
+ " # type_label off the end (#884). Matches the cmd_stale blocked scan.",
15581
+ " while IFS=$'\\t' read -r num title type_label dep_line; do",
15569
15582
  ' [[ -z "$num" ]] && continue',
15570
15583
  "",
15571
15584
  ' local deps=""',
@@ -15659,7 +15672,7 @@ function buildCheckBlockedScript(tiers, scopeGate, _runRatio) {
15659
15672
  " local bl_data",
15660
15673
  ` bl_data=$(echo "$bl_issues" | jq -r '`,
15661
15674
  " .[] |",
15662
- ' (.body | split("\\n") | map(select(test("Depends on:"; "i"))) | .[0] // "") as $dep_line |',
15675
+ ' (.body | split("\\n") | map(select(test("Depends on:"; "i"))) | join(" ")) as $dep_line |',
15663
15676
  ' "\\(.number)\\t\\(.title)\\t\\(.updatedAt)\\t\\($dep_line)"',
15664
15677
  " ')",
15665
15678
  "",