knip 2.33.2 → 2.33.3
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { VitestConfigOrFn } from './types.js';
|
|
2
2
|
import type { IsPluginEnabledCallback, GenericPluginCallback, GenericPluginCallbackOptions } from '../../types/plugins.js';
|
|
3
3
|
export declare const NAME = "Vitest";
|
|
4
4
|
export declare const ENABLERS: string[];
|
|
5
5
|
export declare const isEnabled: IsPluginEnabledCallback;
|
|
6
6
|
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
7
7
|
export declare const ENTRY_FILE_PATTERNS: string[];
|
|
8
|
-
export declare const findVitestDeps: (config:
|
|
8
|
+
export declare const findVitestDeps: (config: VitestConfigOrFn, options: GenericPluginCallbackOptions) => any[];
|
|
9
9
|
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -10,7 +10,10 @@ export const CONFIG_FILE_PATTERNS = ['vitest.config.ts', 'vitest.{workspace,proj
|
|
|
10
10
|
export const ENTRY_FILE_PATTERNS = ['**/*.{test,spec}.?(c|m)[jt]s?(x)'];
|
|
11
11
|
export const findVitestDeps = (config, options) => {
|
|
12
12
|
const { isProduction } = options;
|
|
13
|
-
if (!config
|
|
13
|
+
if (!config)
|
|
14
|
+
return [];
|
|
15
|
+
config = typeof config === 'function' ? config() : config;
|
|
16
|
+
if (!config.test)
|
|
14
17
|
return [];
|
|
15
18
|
const testConfig = config.test;
|
|
16
19
|
const entryPatterns = (options.config?.entry ?? testConfig.include ?? ENTRY_FILE_PATTERNS).map(toEntryPattern);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.33.
|
|
1
|
+
export declare const version = "2.33.3";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.33.
|
|
1
|
+
export const version = '2.33.3';
|
package/package.json
CHANGED