file-entry-cache 10.0.0 → 10.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/index.cjs +2 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3
- package/package.json +12 -8
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
[](https://codecov.io/gh/jaredwray/cacheable)
|
|
7
7
|
[](https://github.com/jaredwray/cacheable/actions/workflows/tests.yml)
|
|
8
|
-
[](https://www.npmjs.com/package/file-entry-cache)
|
|
9
|
+
[](https://www.npmjs.com/package/file-entry-cache)
|
|
10
|
+
[](https://github.com/jaredwray/cacheable/blob/main/LICENSE)
|
|
11
11
|
|
|
12
12
|
# Features
|
|
13
13
|
|
package/dist/index.cjs
CHANGED
|
@@ -59,7 +59,6 @@ function create(cacheId, cacheDirectory, useCheckSum, currentWorkingDirectory) {
|
|
|
59
59
|
const cachePath = `${cacheDirectory}/${cacheId}`;
|
|
60
60
|
if (import_node_fs.default.existsSync(cachePath)) {
|
|
61
61
|
fileEntryCache.cache = (0, import_flat_cache.createFromFile)(cachePath, options.cache);
|
|
62
|
-
fileEntryCache.reconcile();
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
return fileEntryCache;
|
|
@@ -127,9 +126,9 @@ var FileEntryCache = class {
|
|
|
127
126
|
* @param {String} filePath
|
|
128
127
|
* @return {String}
|
|
129
128
|
*/
|
|
130
|
-
createFileKey(filePath,
|
|
129
|
+
createFileKey(filePath, options) {
|
|
131
130
|
let result = filePath;
|
|
132
|
-
const currentWorkingDirectory =
|
|
131
|
+
const currentWorkingDirectory = options?.currentWorkingDirectory ?? this._currentWorkingDirectory;
|
|
133
132
|
if (currentWorkingDirectory && filePath.startsWith(currentWorkingDirectory)) {
|
|
134
133
|
const splitPath = filePath.split(currentWorkingDirectory).pop();
|
|
135
134
|
if (splitPath) {
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -22,7 +22,6 @@ function create(cacheId, cacheDirectory, useCheckSum, currentWorkingDirectory) {
|
|
|
22
22
|
const cachePath = `${cacheDirectory}/${cacheId}`;
|
|
23
23
|
if (fs.existsSync(cachePath)) {
|
|
24
24
|
fileEntryCache.cache = createFlatCacheFile(cachePath, options.cache);
|
|
25
|
-
fileEntryCache.reconcile();
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
return fileEntryCache;
|
|
@@ -90,9 +89,9 @@ var FileEntryCache = class {
|
|
|
90
89
|
* @param {String} filePath
|
|
91
90
|
* @return {String}
|
|
92
91
|
*/
|
|
93
|
-
createFileKey(filePath,
|
|
92
|
+
createFileKey(filePath, options) {
|
|
94
93
|
let result = filePath;
|
|
95
|
-
const currentWorkingDirectory =
|
|
94
|
+
const currentWorkingDirectory = options?.currentWorkingDirectory ?? this._currentWorkingDirectory;
|
|
96
95
|
if (currentWorkingDirectory && filePath.startsWith(currentWorkingDirectory)) {
|
|
97
96
|
const splitPath = filePath.split(currentWorkingDirectory).pop();
|
|
98
97
|
if (splitPath) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "file-entry-cache",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2",
|
|
4
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",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -12,7 +12,11 @@
|
|
|
12
12
|
"import": "./dist/index.js"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
"repository":
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/jaredwray/cacheable.git",
|
|
18
|
+
"directory": "packages/file-entry-cache"
|
|
19
|
+
},
|
|
16
20
|
"author": "Jared Wray <me@jaredwray.com>",
|
|
17
21
|
"license": "MIT",
|
|
18
22
|
"private": false,
|
|
@@ -25,16 +29,16 @@
|
|
|
25
29
|
"cache"
|
|
26
30
|
],
|
|
27
31
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^22.
|
|
29
|
-
"@vitest/coverage-v8": "^2.1.
|
|
32
|
+
"@types/node": "^22.9.0",
|
|
33
|
+
"@vitest/coverage-v8": "^2.1.4",
|
|
30
34
|
"rimraf": "^6.0.1",
|
|
31
|
-
"tsup": "^8.3.
|
|
32
|
-
"typescript": "^5.6.
|
|
33
|
-
"vitest": "^2.1.
|
|
35
|
+
"tsup": "^8.3.5",
|
|
36
|
+
"typescript": "^5.6.3",
|
|
37
|
+
"vitest": "^2.1.4",
|
|
34
38
|
"xo": "^0.59.3"
|
|
35
39
|
},
|
|
36
40
|
"dependencies": {
|
|
37
|
-
"flat-cache": "^6.1.
|
|
41
|
+
"flat-cache": "^6.1.2"
|
|
38
42
|
},
|
|
39
43
|
"files": [
|
|
40
44
|
"dist",
|