Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/no-tests-in-dist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tailor-platform/app-shell": patch
---

The published package no longer includes `dist/semantic-contrast.test.ts` and `dist/theme-bridge.test.ts`. These internal test files were copied into `dist/` by mistake. No public API or CSS changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { describe, expect, it } from "vitest";
* bridge entry would leave every other test green while the utility silently
* stops producing colour.
*/
const here = dirname(fileURLToPath(import.meta.url));
const bridge = readFileSync(join(here, "theme.bridge.css"), "utf8");
const defaultTheme = readFileSync(join(here, "themes/default.css"), "utf8");
const assetsDir = join(dirname(fileURLToPath(import.meta.url)), "../src/assets");
const bridge = readFileSync(join(assetsDir, "theme.bridge.css"), "utf8");
const defaultTheme = readFileSync(join(assetsDir, "themes/default.css"), "utf8");

/** Semantic colour roles: 5 intents x 8 roles, named `--{intent}-{role}`. */
const SEMANTIC_PREFIX = "(?:info|success|warning|danger|neutral)";
Expand Down Expand Up @@ -75,7 +75,9 @@ describe("theme bridge", () => {
])("keeps %s linked to %s for consumer overrides", (alias, target) => {
const sheets = [
defaultTheme,
...["cream", "bloom"].map((name) => readFileSync(join(here, `themes/${name}.css`), "utf8")),
...["cream", "bloom"].map((name) =>
readFileSync(join(assetsDir, `themes/${name}.css`), "utf8"),
),
];
const values = sheets.flatMap((css) =>
[...css.matchAll(new RegExp(`^\\s*${alias}:\\s*([^;]+);`, "gm"))].map((match) =>
Expand Down
2 changes: 1 addition & 1 deletion packages/core/tests/typography-compile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { describe, expect, it } from "vitest";

/**
* Compiles theme.bridge.css with Tailwind and checks the emitted utility rules.
* The string-level checks in src/assets/theme-bridge.test.ts confirm that the
* The string-level checks in tests/theme-bridge.test.ts confirm that the
* bridge names the right variables. This test confirms that Tailwind turns those
* entries into the four declarations a role needs, both for AppShell's own
* prefixed build (`astw:`) and for a consumer's unprefixed build.
Expand Down
Loading