knip 2.31.0 → 2.32.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/README.md +15 -24
- package/dist/ConfigurationValidator.d.ts +56 -0
- package/dist/ConfigurationValidator.js +1 -0
- package/dist/WorkspaceWorker.d.ts +8 -6
- package/dist/WorkspaceWorker.js +33 -59
- package/dist/binaries/index.js +1 -1
- package/dist/binaries/resolvers/c8.js +2 -1
- package/dist/binaries/resolvers/dotenv.js +2 -1
- package/dist/binaries/resolvers/fallback.js +2 -1
- package/dist/binaries/resolvers/nodemon.js +2 -1
- package/dist/binaries/resolvers/npx.js +2 -1
- package/dist/binaries/resolvers/nx.js +1 -1
- package/dist/binaries/resolvers/pnpm.js +1 -1
- package/dist/binaries/resolvers/rollup.js +2 -1
- package/dist/binaries/resolvers/yarn.js +1 -1
- package/dist/binaries/util.d.ts +0 -3
- package/dist/binaries/util.js +1 -3
- package/dist/constants.d.ts +0 -1
- package/dist/constants.js +0 -4
- package/dist/index.js +19 -18
- package/dist/plugins/ava/index.d.ts +1 -1
- package/dist/plugins/ava/index.js +23 -5
- package/dist/plugins/ava/types.d.ts +1 -0
- package/dist/plugins/babel/index.js +3 -1
- package/dist/plugins/capacitor/index.js +3 -1
- package/dist/plugins/changesets/index.js +3 -1
- package/dist/plugins/commitizen/index.d.ts +1 -0
- package/dist/plugins/commitizen/index.js +4 -1
- package/dist/plugins/commitlint/index.js +3 -1
- package/dist/plugins/cspell/index.js +3 -1
- package/dist/plugins/cypress/index.d.ts +3 -1
- package/dist/plugins/cypress/index.js +14 -4
- package/dist/plugins/drizzle/index.js +3 -5
- package/dist/plugins/eslint/helpers.js +2 -1
- package/dist/plugins/eslint/index.d.ts +1 -0
- package/dist/plugins/eslint/index.js +4 -1
- package/dist/plugins/gatsby/index.js +10 -2
- package/dist/plugins/github-actions/index.js +3 -1
- package/dist/plugins/husky/index.js +3 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/jest/index.d.ts +1 -1
- package/dist/plugins/jest/index.js +16 -7
- package/dist/plugins/lefthook/index.js +4 -2
- package/dist/plugins/lint-staged/index.d.ts +1 -0
- package/dist/plugins/lint-staged/index.js +4 -1
- package/dist/plugins/markdownlint/index.js +3 -1
- package/dist/plugins/mocha/index.d.ts +1 -0
- package/dist/plugins/mocha/index.js +10 -6
- package/dist/plugins/next/index.d.ts +2 -1
- package/dist/plugins/next/index.js +4 -0
- package/dist/plugins/node-test-runner/index.d.ts +6 -0
- package/dist/plugins/node-test-runner/index.js +17 -0
- package/dist/plugins/npm-package-json-lint/index.d.ts +1 -0
- package/dist/plugins/npm-package-json-lint/index.js +5 -2
- package/dist/plugins/nx/index.js +3 -1
- package/dist/plugins/nyc/index.js +3 -1
- package/dist/plugins/playwright/index.d.ts +3 -1
- package/dist/plugins/playwright/index.js +22 -2
- package/dist/plugins/playwright-ct/index.d.ts +3 -1
- package/dist/plugins/playwright-ct/index.js +13 -2
- package/dist/plugins/postcss/index.js +8 -6
- package/dist/plugins/prettier/index.js +3 -1
- package/dist/plugins/release-it/index.d.ts +1 -0
- package/dist/plugins/release-it/index.js +5 -2
- package/dist/plugins/remark/index.d.ts +1 -0
- package/dist/plugins/remark/index.js +10 -3
- package/dist/plugins/remix/index.d.ts +2 -1
- package/dist/plugins/remix/index.js +10 -0
- package/dist/plugins/rollup/index.d.ts +2 -1
- package/dist/plugins/rollup/index.js +7 -0
- package/dist/plugins/semantic-release/index.d.ts +1 -0
- package/dist/plugins/semantic-release/index.js +7 -2
- package/dist/plugins/sentry/index.d.ts +2 -1
- package/dist/plugins/sentry/index.js +7 -0
- package/dist/plugins/storybook/index.js +6 -2
- package/dist/plugins/stryker/index.js +9 -8
- package/dist/plugins/stylelint/index.js +3 -1
- package/dist/plugins/svelte/index.d.ts +2 -1
- package/dist/plugins/svelte/index.js +6 -0
- package/dist/plugins/typedoc/index.d.ts +1 -0
- package/dist/plugins/typedoc/index.js +5 -2
- package/dist/plugins/typescript/index.js +3 -1
- package/dist/plugins/vite/index.js +2 -2
- package/dist/plugins/vitest/index.d.ts +3 -3
- package/dist/plugins/vitest/index.js +16 -23
- package/dist/plugins/vitest/types.d.ts +1 -0
- package/dist/plugins/webpack/index.js +3 -1
- package/dist/types/config.d.ts +3 -2
- package/dist/types/plugins.d.ts +3 -3
- package/dist/util/compilers.d.ts +10 -0
- package/dist/util/object.d.ts +1 -0
- package/dist/util/object.js +1 -0
- package/dist/util/plugin.d.ts +1 -1
- package/dist/util/protocols.d.ts +9 -0
- package/dist/util/protocols.js +9 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -1
- package/schema.json +4 -0
package/dist/util/compilers.d.ts
CHANGED
|
@@ -117,6 +117,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
117
117
|
entry?: string | string[] | undefined;
|
|
118
118
|
project?: string | string[] | undefined;
|
|
119
119
|
} | undefined;
|
|
120
|
+
'node-test-runner'?: string | boolean | string[] | {
|
|
121
|
+
config?: string | string[] | undefined;
|
|
122
|
+
entry?: string | string[] | undefined;
|
|
123
|
+
project?: string | string[] | undefined;
|
|
124
|
+
} | undefined;
|
|
120
125
|
'npm-package-json-lint'?: string | boolean | string[] | {
|
|
121
126
|
config?: string | string[] | undefined;
|
|
122
127
|
entry?: string | string[] | undefined;
|
|
@@ -318,6 +323,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
318
323
|
entry?: string | string[] | undefined;
|
|
319
324
|
project?: string | string[] | undefined;
|
|
320
325
|
} | undefined;
|
|
326
|
+
'node-test-runner'?: string | boolean | string[] | {
|
|
327
|
+
config?: string | string[] | undefined;
|
|
328
|
+
entry?: string | string[] | undefined;
|
|
329
|
+
project?: string | string[] | undefined;
|
|
330
|
+
} | undefined;
|
|
321
331
|
'npm-package-json-lint'?: string | boolean | string[] | {
|
|
322
332
|
config?: string | string[] | undefined;
|
|
323
333
|
entry?: string | string[] | undefined;
|
package/dist/util/object.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const getValuesByKeyDeep: (obj: any, key: string) => unknown[];
|
|
2
2
|
export declare const getStringValues: (obj: any) => string[];
|
|
3
3
|
export declare const getKeysByValue: <T>(obj: T, value: unknown) => (keyof T)[];
|
|
4
|
+
export declare const get: (obj: unknown, path: string) => unknown;
|
package/dist/util/object.js
CHANGED
package/dist/util/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { _load as load } from './loader.js';
|
|
2
|
-
import type { RawPluginConfiguration } from '
|
|
2
|
+
import type { RawPluginConfiguration } from '../types/config.js';
|
|
3
3
|
export declare const toCamelCase: (name: string) => string;
|
|
4
4
|
export declare const hasDependency: (dependencies: Set<string>, values: (string | RegExp)[]) => boolean;
|
|
5
5
|
export declare const normalizePluginConfig: (pluginConfig: RawPluginConfiguration) => boolean | {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const toBinary: (specifier: string) => string;
|
|
2
|
+
export declare const fromBinary: (specifier: string) => string;
|
|
3
|
+
export declare const isBinary: (specifier: string) => boolean;
|
|
4
|
+
export declare const toEntryPattern: (specifier: string) => string;
|
|
5
|
+
export declare const fromEntryPattern: (specifier: string) => string;
|
|
6
|
+
export declare const isEntryPattern: (specifier: string) => boolean;
|
|
7
|
+
export declare const toProductionEntryPattern: (specifier: string) => string;
|
|
8
|
+
export declare const fromProductionEntryPattern: (specifier: string) => string;
|
|
9
|
+
export declare const isProductionEntryPattern: (specifier: string) => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const toBinary = (specifier) => specifier.replace(/^(bin:)?/, 'bin:');
|
|
2
|
+
export const fromBinary = (specifier) => specifier.replace(/^(bin:)?/, '');
|
|
3
|
+
export const isBinary = (specifier) => specifier.startsWith('bin:');
|
|
4
|
+
export const toEntryPattern = (specifier) => specifier.replace(/^(entry:)?/, 'entry:');
|
|
5
|
+
export const fromEntryPattern = (specifier) => specifier.replace(/^(entry:)?/, '');
|
|
6
|
+
export const isEntryPattern = (specifier) => specifier.startsWith('entry:');
|
|
7
|
+
export const toProductionEntryPattern = (specifier) => specifier.replace(/^(production:)?/, 'production:');
|
|
8
|
+
export const fromProductionEntryPattern = (specifier) => specifier.replace(/^(production:)?/, '');
|
|
9
|
+
export const isProductionEntryPattern = (specifier) => specifier.startsWith('production:');
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.
|
|
1
|
+
export declare const version = "2.32.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.
|
|
1
|
+
export const version = '2.32.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "knip",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.32.0",
|
|
4
4
|
"description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
|
|
5
5
|
"homepage": "https://github.com/webpro/knip",
|
|
6
6
|
"repository": "github:webpro/knip",
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
"eslint-import-resolver-typescript": "3.6.1",
|
|
81
81
|
"eslint-plugin-import": "2.28.1",
|
|
82
82
|
"eslint-plugin-n": "16.1.0",
|
|
83
|
+
"playwright": "1.38.1",
|
|
83
84
|
"prettier": "3.0.3",
|
|
84
85
|
"release-it": "16.2.1",
|
|
85
86
|
"remark-cli": "12.0.0",
|
package/schema.json
CHANGED
|
@@ -300,6 +300,10 @@
|
|
|
300
300
|
"title": "Next.js plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/main/README.md)",
|
|
301
301
|
"$ref": "#/definitions/plugin"
|
|
302
302
|
},
|
|
303
|
+
"node-test-runner": {
|
|
304
|
+
"title": "node-test-runner plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/node-test-runner/README.md)",
|
|
305
|
+
"$ref": "#/definitions/plugin"
|
|
306
|
+
},
|
|
303
307
|
"npm-package-json-lint": {
|
|
304
308
|
"title": "npm-package-json-lint plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/npm-package-json-lint/README.md)",
|
|
305
309
|
"$ref": "#/definitions/plugin"
|