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
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
# Shell scripts and the Node guard must stay LF even on Windows checkouts — bash chokes on
# CRLF (\r), which breaks the guard/install tests under Git Bash on windows-latest.
*.sh text eol=lf

# Diagram sources and their SVG exports are content-addressed: docs/diagrams/diagrams.json
# records each source's sha256 and the docs-site copies must be byte-identical. A Windows
# checkout (core.autocrlf) would rewrite them with CRLF and every receipt would read stale.
docs/diagrams/** text eol=lf
mintlify/images/diagrams/*.svg text eol=lf
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- **The diagram check passes on a Windows checkout.** With `core.autocrlf`, Git checked the
diagram sources out with CRLF line endings. Their sha256 then differed from the receipts in
`docs/diagrams/diagrams.json`, so all thirteen diagrams read as changed. `.gitattributes` now
keeps `docs/diagrams/` and the docs-site SVG copies LF on every platform.

## [1.7.0] - 2026-09-26

### Fixed
Expand Down
10 changes: 10 additions & 0 deletions mintlify/changelog/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ This page is generated from `CHANGELOG.md` by `forge docs render`, and `forge do
CI when it falls behind, so it cannot drift from the release notes again.

{/* forge:render:changelog:begin (generated by `forge docs render` — do not edit) */}
<Update label="Unreleased" description="Merged on the default branch, not yet released" tags={["Fixed"]}>

**Fixed**

- **The diagram check passes on a Windows checkout.**

[Full notes for Unreleased →](https://github.com/CodeWithJuber/forgekit/blob/HEAD/CHANGELOG.md#unreleased)

</Update>

<Update label="v1.7.0" description="September 26, 2026" tags={["Fixed","Added"]}>

**Fixed**
Expand Down
17 changes: 17 additions & 0 deletions test/diagrams.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// The Archify diagram pipeline (scripts/diagrams.mjs): the offline receipt check, source
// naming, the gallery page, and the docs-check rules for embeds and hand-written Mermaid.
import assert from "node:assert/strict";
import { execFileSync } from "node:child_process";
import { createHash } from "node:crypto";
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
Expand Down Expand Up @@ -160,3 +161,19 @@ test("the repository's diagrams match their receipts and are embedded where the
for (const d of manifest.diagrams)
assert.ok(d.usedIn.length >= 1, `${d.id} is embedded somewhere`);
});

test("diagram sources and SVGs check out with LF everywhere (receipts hash exact bytes)", () => {
const paths = [
"docs/diagrams/src/core-loop.workflow.json",
"docs/diagrams/diagrams.json",
"docs/diagrams/core-loop.svg",
"mintlify/images/diagrams/system.svg",
];
const out = execFileSync("git", ["check-attr", "eol", "--", ...paths], {
cwd: BRAND.root,
encoding: "utf8",
});
const lines = out.trim().split(/\r?\n/);
assert.equal(lines.length, paths.length);
for (const line of lines) assert.match(line, /: eol: lf$/, line);
});
Loading