knip 5.63.0 → 5.63.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.
Files changed (103) hide show
  1. package/dist/CacheConsultant.d.ts +3 -9
  2. package/dist/CacheConsultant.js +5 -5
  3. package/dist/ConfigurationChief.d.ts +585 -38
  4. package/dist/ConfigurationChief.js +33 -122
  5. package/dist/ConsoleStreamer.d.ts +2 -3
  6. package/dist/ConsoleStreamer.js +2 -2
  7. package/dist/DependencyDeputy.d.ts +2 -6
  8. package/dist/IssueCollector.d.ts +4 -12
  9. package/dist/IssueCollector.js +9 -9
  10. package/dist/IssueFixer.d.ts +3 -14
  11. package/dist/IssueFixer.js +11 -21
  12. package/dist/PrincipalFactory.d.ts +3 -2
  13. package/dist/PrincipalFactory.js +11 -11
  14. package/dist/ProjectPrincipal.d.ts +4 -3
  15. package/dist/ProjectPrincipal.js +8 -8
  16. package/dist/WorkspaceWorker.d.ts +4 -9
  17. package/dist/WorkspaceWorker.js +8 -12
  18. package/dist/binaries/bash-parser.js +1 -1
  19. package/dist/binaries/fallback.js +1 -1
  20. package/dist/binaries/package-manager/pnpm.js +6 -1
  21. package/dist/cli.js +43 -61
  22. package/dist/compilers/index.d.ts +14 -4
  23. package/dist/graph/analyze.d.ts +3 -8
  24. package/dist/graph/analyze.js +24 -27
  25. package/dist/graph/build.d.ts +3 -17
  26. package/dist/graph/build.js +42 -39
  27. package/dist/index.d.ts +3 -7
  28. package/dist/index.js +22 -62
  29. package/dist/plugins/index.d.ts +5 -0
  30. package/dist/plugins/index.js +2 -0
  31. package/dist/plugins/nuxt/index.js +4 -3
  32. package/dist/plugins/nuxt/types.d.ts +3 -2
  33. package/dist/plugins/pnpm/index.d.ts +7 -0
  34. package/dist/plugins/pnpm/index.js +8 -0
  35. package/dist/plugins/rsbuild/index.js +23 -6
  36. package/dist/plugins/rsbuild/types.d.ts +3 -0
  37. package/dist/plugins.js +3 -2
  38. package/dist/reporters/codeclimate.d.ts +1 -1
  39. package/dist/reporters/codeclimate.js +10 -10
  40. package/dist/reporters/codeowners.d.ts +1 -1
  41. package/dist/reporters/codeowners.js +5 -5
  42. package/dist/reporters/compact.d.ts +1 -1
  43. package/dist/reporters/compact.js +7 -7
  44. package/dist/reporters/disclosure.d.ts +1 -1
  45. package/dist/reporters/disclosure.js +2 -2
  46. package/dist/reporters/index.d.ts +6 -6
  47. package/dist/reporters/json.d.ts +1 -1
  48. package/dist/reporters/json.js +3 -3
  49. package/dist/reporters/markdown.d.ts +1 -1
  50. package/dist/reporters/markdown.js +4 -4
  51. package/dist/reporters/symbols.js +1 -1
  52. package/dist/reporters/util/configuration-hints.d.ts +1 -1
  53. package/dist/reporters/util/configuration-hints.js +6 -7
  54. package/dist/reporters/util/util.d.ts +2 -2
  55. package/dist/reporters/util/util.js +4 -4
  56. package/dist/reporters/watch.d.ts +3 -4
  57. package/dist/reporters/watch.js +5 -5
  58. package/dist/schema/configuration.d.ts +64 -8
  59. package/dist/schema/plugins.d.ts +23 -0
  60. package/dist/schema/plugins.js +1 -0
  61. package/dist/types/PluginNames.d.ts +2 -2
  62. package/dist/types/PluginNames.js +1 -0
  63. package/dist/types/config.d.ts +4 -10
  64. package/dist/types/issues.d.ts +1 -2
  65. package/dist/types/{cli.d.ts → options.d.ts} +2 -2
  66. package/dist/types/package-json.d.ts +1 -0
  67. package/dist/types/project.d.ts +1 -7
  68. package/dist/typescript/get-imports-and-exports.d.ts +2 -2
  69. package/dist/typescript/get-imports-and-exports.js +9 -10
  70. package/dist/util/Performance.js +16 -6
  71. package/dist/util/cli-arguments.d.ts +1 -2
  72. package/dist/util/cli-arguments.js +3 -13
  73. package/dist/util/create-options.d.ts +1219 -0
  74. package/dist/util/create-options.js +112 -0
  75. package/dist/util/debug.js +3 -4
  76. package/dist/util/errors.d.ts +1 -1
  77. package/dist/util/file-entry-cache.js +3 -3
  78. package/dist/util/get-included-issue-types.d.ts +9 -13
  79. package/dist/util/get-included-issue-types.js +10 -16
  80. package/dist/util/get-referenced-inputs.js +1 -1
  81. package/dist/util/input.d.ts +1 -1
  82. package/dist/util/input.js +1 -1
  83. package/dist/util/is-identifier-referenced.d.ts +1 -1
  84. package/dist/util/is-identifier-referenced.js +2 -2
  85. package/dist/util/load-config.d.ts +1 -0
  86. package/dist/util/load-config.js +24 -0
  87. package/dist/util/path.d.ts +4 -4
  88. package/dist/util/path.js +5 -7
  89. package/dist/util/require.js +1 -2
  90. package/dist/util/tag.d.ts +1 -1
  91. package/dist/util/to-source-path.d.ts +1 -1
  92. package/dist/util/to-source-path.js +5 -5
  93. package/dist/util/trace.d.ts +6 -6
  94. package/dist/util/trace.js +18 -22
  95. package/dist/util/watch.d.ts +2 -5
  96. package/dist/util/watch.js +3 -3
  97. package/dist/version.d.ts +1 -1
  98. package/dist/version.js +1 -1
  99. package/package.json +2 -2
  100. package/schema.json +4 -0
  101. package/dist/util/unwrap-function.d.ts +0 -1
  102. package/dist/util/unwrap-function.js +0 -13
  103. /package/dist/types/{cli.js → options.js} +0 -0
@@ -1,15 +1,9 @@
1
+ import type { MainOptions } from './util/create-options.js';
1
2
  import { type FileDescriptor } from './util/file-entry-cache.js';
2
- type CacheOptions = {
3
- name: string;
4
- isEnabled: boolean;
5
- cacheLocation: string;
6
- isProduction: boolean;
7
- };
8
3
  export declare class CacheConsultant<T> {
9
4
  private isEnabled;
10
5
  private cache;
11
- constructor(options: CacheOptions);
12
- getFileDescriptor(file: string): FileDescriptor<T>;
6
+ constructor(name: string, options: MainOptions);
7
+ getFileDescriptor(filePath: string): FileDescriptor<T>;
13
8
  reconcile(): void;
14
9
  }
15
- export {};
@@ -5,18 +5,18 @@ const dummyFileDescriptor = { key: '', changed: true, notFound: true };
5
5
  export class CacheConsultant {
6
6
  isEnabled;
7
7
  cache;
8
- constructor(options) {
9
- this.isEnabled = options.isEnabled;
8
+ constructor(name, options) {
9
+ this.isEnabled = options.isCache;
10
10
  if (this.isEnabled) {
11
- const cacheName = `${options.name.replace(/[^a-z0-9]/g, '-').replace(/-*$/, '')}-${options.isProduction ? '-prod' : ''}-${version}`;
11
+ const cacheName = `${name.replace(/[^a-z0-9]/g, '-').replace(/-*$/, '')}-${options.isProduction ? '-prod' : ''}-${version}`;
12
12
  this.cache = new FileEntryCache(cacheName, options.cacheLocation);
13
13
  this.reconcile = timerify(this.cache.reconcile).bind(this.cache);
14
14
  this.getFileDescriptor = timerify(this.cache.getFileDescriptor).bind(this.cache);
15
15
  }
16
16
  }
17
- getFileDescriptor(file) {
17
+ getFileDescriptor(filePath) {
18
18
  if (this.isEnabled && this.cache)
19
- return this.cache.getFileDescriptor(file);
19
+ return this.cache.getFileDescriptor(filePath);
20
20
  return dummyFileDescriptor;
21
21
  }
22
22
  reconcile() {