Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
HTML agent-skillsai-agentsarchitecture-diagramclaude-codeclaude-skillscodexcoding-agentsdeepseek-harnessdeveloper-toolsdiagramsdiagrams-as-codedsh-pluginflowchartllmmermaidopencodesequence-diagramsoftware-architecturesystem-designvisualization
fix(release): finish standalone development baseline repair
tt-a1i6792ddf7d46a
diff --git a/docs/index.html b/docs/index.htmlindex 0087b166..7dc8ac52 100644--- a/docs/index.html+++ b/docs/index.html@@ -495,7 +495,7 @@<!-- STATS STRIP --><div class="hero-stats fade-up d4">- <div class="stat"><b>05</b><span data-i18n="stat-types">Diagram types</span></div>+ <div class="stat"><b>10</b><span data-i18n="stat-types">Diagram types</span></div><div class="stat"><b>04</b><span data-i18n="stat-presets">Visual presets</span></div><div class="stat"><b>02</b><span data-i18n="stat-themes">Coordinated themes</span></div><div class="stat"><b>4<sup>×</sup></b><span data-i18n="stat-export">Native export scale</span></div>diff --git a/scripts/check-release-identity.mjs b/scripts/check-release-identity.mjsindex dc4c72d0..7576b0ed 100644--- a/scripts/check-release-identity.mjs+++ b/scripts/check-release-identity.mjs@@ -3,6 +3,7 @@import fs from 'node:fs';import path from 'node:path';import { fileURLToPath } from 'node:url';+import { parse } from 'parse5';import {compareSemver,@@ -112,7 +113,24 @@ function checkNoRavenSwitcher(relativePath, source) {}function checkIdentityTemplate(relativePath, source, isDevelopment) {- const hasHardcodedVersion = /\b\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?\b/.test(source);+ // SVG path coordinates can resemble SemVer (for example, `4.3.6-3.1`).+ // Remove only real SVG d attributes, not path-like text inside other+ // attributes or scripts. Keep the original bytes everywhere else.+ const pathDataRanges = [];+ function collectPathData(node) {+ const location = node.sourceCodeLocation?.attrs?.d;+ if (node.namespaceURI === 'http://www.w3.org/2000/svg' && node.tagName === 'path' && location) {+ pathDataRanges.push(location);+ }+ for (const child of node.childNodes || []) collectPathData(child);+ if (node.content) collectPathData(node.content);+ }+ collectPathData(parse(source, { sourceCodeLocationInfo: true }));+ let sourceWithoutPathData = source;+ for (const { startOffset, endOffset } of pathDataRanges.sort((a, b) => b.startOffset - a.startOffset)) {+ sourceWithoutPathData = sourceWithoutPathData.slice(0, startOffset) + sourceWithoutPathData.slice(endOffset);+ }+ const hasHardcodedVersion = /\b\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?\b/.test(sourceWithoutPathData);const identity = isDevelopment ? 'development and 开发版' : 'stable and 稳定版';const hasIdentity = isDevelopment? /development/i.test(source) && /开发版/.test(source)diff --git a/test/release-identity.test.mjs b/test/release-identity.test.mjsindex b7f6ec04..0b4027ee 100644--- a/test/release-identity.test.mjs+++ b/test/release-identity.test.mjs@@ -510,3 +510,44 @@ test('stable public-page templates reject development labels on version-bearingfs.rmSync(fixture, { recursive: true, force: true });}});++test('public-page identity ignores compact SVG coordinates without hiding real version literals', () => {+ const fixture = fs.mkdtempSync(path.join(os.tmpdir(), 'archify-release-identity-'));+ const templatePath = 'scripts/start-template.html';+ const identity = 'development · 开发版 · [[ARCHIFY_VERSION]]';+ const coordinates = 'M8 1.6l1.9 3.9 4.3.6-3.1 3 .7 4.3L8 11.4z';+ try {+ for (const pathElement of [+ `<path d="${coordinates}"/>`,+ `<path d='${coordinates}'/>`,+ `<path aria-label="x > y" d = "${coordinates}"/>`,+ ]) {+ writeValidDevelopmentFixture(fixture, {+ [templatePath]: `${identity}<svg>${pathElement}</svg>`,+ });+ const valid = runCheck(fixture);+ assert.equal(valid.status, 0, valid.stderr);+ }++ // A nearby path attribute, another element's d attribute, and visible text+ // still belong to the release-identity contract, not SVG coordinate data.+ for (const content of [+ `<svg><path data-version="2.12.0" d="${coordinates}"/></svg>`,+ `<svg><path d="${coordinates}" data-version="2.12.0"/></svg>`,+ `<div d="2.12.0"></div>`,+ `<path-data d="2.12.0"></path-data>`,+ `<svg><path aria-label="release d='2.12.0'" d="M0 0"/></svg>`,+ `<div title="<path d='2.12.0'>"></div>`,+ `<script>const markup = "<path d='2.12.0'>";</script>`,+ `<path d="2.12.0"></path>`,+ `<svg><path d="${coordinates}"/></svg><span>2.12.0</span>`,+ ]) {+ writeFile(fixture, templatePath, `${identity}${content}`);+ const stale = runCheck(fixture);+ assert.notEqual(stale.status, 0, content);+ assert.match(stale.stderr, /scripts\/start-template\.html must use \[\[ARCHIFY_VERSION\]\]/);+ }+ } finally {+ fs.rmSync(fixture, { recursive: true, force: true });+ }+});diff --git a/website/src/pages/index.astro b/website/src/pages/index.astroindex 0e493a37..c65a3643 100644--- a/website/src/pages/index.astro+++ b/website/src/pages/index.astro@@ -110,7 +110,7 @@ const { lang = 'en' } = Astro.props;<!-- PROOF STRIP — receipts, not adjectives --><section class="receipts" aria-label="Archify at a glance"><div class="container receipts-row">- <div class="receipt fade-up"><b>5</b><span data-i18n="stat-types">Diagram types</span></div>+ <div class="receipt fade-up"><b>10</b><span data-i18n="stat-types">Diagram types</span></div><div class="receipt fade-up d1"><b>4</b><span data-i18n="stat-presets">Visual presets</span></div><div class="receipt fade-up d2"><b>9/9</b><span data-i18n="stat-checks">Validation checks per artifact</span></div><div class="receipt fade-up d3"><b>4×</b><span data-i18n="stat-export">Native export scale</span></div>