knip 5.40.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
@@ -87,6 +87,7 @@ export declare class ConfigurationChief {
87
87
  drizzle?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
88
88
  eleventy?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
89
89
  eslint?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
90
+ expo?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
90
91
  gatsby?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
91
92
  "github-actions"?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
92
93
  glob?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
@@ -236,6 +236,19 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
236
236
  entry?: string | string[] | undefined;
237
237
  project?: string | string[] | undefined;
238
238
  }>]>>;
239
+ expo: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
240
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
241
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
242
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
243
+ }, "strip", z.ZodTypeAny, {
244
+ config?: string | string[] | undefined;
245
+ entry?: string | string[] | undefined;
246
+ project?: string | string[] | undefined;
247
+ }, {
248
+ config?: string | string[] | undefined;
249
+ entry?: string | string[] | undefined;
250
+ project?: string | string[] | undefined;
251
+ }>]>>;
239
252
  gatsby: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
240
253
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
241
254
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1260,6 +1273,11 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
1260
1273
  entry?: string | string[] | undefined;
1261
1274
  project?: string | string[] | undefined;
1262
1275
  } | undefined;
1276
+ expo?: string | boolean | string[] | {
1277
+ config?: string | string[] | undefined;
1278
+ entry?: string | string[] | undefined;
1279
+ project?: string | string[] | undefined;
1280
+ } | undefined;
1263
1281
  gatsby?: string | boolean | string[] | {
1264
1282
  config?: string | string[] | undefined;
1265
1283
  entry?: string | string[] | undefined;
@@ -1709,6 +1727,11 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
1709
1727
  entry?: string | string[] | undefined;
1710
1728
  project?: string | string[] | undefined;
1711
1729
  } | undefined;
1730
+ expo?: string | boolean | string[] | {
1731
+ config?: string | string[] | undefined;
1732
+ entry?: string | string[] | undefined;
1733
+ project?: string | string[] | undefined;
1734
+ } | undefined;
1712
1735
  gatsby?: string | boolean | string[] | {
1713
1736
  config?: string | string[] | undefined;
1714
1737
  entry?: string | string[] | undefined;
@@ -2280,6 +2303,19 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
2280
2303
  entry?: string | string[] | undefined;
2281
2304
  project?: string | string[] | undefined;
2282
2305
  }>]>>;
2306
+ expo: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2307
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2308
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2309
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2310
+ }, "strip", z.ZodTypeAny, {
2311
+ config?: string | string[] | undefined;
2312
+ entry?: string | string[] | undefined;
2313
+ project?: string | string[] | undefined;
2314
+ }, {
2315
+ config?: string | string[] | undefined;
2316
+ entry?: string | string[] | undefined;
2317
+ project?: string | string[] | undefined;
2318
+ }>]>>;
2283
2319
  gatsby: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2284
2320
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2285
2321
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -3306,6 +3342,11 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
3306
3342
  entry?: string | string[] | undefined;
3307
3343
  project?: string | string[] | undefined;
3308
3344
  } | undefined;
3345
+ expo?: string | boolean | string[] | {
3346
+ config?: string | string[] | undefined;
3347
+ entry?: string | string[] | undefined;
3348
+ project?: string | string[] | undefined;
3349
+ } | undefined;
3309
3350
  gatsby?: string | boolean | string[] | {
3310
3351
  config?: string | string[] | undefined;
3311
3352
  entry?: string | string[] | undefined;
@@ -3761,6 +3802,11 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
3761
3802
  entry?: string | string[] | undefined;
3762
3803
  project?: string | string[] | undefined;
3763
3804
  } | undefined;
3805
+ expo?: string | boolean | string[] | {
3806
+ config?: string | string[] | undefined;
3807
+ entry?: string | string[] | undefined;
3808
+ project?: string | string[] | undefined;
3809
+ } | undefined;
3764
3810
  gatsby?: string | boolean | string[] | {
3765
3811
  config?: string | string[] | undefined;
3766
3812
  entry?: string | string[] | undefined;
@@ -4213,6 +4259,11 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
4213
4259
  entry?: string | string[] | undefined;
4214
4260
  project?: string | string[] | undefined;
4215
4261
  } | undefined;
4262
+ expo?: string | boolean | string[] | {
4263
+ config?: string | string[] | undefined;
4264
+ entry?: string | string[] | undefined;
4265
+ project?: string | string[] | undefined;
4266
+ } | undefined;
4216
4267
  gatsby?: string | boolean | string[] | {
4217
4268
  config?: string | string[] | undefined;
4218
4269
  entry?: string | string[] | undefined;
@@ -4668,6 +4719,11 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
4668
4719
  entry?: string | string[] | undefined;
4669
4720
  project?: string | string[] | undefined;
4670
4721
  } | undefined;
4722
+ expo?: string | boolean | string[] | {
4723
+ config?: string | string[] | undefined;
4724
+ entry?: string | string[] | undefined;
4725
+ project?: string | string[] | undefined;
4726
+ } | undefined;
4671
4727
  gatsby?: string | boolean | string[] | {
4672
4728
  config?: string | string[] | undefined;
4673
4729
  entry?: string | string[] | undefined;
@@ -93,6 +93,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
93
93
  entry?: string | string[] | undefined;
94
94
  project?: string | string[] | undefined;
95
95
  } | undefined;
96
+ expo?: string | boolean | string[] | {
97
+ config?: string | string[] | undefined;
98
+ entry?: string | string[] | undefined;
99
+ project?: string | string[] | undefined;
100
+ } | undefined;
96
101
  gatsby?: string | boolean | string[] | {
97
102
  config?: string | string[] | undefined;
98
103
  entry?: string | string[] | undefined;
@@ -546,6 +551,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
546
551
  entry?: string | string[] | undefined;
547
552
  project?: string | string[] | undefined;
548
553
  } | undefined;
554
+ expo?: string | boolean | string[] | {
555
+ config?: string | string[] | undefined;
556
+ entry?: string | string[] | undefined;
557
+ project?: string | string[] | undefined;
558
+ } | undefined;
549
559
  gatsby?: string | boolean | string[] | {
550
560
  config?: string | string[] | undefined;
551
561
  entry?: string | string[] | undefined;
@@ -0,0 +1,4 @@
1
+ import type { PluginOptions } from '../../types/config.js';
2
+ import { type Input } from '../../util/input.js';
3
+ import type { ExpoConfig } from './types.js';
4
+ export declare const getDependencies: (expoConfig: ExpoConfig, { manifest }: PluginOptions) => Promise<Input[]>;
@@ -0,0 +1,51 @@
1
+ import { toDependency, toProductionDependency } from '../../util/input.js';
2
+ import { getPackageNameFromModuleSpecifier } from '../../util/modules.js';
3
+ export const getDependencies = async (expoConfig, { manifest }) => {
4
+ const config = 'expo' in expoConfig ? expoConfig.expo : expoConfig;
5
+ const platforms = config.platforms ?? ['ios', 'android'];
6
+ const pluginPackages = config.plugins
7
+ ?.map(plugin => {
8
+ const pluginName = Array.isArray(plugin) ? plugin[0] : plugin;
9
+ return getPackageNameFromModuleSpecifier(pluginName);
10
+ })
11
+ .filter(Boolean) ?? [];
12
+ const inputs = new Set(pluginPackages.map(toDependency));
13
+ const allowedPackages = ['expo-atlas', 'expo-dev-client'];
14
+ const allowedProductionPackages = ['expo-insights'];
15
+ const manifestDependencies = Object.keys(manifest.dependencies ?? {});
16
+ for (const pkg of allowedPackages) {
17
+ if (manifestDependencies.includes(pkg)) {
18
+ inputs.add(toDependency(pkg));
19
+ }
20
+ }
21
+ for (const pkg of allowedProductionPackages) {
22
+ if (manifestDependencies.includes(pkg)) {
23
+ inputs.add(toProductionDependency(pkg));
24
+ }
25
+ }
26
+ if (config.updates?.enabled !== false) {
27
+ inputs.add(toProductionDependency('expo-updates'));
28
+ }
29
+ if (config.notification) {
30
+ inputs.add(toProductionDependency('expo-notifications'));
31
+ }
32
+ const isExpoRouter = manifest.main === 'expo-router/entry';
33
+ if (isExpoRouter) {
34
+ inputs.add(toProductionDependency('expo-router'));
35
+ }
36
+ if (platforms.includes('web')) {
37
+ inputs.add(toProductionDependency('react-native-web'));
38
+ inputs.add(toProductionDependency('react-dom'));
39
+ if (!isExpoRouter) {
40
+ inputs.add(toDependency('@expo/metro-runtime'));
41
+ }
42
+ }
43
+ if ((platforms.includes('android') && (config.userInterfaceStyle || config.android?.userInterfaceStyle)) ||
44
+ (platforms.includes('ios') && (config.backgroundColor || config.ios?.backgroundColor))) {
45
+ inputs.add(toProductionDependency('expo-system-ui'));
46
+ }
47
+ if (platforms.includes('android') && config.androidNavigationBar) {
48
+ inputs.add(toProductionDependency('expo-navigation-bar'));
49
+ }
50
+ return [...inputs];
51
+ };
@@ -0,0 +1,11 @@
1
+ import type { IsPluginEnabled, ResolveConfig, ResolveEntryPaths } from '../../types/config.js';
2
+ import type { ExpoConfig } from './types.js';
3
+ declare const _default: {
4
+ title: string;
5
+ enablers: string[];
6
+ isEnabled: IsPluginEnabled;
7
+ config: string[];
8
+ resolveEntryPaths: ResolveEntryPaths<ExpoConfig>;
9
+ resolveConfig: ResolveConfig<ExpoConfig>;
10
+ };
11
+ export default _default;
@@ -0,0 +1,33 @@
1
+ import { toProductionEntry } from '../../util/input.js';
2
+ import { join } from '../../util/path.js';
3
+ import { hasDependency } from '../../util/plugin.js';
4
+ import { getDependencies } from './helpers.js';
5
+ const title = 'Expo';
6
+ const enablers = ['expo'];
7
+ const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
8
+ const config = ['app.json', 'app.config.{ts,js}'];
9
+ const resolveEntryPaths = async (expoConfig, { manifest }) => {
10
+ const config = 'expo' in expoConfig ? expoConfig.expo : expoConfig;
11
+ let production = [];
12
+ if (manifest.main === 'expo-router/entry') {
13
+ production = ['app/**/*.{js,jsx,ts,tsx}', 'src/app/**/*.{js,jsx,ts,tsx}'];
14
+ const normalizedPlugins = config.plugins?.map(plugin => (Array.isArray(plugin) ? plugin : [plugin])) ?? [];
15
+ const expoRouterPlugin = normalizedPlugins.find(([plugin]) => plugin === 'expo-router');
16
+ if (expoRouterPlugin) {
17
+ const [, options] = expoRouterPlugin;
18
+ if (typeof options?.root === 'string') {
19
+ production = [join(options.root, '**/*.{js,jsx,ts,tsx}')];
20
+ }
21
+ }
22
+ }
23
+ return production.map(entry => toProductionEntry(entry));
24
+ };
25
+ const resolveConfig = async (expoConfig, options) => getDependencies(expoConfig, options);
26
+ export default {
27
+ title,
28
+ enablers,
29
+ isEnabled,
30
+ config,
31
+ resolveEntryPaths,
32
+ resolveConfig,
33
+ };
@@ -0,0 +1,21 @@
1
+ type AppConfig = {
2
+ platforms?: ('ios' | 'android' | 'web')[];
3
+ notification?: Record<string, unknown>;
4
+ updates?: {
5
+ enabled?: boolean;
6
+ };
7
+ backgroundColor?: string;
8
+ userInterfaceStyle?: 'automatic' | 'light' | 'dark';
9
+ ios?: {
10
+ backgroundColor?: string;
11
+ };
12
+ android?: {
13
+ userInterfaceStyle?: 'automatic' | 'light' | 'dark';
14
+ };
15
+ androidNavigationBar?: Record<string, unknown>;
16
+ plugins?: (string | [string, Record<string, unknown>])[];
17
+ };
18
+ export type ExpoConfig = AppConfig | {
19
+ expo: AppConfig;
20
+ };
21
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -125,6 +125,14 @@ export declare const Plugins: {
125
125
  config: string[];
126
126
  resolveConfig: import("../types/config.js").ResolveConfig<import("./eslint/types.js").ESLintConfig>;
127
127
  };
128
+ expo: {
129
+ title: string;
130
+ enablers: string[];
131
+ isEnabled: import("../types/config.js").IsPluginEnabled;
132
+ config: string[];
133
+ resolveEntryPaths: import("../types/config.js").ResolveEntryPaths<import("./expo/types.js").ExpoConfig>;
134
+ resolveConfig: import("../types/config.js").ResolveConfig<import("./expo/types.js").ExpoConfig>;
135
+ };
128
136
  gatsby: {
129
137
  title: string;
130
138
  enablers: string[];
@@ -14,6 +14,7 @@ import { default as dotenv } from './dotenv/index.js';
14
14
  import { default as drizzle } from './drizzle/index.js';
15
15
  import { default as eleventy } from './eleventy/index.js';
16
16
  import { default as eslint } from './eslint/index.js';
17
+ import { default as expo } from './expo/index.js';
17
18
  import { default as gatsby } from './gatsby/index.js';
18
19
  import { default as githubActions } from './github-actions/index.js';
19
20
  import { default as glob } from './glob/index.js';
@@ -103,6 +104,7 @@ export const Plugins = {
103
104
  drizzle,
104
105
  eleventy,
105
106
  eslint,
107
+ expo,
106
108
  gatsby,
107
109
  'github-actions': githubActions,
108
110
  glob,
@@ -4,7 +4,7 @@ import { hasDependency } from '../../util/plugin.js';
4
4
  const title = 'Nx';
5
5
  const enablers = ['nx', /^@nrwl\//, /^@nx\//];
6
6
  const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
7
- const config = ['nx.json', 'project.json', '{apps,libs}/**/project.json'];
7
+ const config = ['nx.json', 'project.json', '{apps,libs}/**/project.json', 'package.json'];
8
8
  const findNxDependenciesInNxJson = async (localConfig) => {
9
9
  const targetsDefault = localConfig.targetDefaults
10
10
  ? Object.keys(localConfig.targetDefaults)
@@ -222,6 +222,19 @@ export declare const pluginsSchema: z.ZodObject<{
222
222
  entry?: string | string[] | undefined;
223
223
  project?: string | string[] | undefined;
224
224
  }>]>;
225
+ expo: z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
226
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
227
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
228
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
229
+ }, "strip", z.ZodTypeAny, {
230
+ config?: string | string[] | undefined;
231
+ entry?: string | string[] | undefined;
232
+ project?: string | string[] | undefined;
233
+ }, {
234
+ config?: string | string[] | undefined;
235
+ entry?: string | string[] | undefined;
236
+ project?: string | string[] | undefined;
237
+ }>]>;
225
238
  gatsby: z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
226
239
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
227
240
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1244,6 +1257,11 @@ export declare const pluginsSchema: z.ZodObject<{
1244
1257
  entry?: string | string[] | undefined;
1245
1258
  project?: string | string[] | undefined;
1246
1259
  };
1260
+ expo: string | boolean | string[] | {
1261
+ config?: string | string[] | undefined;
1262
+ entry?: string | string[] | undefined;
1263
+ project?: string | string[] | undefined;
1264
+ };
1247
1265
  gatsby: string | boolean | string[] | {
1248
1266
  config?: string | string[] | undefined;
1249
1267
  entry?: string | string[] | undefined;
@@ -1685,6 +1703,11 @@ export declare const pluginsSchema: z.ZodObject<{
1685
1703
  entry?: string | string[] | undefined;
1686
1704
  project?: string | string[] | undefined;
1687
1705
  };
1706
+ expo: string | boolean | string[] | {
1707
+ config?: string | string[] | undefined;
1708
+ entry?: string | string[] | undefined;
1709
+ project?: string | string[] | undefined;
1710
+ };
1688
1711
  gatsby: string | boolean | string[] | {
1689
1712
  config?: string | string[] | undefined;
1690
1713
  entry?: string | string[] | undefined;
@@ -26,6 +26,7 @@ export const pluginsSchema = z.object({
26
26
  drizzle: pluginSchema,
27
27
  eleventy: pluginSchema,
28
28
  eslint: pluginSchema,
29
+ expo: pluginSchema,
29
30
  gatsby: pluginSchema,
30
31
  'github-actions': pluginSchema,
31
32
  glob: pluginSchema,
@@ -1,2 +1,2 @@
1
- export type PluginName = 'angular' | 'astro' | 'ava' | 'babel' | 'c8' | 'capacitor' | 'changesets' | 'commitizen' | 'commitlint' | 'cspell' | 'cucumber' | 'cypress' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'gatsby' | 'github-actions' | 'glob' | 'graphql-codegen' | 'husky' | 'jest' | 'karma' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mocha' | 'moonrepo' | 'msw' | 'nest' | 'netlify' | 'next' | 'node' | 'node-test-runner' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'postcss' | 'preconstruct' | 'prettier' | 'react-cosmos' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rspack' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'syncpack' | 'tailwind' | 'travis' | 'ts-node' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie';
2
- export declare const pluginNames: readonly ["angular", "astro", "ava", "babel", "c8", "capacitor", "changesets", "commitizen", "commitlint", "cspell", "cucumber", "cypress", "dotenv", "drizzle", "eleventy", "eslint", "gatsby", "github-actions", "glob", "graphql-codegen", "husky", "jest", "karma", "ladle", "lefthook", "lint-staged", "linthtml", "lockfile-lint", "lost-pixel", "markdownlint", "mocha", "moonrepo", "msw", "nest", "netlify", "next", "node", "node-test-runner", "nodemon", "npm-package-json-lint", "nuxt", "nx", "nyc", "oclif", "playwright", "playwright-ct", "playwright-test", "plop", "postcss", "preconstruct", "prettier", "react-cosmos", "release-it", "remark", "remix", "rollup", "rsbuild", "rspack", "semantic-release", "sentry", "simple-git-hooks", "size-limit", "storybook", "stryker", "stylelint", "svelte", "syncpack", "tailwind", "travis", "ts-node", "tsup", "tsx", "typedoc", "typescript", "unbuild", "unocss", "vercel-og", "vike", "vite", "vitest", "vue", "webdriver-io", "webpack", "wireit", "wrangler", "xo", "yarn", "yorkie"];
1
+ export type PluginName = 'angular' | 'astro' | 'ava' | 'babel' | 'c8' | 'capacitor' | 'changesets' | 'commitizen' | 'commitlint' | 'cspell' | 'cucumber' | 'cypress' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'expo' | 'gatsby' | 'github-actions' | 'glob' | 'graphql-codegen' | 'husky' | 'jest' | 'karma' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mocha' | 'moonrepo' | 'msw' | 'nest' | 'netlify' | 'next' | 'node' | 'node-test-runner' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'postcss' | 'preconstruct' | 'prettier' | 'react-cosmos' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rspack' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'syncpack' | 'tailwind' | 'travis' | 'ts-node' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie';
2
+ export declare const pluginNames: readonly ["angular", "astro", "ava", "babel", "c8", "capacitor", "changesets", "commitizen", "commitlint", "cspell", "cucumber", "cypress", "dotenv", "drizzle", "eleventy", "eslint", "expo", "gatsby", "github-actions", "glob", "graphql-codegen", "husky", "jest", "karma", "ladle", "lefthook", "lint-staged", "linthtml", "lockfile-lint", "lost-pixel", "markdownlint", "mocha", "moonrepo", "msw", "nest", "netlify", "next", "node", "node-test-runner", "nodemon", "npm-package-json-lint", "nuxt", "nx", "nyc", "oclif", "playwright", "playwright-ct", "playwright-test", "plop", "postcss", "preconstruct", "prettier", "react-cosmos", "release-it", "remark", "remix", "rollup", "rsbuild", "rspack", "semantic-release", "sentry", "simple-git-hooks", "size-limit", "storybook", "stryker", "stylelint", "svelte", "syncpack", "tailwind", "travis", "ts-node", "tsup", "tsx", "typedoc", "typescript", "unbuild", "unocss", "vercel-og", "vike", "vite", "vitest", "vue", "webdriver-io", "webpack", "wireit", "wrangler", "xo", "yarn", "yorkie"];
@@ -15,6 +15,7 @@ export const pluginNames = [
15
15
  'drizzle',
16
16
  'eleventy',
17
17
  'eslint',
18
+ 'expo',
18
19
  'gatsby',
19
20
  'github-actions',
20
21
  'glob',
@@ -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.40.0";
1
+ export declare const version = "5.41.1";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.40.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.40.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": {
package/schema.json CHANGED
@@ -344,6 +344,10 @@
344
344
  "title": "ESLint plugin configuration (https://knip.dev/reference/plugins/eslint)",
345
345
  "$ref": "#/definitions/plugin"
346
346
  },
347
+ "expo": {
348
+ "title": "Expo plugin configuration (https://knip.dev/reference/plugins/expo)",
349
+ "$ref": "#/definitions/plugin"
350
+ },
347
351
  "gatsby": {
348
352
  "title": "Gatsby plugin configuration (https://knip.dev/reference/plugins/gatsby)",
349
353
  "$ref": "#/definitions/plugin"