Skip to content

Commit

Permalink
file-entry-cache - changed does not get set on meta.data changes (#906)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredwray authored Nov 24, 2024
1 parent e7c87b2 commit 7d34f45
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/file-entry-cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "file-entry-cache",
"version": "10.0.3",
"version": "10.0.4",
"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",
"type": "module",
"main": "./dist/index.cjs",
Expand Down
4 changes: 0 additions & 4 deletions packages/file-entry-cache/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ export class FileEntryCache {
return result;
}

if (result.meta.data !== metaCache.data) {
result.changed = true;
}

// Set the data from the cache
if (result.meta.data === undefined) {
result.meta.data = metaCache.data;
Expand Down
2 changes: 1 addition & 1 deletion packages/file-entry-cache/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ describe('getFileDescriptor()', () => {
const fileDescriptor4 = fileEntryCache3.getFileDescriptor(testFile1);
expect(fileDescriptor4).toBeDefined();
expect(fileDescriptor4.meta.data).toEqual(data2);
expect(fileDescriptor4.changed).toEqual(true);
expect(fileDescriptor4.changed).toEqual(false);
});

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

0 comments on commit 7d34f45

Please sign in to comment.