Skip to content

Commit 7d34f45

Browse files
authored
file-entry-cache - changed does not get set on meta.data changes (#906)
1 parent e7c87b2 commit 7d34f45

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

packages/file-entry-cache/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "file-entry-cache",
3-
"version": "10.0.3",
3+
"version": "10.0.4",
44
"description": "A lightweight cache for file metadata, ideal for processes that work on a specific set of files and only need to reprocess files that have changed since the last run",
55
"type": "module",
66
"main": "./dist/index.cjs",

packages/file-entry-cache/src/index.ts

-4
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,6 @@ export class FileEntryCache {
290290
return result;
291291
}
292292

293-
if (result.meta.data !== metaCache.data) {
294-
result.changed = true;
295-
}
296-
297293
// Set the data from the cache
298294
if (result.meta.data === undefined) {
299295
result.meta.data = metaCache.data;

packages/file-entry-cache/test/index.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ describe('getFileDescriptor()', () => {
188188
const fileDescriptor4 = fileEntryCache3.getFileDescriptor(testFile1);
189189
expect(fileDescriptor4).toBeDefined();
190190
expect(fileDescriptor4.meta.data).toEqual(data2);
191-
expect(fileDescriptor4.changed).toEqual(true);
191+
expect(fileDescriptor4.changed).toEqual(false);
192192
});
193193

194194
test('should return a file descriptor', () => {

0 commit comments

Comments
 (0)