@inixiative/config 0.2.1 → 0.3.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.
- package/dist/cli.js +17 -8
- package/dist/tsup.js +3 -2
- package/package.json +1 -1
- package/versions.json +10 -6
package/dist/cli.js
CHANGED
|
@@ -576,7 +576,8 @@ if (command === "train") {
|
|
|
576
576
|
bump.fix?.();
|
|
577
577
|
}
|
|
578
578
|
inspection.flush();
|
|
579
|
-
|
|
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,24 +589,28 @@ if (command === "train") {
|
|
|
588
589
|
skipped.push(repo.name);
|
|
589
590
|
continue;
|
|
590
591
|
}
|
|
591
|
-
if (
|
|
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");
|
|
595
596
|
process.exit(1);
|
|
596
597
|
}
|
|
597
598
|
const stale = inspect(repo.dir, manifest).findings.filter((finding) => finding.kind === "stale-lock" && finding.name).map((finding) => finding.name);
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}
|
|
599
|
+
spawnSync2("bun", ["update", "@inixiative/config", ...new Set(stale)], {
|
|
600
|
+
cwd: repo.dir,
|
|
601
|
+
stdio: "inherit"
|
|
602
|
+
});
|
|
602
603
|
const check = spawnSync2("bun", ["run", "check"], { cwd: repo.dir, stdio: "inherit" });
|
|
603
604
|
if (check.status !== 0) {
|
|
604
605
|
console.error(`\u2717 check failed in ${repo.name} \u2014 aborting train`);
|
|
605
606
|
process.exit(1);
|
|
606
607
|
}
|
|
607
608
|
}
|
|
608
|
-
|
|
609
|
+
const mutated = spawnSync2("git", ["status", "--porcelain", "package.json", "bun.lock"], {
|
|
610
|
+
cwd: repo.dir,
|
|
611
|
+
encoding: "utf8"
|
|
612
|
+
});
|
|
613
|
+
if (mutated.status === 0 && mutated.stdout.trim().length > 0) {
|
|
609
614
|
spawnSync2("git", ["add", "package.json", "bun.lock"], { cwd: repo.dir });
|
|
610
615
|
const commit = spawnSync2(
|
|
611
616
|
"git",
|
|
@@ -668,4 +673,8 @@ if (!flags.has("--no-install")) {
|
|
|
668
673
|
}
|
|
669
674
|
}
|
|
670
675
|
var final = inspect(dir, manifest, presetFlag);
|
|
671
|
-
|
|
676
|
+
var remaining = final.findings.filter((finding) => finding.fix);
|
|
677
|
+
for (const finding of remaining) finding.fix?.();
|
|
678
|
+
final.flush();
|
|
679
|
+
var settled = remaining.length > 0 ? inspect(dir, manifest, presetFlag) : final;
|
|
680
|
+
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
|
|
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
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": [
|
|
10
|
+
"required": [
|
|
11
|
+
"@biomejs/biome",
|
|
12
|
+
"typescript",
|
|
13
|
+
"@types/bun"
|
|
14
|
+
],
|
|
11
15
|
"ecosystem": {
|
|
12
|
-
"@inixiative/json-rules": "2.
|
|
13
|
-
"@inixiative/permissions": "0.3.
|
|
14
|
-
"@inixiative/transitions": "0.0
|
|
15
|
-
"@inixiative/rules-builder": "0.
|
|
16
|
+
"@inixiative/json-rules": "2.14.0",
|
|
17
|
+
"@inixiative/permissions": "0.3.2",
|
|
18
|
+
"@inixiative/transitions": "0.1.0",
|
|
19
|
+
"@inixiative/rules-builder": "0.14.1",
|
|
16
20
|
"@inixiative/prisma-map": "0.1.0",
|
|
17
|
-
"@inixiative/atlas": "0.1.
|
|
21
|
+
"@inixiative/atlas": "0.1.1"
|
|
18
22
|
}
|
|
19
23
|
}
|