Repository navigation
Conversation
…, and regenerated The generator wrote its output unformatted (quoted keys, one-line arrays) while the checked-in file was formatted, so every Sandbox build, which runs it, left 1,600 changed lines in the tree even when no count had changed. It now formats what it writes with the repository's Prettier config, so a run whose counts are current changes nothing, and `check:motion-audit` (`--check`) fails when the checked-in file is not what a run would write. The audit is regenerated: it was last written on Oct 26 (meta#8620), and core and lab have changed since (getComputedStyle reads 85 to 112, setTimeout literals 1 to 3, files with reduced motion 52 to 55, among others).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
No blocking issues: the generator now writes the formatted file, check:motion-audit passes on this head, and the regenerated audit is exactly what the previous generator produces for the same sources once formatted. Two optional follow-ups:
- Declare
prettier(catalog:) inapps/sandbox/package.json, since the Sandbox build now imports it and the workspace expects each package to declare its imports. filesScannedcounts the 31 gitignored locale modules thatpnpm installgenerates, so the check fails in a checkout installed without scripts; skippinggenerated-localesin the walk would remove that dependence.
[Automated review]
| import fs from 'node:fs'; | ||
| import path from 'node:path'; | ||
| import url from 'node:url'; | ||
| import {format, resolveConfig} from 'prettier'; |
There was a problem hiding this comment.
Non-blocking: @astryxdesign/sandbox doesn't declare prettier, so this import resolves only through the workspace root's devDependency. Since the generator now runs in every Sandbox dev and build, consider adding "prettier": "catalog:" to the Sandbox devDependencies, as pnpm-workspace.yaml asks of every consumer and apps/docsite does.
| labComponentDirs: 22, | ||
| hardcodedInLab: 10, | ||
| filesScanned: 917, | ||
| filesScanned: 941, |
There was a problem hiding this comment.
Non-blocking: 941 includes the 31 gitignored packages/core/src/i18n/generated-locales/*.generated.ts modules that pnpm install writes through the root prepare script. Without them a run writes 910, so check:motion-audit fails in a checkout installed with scripts disabled. If the check shouldn't depend on install scripts, adding generated-locales to SKIP_DIRS and regenerating would remove that dependence.
… and the Sandbox declares prettier (meta#8831) The audit walked packages/core/src/i18n/generated-locales, 31 modules that pnpm install writes and git ignores, so `filesScanned` depended on how the checkout was installed and `check:motion-audit` failed in a checkout installed without scripts. The walk skips that directory now, and the audit is regenerated (files scanned 941 to 910, no other count moves). The generator imports prettier, which the Sandbox did not declare and resolved only through the root's install; it is declared as `catalog:`, as the root declares it. Red first: the check failed on 3f2f8dc with the generated locales moved aside, and passes here with and without them.
|
Both done in 230185f: the audit's walk skips |
There was a problem hiding this comment.
No blocking issues: the generator writes the formatted file, check:motion-audit passes on this head with and without the generated locale modules, and the regenerated audit is exactly what the previous generator produces for the same tracked sources once formatted. Both earlier suggestions are addressed: the Sandbox declares prettier, and the walk skips generated-locales. Optionally, refresh the description: its Evidence still lists files scanned 917 → 941 and its first line links a compare that stops at the first commit, while the file now records 910.
[Automated review]
Review only this PR's change: vjeux/astryx@84e8552...230185f
Why
Every Sandbox build runs the Motion Lab's audit generator, and the generator wrote its file unformatted while the checked-in copy is formatted. So each build left about 1,650 changed lines in the working tree (+243/−1,413) even when no count had changed, and anyone building the Sandbox had to discard them. The checked-in numbers were also stale: the file was last regenerated on Oct 26 (#8620), and core and lab have changed since.
What led to it
Running Sandbox builds left this file changed every time. Formatting it with Prettier gave exactly what the generator had written, so the churn was formatting alone; the real count changes were on top of that.
Options and tradeoffs
Why this choice
The generator now formats its output with the repository's Prettier config, as
scripts/generate-cldr-weekdays.mjsdoes, so a run whose counts are current changes nothing.check:motion-audit(--check) fails when the checked-in file is not what a run would write. The walk skips Core's generated locale modules, so the check passes in an install without scripts, and the Sandbox declaresprettier.The check is not part of the required checks: the audit measures core and lab sources, so requiring it would make every motion change in core or lab regenerate a Sandbox file and conflict with the others. The Sandbox build regenerates the file before building, so the published lab is current either way.
How to check it
pnpm -F @astryxdesign/sandbox check:motion-audit: on main it fails ("is not what a run writes now"); here it passes.pnpm -F @astryxdesign/sandbox generate:motion-audit, twice: here the tree stays clean; on main one run changes about 1,650 lines.Evidence
Counts that moved since Oct 26:
getComputedStylereads 85 → 112,setTimeoutliterals 1 → 3, files with reduced motion 52 → 55, animated files 96 → 99, files scanned 917 → 910, durations without a curve 12 → 13; several sites moved lines.