knip 2.26.0 → 2.27.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 CHANGED
@@ -267,6 +267,7 @@ Knip contains a growing list of plugins:
267
267
  - [Nx][plugin-nx]
268
268
  - [nyc][plugin-nyc]
269
269
  - [Playwright][plugin-playwright]
270
+ - [Playwright for components][plugin-playwright-ct]
270
271
  - [PostCSS][plugin-postcss]
271
272
  - [Prettier][plugin-prettier]
272
273
  - [Release It][plugin-release-it]
@@ -888,6 +889,7 @@ Special thanks to the wonderful people who have contributed to this project:
888
889
  [plugin-nx]: ./src/plugins/nx
889
890
  [plugin-nyc]: ./src/plugins/nyc
890
891
  [plugin-playwright]: ./src/plugins/playwright
892
+ [plugin-playwright-ct]: ./src/plugins/playwright-ct
891
893
  [plugin-postcss]: ./src/plugins/postcss
892
894
  [plugin-prettier]: ./src/plugins/prettier
893
895
  [plugin-release-it]: ./src/plugins/release-it
@@ -50,7 +50,7 @@ export declare class WorkspaceWorker {
50
50
  hostDependencies: HostDependencies;
51
51
  installedBinaries: InstalledBinaries;
52
52
  referencedDependencies: ReferencedDependencies;
53
- enabledPlugins: ("angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "markdownlint" | "mocha" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "tailwind" | "typedoc" | "typescript" | "vite" | "vitest" | "webpack" | "githubActions" | "lintStaged" | "npmPackageJsonLint" | "releaseIt" | "semanticRelease" | "svelte")[];
53
+ enabledPlugins: ("angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "markdownlint" | "mocha" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "tailwind" | "typedoc" | "typescript" | "vite" | "vitest" | "webpack" | "githubActions" | "lintStaged" | "npmPackageJsonLint" | "playwrightCt" | "releaseIt" | "semanticRelease" | "svelte")[];
54
54
  }>;
55
55
  }
56
56
  export {};
@@ -21,6 +21,7 @@ export * as npmPackageJsonLint from './npm-package-json-lint/index.js';
21
21
  export * as nx from './nx/index.js';
22
22
  export * as nyc from './nyc/index.js';
23
23
  export * as playwright from './playwright/index.js';
24
+ export * as playwrightCt from './playwright-ct/index.js';
24
25
  export * as postcss from './postcss/index.js';
25
26
  export * as prettier from './prettier/index.js';
26
27
  export * as releaseIt from './release-it/index.js';
@@ -21,6 +21,7 @@ export * as npmPackageJsonLint from './npm-package-json-lint/index.js';
21
21
  export * as nx from './nx/index.js';
22
22
  export * as nyc from './nyc/index.js';
23
23
  export * as playwright from './playwright/index.js';
24
+ export * as playwrightCt from './playwright-ct/index.js';
24
25
  export * as postcss from './postcss/index.js';
25
26
  export * as prettier from './prettier/index.js';
26
27
  export * as releaseIt from './release-it/index.js';
@@ -0,0 +1,5 @@
1
+ import type { IsPluginEnabledCallback } from '../../types/plugins.js';
2
+ export declare const NAME = "Playwright for components";
3
+ export declare const ENABLERS: RegExp[];
4
+ export declare const isEnabled: IsPluginEnabledCallback;
5
+ export declare const ENTRY_FILE_PATTERNS: string[];
@@ -0,0 +1,5 @@
1
+ import { hasDependency } from '../../util/plugin.js';
2
+ export const NAME = 'Playwright for components';
3
+ export const ENABLERS = [/^@playwright\/experimental-ct-/];
4
+ export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
5
+ export const ENTRY_FILE_PATTERNS = ['playwright-ct.config.{js,ts}', 'playwright/index.{js,ts,jsx,tsx}'];
@@ -3,7 +3,7 @@ import { hasDependency, load } from '../../util/plugin.js';
3
3
  export const NAME = 'Storybook';
4
4
  export const ENABLERS = [/^@storybook\//, '@nrwl/storybook'];
5
5
  export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
6
- export const CONFIG_FILE_PATTERNS = ['.storybook/{main,manager}.{js,ts}'];
6
+ export const CONFIG_FILE_PATTERNS = ['.storybook/{main,manager,test-runner}.{js,ts}'];
7
7
  export const ENTRY_FILE_PATTERNS = ['.storybook/preview.{js,jsx,ts,tsx}', '**/*.stories.{js,jsx,ts,tsx}'];
8
8
  export const PROJECT_FILE_PATTERNS = ['.storybook/**/*.{js,jsx,ts,tsx}'];
9
9
  const findStorybookDependencies = async (configFilePath) => {
@@ -7,7 +7,7 @@ import { loadTSConfig } from '../../util/tsconfig-loader.js';
7
7
  export const NAME = 'TypeScript';
8
8
  export const ENABLERS = ['typescript'];
9
9
  export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
10
- export const CONFIG_FILE_PATTERNS = ['tsconfig.json'];
10
+ export const CONFIG_FILE_PATTERNS = ['tsconfig.json', 'tsconfig.*.json'];
11
11
  const resolveExtensibleConfig = async (configFilePath) => {
12
12
  const config = await load(configFilePath);
13
13
  config.extends = config.extends ? [config.extends].flat() : [];
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "2.26.0";
1
+ export declare const version = "2.27.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '2.26.0';
1
+ export const version = '2.27.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "2.26.0",
3
+ "version": "2.27.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",
@@ -65,26 +65,26 @@
65
65
  "@npmcli/package-json": "5.0.0",
66
66
  "@release-it/bumper": "5.1.0",
67
67
  "@swc/cli": "0.1.62",
68
- "@swc/core": "1.3.85",
69
- "@types/eslint": "8.44.2",
68
+ "@swc/core": "1.3.88",
69
+ "@types/eslint": "8.44.3",
70
70
  "@types/js-yaml": "4.0.6",
71
71
  "@types/micromatch": "4.0.2",
72
72
  "@types/minimist": "1.2.2",
73
- "@types/node": "20.6.2",
74
- "@types/npmcli__map-workspaces": "3.0.1",
73
+ "@types/node": "20.6.4",
74
+ "@types/npmcli__map-workspaces": "3.0.2",
75
75
  "@types/webpack": "5.28.2",
76
- "@typescript-eslint/eslint-plugin": "6.7.0",
77
- "@typescript-eslint/parser": "6.7.0",
76
+ "@typescript-eslint/eslint-plugin": "6.7.2",
77
+ "@typescript-eslint/parser": "6.7.2",
78
78
  "c8": "8.0.1",
79
- "eslint": "8.49.0",
80
- "eslint-import-resolver-typescript": "3.6.0",
79
+ "eslint": "8.50.0",
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
83
  "prettier": "3.0.3",
84
- "release-it": "16.1.5",
84
+ "release-it": "16.2.0",
85
85
  "remark-cli": "11.0.0",
86
86
  "remark-preset-webpro": "0.0.3",
87
- "tsx": "3.12.10",
87
+ "tsx": "3.13.0",
88
88
  "type-fest": "4.3.1"
89
89
  },
90
90
  "engines": {