@cosmicdrift/kumiko-dev-server 0.60.0 → 0.60.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-dev-server",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.2",
|
|
4
4
|
"description": "Development server bootstrap for Kumiko apps. Bundles the client, mints dev-JWTs, injects the resolved AppSchema, and seeds an admin. Not for production.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -37,46 +37,49 @@ function bunAvailable(): boolean {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
describe("renderer-web styles.css @source relocation (#359)", () => {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
// skipIf statt `if (!bunAvailable()) return;` — sonst meldet der Runner den
|
|
41
|
+
// Test grün, obwohl er nie lief (silent-pass verschleiert fehlende Coverage).
|
|
42
|
+
test.skipIf(!bunAvailable())(
|
|
43
|
+
"self-relative @source scans the shell standalone; monorepo path would not",
|
|
44
|
+
async () => {
|
|
45
|
+
// Tailwind v4 auto-scannt nur das cwd-Verzeichnis (empirisch bestätigt:
|
|
46
|
+
// das Verzeichnis der Input-CSS wird NICHT automatisch gescannt). Im echten
|
|
47
|
+
// Standalone-Consumer ist renderer-web zudem in node_modules (gitignored) →
|
|
48
|
+
// ebenfalls nicht auto-gescannt. Die Shell-Klassen erreicht also NUR der
|
|
49
|
+
// explizite @source der styles.css. Hier mirrorn wir das robust, ohne
|
|
50
|
+
// gitignore-/node_modules-Semantik: das Paket-`src` (mit der Shell-Probe)
|
|
51
|
+
// liegt AUSSERHALB des Build-cwd — nur der self-relative `@source "./**"`
|
|
52
|
+
// der relozierten styles.css erreicht es, der monorepo-Pfad ist tot.
|
|
53
|
+
// Temp unter REPO_ROOT, damit @import "tailwindcss"/react-day-picker via
|
|
54
|
+
// node_modules auflösen.
|
|
55
|
+
const dir = await mkdtemp(join(REPO_ROOT, ".reloc-rendererweb-"));
|
|
56
|
+
const buildCwd = join(dir, "app");
|
|
57
|
+
const pkgSrc = join(dir, "pkg");
|
|
58
|
+
try {
|
|
59
|
+
const realCss = await readFile(RENDERER_WEB_STYLES, "utf8");
|
|
60
|
+
// Guard: der Fix MUSS in der Quelle stehen, sonst testet die Relocation nichts.
|
|
61
|
+
expect(realCss).toContain(SELF_SOURCE);
|
|
42
62
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// liegt AUSSERHALB des Build-cwd — nur der self-relative `@source "./**"`
|
|
50
|
-
// der relozierten styles.css erreicht es, der monorepo-Pfad ist tot.
|
|
51
|
-
// Temp unter REPO_ROOT, damit @import "tailwindcss"/react-day-picker via
|
|
52
|
-
// node_modules auflösen.
|
|
53
|
-
const dir = await mkdtemp(join(REPO_ROOT, ".reloc-rendererweb-"));
|
|
54
|
-
const buildCwd = join(dir, "app");
|
|
55
|
-
const pkgSrc = join(dir, "pkg");
|
|
56
|
-
try {
|
|
57
|
-
const realCss = await readFile(RENDERER_WEB_STYLES, "utf8");
|
|
58
|
-
// Guard: der Fix MUSS in der Quelle stehen, sonst testet die Relocation nichts.
|
|
59
|
-
expect(realCss).toContain(SELF_SOURCE);
|
|
63
|
+
await mkdir(buildCwd, { recursive: true });
|
|
64
|
+
await mkdir(join(pkgSrc, "layout"), { recursive: true });
|
|
65
|
+
await writeFile(
|
|
66
|
+
join(pkgSrc, "layout/probe.tsx"),
|
|
67
|
+
`export const P = () => <div className="min-h-screen" />;\n`,
|
|
68
|
+
);
|
|
60
69
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
join(pkgSrc, "layout/probe.tsx"),
|
|
65
|
-
`export const P = () => <div className="min-h-screen" />;\n`,
|
|
66
|
-
);
|
|
70
|
+
await writeFile(join(pkgSrc, "styles.css"), realCss);
|
|
71
|
+
const fixed = await runTailwindOnce(join(pkgSrc, "styles.css"), buildCwd);
|
|
72
|
+
expect(fixed).toContain("min-h-screen");
|
|
67
73
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
await rm(dir, { recursive: true, force: true });
|
|
80
|
-
}
|
|
81
|
-
});
|
|
74
|
+
// Diskriminator: mit dem ALTEN monorepo-relativen @source ist die Probe
|
|
75
|
+
// an diesem relozierten Ort unerreichbar → Sentinel fehlt. Beweist, dass
|
|
76
|
+
// der Fix kein No-op ist (der Test würde bei einem Revert rot).
|
|
77
|
+
await writeFile(join(pkgSrc, "styles.css"), realCss.replace(SELF_SOURCE, MONOREPO_SOURCE));
|
|
78
|
+
const buggy = await runTailwindOnce(join(pkgSrc, "styles.css"), buildCwd);
|
|
79
|
+
expect(buggy).not.toContain("min-h-screen");
|
|
80
|
+
} finally {
|
|
81
|
+
await rm(dir, { recursive: true, force: true });
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
);
|
|
82
85
|
});
|