Pre Release New Changes

This commit is contained in:
2026-07-31 16:30:13 +05:30
parent 358a520bc5
commit 3e565e8d03
189 changed files with 36727 additions and 17249 deletions
+16 -2
View File
@@ -80,11 +80,25 @@ test("component reference contains only explicitly declared public events", () =
) as { components: Array<{ name: string; events: string[] }> };
for (const component of reference.components) {
const source = readFileSync(uiComponentPath(component.name), "utf8");
const componentPath = uiComponentPath(component.name);
const source = readFileSync(componentPath, "utf8");
const declaredEvents = [
...source.matchAll(/@event\s+([A-Za-z][A-Za-z0-9_]*)\s*=\s*function/g),
].map((match) => match[1]);
expect(component.events).toEqual([...new Set(declaredEvents)]);
const expectedEvents = [...new Set(declaredEvents)];
if (JSON.stringify(component.events) !== JSON.stringify(expectedEvents)) {
console.error("UI EVENT REFERENCE MISMATCH", {
component: component.name,
componentPath,
referenceEvents: component.events,
declaredEvents: expectedEvents,
});
}
expect(component.events).toEqual(expectedEvents);
}
});