@rtorcato/repo-tooling 3.7.0 → 3.7.1

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.
@@ -411,17 +411,22 @@ export function buildGhApplyCommands(state) {
411
411
  * on skip (no gh/auth/remote, or already compliant), logging the reason. Mirrors
412
412
  * the "no package.json found — skipping" fixer pattern. Read-only unless a delta
413
413
  * exists, so re-runs (walk-all hits it up to 3×) are safe.
414
+ *
415
+ * Reached from the `github-settings` fixer, so its advisories go to
416
+ * `console.error` for the same reason the fixers' do (#357): stdout carries the
417
+ * `--json` payload. #358 fixed the fixer files but not this one — it isn't a
418
+ * fixer file, it's just called by one.
414
419
  */
415
420
  export async function applyGithubSettings(dir, exec) {
416
421
  if (!(await fs.pathExists(path.join(dir, '.git')))) {
417
- console.log(chalk.gray(' skipped — not a git repository'));
422
+ console.error(chalk.gray(' skipped — not a git repository'));
418
423
  return [];
419
424
  }
420
425
  // Bind gh's cwd to the target dir so its repo resolution honors `-d` (#218).
421
426
  const gh = exec ?? ((args, stdin) => realGhExec(args, stdin, dir));
422
427
  const probe = await probeRepo(gh);
423
428
  if ('skip' in probe) {
424
- console.log(chalk.gray(` skipped — ${probe.skip}`));
429
+ console.error(chalk.gray(` skipped — ${probe.skip}`));
425
430
  return [];
426
431
  }
427
432
  const { info } = probe;
@@ -442,7 +447,7 @@ export async function applyGithubSettings(dir, exec) {
442
447
  if (r.ok)
443
448
  applied.push(cmd.label);
444
449
  else
445
- console.log(chalk.yellow(` could not apply ${cmd.label}: ${r.stderr.trim() || 'gh error'}`));
450
+ console.error(chalk.yellow(` could not apply ${cmd.label}: ${r.stderr.trim() || 'gh error'}`));
446
451
  }
447
452
  // Code-scanning ruleset (#269): POST only when CodeQL is on and no active gate
448
453
  // covers the default branch — the check re-read keeps this idempotent.
@@ -453,9 +458,9 @@ export async function applyGithubSettings(dir, exec) {
453
458
  if (r.ok)
454
459
  applied.push(label);
455
460
  else
456
- console.log(chalk.yellow(` could not apply ${label}: ${r.stderr.trim() || 'gh error'}`));
461
+ console.error(chalk.yellow(` could not apply ${label}: ${r.stderr.trim() || 'gh error'}`));
457
462
  }
458
463
  if (applied.length === 0)
459
- console.log(chalk.gray(' already configured — nothing to apply'));
464
+ console.error(chalk.gray(' already configured — nothing to apply'));
460
465
  return applied;
461
466
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtorcato/repo-tooling",
3
- "version": "3.7.0",
3
+ "version": "3.7.1",
4
4
  "description": "One CLI to scaffold, audit and fix your repo's whole toolchain — linting, tests, commits, releases & CI.",
5
5
  "type": "module",
6
6
  "keywords": [