remarque-tokens 0.5.0 → 0.5.1

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/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ All notable changes to `remarque-tokens` are documented here. Token value
4
4
  changes always state the design rationale — downstream sites pin against
5
5
  these entries when syncing.
6
6
 
7
+ ## 0.5.1 — 2026-07-20
8
+
9
+ Two `remarque-audit` fixes found by the flagship site's adoption (its
10
+ first real-world run):
11
+
12
+ ### Fixed
13
+ - The file passed via `--palette` now always counts as a token file for
14
+ the oklch-literal scan — previously a consumer palette named
15
+ `global.css` produced ~200 false positives against its own token
16
+ declarations. `theme-deck.css`-style generated palette files are also
17
+ allowlisted.
18
+ - The `--src` scans strip comments (line numbers preserved) before
19
+ matching, so prose like `(issue #324)` in a comment no longer trips
20
+ the hex-color regex.
21
+
22
+ No token values changed.
23
+
7
24
  ## 0.5.0 — 2026-07-20
8
25
 
9
26
  Theme-convention unification (epic #47 item 4; ratified 3-0 by consensus
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remarque-tokens",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "engines": {
5
5
  "node": ">=18"
6
6
  },
package/scripts/audit.mjs CHANGED
@@ -152,11 +152,20 @@ console.log(`\nsource scans (${SRC})`);
152
152
  const FONT_FLOOR_REM = 0.8125, FONT_FLOOR_PX = 13;
153
153
  // tokens.astro is the token *reference page* — its job is displaying literal
154
154
  // values (issue #48 tracks generating it from a machine-readable source).
155
- const isTokenFile = (p) => /tokens(-core|-palette)?\.css$|fonts\.css$|globals\.css$|pages[\/\\]tokens\.astro$/.test(p);
155
+ // The file passed via --palette is BY DEFINITION a token file, whatever
156
+ // its name (a consumer's palette is often global.css or similar).
157
+ const paletteRel = relative('.', PALETTE);
158
+ const isTokenFile = (p) =>
159
+ p === paletteRel ||
160
+ /tokens(-core|-palette)?\.css$|fonts\.css$|globals?\.css$|theme-deck\.css$|pages[\/\\]tokens\.astro$/.test(p);
156
161
 
157
162
  for (const file of walk(SRC)) {
158
163
  const rel = relative('.', file);
159
- const text = readFileSync(file, 'utf8');
164
+ // Strip comments before scanning, preserving line numbers — otherwise
165
+ // prose like "(issue #324)" in a comment trips the hex-color regex.
166
+ const text = readFileSync(file, 'utf8')
167
+ .replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, ' '))
168
+ .replace(/(^|[^:])\/\/[^\n]*/g, (m, p1) => p1 + ' '.repeat(m.length - p1.length));
160
169
  const lines = text.split('\n');
161
170
  lines.forEach((line, i) => {
162
171
  // 2. font-size floor (static rem/px values), plus statically
package/tokens.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$description": "Remarque design tokens — GENERATED from tokens-core.css + tokens-palette.css by scripts/tokens-json.mjs. Do not edit; the CSS is the source of truth.",
3
3
  "$extensions": {
4
4
  "remarque": {
5
- "version": "0.5.0",
5
+ "version": "0.5.1",
6
6
  "tiers": {
7
7
  "core": "immutable identity — overriding forks the system",
8
8
  "palette": "sanctioned personalization surface — override freely, then run remarque-audit"