refactor: migrate legacy wire namespace to wrn
Quality / quality (ubuntu-latest) (push) Failing after 9m49s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-12 18:51:15 +05:30
parent ec23dd4c93
commit 2c960fc1dc
488 changed files with 27306 additions and 19063 deletions
@@ -1,8 +1,8 @@
import { expect, test } from "bun:test";
import { readFileSync, readdirSync } from "node:fs";
import { join } from "node:path";
import { compileWireFile } from "../../../packages/compiler/src/index.ts";
import { parse as parseWireSyntax } from "../../../packages/syntax/src/parser.ts";
import { compileWrnFile } from "../../../packages/compiler/src/index.ts";
import { parse as parseWrnSyntax } from "../../../packages/syntax/src/parser.ts";
const root = join(import.meta.dir, "..");
const pagesDir = join(root, "app", "pages");
@@ -63,7 +63,7 @@ test("showcase configures local Lucide icon generation", () => {
expect(packageJson.devDependencies["@iconify/tailwind4"]).toBeTruthy();
expect(packageJson.devDependencies["@iconify-json/lucide"]).toBeTruthy();
expect(styles).toContain('@plugin "@iconify/tailwind4";');
expect(styles).toContain(".playground-preview-source > .wire-action:not(.w-full)");
expect(styles).toContain(".playground-preview-source > .wrn-action:not(.w-full)");
expect(styles).toContain('[data-ui-component="MetricGrid"]');
expect(styles).toContain("width: 100%;");
});
@@ -160,7 +160,7 @@ test("playgrounds preserve typed values, safe DOM replacement, themes, and event
expect(runtime).toContain("preview.replaceChildren");
expect(runtime).not.toContain("preview.innerHTML");
expect(runtime).toContain("__wrnexusHydrateScopes");
expect(runtime).toContain("wireTheme?.bind?.(document)");
expect(runtime).toContain("wrnTheme?.bind?.(document)");
expect(runtime).toContain("bindPlaygroundEvents");
expect(runtime).toContain('attributes.push(`${name}="${field.checked}"`)');
});
@@ -361,7 +361,7 @@ test("every generated showcase page compiles and is accepted by the route syntax
for (const path of paths) {
const source = readFileSync(path, "utf8");
expect(() => parseWireSyntax(source)).not.toThrow();
expect(() => compileWireFile(source, path)).not.toThrow();
expect(() => parseWrnSyntax(source)).not.toThrow();
expect(() => compileWrnFile(source, path)).not.toThrow();
}
});