Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Commit

Permalink
fix: ensure package.json can be resolved on windows (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
smeijer authored May 18, 2023
1 parent b6202d1 commit dadc34b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 13,7 @@ type CacheMeta<T> = FileDescriptor['meta'] & { data: T };
// we keep cache groups per entry file, to keep the cache free from override conflicts
const caches: Record<string, FileEntryCache> = {};
const packageVersion = JSON.parse(
readFileSync(path.resolve(__dirname, '../package.json'), 'utf8'),
readFileSync(path.resolve(__dirname, '..', 'package.json'), 'utf8'),
).version;

export function getCacheIdentity(entry: EntryConfig): string {
Expand All @@ -25,6 25,7 @@ export function getCacheIdentity(entry: EntryConfig): string {
packageVersion,
});

console.log('val', value);
return hash(value);
}

Expand Down

0 comments on commit dadc34b

Please sign in to comment.