chiefwiggum 1.3.22 → 1.3.24

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/cli.cjs +39 -4
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -626,14 +626,27 @@ async function cmdLoop() {
626
626
  var __dirname = (0, import_node_path2.dirname)((0, import_node_url.fileURLToPath)(importMetaUrl));
627
627
  var LOCAL_TEMPLATES_DIR = ".chiefwiggum/templates";
628
628
  var CONFIG_FILE = ".chiefwiggum/CLAUDE.md";
629
+ function stripTrailingCommas(json) {
630
+ return json.replace(/,(\s*[}\]])/g, "$1");
631
+ }
629
632
  function getConfig() {
630
633
  if (!(0, import_node_fs3.existsSync)(CONFIG_FILE)) {
631
634
  return { projectTracker: "todo" };
632
635
  }
636
+ const raw = (0, import_node_fs3.readFileSync)(CONFIG_FILE, "utf-8");
633
637
  try {
634
- return JSON.parse((0, import_node_fs3.readFileSync)(CONFIG_FILE, "utf-8"));
638
+ return JSON.parse(raw);
635
639
  } catch {
636
- return { projectTracker: "todo" };
640
+ try {
641
+ const fixed = stripTrailingCommas(raw);
642
+ const config2 = JSON.parse(fixed);
643
+ console.log(import_picocolors7.default.yellow("Note: Fixed trailing comma in config file."));
644
+ saveConfig(config2);
645
+ return config2;
646
+ } catch {
647
+ console.log(import_picocolors7.default.yellow("Warning: Could not parse config file. Using defaults."));
648
+ return { projectTracker: "todo" };
649
+ }
637
650
  }
638
651
  }
639
652
  function saveConfig(config2) {
@@ -1196,6 +1209,15 @@ Create 5-15 issues.${projectName ? ` Add each to project "${projectName}".` : ""
1196
1209
  const projects = JSON.parse(projectsOutput);
1197
1210
  const project = projects.projects?.find((p2) => p2.title === projectName);
1198
1211
  projectNumber = project?.number?.toString() || null;
1212
+ if (projectNumber) {
1213
+ try {
1214
+ (0, import_node_child_process6.execSync)(
1215
+ `gh project link ${projectNumber} --owner ${repoName.split("/")[0]} --repo ${repoName}`,
1216
+ { stdio: ["pipe", "pipe", "pipe"] }
1217
+ );
1218
+ } catch {
1219
+ }
1220
+ }
1199
1221
  } catch {
1200
1222
  }
1201
1223
  }
@@ -1342,14 +1364,27 @@ var import_node_fs5 = require("fs");
1342
1364
  var import_node_child_process7 = require("child_process");
1343
1365
  var import_picocolors9 = __toESM(require("picocolors"), 1);
1344
1366
  var CONFIG_FILE2 = ".chiefwiggum/CLAUDE.md";
1367
+ function stripTrailingCommas2(json) {
1368
+ return json.replace(/,(\s*[}\]])/g, "$1");
1369
+ }
1345
1370
  function getConfig2() {
1346
1371
  if (!(0, import_node_fs5.existsSync)(CONFIG_FILE2)) {
1347
1372
  return { projectTracker: "todo" };
1348
1373
  }
1374
+ const raw = (0, import_node_fs5.readFileSync)(CONFIG_FILE2, "utf-8");
1349
1375
  try {
1350
- return JSON.parse((0, import_node_fs5.readFileSync)(CONFIG_FILE2, "utf-8"));
1376
+ return JSON.parse(raw);
1351
1377
  } catch {
1352
- return { projectTracker: "todo" };
1378
+ try {
1379
+ const fixed = stripTrailingCommas2(raw);
1380
+ const config2 = JSON.parse(fixed);
1381
+ console.log(import_picocolors9.default.yellow("Note: Fixed trailing comma in config file."));
1382
+ saveConfig2(config2);
1383
+ return config2;
1384
+ } catch {
1385
+ console.log(import_picocolors9.default.yellow("Warning: Could not parse config file. Using defaults."));
1386
+ return { projectTracker: "todo" };
1387
+ }
1353
1388
  }
1354
1389
  }
1355
1390
  function saveConfig2(config2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chiefwiggum",
3
- "version": "1.3.22",
3
+ "version": "1.3.24",
4
4
  "description": "Autonomous coding agent CLI. Point it at a plan, watch it build.",
5
5
  "type": "module",
6
6
  "bin": {