knip 5.36.0 → 5.36.2

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.
@@ -12,6 +12,8 @@ const resolveConfig = async (config, options) => {
12
12
  const inputs = new Set();
13
13
  const jobs = findByKeyDeep(config, 'steps');
14
14
  for (const steps of jobs) {
15
+ if (!Array.isArray(steps.steps))
16
+ continue;
15
17
  const action = steps.steps.find(step => step.uses?.startsWith('actions/checkout@') && typeof step.with?.path === 'string' && !step.with.repository);
16
18
  const path = action?.with?.path;
17
19
  for (const step of steps.steps) {
@@ -180,21 +180,21 @@ export declare const Plugins: {
180
180
  config: string[];
181
181
  resolveConfig: import("../types/config.js").ResolveConfig;
182
182
  };
183
- linthtml: {
183
+ 'lint-staged': {
184
184
  title: string;
185
185
  enablers: string[];
186
186
  isEnabled: import("../types/config.js").IsPluginEnabled;
187
187
  packageJsonPath: string;
188
188
  config: string[];
189
- resolveConfig: import("../types/config.js").ResolveConfig<import("./linthtml/types.js").PluginConfig>;
189
+ resolveConfig: import("../types/config.js").ResolveConfig<import("./lint-staged/types.js").LintStagedConfig>;
190
190
  };
191
- 'lint-staged': {
191
+ linthtml: {
192
192
  title: string;
193
193
  enablers: string[];
194
194
  isEnabled: import("../types/config.js").IsPluginEnabled;
195
195
  packageJsonPath: string;
196
196
  config: string[];
197
- resolveConfig: import("../types/config.js").ResolveConfig<import("./lint-staged/types.js").LintStagedConfig>;
197
+ resolveConfig: import("../types/config.js").ResolveConfig<import("./linthtml/types.js").PluginConfig>;
198
198
  };
199
199
  'lockfile-lint': {
200
200
  title: string;
@@ -272,6 +272,12 @@ export declare const Plugins: {
272
272
  nodeImportArgs: boolean;
273
273
  };
274
274
  };
275
+ 'node-test-runner': {
276
+ title: string;
277
+ enablers: string;
278
+ isEnabled: import("../types/config.js").IsPluginEnabled;
279
+ entry: string[];
280
+ };
275
281
  nodemon: {
276
282
  title: string;
277
283
  args: {
@@ -281,12 +287,6 @@ export declare const Plugins: {
281
287
  fromArgs: string[];
282
288
  };
283
289
  };
284
- 'node-test-runner': {
285
- title: string;
286
- enablers: string;
287
- isEnabled: import("../types/config.js").IsPluginEnabled;
288
- entry: string[];
289
- };
290
290
  'npm-package-json-lint': {
291
291
  title: string;
292
292
  enablers: string[];
@@ -106,8 +106,8 @@ export const Plugins = {
106
106
  jest,
107
107
  ladle,
108
108
  lefthook,
109
- linthtml,
110
109
  'lint-staged': lintStaged,
110
+ linthtml,
111
111
  'lockfile-lint': lockfileLint,
112
112
  'lost-pixel': lostPixel,
113
113
  markdownlint,
@@ -118,8 +118,8 @@ export const Plugins = {
118
118
  netlify,
119
119
  next,
120
120
  node,
121
- nodemon,
122
121
  'node-test-runner': nodeTestRunner,
122
+ nodemon,
123
123
  'npm-package-json-lint': npmPackageJsonLint,
124
124
  nuxt,
125
125
  nx,
@@ -41,6 +41,7 @@ const resolveDependencies = async (config, options) => {
41
41
  }
42
42
  }
43
43
  const runner = config.runner ? [config.runner] : [];
44
+ const runtime = config.runtime && config.runtime !== 'jest-circus' ? [config.runtime] : [];
44
45
  const environments = config.testEnvironment === 'jsdom' ? ['jest-environment-jsdom'] : [];
45
46
  const resolvers = config.resolver ? [config.resolver] : [];
46
47
  const reporters = config.reporters
@@ -67,6 +68,7 @@ const resolveDependencies = async (config, options) => {
67
68
  ...presets,
68
69
  ...projects,
69
70
  ...runner,
71
+ ...runtime,
70
72
  ...environments,
71
73
  ...resolvers,
72
74
  ...reporters,
@@ -1,7 +1,7 @@
1
1
  import EasyTable from 'easy-table';
2
2
  import { relative, toRelative } from '../util/path.js';
3
3
  import { getTitle } from './util.js';
4
- const printHeader = (size, title) => console.log(`<details>${title ? `<summary>${title} (${size})</summary>` : ''}\n\n\`\`\``);
4
+ const printHeader = (size, title) => console.log(`<details>\n${title ? `<summary>${title} (${size})</summary>\n` : ''}\n\`\`\``);
5
5
  const printFooter = () => console.log('```\n\n</details>\n');
6
6
  const logIssueRecord = (issues) => {
7
7
  const table = new EasyTable();
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.36.0";
1
+ export declare const version = "5.36.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.36.0';
1
+ export const version = '5.36.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.36.0",
3
+ "version": "5.36.2",
4
4
  "description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://knip.dev",
6
6
  "repository": {
@@ -43,13 +43,13 @@
43
43
  "test": "bun test test/*.test.ts test/**/*.test.ts",
44
44
  "test:node": "glob -c \"npx -y tsx --test --import ./transform-test.js\" \"test/**/*.test.ts\"",
45
45
  "watch": "npm link && tsc --watch",
46
- "prebuild": "node rmdir.js dist",
46
+ "prebuild": "npm run generate-plugin-defs && node rmdir.js dist",
47
47
  "build": "tsc",
48
48
  "qa": "bun lint && bun run build && bun knip && bun knip:production && bun run test",
49
49
  "release": "release-it",
50
50
  "create-plugin": "bun ./scripts/create-new-plugin.ts",
51
51
  "postcreate-plugin": "biome format --write schema.json schema-jsonc.json src/ConfigurationValidator.ts",
52
- "generate-plugin-types": "bun ./scripts/generate-plugin-types.ts"
52
+ "generate-plugin-defs": "node ./scripts/generate-plugin-defs.js && biome check --write src/plugins/index.ts src/types/PluginNames.ts"
53
53
  },
54
54
  "files": [
55
55
  "dist",
@@ -63,7 +63,7 @@
63
63
  "easy-table": "1.2.0",
64
64
  "enhanced-resolve": "^5.17.1",
65
65
  "fast-glob": "^3.3.2",
66
- "jiti": "^2.3.3",
66
+ "jiti": "^2.4.0",
67
67
  "js-yaml": "^4.1.0",
68
68
  "minimist": "^1.2.8",
69
69
  "picocolors": "^1.1.0",