Compare commits

..

No commits in common. "3ff41e771bc10c90e72ba7bc9e4f8895bfb0a0d1" and "7b96a7cb7680521744036af108576121d907c026" have entirely different histories.

5 changed files with 31 additions and 59 deletions

View file

@ -1,8 +1,8 @@
export * from "./Badge"; export { Badge } from "./Badge";
export * from "./Button"; export { Button } from "./Button";
export * from "./IconButton"; export { IconButton } from "./IconButton";
export * from "./IconGlyph"; export { IconGlyph } from "./IconGlyph";
export * from "./ProgressMeter"; export { ProgressMeter } from "./ProgressMeter";
export * from "./Separator"; export { Separator } from "./Separator";
export * from "./StatusBadge"; export { StatusBadge } from "./StatusBadge";
export * from "./ThemeToggle"; export { ThemeToggle } from "./ThemeToggle";

View file

@ -1,10 +1,10 @@
export * from "./CornerBracketFrame"; export { CornerBracketFrame } from "./CornerBracketFrame";
export * from "./DashboardFrame"; export { DashboardFrame } from "./DashboardFrame";
export * from "./DashboardHeader"; export { DashboardHeader } from "./DashboardHeader";
export * from "./DiagonalStripeField"; export { DiagonalStripeField } from "./DiagonalStripeField";
export * from "./FooterCell"; export { FooterCell } from "./FooterCell";
export * from "./FooterStatusCell"; export { FooterStatusCell } from "./FooterStatusCell";
export * from "./GridFrame"; export { GridFrame } from "./GridFrame";
export * from "./ModuleCard"; export { ModuleCard } from "./ModuleCard";
export * from "./Panel"; export { Panel } from "./Panel";
export * from "./ScanlineField"; export { ScanlineField } from "./ScanlineField";

View file

@ -1,6 +1,6 @@
export * from "./ServiceGroupPanel"; export { ServiceGroupPanel } from "./ServiceGroupPanel";
export * from "./ServicePanel"; export { ServicePanel } from "./ServicePanel";
export * from "./ServiceRow"; export { ServiceRow } from "./ServiceRow";
export * from "./StatusStrip"; export { StatusStrip } from "./StatusStrip";
export * from "./SystemState"; export { SystemState } from "./SystemState";
export * from "./WeatherModule"; export { WeatherModule } from "./WeatherModule";

View file

@ -1,6 +1,6 @@
export * from "./LineChart"; export { LineChart } from "./LineChart";
export * from "./SignalTrace"; export { SignalTrace } from "./SignalTrace";
export * from "./Sparkline"; export { Sparkline } from "./Sparkline";
export * from "./TelemetryCard"; export { TelemetryCard } from "./TelemetryCard";
export * from "./TelemetryGrid"; export { TelemetryGrid } from "./TelemetryGrid";
export * from "./TelemetryStrip"; export { TelemetryStrip } from "./TelemetryStrip";

View file

@ -131,40 +131,12 @@ describe("Storybook inventory", () => {
for (const componentName of componentsByDomain.get(domain) ?? []) { for (const componentName of componentsByDomain.get(domain) ?? []) {
expect(domainIndexSource).toContain( expect(domainIndexSource).toContain(
`export * from "./${componentName}";`, `export { ${componentName} } from "./${componentName}";`,
); );
} }
} }
}); });
test("exports component prop interfaces through grouped package entrypoints", () => {
let propInterfaceCount = 0;
for (const component of componentInventory()) {
const source = readFileSync(component.path, "utf8");
const propTypeName = `${component.name}Props`;
const propExportPattern = new RegExp(
`export\\s+(interface|type)\\s+${propTypeName}\\b`,
);
if (!propExportPattern.test(source)) {
continue;
}
propInterfaceCount += 1;
const domainIndexSource = readFileSync(
join(componentsDir, component.domain, "index.ts"),
"utf8",
);
expect(domainIndexSource).toContain(
`export * from "./${component.name}";`,
);
}
expect(propInterfaceCount).toBeGreaterThan(0);
});
test("keeps Storybook fixtures generic and content-free", () => { test("keeps Storybook fixtures generic and content-free", () => {
const storyText = readdirSync(storiesDir) const storyText = readdirSync(storiesDir)
.filter((filename) => filename.endsWith(".tsx") || filename.endsWith(".ts")) .filter((filename) => filename.endsWith(".tsx") || filename.endsWith(".ts"))