@inixiative/config 0.2.1 → 0.3.0

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/dist/cli.js CHANGED
@@ -576,7 +576,8 @@ if (command === "train") {
576
576
  bump.fix?.();
577
577
  }
578
578
  inspection.flush();
579
- let touched = bumps.length > 0;
579
+ const bumped = bumps.length > 0;
580
+ const staleLock = inspection.findings.some((finding) => finding.kind === "stale-lock");
580
581
  const remote = spawnSync2("npm", ["view", `${repo.name}@latest`, "version"], {
581
582
  encoding: "utf8"
582
583
  });
@@ -588,7 +589,7 @@ if (command === "train") {
588
589
  skipped.push(repo.name);
589
590
  continue;
590
591
  }
591
- if (touched || ahead) {
592
+ if (bumped || ahead || staleLock) {
592
593
  const install = spawnSync2("bun", ["install"], { cwd: repo.dir, stdio: "inherit" });
593
594
  if (install.status !== 0) {
594
595
  console.error("\u2717 bun install failed \u2014 aborting train");
@@ -597,7 +598,6 @@ if (command === "train") {
597
598
  const stale = inspect(repo.dir, manifest).findings.filter((finding) => finding.kind === "stale-lock" && finding.name).map((finding) => finding.name);
598
599
  if (stale.length > 0) {
599
600
  spawnSync2("bun", ["update", ...new Set(stale)], { cwd: repo.dir, stdio: "inherit" });
600
- touched = true;
601
601
  }
602
602
  const check = spawnSync2("bun", ["run", "check"], { cwd: repo.dir, stdio: "inherit" });
603
603
  if (check.status !== 0) {
@@ -605,7 +605,11 @@ if (command === "train") {
605
605
  process.exit(1);
606
606
  }
607
607
  }
608
- if (touched) {
608
+ const mutated = spawnSync2("git", ["status", "--porcelain", "package.json", "bun.lock"], {
609
+ cwd: repo.dir,
610
+ encoding: "utf8"
611
+ });
612
+ if (mutated.status === 0 && mutated.stdout.trim().length > 0) {
609
613
  spawnSync2("git", ["add", "package.json", "bun.lock"], { cwd: repo.dir });
610
614
  const commit = spawnSync2(
611
615
  "git",
@@ -668,4 +672,8 @@ if (!flags.has("--no-install")) {
668
672
  }
669
673
  }
670
674
  var final = inspect(dir, manifest, presetFlag);
671
- process.exit(report(final.findings) > 0 ? 1 : 0);
675
+ var remaining = final.findings.filter((finding) => finding.fix);
676
+ for (const finding of remaining) finding.fix?.();
677
+ final.flush();
678
+ var settled = remaining.length > 0 ? inspect(dir, manifest, presetFlag) : final;
679
+ process.exit(report(settled.findings) > 0 ? 1 : 0);
package/dist/tsup.js CHANGED
@@ -8,12 +8,13 @@ var base = {
8
8
  sourcemap: true,
9
9
  clean: true
10
10
  };
11
- var node = (options = {}) => defineConfig({ ...base, ...options });
11
+ var withDts = (options) => options.dts === true ? { ...options, dts: base.dts } : options;
12
+ var node = (options = {}) => defineConfig({ ...base, ...withDts(options) });
12
13
  var react = (options = {}) => {
13
14
  const external = Array.isArray(options.external) ? options.external : [];
14
15
  return defineConfig({
15
16
  ...base,
16
- ...options,
17
+ ...withDts(options),
17
18
  external: [.../* @__PURE__ */ new Set(["react", "react-dom", "react/jsx-runtime", ...external])]
18
19
  });
19
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inixiative/config",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Shared toolchain for the inixiative ecosystem: tsconfig/biome/tsup presets, a version manifest (BOM), and a sync/check CLI",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/versions.json CHANGED
@@ -7,13 +7,17 @@
7
7
  "@types/bun": "1.3.14",
8
8
  "lefthook": "2.1.9"
9
9
  },
10
- "required": ["@biomejs/biome", "typescript", "@types/bun"],
10
+ "required": [
11
+ "@biomejs/biome",
12
+ "typescript",
13
+ "@types/bun"
14
+ ],
11
15
  "ecosystem": {
12
- "@inixiative/json-rules": "2.12.1",
13
- "@inixiative/permissions": "0.3.1",
14
- "@inixiative/transitions": "0.0.3",
15
- "@inixiative/rules-builder": "0.13.0",
16
+ "@inixiative/json-rules": "2.13.0",
17
+ "@inixiative/permissions": "0.3.2",
18
+ "@inixiative/transitions": "0.1.0",
19
+ "@inixiative/rules-builder": "0.14.0",
16
20
  "@inixiative/prisma-map": "0.1.0",
17
- "@inixiative/atlas": "0.1.0"
21
+ "@inixiative/atlas": "0.1.1"
18
22
  }
19
23
  }