knip 5.41.0 → 5.41.1

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
@@ -28,9 +28,7 @@ less maintenance and easier refactorings.
28
28
 
29
29
  ## Contributors
30
30
 
31
- Special thanks to the wonderful people who have contributed to this project:
32
-
33
- [![Contributors][9]][8]
31
+ Special thanks to [the wonderful people who have contributed Knip][8]!
34
32
 
35
33
  ## Knip
36
34
 
@@ -43,5 +41,4 @@ Special thanks to the wonderful people who have contributed to this project:
43
41
  [5]: https://github.com/webpro-nl/knip/blob/main/.github/CONTRIBUTING.md
44
42
  [6]: https://knip.dev/sponsors
45
43
  [7]: https://www.youtube.com/watch?v=PE7h7KvQoUI&t=9s
46
- [8]: https://github.com/webpro-nl/knip/graphs/contributors
47
- [9]: https://contrib.rocks/image?repo=webpro-nl/knip
44
+ [8]: https://knip.dev/#-contributors
@@ -1,5 +1,7 @@
1
1
  import fs from 'node:fs';
2
+ import path from 'node:path';
2
3
  import { timerify } from './Performance.js';
4
+ import parsedArgValues from './cli-arguments.js';
3
5
  import { debugLog } from './debug.js';
4
6
  import { isDirectory, isFile } from './fs.js';
5
7
  import { dirname, isAbsolute, resolve } from './path.js';
@@ -19,7 +21,9 @@ export class FileEntryCache {
19
21
  cache = new Map();
20
22
  normalizedEntries = new Map();
21
23
  constructor(cacheId, _path) {
22
- this.filePath = isAbsolute(_path) ? resolve(_path, cacheId) : resolve(cwd, _path, cacheId);
24
+ const { 'cache-location': cacheLocation } = parsedArgValues;
25
+ const currentPath = cacheLocation ? path.resolve(cacheLocation) : path.resolve(cwd);
26
+ this.filePath = isAbsolute(currentPath) ? path.join(currentPath, cacheId) : path.join(currentPath, _path, cacheId);
23
27
  if (isFile(this.filePath))
24
28
  this.cache = create(this.filePath);
25
29
  this.removeNotFoundFiles();
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.41.0";
1
+ export declare const version = "5.41.1";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.41.0';
1
+ export const version = '5.41.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.41.0",
3
+ "version": "5.41.1",
4
4
  "description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://knip.dev",
6
6
  "repository": {