knip 2.32.3 → 2.32.4
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/dist/plugins/ava/index.js +11 -9
- package/dist/plugins/ava/types.d.ts +4 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -7,19 +7,21 @@ export const ENABLERS = ['ava'];
|
|
|
7
7
|
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
8
8
|
export const CONFIG_FILE_PATTERNS = ['ava.config.{js,cjs,mjs}', 'package.json'];
|
|
9
9
|
export const ENTRY_FILE_PATTERNS = [
|
|
10
|
-
`test.{js,cjs,mjs}`,
|
|
11
|
-
`{src,source}/test.{js,cjs,mjs}`,
|
|
12
|
-
`**/__tests__/**/*.{js,cjs,mjs}`,
|
|
13
|
-
`**/*.spec.{js,cjs,mjs}`,
|
|
14
|
-
`**/*.test.{js,cjs,mjs}`,
|
|
15
|
-
`**/test-*.{js,cjs,mjs}`,
|
|
16
|
-
`**/test/**/*.{js,cjs,mjs}`,
|
|
17
|
-
`**/tests/**/*.{js,cjs,mjs}`,
|
|
10
|
+
`test.{js,cjs,mjs,ts}`,
|
|
11
|
+
`{src,source}/test.{js,cjs,mjs,ts}`,
|
|
12
|
+
`**/__tests__/**/*.{js,cjs,mjs,ts}`,
|
|
13
|
+
`**/*.spec.{js,cjs,mjs,ts}`,
|
|
14
|
+
`**/*.test.{js,cjs,mjs,ts}`,
|
|
15
|
+
`**/test-*.{js,cjs,mjs,ts}`,
|
|
16
|
+
`**/test/**/*.{js,cjs,mjs,ts}`,
|
|
17
|
+
`**/tests/**/*.{js,cjs,mjs,ts}`,
|
|
18
18
|
'!**/__tests__/**/__{helper,fixture}?(s)__/**/*',
|
|
19
19
|
'!**/test?(s)/**/{helper,fixture}?(s)/**/*',
|
|
20
20
|
];
|
|
21
21
|
const findAvaDependencies = async (configFilePath, { cwd, manifest, isProduction }) => {
|
|
22
|
-
|
|
22
|
+
let config = configFilePath.endsWith('package.json') ? manifest.ava : await load(configFilePath);
|
|
23
|
+
if (typeof config === 'function')
|
|
24
|
+
config = config();
|
|
23
25
|
const entryPatterns = (config?.files ?? ENTRY_FILE_PATTERNS).map(toEntryPattern);
|
|
24
26
|
if (isProduction)
|
|
25
27
|
return entryPatterns;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.32.
|
|
1
|
+
export declare const version = "2.32.4";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.32.
|
|
1
|
+
export const version = '2.32.4';
|
package/package.json
CHANGED