build: move repo to prettier 3.9.x (fix template format:check drift)#827
Conversation
7758a84 to
dd148fd
Compare
dd148fd to
0131763
Compare
0131763 to
4d91748
Compare
4d91748 to
b12efb0
Compare
The per-template `format:check` (run in CI by the Node template test jobs)
was failing because the repo root and the templates ran different prettier
versions:
- the repo root pins prettier 3.8.3 via pnpm-lock.yaml (range `^3.7.4`), so it
never drifted;
- each template declares prettier as an open `^` range with NO lockfile, so a
fresh `npm install` floats to the newest available — 3.9.x.
Prettier 3.9.0 (2026-06-27) reformats the comment-only objects in the AGENTS.md
input/output schema snippets, so the templates' 3.9.x considered the committed
files mis-formatted while the root's 3.8.3 considered them fine — a version
disagreement, not a real formatting problem.
Move the repo root onto the latest prettier and reformat, so the root and the
templates' floating installs agree:
- bump prettier to 3.9.1 (3.9.2/3.9.3 are blocked by the repo's 24h
`minimumReleaseAge` policy; the templates' npm install floats to 3.9.3, which
produces identical output for these files — verified);
- reformat with it. The ONLY content change is the AGENTS.md schema snippets
collapsing onto one line (`"properties": {/* ... */}`); no other files change.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
b12efb0 to
bd7ed86
Compare
| "type": "object", | ||
| "schemaVersion": 1, | ||
| "properties": { | ||
| /* define input fields here */ |
There was a problem hiding this comment.
We probably don't want this collapsed right?
There was a problem hiding this comment.
I think it does not really matter much for the agents.
Just for a record, this was the issue failing the tests. The older version of prettier (root level) kept it spread, but the newer versions of prettier (template level) marked it as incorrect formatting.
Now both root and template level are at versions that collapse it.
There was a problem hiding this comment.
You can use // comment if you want force it expanded
There was a problem hiding this comment.
Thanks @fisker, I was considering it as a possible solution, but decided to not clutter the md files if not really necessary. As these are supposed to be read mainly by agents, the one-liner is not really an issue.
Root cause: prettier version drift between root and templates
The per-template
format:check(run in CI by Test Node.js templates / Test LLM AI Node.js templates) started failing on every PR run on/after 2026-06-27 (e.g. #824) due to a version mismatch:^3.7.4pnpm-lock.yaml^3.5.3npm installfloats to newest)Prettier 3.9.0 (2026-06-27) reformats the comment-only objects in the
AGENTS.mdinput/output schema snippets. So the templates' 3.9.x flagged files that the root's pinned 3.8.3 considers correctly formatted.Fix: put the whole repo on prettier 3.9.x
Bump the root prettier and reformat, so the root and the templates' floating installs agree.
Notes
Root lands on 3.9.1, not 3.9.3 — the repo's
minimumReleaseAge: 1440(24h) blocks 3.9.2/3.9.3 (released today). The templates' npm install has no such policy and floats to 3.9.3; 3.9.1 and 3.9.3 produce identical output for these files (verified). They'll converge once 3.9.3 is >24h old.The templates still float (
^, no lockfile), so a future prettier release that changes formatting can re-introduce this for the templates (the root is shielded by its lockfile until bumped deliberately).