@marktiderman/genesis-cli 1.12.0 → 1.12.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 +18 -7
- package/dist/cli.js.map +1 -1
- package/dist/doctor.js +18 -7
- package/dist/doctor.js.map +1 -1
- package/dist/genesis-catalog.json +10 -10
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/dist/vite.js +18 -7
- package/dist/vite.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packages": {
|
|
3
3
|
"@marktiderman/genesis-chat": {
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.2",
|
|
5
5
|
"blocks": {
|
|
6
6
|
"chat": {
|
|
7
7
|
"feature": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"@marktiderman/genesis-core": {
|
|
56
|
-
"version": "1.
|
|
56
|
+
"version": "1.12.0"
|
|
57
57
|
},
|
|
58
58
|
"@marktiderman/genesis-switchboard": {
|
|
59
59
|
"version": "2.1.0"
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"version": "0.2.0"
|
|
66
66
|
},
|
|
67
67
|
"@marktiderman/genesis-features": {
|
|
68
|
-
"version": "0.
|
|
68
|
+
"version": "0.6.0"
|
|
69
69
|
},
|
|
70
70
|
"@marktiderman/genesis-forms": {
|
|
71
71
|
"version": "0.9.2"
|
|
@@ -89,13 +89,13 @@
|
|
|
89
89
|
"version": "0.6.3"
|
|
90
90
|
},
|
|
91
91
|
"@marktiderman/genesis": {
|
|
92
|
-
"version": "0.9.
|
|
92
|
+
"version": "0.9.12"
|
|
93
93
|
},
|
|
94
94
|
"@marktiderman/genesis-cli": {
|
|
95
|
-
"version": "1.12.
|
|
95
|
+
"version": "1.12.1"
|
|
96
96
|
},
|
|
97
97
|
"@marktiderman/genesis-native": {
|
|
98
|
-
"version": "0.4.
|
|
98
|
+
"version": "0.4.4",
|
|
99
99
|
"blocks": {
|
|
100
100
|
"push": {
|
|
101
101
|
"feature": {
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
}
|
|
274
274
|
},
|
|
275
275
|
"@marktiderman/genesis-notifications": {
|
|
276
|
-
"version": "0.2.
|
|
276
|
+
"version": "0.2.2",
|
|
277
277
|
"blocks": {
|
|
278
278
|
"notifications": {
|
|
279
279
|
"feature": {
|
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
}
|
|
330
330
|
},
|
|
331
331
|
"@marktiderman/genesis-sites": {
|
|
332
|
-
"version": "0.3.
|
|
332
|
+
"version": "0.3.3",
|
|
333
333
|
"blocks": {
|
|
334
334
|
"sites": {
|
|
335
335
|
"feature": {
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
"version": "0.3.1"
|
|
380
380
|
},
|
|
381
381
|
"@marktiderman/genesis-supabase": {
|
|
382
|
-
"version": "0.6.
|
|
382
|
+
"version": "0.6.2",
|
|
383
383
|
"blocks": {
|
|
384
384
|
"account": {
|
|
385
385
|
"feature": {
|
|
@@ -511,7 +511,7 @@
|
|
|
511
511
|
}
|
|
512
512
|
},
|
|
513
513
|
"@marktiderman/genesis-support": {
|
|
514
|
-
"version": "0.2.
|
|
514
|
+
"version": "0.2.4",
|
|
515
515
|
"blocks": {
|
|
516
516
|
"support-feedback": {
|
|
517
517
|
"feature": {
|
package/dist/index.js
CHANGED
|
@@ -1795,7 +1795,9 @@ ${globs.join("\n")}`;
|
|
|
1795
1795
|
for (const dir of [...dirs].sort()) {
|
|
1796
1796
|
const manifest = path14.join(dir, "package.json");
|
|
1797
1797
|
if (!existsSync(manifest)) continue;
|
|
1798
|
-
if (!inside(real2, realpathSync(dir)))
|
|
1798
|
+
if (!inside(real2, realpathSync(dir))) {
|
|
1799
|
+
throw new LocalPackagesError(`${path14.relative(appRoot, dir) || dir} is outside the repository; localPackages may only list folders inside it`);
|
|
1800
|
+
}
|
|
1799
1801
|
let pkg;
|
|
1800
1802
|
try {
|
|
1801
1803
|
pkg = JSON.parse(readFileSync(manifest, "utf8"));
|
|
@@ -3313,7 +3315,7 @@ var SOURCE = /\.(?:[cm]?[jt]sx?)$/;
|
|
|
3313
3315
|
var SKIP_DIRS2 = /* @__PURE__ */ new Set(["node_modules", "dist", "build", "coverage", ".turbo"]);
|
|
3314
3316
|
var BUILTINS = new Set(builtinModules.flatMap((m) => [m, `node:${m}`]));
|
|
3315
3317
|
var IMPORT = /(?:\bfrom\s*|\bimport\s*\(\s*|\bimport\s+|\brequire\s*\(\s*)["']([^"']+)["']/g;
|
|
3316
|
-
var TYPE_ONLY = /\b(?:import|export)\s+type\
|
|
3318
|
+
var TYPE_ONLY = /\b(?:import|export)\s+type\s+(?:\{[^}]*\}|\*\s+as\s+[\w$]+|\*|[\w$]+)\s*from\s*["'][^"']+["']/g;
|
|
3317
3319
|
function sourceFiles(dir, rel = "") {
|
|
3318
3320
|
const out = [];
|
|
3319
3321
|
for (const entry of readdirSync(path14.join(dir, rel)).sort()) {
|
|
@@ -3452,7 +3454,7 @@ function checkExports(ctx, pkg, json) {
|
|
|
3452
3454
|
};
|
|
3453
3455
|
walk(json.exports);
|
|
3454
3456
|
for (const t of targets) {
|
|
3455
|
-
if (!t.startsWith("./") || t.includes("*") ||
|
|
3457
|
+
if (!t.startsWith("./") || t.includes("*") || !/\.(?:[cm]?tsx?|json)$/.test(t) || /\.d\.[cm]?ts$/.test(t)) continue;
|
|
3456
3458
|
if (!existsSync(path14.join(pkg.dir, t))) {
|
|
3457
3459
|
ctx.report({ rule: "package-export-missing", file: `${pkg.rel}/package.json`, subject: t, message: `${pkg.name} exports ${t}, which doesn't exist` });
|
|
3458
3460
|
}
|
|
@@ -3483,10 +3485,13 @@ function checkRegistered(ctx, pkg) {
|
|
|
3483
3485
|
} catch {
|
|
3484
3486
|
return;
|
|
3485
3487
|
}
|
|
3488
|
+
const top = git(ctx.root, ["rev-parse", "--show-toplevel"])?.trim();
|
|
3489
|
+
const forms = /* @__PURE__ */ new Set([pkg.rel]);
|
|
3490
|
+
if (top) forms.add(path14.relative(top, realpathSync(pkg.dir)).split(path14.sep).join("/"));
|
|
3486
3491
|
const covered = (doc.features ?? []).some(
|
|
3487
3492
|
(f) => (f.links?.code ?? []).some((c) => {
|
|
3488
3493
|
const norm = c.replace(/^\.\//, "").replace(/\/+$/, "");
|
|
3489
|
-
return norm ===
|
|
3494
|
+
return [...forms].some((rel) => norm === rel || norm.startsWith(`${rel}/`) || rel.startsWith(`${norm}/`));
|
|
3490
3495
|
})
|
|
3491
3496
|
);
|
|
3492
3497
|
if (!covered) {
|
|
@@ -3510,8 +3515,12 @@ function mergeBaseOf(root, base) {
|
|
|
3510
3515
|
return sha ? { sha } : { reason: `HEAD has no merge base with ${base} (fetch with depth 0)` };
|
|
3511
3516
|
}
|
|
3512
3517
|
function checkChanges(ctx, pkg, json, base, mergeBase) {
|
|
3513
|
-
const
|
|
3514
|
-
|
|
3518
|
+
const top = git(ctx.root, ["rev-parse", "--show-toplevel"])?.trim();
|
|
3519
|
+
if (!top) return;
|
|
3520
|
+
const appRelative = (fromTop) => path14.relative(realpathSync(ctx.root), path14.join(top, fromTop)).split(path14.sep).join("/");
|
|
3521
|
+
const inRepo = path14.relative(top, realpathSync(pkg.dir)).split(path14.sep).join("/");
|
|
3522
|
+
const diff = (git(top, ["diff", "--name-status", "-M", mergeBase, "--", inRepo]) ?? "").split("\n").filter(Boolean).map((row) => row.split(" ").map((cell, i) => i === 0 ? cell : appRelative(cell)).join(" ")).join("\n");
|
|
3523
|
+
const untracked = (git(top, ["ls-files", "--others", "--exclude-standard", "--", inRepo]) ?? "").split("\n").filter(Boolean).map(appRelative);
|
|
3515
3524
|
const changed = [...diff.split("\n").filter(Boolean).map((row) => row.split(" ").at(-1)), ...untracked].filter(
|
|
3516
3525
|
(f) => !/(^|\/)(CHANGELOG\.md|node_modules\/)/.test(f)
|
|
3517
3526
|
);
|
|
@@ -3532,7 +3541,6 @@ function checkChanges(ctx, pkg, json, base, mergeBase) {
|
|
|
3532
3541
|
const now = typeof json.version === "string" ? parseVersion(json.version) : null;
|
|
3533
3542
|
const was = typeof versionBefore === "string" ? parseVersion(versionBefore) : null;
|
|
3534
3543
|
const bumped = before === null || now !== null && was !== null && compareVersions(now, was) > 0;
|
|
3535
|
-
const top = git(ctx.root, ["rev-parse", "--show-toplevel"])?.trim();
|
|
3536
3544
|
const changesets = top ? (git(top, ["diff", "--name-only", "--diff-filter=A", mergeBase, "--", ".changeset"]) ?? "").split("\n").concat((git(top, ["ls-files", "--others", "--exclude-standard", "--", ".changeset"]) ?? "").split("\n")).filter((f) => f.endsWith(".md")).map((f) => path14.join(top, f)) : [];
|
|
3537
3545
|
const naming = changesets.filter((p) => existsSync(p) && changesetNames(readFileSync(p, "utf8")).has(json.name));
|
|
3538
3546
|
const named = naming.length > 0;
|
|
@@ -3550,6 +3558,9 @@ function checkChanges(ctx, pkg, json, base, mergeBase) {
|
|
|
3550
3558
|
const registry = (git(ctx.root, ["diff", "--relative", "--name-only", mergeBase, "--", "features.ts", "src/features.ts"]) ?? "").trim();
|
|
3551
3559
|
if (!registry) ctx.report({ rule: "package-unversioned-change", level: "warn", file: `${pkg.rel}/package.json`, message: `${pkg.name}'s blocks or exports changed but features.ts didn't; update the features they belong to` });
|
|
3552
3560
|
}
|
|
3561
|
+
if (bumped && !named && before !== null) {
|
|
3562
|
+
ctx.report({ rule: "package-unversioned-change", level: "warn", file: `${pkg.rel}/package.json`, message: `${pkg.name}'s version went up without a changeset; add one with a "Features:" line so the change is recorded` });
|
|
3563
|
+
}
|
|
3553
3564
|
if (!bumped && !named) {
|
|
3554
3565
|
ctx.report({
|
|
3555
3566
|
rule: "package-unversioned-change",
|