Describe the bug
When file-entry-cache creates a new instance from a file, and a "cached" file had changed before cache instance was created, it reports that the "cached" file did not change.
There is a cache file containing metadata of file X
File X changes
file-entry-cache creates a new cache instance from the cache file
file-entry-cache analyzeFiles and getUpdatedFiles do not report file X as changed
This is a regression in version 10.0.0 - according to npm's versioning. I don't know how cacheable date based versioning relates to npm's semver.
yarn fails2 - does not detect file changes.
If in package.json you switch to file-entry-cache version 9.1.0 and run yarn to reinstall packages, then fail1 and fail2 scripts detect file changes.
Describe the bug When file-entry-cache creates a new instance from a file, and a "cached" file had changed before cache instance was created, it reports that the "cached" file did not change.
analyzeFiles
andgetUpdatedFiles
do not report file X as changedThis is a regression in version 10.0.0 - according to npm's versioning. I don't know how
cacheable
date based versioning relates to npm's semver.How To Reproduce Codesandbox example: https://codesandbox.io/p/devbox/c3rx6r From the terminal you can run:
yarn works
- works as expectedyarn fails1
- does not detect file changesyarn fails2
- does not detect file changes. If inpackage.json
you switch tofile-entry-cache
version 9.1.0 and runyarn
to reinstall packages, thenfail1
andfail2
scripts detect file changes.I will also provide unit tests in a pull request.