release: WRNexusJS 0.3.0

This commit is contained in:
2026-07-22 17:29:08 +05:30
parent 13dfa31d19
commit 07d8fb59d6
145 changed files with 9664 additions and 3881 deletions
+20
View File
@@ -168,3 +168,23 @@ test("update verification formats before checking and building", () => {
test("update verification skips unavailable scripts", () => {
expect(verificationCommands({ check: "bun run lint" })).toEqual([["run", "check"]]);
});
test("0.3 WRN source normalization is conservative and idempotent", async () => {
const { migrateWrnSource } = await import("../src/update.ts");
const source = `component Card {
props { eyebrow = "" title = "" description = "" align = "start" class = "" }
view {
<FeatureList items={items} emptyLabel="No items" />
<button @click={save()} data-config={{ nested: true }}>Save</button>
}
}`;
const migrated = migrateWrnSource(source);
expect(migrated).toContain("props {\n");
expect(migrated).toContain(' eyebrow = ""');
expect(migrated).toContain("items='{items}'");
expect(migrated).toContain("@click='{save()}'");
// Nested brace expressions are deliberately left untouched for manual review.
expect(migrated).toContain("data-config={{ nested: true }}");
expect(migrateWrnSource(migrated)).toBe(migrated);
});