knip 6.15.0 → 6.16.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.
Files changed (61) hide show
  1. package/dist/ConfigurationChief.d.ts +20 -0
  2. package/dist/ConfigurationChief.js +2 -1
  3. package/dist/ProjectPrincipal.d.ts +2 -1
  4. package/dist/ProjectPrincipal.js +13 -13
  5. package/dist/binaries/fallback.js +1 -1
  6. package/dist/binaries/plugins.js +1 -1
  7. package/dist/binaries/resolvers/bun.js +1 -1
  8. package/dist/binaries/resolvers/bunx.js +1 -1
  9. package/dist/binaries/resolvers/npm.js +1 -1
  10. package/dist/binaries/resolvers/npx.js +1 -1
  11. package/dist/binaries/resolvers/pnpm.js +1 -1
  12. package/dist/binaries/resolvers/pnpx.js +1 -1
  13. package/dist/binaries/resolvers/yarn.js +1 -1
  14. package/dist/binaries/util.d.ts +1 -2
  15. package/dist/binaries/util.js +1 -1
  16. package/dist/compilers/index.d.ts +31 -0
  17. package/dist/graph/analyze.js +8 -7
  18. package/dist/graph/build.js +3 -3
  19. package/dist/plugins/_custom-elements/custom-element-visitor.d.ts +7 -0
  20. package/dist/plugins/_custom-elements/custom-element-visitor.js +106 -0
  21. package/dist/plugins/bun/index.js +1 -1
  22. package/dist/plugins/catalyst/index.d.ts +3 -0
  23. package/dist/plugins/catalyst/index.js +16 -0
  24. package/dist/plugins/execa/visitors/execa.js +4 -17
  25. package/dist/plugins/fast/index.d.ts +3 -0
  26. package/dist/plugins/fast/index.js +16 -0
  27. package/dist/plugins/index.d.ts +3 -0
  28. package/dist/plugins/index.js +6 -0
  29. package/dist/plugins/lit/index.d.ts +3 -0
  30. package/dist/plugins/lit/index.js +25 -0
  31. package/dist/plugins/nano-spawn/visitors/nano-spawn.js +4 -17
  32. package/dist/plugins/relay/index.js +1 -1
  33. package/dist/plugins/stencil/index.js +17 -1
  34. package/dist/plugins/sveltejs-package/helpers.js +1 -1
  35. package/dist/schema/configuration.d.ts +51 -0
  36. package/dist/schema/configuration.js +1 -0
  37. package/dist/schema/plugins.d.ts +15 -0
  38. package/dist/schema/plugins.js +3 -0
  39. package/dist/types/PluginNames.d.ts +2 -2
  40. package/dist/types/PluginNames.js +3 -0
  41. package/dist/types/args.d.ts +1 -1
  42. package/dist/types/config.d.ts +2 -0
  43. package/dist/types/module-graph.d.ts +1 -0
  44. package/dist/typescript/ast-helpers.js +21 -20
  45. package/dist/typescript/ast-nodes.d.ts +1 -0
  46. package/dist/typescript/ast-nodes.js +19 -0
  47. package/dist/typescript/get-imports-and-exports.js +18 -2
  48. package/dist/typescript/resolve-module-names.d.ts +6 -1
  49. package/dist/typescript/resolve-module-names.js +20 -12
  50. package/dist/typescript/visitors/calls.d.ts +3 -2
  51. package/dist/typescript/visitors/calls.js +88 -16
  52. package/dist/typescript/visitors/exports.js +12 -0
  53. package/dist/typescript/visitors/walk.d.ts +7 -0
  54. package/dist/typescript/visitors/walk.js +36 -1
  55. package/dist/util/create-options.d.ts +31 -0
  56. package/dist/util/parse-args.d.ts +14 -0
  57. package/dist/util/parse-args.js +112 -0
  58. package/dist/version.d.ts +1 -1
  59. package/dist/version.js +1 -1
  60. package/package.json +1 -3
  61. package/schema.json +61 -43
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "6.15.0",
3
+ "version": "6.16.0",
4
4
  "description": "Find and fix unused dependencies, exports and files in your TypeScript and JavaScript projects",
5
5
  "keywords": [
6
6
  "analysis",
@@ -81,7 +81,6 @@
81
81
  "formatly": "^0.3.0",
82
82
  "get-tsconfig": "4.14.0",
83
83
  "jiti": "^2.7.0",
84
- "minimist": "^1.2.8",
85
84
  "oxc-parser": "^0.133.0",
86
85
  "oxc-resolver": "^11.20.0",
87
86
  "picomatch": "^4.0.4",
@@ -95,7 +94,6 @@
95
94
  "devDependencies": {
96
95
  "@jest/types": "^29.6.3",
97
96
  "@types/bun": "^1.3.3",
98
- "@types/minimist": "^1.2.5",
99
97
  "@types/picomatch": "^4.0.1",
100
98
  "@types/webpack": "^5.28.5",
101
99
  "@typescript/native-preview": "7.0.0-dev.20260512.1",
package/schema.json CHANGED
@@ -52,49 +52,7 @@
52
52
  "$ref": "#/definitions/issueTypes"
53
53
  },
54
54
  "ignoreExportsUsedInFile": {
55
- "title": "Ignore exports used in file",
56
- "examples": [
57
- {
58
- "ignoreExportsUsedInFile": true
59
- },
60
- {
61
- "ignoreExportsUsedInFile": {
62
- "interface": true,
63
- "type": true
64
- }
65
- }
66
- ],
67
- "anyOf": [
68
- {
69
- "type": "boolean"
70
- },
71
- {
72
- "type": "object",
73
- "properties": {
74
- "class": {
75
- "type": "boolean"
76
- },
77
- "enum": {
78
- "type": "boolean"
79
- },
80
- "function": {
81
- "type": "boolean"
82
- },
83
- "interface": {
84
- "type": "boolean"
85
- },
86
- "member": {
87
- "type": "boolean"
88
- },
89
- "type": {
90
- "type": "boolean"
91
- },
92
- "variable": {
93
- "type": "boolean"
94
- }
95
- }
96
- }
97
- ]
55
+ "$ref": "#/definitions/ignoreExportsUsedInFile"
98
56
  },
99
57
  "ignoreIssues": {
100
58
  "title": " Ignore specific issue types for specific file patterns",
@@ -224,6 +182,51 @@
224
182
  "title": "Include entry files when reporting unused exports",
225
183
  "type": "boolean"
226
184
  },
185
+ "ignoreExportsUsedInFile": {
186
+ "title": "Ignore exports used in file",
187
+ "examples": [
188
+ {
189
+ "ignoreExportsUsedInFile": true
190
+ },
191
+ {
192
+ "ignoreExportsUsedInFile": {
193
+ "interface": true,
194
+ "type": true
195
+ }
196
+ }
197
+ ],
198
+ "anyOf": [
199
+ {
200
+ "type": "boolean"
201
+ },
202
+ {
203
+ "type": "object",
204
+ "properties": {
205
+ "class": {
206
+ "type": "boolean"
207
+ },
208
+ "enum": {
209
+ "type": "boolean"
210
+ },
211
+ "function": {
212
+ "type": "boolean"
213
+ },
214
+ "interface": {
215
+ "type": "boolean"
216
+ },
217
+ "member": {
218
+ "type": "boolean"
219
+ },
220
+ "type": {
221
+ "type": "boolean"
222
+ },
223
+ "variable": {
224
+ "type": "boolean"
225
+ }
226
+ }
227
+ }
228
+ ]
229
+ },
227
230
  "ignoreMembers": {
228
231
  "title": "Enum and namespace members to exclude from the report (regex allowed)",
229
232
  "examples": ["render", "on.*"],
@@ -310,6 +313,9 @@
310
313
  "ignoreUnresolved": {
311
314
  "$ref": "#/definitions/ignoreUnresolved"
312
315
  },
316
+ "ignoreExportsUsedInFile": {
317
+ "$ref": "#/definitions/ignoreExportsUsedInFile"
318
+ },
313
319
  "includeEntryExports": {
314
320
  "$ref": "#/definitions/includeEntryExports"
315
321
  }
@@ -388,6 +394,10 @@
388
394
  "title": "Capacitor plugin configuration (https://knip.dev/reference/plugins/capacitor)",
389
395
  "$ref": "#/definitions/plugin"
390
396
  },
397
+ "catalyst": {
398
+ "title": "catalyst plugin configuration (https://knip.dev/reference/plugins/catalyst)",
399
+ "$ref": "#/definitions/plugin"
400
+ },
391
401
  "changelogen": {
392
402
  "title": "changelogen plugin configuration (https://knip.dev/reference/plugins/changelogen)",
393
403
  "$ref": "#/definitions/plugin"
@@ -468,6 +478,10 @@
468
478
  "title": "expressive-code plugin configuration (https://knip.dev/reference/plugins/expressive-code)",
469
479
  "$ref": "#/definitions/plugin"
470
480
  },
481
+ "fast": {
482
+ "title": "fast plugin configuration (https://knip.dev/reference/plugins/fast)",
483
+ "$ref": "#/definitions/plugin"
484
+ },
471
485
  "gatsby": {
472
486
  "title": "Gatsby plugin configuration (https://knip.dev/reference/plugins/gatsby)",
473
487
  "$ref": "#/definitions/plugin"
@@ -524,6 +538,10 @@
524
538
  "title": "linthtml plugin configuration (https://knip.dev/reference/plugins/linthtml)",
525
539
  "$ref": "#/definitions/plugin"
526
540
  },
541
+ "lit": {
542
+ "title": "lit plugin configuration (https://knip.dev/reference/plugins/lit)",
543
+ "$ref": "#/definitions/plugin"
544
+ },
527
545
  "lockfile-lint": {
528
546
  "title": "lockfile-lint plugin configuration (https://knip.dev/reference/plugins/lockfile-lint)",
529
547
  "$ref": "#/definitions/plugin"