roast-my-design-system 8.6.1 → 8.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "roast-my-design-system",
|
|
3
|
-
"version": "8.6.
|
|
3
|
+
"version": "8.6.2",
|
|
4
4
|
"mcpName": "io.github.gregkozakiewicz/roast-my-design-system",
|
|
5
5
|
"description": "Your AI can write the UI. This makes sure it writes your UI. A deterministic scanner scores your design system 0-100 against 112 public repos, reads React and web components (Stencil, Lit), hands you a copy-paste fix prompt for each top finding, writes rules for Claude, Cursor, Copilot and Windsurf with --apply, and runs as a local MCP server with --mcp.",
|
|
6
6
|
"keywords": [
|
|
@@ -71,6 +71,11 @@ export const CONTENT_CSS_NAME_RE = /(^|\/)_?(?:highlight(?:-\w+)?|hljs(?:-theme)
|
|
|
71
71
|
export const EXTENSION_CSS_PATH_RE = /(^|\/)(?:chrome-extension|browser-extension|webextension)\/[\s\S]*\/(?:content|inject)[\w-]*\.(?:css|scss|less)$|(^|\/)content[_-]?script[\w-]*\.(?:css|scss|less)$/i;
|
|
72
72
|
// minified: one very long line, whoever shipped it
|
|
73
73
|
export const minifiedCss = (text) => text.split('\n').some((l) => l.length > 2000);
|
|
74
|
+
// Tailwind's own build output, committed: it opens with the licence banner and
|
|
75
|
+
// restates every --tw-* internal. Cal.com keeps a 343 KB one, pretty-printed so
|
|
76
|
+
// the minified test misses it, and until 8.6.2 the twin check paired a new
|
|
77
|
+
// theme token with --tw-ring-offset-color from it (benchmark, 2026-09-25).
|
|
78
|
+
export const COMPILED_TAILWIND_RE = /^\s*\/\*!\s*tailwindcss v\d/;
|
|
74
79
|
|
|
75
80
|
/** Why this stylesheet is not the product's own, or null. */
|
|
76
81
|
export function foreignStylesheet(file, text = '') {
|
|
@@ -78,6 +83,7 @@ export function foreignStylesheet(file, text = '') {
|
|
|
78
83
|
if (/\.module\.(?:css|scss|less)$/i.test(file)) return null;
|
|
79
84
|
if (VENDOR_CSS_NAME_RE.test(file)) return "a library's stylesheet kept in the repo";
|
|
80
85
|
if (minifiedCss(text)) return 'a minified stylesheet, shipped rather than written here';
|
|
86
|
+
if (COMPILED_TAILWIND_RE.test(text)) return "Tailwind's compiled output, generated from the source rather than written here";
|
|
81
87
|
if (CONTENT_CSS_NAME_RE.test(file)) return 'a code or markdown theme: it styles content, not the interface';
|
|
82
88
|
if (EXTENSION_CSS_PATH_RE.test(file)) return "CSS injected into other people's pages by a browser extension";
|
|
83
89
|
return null;
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import { canonical, oklab } from './color.mjs';
|
|
23
23
|
import { KNOWN_ROWS } from '../profiles/shadcn-data.mjs';
|
|
24
|
+
import { foreignStylesheet } from './exempt.mjs';
|
|
24
25
|
|
|
25
26
|
export const TWIN_STEPS = 8;
|
|
26
27
|
// Two tokens are deliberate, so a pair of them must also be closer than the
|
|
@@ -102,6 +103,9 @@ export function tokenDefsOf(raw) {
|
|
|
102
103
|
const defs = new Map();
|
|
103
104
|
for (const m of text.matchAll(/(--[\w-]+)\s*:\s*([^;{}]+)[;}]/g)) {
|
|
104
105
|
const [, name, rawValue] = m;
|
|
106
|
+
// Tailwind's internals (--tw-ring-offset-color, --tw-prose-*) are its
|
|
107
|
+
// plumbing, set per element; no one picks them as a design decision
|
|
108
|
+
if (/^--tw-/.test(name)) continue;
|
|
105
109
|
const value = rawValue.trim();
|
|
106
110
|
const canon = canonical(value);
|
|
107
111
|
if (!canon) continue;
|
|
@@ -127,6 +131,8 @@ export function repoTokenDefs(styleFiles, read) {
|
|
|
127
131
|
for (const file of styleFiles) {
|
|
128
132
|
const text = read(file);
|
|
129
133
|
if (!text || !text.includes('--')) continue;
|
|
134
|
+
// a library's CSS or a compiled build: the report leaves it out, so does this
|
|
135
|
+
if (foreignStylesheet(file, text)) continue;
|
|
130
136
|
for (const [name, e] of tokenDefsOf(text)) out.push({ name, file, ...e });
|
|
131
137
|
}
|
|
132
138
|
return out;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Single version constant for the engine — imported by diagnose (report
|
|
2
2
|
// footer) and rules (generated-by line). This is the bump spot that used to
|
|
3
3
|
// live as a const inside diagnose/index.mjs.
|
|
4
|
-
export const VERSION = '8.6.
|
|
4
|
+
export const VERSION = '8.6.2';
|
|
5
5
|
// The shape of harvest.json and summary.json. Bumped only when a field is
|
|
6
6
|
// renamed, removed or changes meaning; a new field is not a new schema. A
|
|
7
7
|
// tool comparing two scans compares like with like by this number, not by VERSION.
|