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 CHANGED
@@ -5,9 +5,9 @@
5
5
 
6
6
  [![codecov](https://codecov.io/gh/jaredwray/cacheable/graph/badge.svg?token=lWZ9OBQ7GM)](https://codecov.io/gh/jaredwray/cacheable)
7
7
  [![tests](https://github.com/jaredwray/cacheable/actions/workflows/tests.yml/badge.svg)](https://github.com/jaredwray/cacheable/actions/workflows/tests.yml)
8
- [![npm](https://img.shields.io/npm/dm/flat-cache.svg)](https://www.npmjs.com/package/flat-cache)
9
- [![npm](https://img.shields.io/npm/v/flat-cache)](https://www.npmjs.com/package/flat-cache)
10
- [![GitHub](https://img.shields.io/github/license/jaredwray/cacheable)](https://github.com/jaredwray/cacheable/blob/main/LICENSE)
8
+ [![npm](https://img.shields.io/npm/dm/file-entry-cache.svg)](https://www.npmjs.com/package/file-entry-cache)
9
+ [![npm](https://img.shields.io/npm/v/file-entry-cache)](https://www.npmjs.com/package/file-entry-cache)
10
+ [![license](https://img.shields.io/github/license/jaredwray/cacheable)](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, optons) {
129
+ createFileKey(filePath, options) {
131
130
  let result = filePath;
132
- const currentWorkingDirectory = optons?.currentWorkingDirectory ?? this._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
@@ -61,7 +61,7 @@ declare class FileEntryCache {
61
61
  * @param {String} filePath
62
62
  * @return {String}
63
63
  */
64
- createFileKey(filePath: string, optons?: {
64
+ createFileKey(filePath: string, options?: {
65
65
  currentWorkingDirectory?: string;
66
66
  }): string;
67
67
  /**
package/dist/index.d.ts CHANGED
@@ -61,7 +61,7 @@ declare class FileEntryCache {
61
61
  * @param {String} filePath
62
62
  * @return {String}
63
63
  */
64
- createFileKey(filePath: string, optons?: {
64
+ createFileKey(filePath: string, options?: {
65
65
  currentWorkingDirectory?: string;
66
66
  }): string;
67
67
  /**
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, optons) {
92
+ createFileKey(filePath, options) {
94
93
  let result = filePath;
95
- const currentWorkingDirectory = optons?.currentWorkingDirectory ?? this._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.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": "https://github.com/jaredwray/cacheable.git",
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.7.4",
29
- "@vitest/coverage-v8": "^2.1.1",
32
+ "@types/node": "^22.9.0",
33
+ "@vitest/coverage-v8": "^2.1.4",
30
34
  "rimraf": "^6.0.1",
31
- "tsup": "^8.3.0",
32
- "typescript": "^5.6.2",
33
- "vitest": "^2.1.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.0"
41
+ "flat-cache": "^6.1.2"
38
42
  },
39
43
  "files": [
40
44
  "dist",