knip 5.11.0 → 5.12.0

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/constants.js CHANGED
@@ -14,6 +14,7 @@ export const GLOBAL_IGNORE_PATTERNS = ['**/node_modules/**', '.yarn'];
14
14
  export const IGNORED_GLOBAL_BINARIES = new Set([
15
15
  'bash',
16
16
  'bun',
17
+ 'bundle',
17
18
  'bunx',
18
19
  'cat',
19
20
  'cd',
@@ -25,12 +26,15 @@ export const IGNORED_GLOBAL_BINARIES = new Set([
25
26
  'dirname',
26
27
  'docker',
27
28
  'echo',
29
+ 'env',
28
30
  'exec',
29
31
  'exit',
30
32
  'find',
33
+ 'gem',
31
34
  'git',
32
35
  'grep',
33
36
  'gzip',
37
+ 'ln',
34
38
  'ls',
35
39
  'mkdir',
36
40
  'mv',
@@ -48,6 +52,7 @@ export const IGNORED_GLOBAL_BINARIES = new Set([
48
52
  'true',
49
53
  'yarn',
50
54
  'xargs',
55
+ 'xcodebuild',
51
56
  ]);
52
57
  export const IGNORED_DEPENDENCIES = new Set(['knip', 'typescript']);
53
58
  export const IGNORED_RUNTIME_DEPENDENCIES = new Set(['bun']);
@@ -1,10 +1,17 @@
1
+ import { isFile } from '#p/util/fs.js';
2
+ import { join } from '#p/util/path.js';
1
3
  import { hasDependency } from '#p/util/plugin.js';
2
4
  const title = 'Capacitor';
3
5
  const enablers = [/^@capacitor\//];
4
6
  const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
5
7
  const config = ['capacitor.config.{json,ts}'];
6
- const resolveConfig = config => {
7
- return config.includePlugins ?? [];
8
+ const resolveConfig = async (config, { configFileDir }) => {
9
+ const exists = (filePath) => isFile(join(configFileDir, filePath));
10
+ const plugins = config.includePlugins ?? [];
11
+ const android = (await exists('android/capacitor.settings.gradle')) ? ['@capacitor/android'] : [];
12
+ const ios = (await exists('ios/App/Podfile')) ? ['@capacitor/ios'] : [];
13
+ console.log({ android, ios });
14
+ return [...plugins, ...android, ...ios];
8
15
  };
9
16
  export default {
10
17
  title,
@@ -7,7 +7,7 @@ const productionEntryFilePatternsWithoutSrc = [
7
7
  '{instrumentation,middleware}.{js,ts}',
8
8
  'app/global-error.{js,jsx,ts,tsx}',
9
9
  'app/**/{error,layout,loading,not-found,page,template,default}.{js,jsx,ts,tsx}',
10
- 'app/**/route.{js,ts}',
10
+ 'app/**/route.{js,jsx,ts,tsx}',
11
11
  'app/{manifest,sitemap,robots}.{js,ts}',
12
12
  'app/**/{icon,apple-icon}.{js,jsx,ts,tsx}',
13
13
  'app/**/{opengraph,twitter}-image.{js,jsx,ts,tsx}',
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.11.0";
1
+ export declare const version = "5.12.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.11.0';
1
+ export const version = '5.12.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.11.0",
3
+ "version": "5.12.0",
4
4
  "description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://knip.dev",
6
6
  "repository": {