knip 6.7.0 → 6.8.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/ConfigurationChief.d.ts +6 -0
- package/dist/binaries/resolvers/index.d.ts +2 -0
- package/dist/binaries/resolvers/index.js +2 -0
- package/dist/binaries/resolvers/pnpm.js +18 -0
- package/dist/compilers/index.d.ts +10 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +2 -0
- package/dist/plugins/wxt/index.d.ts +3 -0
- package/dist/plugins/wxt/index.js +27 -0
- package/dist/plugins/wxt/types.d.ts +3 -0
- package/dist/plugins/wxt/types.js +1 -0
- package/dist/schema/configuration.d.ts +15 -0
- package/dist/schema/plugins.d.ts +5 -0
- package/dist/schema/plugins.js +1 -0
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +1 -0
- package/dist/typescript/visitors/imports.js +4 -3
- package/dist/util/create-options.d.ts +10 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -776,6 +776,11 @@ export declare class ConfigurationChief {
|
|
|
776
776
|
entry?: string | string[] | undefined;
|
|
777
777
|
project?: string | string[] | undefined;
|
|
778
778
|
} | undefined;
|
|
779
|
+
wxt?: string | boolean | string[] | {
|
|
780
|
+
config?: string | string[] | undefined;
|
|
781
|
+
entry?: string | string[] | undefined;
|
|
782
|
+
project?: string | string[] | undefined;
|
|
783
|
+
} | undefined;
|
|
779
784
|
xo?: string | boolean | string[] | {
|
|
780
785
|
config?: string | string[] | undefined;
|
|
781
786
|
entry?: string | string[] | undefined;
|
|
@@ -963,6 +968,7 @@ export declare class ConfigurationChief {
|
|
|
963
968
|
webpack?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
964
969
|
wireit?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
965
970
|
wrangler?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
971
|
+
wxt?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
966
972
|
xo?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
967
973
|
yarn?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
968
974
|
yorkie?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -5,7 +5,9 @@ declare const _default: {
|
|
|
5
5
|
npm: import("../../types/config.ts").BinaryResolver;
|
|
6
6
|
npx: import("../../types/config.ts").BinaryResolver;
|
|
7
7
|
pnpm: import("../../types/config.ts").BinaryResolver;
|
|
8
|
+
pn: import("../../types/config.ts").BinaryResolver;
|
|
8
9
|
pnpx: import("../../types/config.ts").BinaryResolver;
|
|
10
|
+
pnx: import("../../types/config.ts").BinaryResolver;
|
|
9
11
|
yarn: import("../../types/config.ts").BinaryResolver;
|
|
10
12
|
};
|
|
11
13
|
export default _default;
|
|
@@ -10,41 +10,58 @@ const commands = [
|
|
|
10
10
|
'cache',
|
|
11
11
|
'cat-file',
|
|
12
12
|
'cat-index',
|
|
13
|
+
'ci',
|
|
14
|
+
'clean-install',
|
|
15
|
+
'clean',
|
|
13
16
|
'config',
|
|
14
17
|
'dedupe',
|
|
15
18
|
'deploy',
|
|
16
19
|
'dlx',
|
|
20
|
+
'docs',
|
|
17
21
|
'doctor',
|
|
18
22
|
'env',
|
|
19
23
|
'fetch',
|
|
20
24
|
'find-hash',
|
|
25
|
+
'home',
|
|
21
26
|
'i',
|
|
27
|
+
'ic',
|
|
22
28
|
'ignored-builds',
|
|
23
29
|
'import',
|
|
24
30
|
'init',
|
|
31
|
+
'install-clean',
|
|
25
32
|
'install-test',
|
|
26
33
|
'install',
|
|
27
34
|
'it',
|
|
35
|
+
'la',
|
|
28
36
|
'licenses',
|
|
29
37
|
'link',
|
|
30
38
|
'list',
|
|
39
|
+
'll',
|
|
31
40
|
'ln',
|
|
32
41
|
'ls',
|
|
33
42
|
'outdated',
|
|
43
|
+
'pack-app',
|
|
34
44
|
'pack',
|
|
35
45
|
'patch-commit',
|
|
36
46
|
'patch-remove',
|
|
37
47
|
'patch',
|
|
48
|
+
'peers',
|
|
49
|
+
'ping',
|
|
38
50
|
'pkg',
|
|
51
|
+
'pm',
|
|
39
52
|
'prepare',
|
|
40
53
|
'prune',
|
|
41
54
|
'publish',
|
|
55
|
+
'purge',
|
|
42
56
|
'rb',
|
|
43
57
|
'rebuild',
|
|
44
58
|
'remove',
|
|
45
59
|
'rm',
|
|
46
60
|
'root',
|
|
61
|
+
'rt',
|
|
47
62
|
'run',
|
|
63
|
+
'runtime',
|
|
64
|
+
'sbom',
|
|
48
65
|
'self-update',
|
|
49
66
|
'server',
|
|
50
67
|
'setup',
|
|
@@ -61,6 +78,7 @@ const commands = [
|
|
|
61
78
|
'upgrade',
|
|
62
79
|
'version',
|
|
63
80
|
'why',
|
|
81
|
+
'with',
|
|
64
82
|
];
|
|
65
83
|
export const resolve = (_binary, args, options) => {
|
|
66
84
|
const parsed = parseArgs(args, {
|
|
@@ -723,6 +723,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
723
723
|
entry?: string | string[] | undefined;
|
|
724
724
|
project?: string | string[] | undefined;
|
|
725
725
|
} | undefined;
|
|
726
|
+
wxt?: string | boolean | string[] | {
|
|
727
|
+
config?: string | string[] | undefined;
|
|
728
|
+
entry?: string | string[] | undefined;
|
|
729
|
+
project?: string | string[] | undefined;
|
|
730
|
+
} | undefined;
|
|
726
731
|
xo?: string | boolean | string[] | {
|
|
727
732
|
config?: string | string[] | undefined;
|
|
728
733
|
entry?: string | string[] | undefined;
|
|
@@ -1484,6 +1489,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
1484
1489
|
entry?: string | string[] | undefined;
|
|
1485
1490
|
project?: string | string[] | undefined;
|
|
1486
1491
|
} | undefined;
|
|
1492
|
+
wxt?: string | boolean | string[] | {
|
|
1493
|
+
config?: string | string[] | undefined;
|
|
1494
|
+
entry?: string | string[] | undefined;
|
|
1495
|
+
project?: string | string[] | undefined;
|
|
1496
|
+
} | undefined;
|
|
1487
1497
|
xo?: string | boolean | string[] | {
|
|
1488
1498
|
config?: string | string[] | undefined;
|
|
1489
1499
|
entry?: string | string[] | undefined;
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -148,6 +148,7 @@ export declare const Plugins: {
|
|
|
148
148
|
webpack: import("../types/config.ts").Plugin;
|
|
149
149
|
wireit: import("../types/config.ts").Plugin;
|
|
150
150
|
wrangler: import("../types/config.ts").Plugin;
|
|
151
|
+
wxt: import("../types/config.ts").Plugin;
|
|
151
152
|
xo: import("../types/config.ts").Plugin;
|
|
152
153
|
yarn: import("../types/config.ts").Plugin;
|
|
153
154
|
yorkie: import("../types/config.ts").Plugin;
|
package/dist/plugins/index.js
CHANGED
|
@@ -142,6 +142,7 @@ import { default as webdriverIo } from './webdriver-io/index.js';
|
|
|
142
142
|
import { default as webpack } from './webpack/index.js';
|
|
143
143
|
import { default as wireit } from './wireit/index.js';
|
|
144
144
|
import { default as wrangler } from './wrangler/index.js';
|
|
145
|
+
import { default as wxt } from './wxt/index.js';
|
|
145
146
|
import { default as xo } from './xo/index.js';
|
|
146
147
|
import { default as yarn } from './yarn/index.js';
|
|
147
148
|
import { default as yorkie } from './yorkie/index.js';
|
|
@@ -291,6 +292,7 @@ export const Plugins = {
|
|
|
291
292
|
webpack,
|
|
292
293
|
wireit,
|
|
293
294
|
wrangler,
|
|
295
|
+
wxt,
|
|
294
296
|
xo,
|
|
295
297
|
yarn,
|
|
296
298
|
yorkie,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { toDependency, toProductionEntry } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
|
+
const title = 'WXT';
|
|
4
|
+
const enablers = ['wxt'];
|
|
5
|
+
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
6
|
+
const config = ['wxt.config.{js,mjs,ts}'];
|
|
7
|
+
const production = ['entrypoints/**/*'];
|
|
8
|
+
const resolveConfig = async (localConfig) => {
|
|
9
|
+
const inputs = [];
|
|
10
|
+
for (const pattern of production) {
|
|
11
|
+
inputs.push(toProductionEntry(pattern));
|
|
12
|
+
}
|
|
13
|
+
for (const id of localConfig?.modules ?? []) {
|
|
14
|
+
if (typeof id === 'string')
|
|
15
|
+
inputs.push(toDependency(id));
|
|
16
|
+
}
|
|
17
|
+
return inputs;
|
|
18
|
+
};
|
|
19
|
+
const plugin = {
|
|
20
|
+
title,
|
|
21
|
+
enablers,
|
|
22
|
+
isEnabled,
|
|
23
|
+
config,
|
|
24
|
+
production,
|
|
25
|
+
resolveConfig,
|
|
26
|
+
};
|
|
27
|
+
export default plugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -721,6 +721,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
|
|
|
721
721
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
722
722
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
723
723
|
}, z.core.$strip>]>>;
|
|
724
|
+
wxt: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
725
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
726
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
727
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
728
|
+
}, z.core.$strip>]>>;
|
|
724
729
|
xo: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
725
730
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
726
731
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1473,6 +1478,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1473
1478
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1474
1479
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1475
1480
|
}, z.core.$strip>]>>;
|
|
1481
|
+
wxt: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1482
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1483
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1484
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1485
|
+
}, z.core.$strip>]>>;
|
|
1476
1486
|
xo: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1477
1487
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1478
1488
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -2242,6 +2252,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
2242
2252
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2243
2253
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2244
2254
|
}, z.core.$strip>]>>;
|
|
2255
|
+
wxt: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2256
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2257
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2258
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2259
|
+
}, z.core.$strip>]>>;
|
|
2245
2260
|
xo: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2246
2261
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2247
2262
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
package/dist/schema/plugins.d.ts
CHANGED
|
@@ -726,6 +726,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
726
726
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
727
727
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
728
728
|
}, z.core.$strip>]>;
|
|
729
|
+
wxt: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
730
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
731
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
732
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
733
|
+
}, z.core.$strip>]>;
|
|
729
734
|
xo: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
730
735
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
731
736
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
package/dist/schema/plugins.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'execa' | 'expo' | 'expressive-code' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'qwik' | 'raycast' | 'react-cosmos' | 'react-email' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rolldown' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'serverless-framework' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'stencil' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltejs-package' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
-
export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-og-canvas', 'ava', 'babel', 'biome', 'bumpp', 'bun', 'c8', 'capacitor', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'eleventy', 'eslint', 'execa', 'expo', 'expressive-code', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'lefthook', 'lint-staged', 'linthtml', 'lockfile-lint', 'lost-pixel', 'markdownlint', 'mdx', 'mdxlint', 'metro', 'mocha', 'moonrepo', 'msw', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nx', 'nyc', 'oclif', 'openapi-ts', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'preconstruct', 'prettier', 'prisma', 'qwik', 'raycast', 'react-cosmos', 'react-email', 'react-native', 'react-router', 'relay', 'release-it', 'remark', 'remix', 'rolldown', 'rollup', 'rsbuild', 'rslib', 'rspack', 'rstest', 'sanity', 'semantic-release', 'sentry', 'serverless-framework', 'simple-git-hooks', 'size-limit', 'sst', 'starlight', 'stencil', 'storybook', 'stryker', 'stylelint', 'svelte', 'sveltejs-package', 'sveltekit', 'svgo', 'svgr', 'swc', 'syncpack', 'tailwind', 'tanstack-router', 'taskfile', 'travis', 'ts-node', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'vercel-og', 'vike', 'vite', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'xo', 'yarn', 'yorkie', 'zx'];
|
|
1
|
+
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'execa' | 'expo' | 'expressive-code' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'qwik' | 'raycast' | 'react-cosmos' | 'react-email' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rolldown' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'serverless-framework' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'stencil' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltejs-package' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
+
export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-og-canvas', 'ava', 'babel', 'biome', 'bumpp', 'bun', 'c8', 'capacitor', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'eleventy', 'eslint', 'execa', 'expo', 'expressive-code', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'lefthook', 'lint-staged', 'linthtml', 'lockfile-lint', 'lost-pixel', 'markdownlint', 'mdx', 'mdxlint', 'metro', 'mocha', 'moonrepo', 'msw', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nx', 'nyc', 'oclif', 'openapi-ts', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'preconstruct', 'prettier', 'prisma', 'qwik', 'raycast', 'react-cosmos', 'react-email', 'react-native', 'react-router', 'relay', 'release-it', 'remark', 'remix', 'rolldown', 'rollup', 'rsbuild', 'rslib', 'rspack', 'rstest', 'sanity', 'semantic-release', 'sentry', 'serverless-framework', 'simple-git-hooks', 'size-limit', 'sst', 'starlight', 'stencil', 'storybook', 'stryker', 'stylelint', 'svelte', 'sveltejs-package', 'sveltekit', 'svgo', 'svgr', 'swc', 'syncpack', 'tailwind', 'tanstack-router', 'taskfile', 'travis', 'ts-node', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'vercel-og', 'vike', 'vite', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
|
|
@@ -204,7 +204,7 @@ export function handleVariableDeclarator(node, s) {
|
|
|
204
204
|
if (_import) {
|
|
205
205
|
const internalImport = s.internal.get(_import.filePath);
|
|
206
206
|
if (internalImport) {
|
|
207
|
-
if (_import.isDynamicImport) {
|
|
207
|
+
if (_import.isDynamicImport && memberPath.length === 0) {
|
|
208
208
|
for (const prop of node.id.properties) {
|
|
209
209
|
if (prop.type === 'Property' && prop.key?.type === 'Identifier') {
|
|
210
210
|
addValue(internalImport.import, prop.key.name, s.filePath);
|
|
@@ -214,14 +214,15 @@ export function handleVariableDeclarator(node, s) {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
else {
|
|
217
|
+
else if (!_import.isDynamicImport) {
|
|
218
218
|
const ns = _import.isNamespace ? rootName : _import.importedName;
|
|
219
219
|
const prefix = [ns, ...memberPath].join('.');
|
|
220
|
+
const isNsRoot = _import.isNamespace && memberPath.length === 0;
|
|
220
221
|
for (const prop of node.id.properties) {
|
|
221
222
|
if (prop.type === 'Property' && prop.key?.type === 'Identifier') {
|
|
222
223
|
internalImport.refs.add(`${prefix}.${prop.key.name}`);
|
|
223
224
|
}
|
|
224
|
-
else if (prop.type === 'RestElement') {
|
|
225
|
+
else if (prop.type === 'RestElement' && isNsRoot) {
|
|
225
226
|
addValue(internalImport.import, OPAQUE, s.filePath);
|
|
226
227
|
}
|
|
227
228
|
}
|
|
@@ -761,6 +761,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
761
761
|
entry?: string | string[] | undefined;
|
|
762
762
|
project?: string | string[] | undefined;
|
|
763
763
|
} | undefined;
|
|
764
|
+
wxt?: string | boolean | string[] | {
|
|
765
|
+
config?: string | string[] | undefined;
|
|
766
|
+
entry?: string | string[] | undefined;
|
|
767
|
+
project?: string | string[] | undefined;
|
|
768
|
+
} | undefined;
|
|
764
769
|
xo?: string | boolean | string[] | {
|
|
765
770
|
config?: string | string[] | undefined;
|
|
766
771
|
entry?: string | string[] | undefined;
|
|
@@ -1524,6 +1529,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
1524
1529
|
entry?: string | string[] | undefined;
|
|
1525
1530
|
project?: string | string[] | undefined;
|
|
1526
1531
|
} | undefined;
|
|
1532
|
+
wxt?: string | boolean | string[] | {
|
|
1533
|
+
config?: string | string[] | undefined;
|
|
1534
|
+
entry?: string | string[] | undefined;
|
|
1535
|
+
project?: string | string[] | undefined;
|
|
1536
|
+
} | undefined;
|
|
1527
1537
|
xo?: string | boolean | string[] | {
|
|
1528
1538
|
config?: string | string[] | undefined;
|
|
1529
1539
|
entry?: string | string[] | undefined;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.
|
|
1
|
+
export declare const version = "6.8.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '6.
|
|
1
|
+
export const version = '6.8.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "knip",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.0",
|
|
4
4
|
"description": "Find and fix unused dependencies, exports and files in your TypeScript and JavaScript projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"analysis",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"get-tsconfig": "4.14.0",
|
|
83
83
|
"jiti": "^2.6.0",
|
|
84
84
|
"minimist": "^1.2.8",
|
|
85
|
-
"oxc-parser": "^0.
|
|
85
|
+
"oxc-parser": "^0.128.0",
|
|
86
86
|
"oxc-resolver": "^11.19.1",
|
|
87
87
|
"picomatch": "^4.0.4",
|
|
88
88
|
"smol-toml": "^1.6.1",
|