fix: match useCheckSum casing expected by file-entry-cache v11#18914
fix: match useCheckSum casing expected by file-entry-cache v11#18914paulofduarte wants to merge 2 commits intoprettier:mainfrom
useCheckSum casing expected by file-entry-cache v11#18914Conversation
`file-entry-cache` v11 expects `useCheckSum` (capital S) in its options, but Prettier passes `useChecksum` (lowercase s). JavaScript property access is case-sensitive, so the option is silently ignored. This causes `--cache-strategy content` to never enable content hashing. With both `useCheckSum` and `useModifiedTime` effectively false, the only change detection that runs is an unconditional file-size comparison. Any edit that preserves the byte count is invisible to the cache.
✅ Deploy Preview for prettier ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
|
Thanks for fixing this. Please follow the PR template, and fill nessary information instead of AI generate contents. Is it possible to add a test for it? |
|
Hi @fisker . I will update the PR tomorrow to follow the template. Will also include a test. The issue linked to the PR has the details to reproduce it. I'll add it as a test. Thanks. |
Add integration test verifying that --cache-strategy content detects file changes even when file size is unchanged. Add changelog entry.
|
Hi @fisker, first I would like to thank you for maintaining such an useful project, second for being patient for me not following the CONTRIBUTING.md and still responding an keeping the PR open. I hap updated the PR to follow the template and added a test to cover the bugfix. Please let me know if you need anything else. I am happy to make a tiny contribution to prettier. |
Description
Fix
--cache-strategy contentbeing silently ignored since thefile-entry-cachev10 → v11 upgrade.file-entry-cachev11 renamed its option fromuseChecksum(lowercases) touseCheckSum(capitalS). Prettier still passes the old casing, so the option is silently ignored — content hashing never activates and the cache falls back to file-size-only comparison.Fixes #18913.
Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.