@bensandee/tooling 0.84.1 → 0.84.3

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/bin.mjs +23 -16
  2. package/package.json +1 -1
package/dist/bin.mjs CHANGED
@@ -269,7 +269,7 @@ function loadEnvFileForBin(rawArgs, bin, io = processIo) {
269
269
  */
270
270
  const envFileLoad = loadEnvFileForBin(process.argv.slice(2), {
271
271
  name: "bst",
272
- version: "0.84.1"
272
+ version: "0.84.3"
273
273
  });
274
274
  //#endregion
275
275
  //#region ../cli-kit/src/logger.ts
@@ -5777,8 +5777,8 @@ function declaredPublishRegistries(targetDir, structure, rootPackageJson) {
5777
5777
  * shape of custom regex manager in the root `renovate.json` can rewrite both this version and this
5778
5778
  * digest (`customManagers` entries scoped to this file).
5779
5779
  */
5780
- const MISE_VERSION = "2026.9.18";
5781
- const MISE_LINUX_X64_SHA256 = "d24fe0bf7e613824ad99f7b8dac3f2b381a37b9f75f84dd250855217095a8de4";
5780
+ const MISE_VERSION = "2026.10.0";
5781
+ const MISE_LINUX_X64_SHA256 = "57ced973f968b8fbab07aa8e32bd7077d4a357e200a22356d98963c723c6de0a";
5782
5782
  /** Where generated Forgejo workflows fetch the shared mise setup action: a composite action in
5783
5783
  * `bensandee/common`, on the forge every fleet repo lives on. GitHub cannot reach it; the
5784
5784
  * generators keep inline steps there. */
@@ -7163,7 +7163,7 @@ function buildManagedDevDeps(ctx) {
7163
7163
  const devDeps = { ...rootDevDeps(ctx.config) };
7164
7164
  if (!isMonorepo) Object.assign(devDeps, perPackageDevDeps(ctx.config));
7165
7165
  if (ctx.config.stack !== "none" || ctx.config.ci === "forgejo") devDeps["@bensandee/config"] = isWorkspacePackage(ctx, "@bensandee/config") ? "workspace:*" : "0.14.5";
7166
- if (!isWorkspacePackage(ctx, "@bensandee/tooling")) devDeps["@bensandee/tooling"] = "0.84.1";
7166
+ if (!isWorkspacePackage(ctx, "@bensandee/tooling")) devDeps["@bensandee/tooling"] = "0.84.3";
7167
7167
  if (ctx.config.useEslintPlugin && ctx.config.stack !== "none") devDeps["@bensandee/eslint-plugin"] = isWorkspacePackage(ctx, "@bensandee/eslint-plugin") ? "workspace:*" : "0.15.2";
7168
7168
  if (ctx.config.formatter === "oxfmt") devDeps["oxfmt"] = {
7169
7169
  "@changesets/cli": "3.0.3",
@@ -12696,7 +12696,7 @@ function reportFailures(failed, command) {
12696
12696
  function generateMigratePrompt(results, config, detected) {
12697
12697
  const sections = [];
12698
12698
  const timestamp = (/* @__PURE__ */ new Date()).toISOString();
12699
- sections.push(`# Migration Prompt\n\n_Generated by \`@bensandee/tooling@0.84.1 repo:sync\` on ${timestamp}_\n`);
12699
+ sections.push(`# Migration Prompt\n\n_Generated by \`@bensandee/tooling@0.84.3 repo:sync\` on ${timestamp}_\n`);
12700
12700
  const changed = results.filter((r) => r.action === "created" || r.action === "updated" || r.action === "archived");
12701
12701
  if (changed.length > 0) {
12702
12702
  const items = changed.map((r) => {
@@ -25939,7 +25939,7 @@ async function refusalMessage(res) {
25939
25939
  try {
25940
25940
  const parsed = ErrorBodySchema.safeParse(JSON.parse(text));
25941
25941
  if (parsed.success) return parsed.data.message;
25942
- } catch {}
25942
+ } catch (_error) {}
25943
25943
  return text;
25944
25944
  }
25945
25945
  /** Delete one branch. The name is encoded per segment so `feat/a/b` keeps its slashes. */
@@ -26183,12 +26183,15 @@ function conventionalActiveDirs(exec) {
26183
26183
  * prefix replaced by the terminal verb (`docs/plan-foo.md` ->
26184
26184
  * `docs/retired/completed-foo.md`); anything else (a `plans`/`specs` dir doc,
26185
26185
  * date-prefixed superpowers plan or not) keeps its basename and moves to the
26186
- * sibling `retired/` directory. The single place `docs:retire` reads this
26187
- * convention from, so it can never drift from what `discoverPairs` expects.
26186
+ * sibling `retired/` directory. A doc already in a retired directory stays
26187
+ * where it is -- re-retiring one to add its retire paragraph once moved it a
26188
+ * level deeper, into `retired/retired/`. The single place `docs:retire` reads
26189
+ * this convention from, so it can never drift from what `discoverPairs` expects.
26188
26190
  */
26189
26191
  function retireDestination(src, verb) {
26190
26192
  const dir = path.posix.dirname(src);
26191
26193
  const base = path.posix.basename(src);
26194
+ if (RETIRED_DIR_NAMES$1.includes(path.posix.basename(dir))) return src;
26192
26195
  if (dir === DOCS_ROOT && LEGACY_ACTIVE_PATTERN.test(base)) return `${DOCS_ROOT}/${RETIRED_DIR}/${verb}-${base.slice(5)}`;
26193
26196
  return `${dir}/${RETIRED_DIR}/${base}`;
26194
26197
  }
@@ -26404,6 +26407,11 @@ function checkPair(exec, pair, config, opts) {
26404
26407
  * unquoted too) -- with two deliberate deviations: an empty value is allowed (a label alone
26405
26408
  * on its line, link on the next); no `i` flag (no lowercase `implements:` in this repo). */
26406
26409
  const IMPLEMENTS_LINE_RE = /^(?:(>[ \t]*)|[ \t]*)(?:\*\*)?Implements(?:\*\*)?:.*$/m;
26410
+ /** The fallback link line for a plan written in another format, which names its spec with a
26411
+ * `Spec:` label (`**Spec:** [...]` in the superpowers plan header) and no `Implements:` line.
26412
+ * Same shape as {@link IMPLEMENTS_LINE_RE}; read only when that one does not match, so a plan
26413
+ * carrying both is linked by its `Implements:` line alone. */
26414
+ const SPEC_LINE_RE = /^(?:(>[ \t]*)|[ \t]*)(?:\*\*)?Spec(?:\*\*)?:.*$/m;
26407
26415
  /**
26408
26416
  * The spec link(s) on a plan's `Implements:` block, if any -- not every relative link in the
26409
26417
  * body. A plan's prose routinely links other documents (a superseded spec, a design doc it
@@ -26417,7 +26425,7 @@ const IMPLEMENTS_LINE_RE = /^(?:(>[ \t]*)|[ \t]*)(?:\*\*)?Implements(?:\*\*)?:.*
26417
26425
  */
26418
26426
  function implementsLinkTargets(body, fileDir) {
26419
26427
  const scannable = stripCode(body);
26420
- const match = IMPLEMENTS_LINE_RE.exec(scannable);
26428
+ const match = IMPLEMENTS_LINE_RE.exec(scannable) ?? SPEC_LINE_RE.exec(scannable);
26421
26429
  if (match === null) return /* @__PURE__ */ new Set();
26422
26430
  const { lines: continuation } = continuationLines(scannable, match.index + match[0].length, match[1] !== void 0);
26423
26431
  const block = [match[0], ...continuation].join("\n");
@@ -27111,7 +27119,7 @@ function buildRelocatePlan(exec, moves) {
27111
27119
  for (const { from, to } of moves) {
27112
27120
  if (moveMap.has(from)) throw new FatalError(`docs:relocate: duplicate source ${from}`);
27113
27121
  moveMap.set(from, to);
27114
- if (exec.exists(from)) plannedMoves.push({
27122
+ if (exec.exists(from) && from !== to) plannedMoves.push({
27115
27123
  from,
27116
27124
  to,
27117
27125
  status: "pending"
@@ -27315,14 +27323,12 @@ const DATE_RE = /^\d{4}-\d{2}-\d{2}$/;
27315
27323
  function validateRetireArgs(exec, src, opts) {
27316
27324
  if (!isRetireVerb(opts.status)) throw new FatalError(`docs:retire: unrecognized --status "${opts.status}" (expected one of: ${RETIRE_VERBS.join(", ")})`);
27317
27325
  const verb = opts.status;
27318
- const date = opts.date ?? localToday(/* @__PURE__ */ new Date());
27319
- if (!DATE_RE.test(date)) throw new FatalError(`docs:retire: --date must be YYYY-MM-DD, got: ${date}`);
27326
+ if (opts.date !== void 0 && !DATE_RE.test(opts.date)) throw new FatalError(`docs:retire: --date must be YYYY-MM-DD, got: ${opts.date}`);
27320
27327
  if (!src.endsWith(".md")) throw new FatalError(`docs:retire: source must be a .md file: ${src}`);
27321
27328
  const dest = opts.dest !== void 0 ? path.posix.normalize(opts.dest) : retireDestination(src, verb);
27322
27329
  if (src !== dest && exec.exists(src) && exec.exists(dest)) throw new FatalError(`docs:retire: refusing to overwrite existing destination: ${dest}`);
27323
27330
  return {
27324
27331
  verb,
27325
- date,
27326
27332
  dest
27327
27333
  };
27328
27334
  }
@@ -27486,7 +27492,7 @@ function formatRetireLines(src, dest, relocatePlan, lifecycleSummary) {
27486
27492
  */
27487
27493
  function runDocsRetire(exec, src, opts) {
27488
27494
  const vc = { verbose: opts.verbose ?? false };
27489
- const { verb, date, dest } = validateRetireArgs(exec, src, opts);
27495
+ const { verb, dest } = validateRetireArgs(exec, src, opts);
27490
27496
  const relocatePlan = buildRelocatePlan(exec, [{
27491
27497
  from: src,
27492
27498
  to: dest
@@ -27496,6 +27502,7 @@ function runDocsRetire(exec, src, opts) {
27496
27502
  const relinkRewrite = relocatePlan.rewrites.find((r) => r.file === dest);
27497
27503
  const baseContent = relinkRewrite?.content ?? exec.readFile(move.status === "pending" ? src : dest);
27498
27504
  if (baseContent === void 0) throw new FatalError(`docs:retire: cannot read ${move.status === "pending" ? src : dest}`);
27505
+ const date = opts.date ?? datedStatusValue(baseContent) ?? localToday(/* @__PURE__ */ new Date());
27499
27506
  const { content: lifecycleContent, summary, edits: lifecycle } = applyLifecycleEdits(baseContent, dest, verb, date, opts.shipped);
27500
27507
  const delinked = delinkDocument(lifecycleContent, path.posix.dirname(dest));
27501
27508
  const finalContent = delinked.content;
@@ -27565,7 +27572,7 @@ const docsRetireCommand = defineCommand({
27565
27572
  },
27566
27573
  date: {
27567
27574
  type: "string",
27568
- description: "Retirement date, YYYY-MM-DD (defaults to today, local time)"
27575
+ description: "Retirement date, YYYY-MM-DD (defaults to the date of an existing terminal Status: line, else today, local time)"
27569
27576
  },
27570
27577
  shipped: {
27571
27578
  type: "string",
@@ -31255,7 +31262,7 @@ setForgejoLogger(log$1);
31255
31262
  * `local <sha>[-dirty]` otherwise -- so an artifact built from the working tree
31256
31263
  * can't pass itself off as the published release whose version it carries.
31257
31264
  */
31258
- const displayVersion = "0.84.1";
31265
+ const displayVersion = "0.84.3";
31259
31266
  /**
31260
31267
  * The registered `bst` subcommand map, exported so both the JSON entry path below (resolving a
31261
31268
  * command name before citty parses anything) and the coverage test (enumerating every
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bensandee/tooling",
3
- "version": "0.84.1",
3
+ "version": "0.84.3",
4
4
  "description": "CLI tool to bootstrap and maintain standardized TypeScript project tooling",
5
5
  "license": "MIT",
6
6
  "repository": {