You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
blocks-cli: generate cache ignores public/*.csv — CSV redirect changes leave a stale blocks.gen.json #667
generate's blocks step is cached by .deco/generate.digests.json, and its inputs are only the top-level JSON files of .deco/blocks (scripts/generate.ts ~l.572, listTopLevelJson). The CSV redirects it materializes (__csv_redirects__<file> via lib/csv-redirects.ts) are read from public/<file>.csv, which is not part of the digest.
So updating only public/redirects.csv (the usual way a storefront ships new SEO redirects) leaves a stale .deco/blocks.gen.json wherever the file already exists: bun run generate / bun run build report the blocks step as cached and the old rules keep answering. Measured on deco-sites/oficina-tanstack after syncing 475 changed rows: /calca-linho-cinza-0076697020/p kept the old target (301 to another product) until generate --only blocks --force. Fresh CI checkouts are unaffected only because blocks.gen.json is gitignored and absent.
Proposal
Add every CSV referenced by a website/loaders/redirectsFromCsv.ts block (resolved the same way buildCsvRedirectBlocks does) to the blocks step's digest inputs.
Found while validating deco-sites/oficina-tanstack#479.
Activity