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 -1
View File
@@ -88,7 +88,7 @@ component ThemeToggle {
label = "Toggle theme"
class = ""
}
view { <button class="{class}" data-wire-theme-toggle><slot>{label}</slot></button> }
view { <button class="{class}" data-wrn-theme-toggle><slot>{label}</slot></button> }
}`;
const diagnostics = validateBalancedCharacters(mockDocument(source), source);
+5 -5
View File
@@ -95,9 +95,9 @@ test("formats public event declarations as individual props members", () => {
test("keeps long inline-closing tags idempotent after multiline expansion", () => {
const source = `component Status {
view {
<section class="overflow-hidden rounded-3xl border border-[var(--wire-color-border,#e2e8f0)] bg-[var(--wire-color-surface,#ffffff)]">
<span class="inline-flex items-center gap-2 rounded-full bg-[var(--wire-color-surface-2,#f8fafc)] px-3 py-1.5 text-xs font-semibold">
<span class="h-2 w-2 animate-pulse rounded-full bg-[var(--wire-color-primary,#059669)]"></span>Loading
<section class="overflow-hidden rounded-3xl border border-[var(--wrn-color-border,#e2e8f0)] bg-[var(--wrn-color-surface,#ffffff)]">
<span class="inline-flex items-center gap-2 rounded-full bg-[var(--wrn-color-surface-2,#f8fafc)] px-3 py-1.5 text-xs font-semibold">
<span class="h-2 w-2 animate-pulse rounded-full bg-[var(--wrn-color-primary,#059669)]"></span>Loading
</span>
</section>
}
@@ -205,7 +205,7 @@ test("expands inline if blocks around HTML", () => {
const source = `component Button {
view {
<button>
{#if loading}<span class="wire-spinner wire-spinner--inline" aria-hidden="true"></span>{/if}
{#if loading}<span class="wrn-spinner wrn-spinner--inline" aria-hidden="true"></span>{/if}
{#if icon}<span class="{icon}"></span>{:else}<span>Fallback</span>{/if}
</button>
}
@@ -217,7 +217,7 @@ test("expands inline if blocks around HTML", () => {
<button>
{#if loading}
<span
class="wire-spinner wire-spinner--inline"
class="wrn-spinner wrn-spinner--inline"
aria-hidden="true"
>
</span>
+4 -4
View File
@@ -33,7 +33,7 @@ for (const rel of [
}
}
// 2. Grammar wires up the right scope + embedded languages.
// 2. Grammar connects up the right scope + embedded languages.
const grammar = JSON.parse(readFileSync(join(root, "syntaxes/wrn.tmLanguage.json"), "utf8"));
grammar.scopeName === "source.wrn" ? ok("grammar scopeName") : bad("grammar scopeName");
@@ -121,7 +121,7 @@ try {
try {
const compiler = require(join(root, "src/compiler.cjs"));
const good = `page Home {\n view { <h1>Hi</h1> }\n}`;
compiler.compileWireFile(good);
compiler.compileWrnFile(good);
ok("compiler accepts valid .wrn");
const structuredProps = `page FooterExample {
@@ -140,13 +140,13 @@ try {
/>
}
}`;
compiler.compileWireFile(structuredProps);
compiler.compileWrnFile(structuredProps);
ok("compiler accepts native structured state and unquoted prop expressions");
const badSrc = `page Home {\n view { <h1>Hi</h2> }\n}`;
let threw = false;
try {
compiler.compileWireFile(badSrc);
compiler.compileWrnFile(badSrc);
} catch (e) {
threw = true;
/offset\s+\d+|end of input/.test(e.message)