Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

file-entry-cache

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-entry-cache - npm Package Compare versions

Comparing version 10.0.2 to 10.0.3

13

dist/index.js

@@ -34,3 +34,3 @@ // src/index.ts

var FileEntryCache = class {
_cache = new FlatCache();
_cache = new FlatCache({ useClone: false });
_useCheckSum = false;

@@ -186,2 +186,3 @@ _currentWorkingDirectory;

};
result.meta = this._cache.getKey(result.key) ?? {};
filePath = this.getAbsolutePath(filePath, { currentWorkingDirectory: options?.currentWorkingDirectory });

@@ -218,11 +219,15 @@ const useCheckSumValue = options?.useCheckSum ?? this._useCheckSum;

}
result.meta.data = metaCache.data;
if (result.meta.data !== metaCache.data) {
result.changed = true;
}
if (result.meta.data === void 0) {
result.meta.data = metaCache.data;
}
if (metaCache?.mtime !== result.meta?.mtime || metaCache?.size !== result.meta?.size) {
result.changed = true;
this._cache.setKey(result.key, result.meta);
}
if (useCheckSumValue && metaCache?.hash !== result.meta?.hash) {
result.changed = true;
this._cache.setKey(result.key, result.meta);
}
this._cache.setKey(result.key, result.meta);
return result;

@@ -229,0 +234,0 @@ }

{
"name": "file-entry-cache",
"version": "10.0.2",
"version": "10.0.3",
"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",

@@ -32,8 +32,8 @@ "type": "module",

"devDependencies": {
"@types/node": "^22.9.0",
"@vitest/coverage-v8": "^2.1.4",
"@types/node": "^22.9.3",
"@vitest/coverage-v8": "^2.1.5",
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"typescript": "^5.6.3",
"vitest": "^2.1.4",
"typescript": "^5.7.2",
"vitest": "^2.1.5",
"xo": "^0.59.3"

@@ -40,0 +40,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc