knip 6.31.0 → 6.32.1

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 (59) hide show
  1. package/dist/ConfigurationChief.d.ts +18 -0
  2. package/dist/DependencyDeputy.d.ts +2 -1
  3. package/dist/DependencyDeputy.js +2 -2
  4. package/dist/WorkspaceWorker.js +12 -14
  5. package/dist/binaries/bash-parser.js +20 -8
  6. package/dist/binaries/fallback.js +6 -4
  7. package/dist/binaries/plugins.js +8 -4
  8. package/dist/binaries/resolvers/bun.js +7 -7
  9. package/dist/binaries/resolvers/bunx.d.ts +2 -1
  10. package/dist/binaries/resolvers/bunx.js +10 -6
  11. package/dist/binaries/resolvers/find.js +5 -5
  12. package/dist/binaries/resolvers/npm.js +5 -5
  13. package/dist/binaries/resolvers/npx.js +3 -4
  14. package/dist/binaries/resolvers/nub.js +4 -4
  15. package/dist/binaries/resolvers/pnpm.js +12 -9
  16. package/dist/binaries/resolvers/pnpx.d.ts +2 -1
  17. package/dist/binaries/resolvers/pnpx.js +4 -4
  18. package/dist/binaries/resolvers/yarn.js +17 -13
  19. package/dist/binaries/util.d.ts +6 -4
  20. package/dist/binaries/util.js +25 -3
  21. package/dist/compilers/index.d.ts +30 -0
  22. package/dist/graph/analyze.js +1 -0
  23. package/dist/graph/build.js +1 -0
  24. package/dist/plugins/babel/types.d.ts +1 -0
  25. package/dist/plugins/borp/index.d.ts +3 -0
  26. package/dist/plugins/borp/index.js +61 -0
  27. package/dist/plugins/borp/types.d.ts +4 -0
  28. package/dist/plugins/borp/types.js +1 -0
  29. package/dist/plugins/docusaurus/index.js +3 -4
  30. package/dist/plugins/expo/index.js +3 -1
  31. package/dist/plugins/index.d.ts +3 -0
  32. package/dist/plugins/index.js +6 -0
  33. package/dist/plugins/jest/index.js +6 -2
  34. package/dist/plugins/mocha/index.js +59 -0
  35. package/dist/plugins/playwright/index.js +1 -1
  36. package/dist/plugins/pre-commit/index.d.ts +3 -0
  37. package/dist/plugins/pre-commit/index.js +23 -0
  38. package/dist/plugins/rollup/index.js +5 -1
  39. package/dist/plugins/tsd/index.d.ts +3 -0
  40. package/dist/plugins/tsd/index.js +43 -0
  41. package/dist/plugins/tsd/types.d.ts +4 -0
  42. package/dist/plugins/tsd/types.js +1 -0
  43. package/dist/schema/configuration.d.ts +45 -0
  44. package/dist/schema/plugins.d.ts +15 -0
  45. package/dist/schema/plugins.js +3 -0
  46. package/dist/types/PluginNames.d.ts +2 -2
  47. package/dist/types/PluginNames.js +3 -0
  48. package/dist/types/config.d.ts +4 -2
  49. package/dist/util/create-input-handler.js +2 -0
  50. package/dist/util/create-options.d.ts +30 -0
  51. package/dist/util/package-json.d.ts +3 -0
  52. package/dist/util/package-json.js +6 -2
  53. package/dist/util/parse-args.d.ts +2 -1
  54. package/dist/util/parse-args.js +8 -1
  55. package/dist/util/scripts.js +9 -5
  56. package/dist/version.d.ts +1 -1
  57. package/dist/version.js +1 -1
  58. package/package.json +3 -3
  59. package/schema.json +12 -0
@@ -41,6 +41,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
41
41
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
42
42
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
43
43
  }, z.core.$strip>]>>;
44
+ borp: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
45
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
46
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
47
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
48
+ }, z.core.$strip>]>>;
44
49
  bumpp: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
45
50
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
46
51
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -496,6 +501,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
496
501
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
497
502
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
498
503
  }, z.core.$strip>]>>;
504
+ 'pre-commit': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
505
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
506
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
507
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
508
+ }, z.core.$strip>]>>;
499
509
  preconstruct: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
500
510
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
501
511
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -726,6 +736,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
726
736
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
727
737
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
728
738
  }, z.core.$strip>]>>;
739
+ tsd: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
740
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
741
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
742
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
743
+ }, z.core.$strip>]>>;
729
744
  tsdown: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
730
745
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
731
746
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -952,6 +967,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
952
967
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
953
968
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
954
969
  }, z.core.$strip>]>>;
970
+ borp: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
971
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
972
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
973
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
974
+ }, z.core.$strip>]>>;
955
975
  bumpp: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
956
976
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
957
977
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -1407,6 +1427,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1407
1427
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1408
1428
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1409
1429
  }, z.core.$strip>]>>;
1430
+ 'pre-commit': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1431
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1432
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1433
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1434
+ }, z.core.$strip>]>>;
1410
1435
  preconstruct: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1411
1436
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1412
1437
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -1637,6 +1662,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1637
1662
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1638
1663
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1639
1664
  }, z.core.$strip>]>>;
1665
+ tsd: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1666
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1667
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1668
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1669
+ }, z.core.$strip>]>>;
1640
1670
  tsdown: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1641
1671
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1642
1672
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -1881,6 +1911,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1881
1911
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1882
1912
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1883
1913
  }, z.core.$strip>]>>;
1914
+ borp: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1915
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1916
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1917
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1918
+ }, z.core.$strip>]>>;
1884
1919
  bumpp: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1885
1920
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1886
1921
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -2336,6 +2371,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
2336
2371
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
2337
2372
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
2338
2373
  }, z.core.$strip>]>>;
2374
+ 'pre-commit': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
2375
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
2376
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
2377
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
2378
+ }, z.core.$strip>]>>;
2339
2379
  preconstruct: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
2340
2380
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
2341
2381
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -2566,6 +2606,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
2566
2606
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
2567
2607
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
2568
2608
  }, z.core.$strip>]>>;
2609
+ tsd: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
2610
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
2611
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
2612
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
2613
+ }, z.core.$strip>]>>;
2569
2614
  tsdown: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
2570
2615
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
2571
2616
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -46,6 +46,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
46
46
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
47
47
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
48
48
  }, z.core.$strip>]>;
49
+ borp: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
50
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
51
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
52
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
53
+ }, z.core.$strip>]>;
49
54
  bumpp: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
50
55
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
51
56
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -501,6 +506,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
501
506
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
502
507
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
503
508
  }, z.core.$strip>]>;
509
+ 'pre-commit': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
510
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
511
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
512
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
513
+ }, z.core.$strip>]>;
504
514
  preconstruct: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
505
515
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
506
516
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -731,6 +741,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
731
741
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
732
742
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
733
743
  }, z.core.$strip>]>;
744
+ tsd: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
745
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
746
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
747
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
748
+ }, z.core.$strip>]>;
734
749
  tsdown: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
735
750
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
736
751
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -18,6 +18,7 @@ export const pluginsSchema = z.object({
18
18
  ava: pluginSchema,
19
19
  babel: pluginSchema,
20
20
  biome: pluginSchema,
21
+ borp: pluginSchema,
21
22
  bumpp: pluginSchema,
22
23
  bun: pluginSchema,
23
24
  c8: pluginSchema,
@@ -109,6 +110,7 @@ export const pluginsSchema = z.object({
109
110
  pm2: pluginSchema,
110
111
  pnpm: pluginSchema,
111
112
  postcss: pluginSchema,
113
+ 'pre-commit': pluginSchema,
112
114
  preconstruct: pluginSchema,
113
115
  prettier: pluginSchema,
114
116
  prisma: pluginSchema,
@@ -155,6 +157,7 @@ export const pluginsSchema = z.object({
155
157
  temporal: pluginSchema,
156
158
  travis: pluginSchema,
157
159
  'ts-node': pluginSchema,
160
+ tsd: pluginSchema,
158
161
  tsdown: pluginSchema,
159
162
  tsup: pluginSchema,
160
163
  tsx: pluginSchema,
@@ -1,2 +1,2 @@
1
- export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-markdoc' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'catalyst' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'electron-vite' | 'eleventy' | 'esbuild' | 'eslint' | 'eve' | 'execa' | 'expo' | 'expressive-code' | 'fast' | 'fumadocs' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'laravel-vite-plugin' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lit' | 'lockfile-lint' | 'lost-pixel' | 'lunaria' | 'markdownlint' | 'marko' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-spawn' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nuxtjs-i18n' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'openclaw' | 'orval' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'quasar' | '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' | 'tauri' | 'temporal' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'unplugin-auto-import' | 'unplugin-icons' | 'unplugin-vue-components' | 'unplugin-vue-i18n' | 'unplugin-vue-markdown' | 'unplugin-vue-router' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | 'vite-plugin-pages' | 'vite-plugin-pwa' | 'vite-plugin-vue-layouts-next' | 'vite-plus' | 'vite-pwa-assets-generator' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
2
- export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-markdoc', 'astro-og-canvas', 'ava', 'babel', 'biome', 'bumpp', 'bun', 'c8', 'capacitor', 'catalyst', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'electron-vite', 'eleventy', 'esbuild', 'eslint', 'eve', 'execa', 'expo', 'expressive-code', 'fast', 'fumadocs', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'laravel-vite-plugin', 'lefthook', 'lint-staged', 'linthtml', 'lit', 'lockfile-lint', 'lost-pixel', 'lunaria', 'markdownlint', 'marko', 'mdx', 'mdxlint', 'metro', 'mocha', 'moonrepo', 'msw', 'nano-spawn', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nuxtjs-i18n', 'nx', 'nyc', 'oclif', 'openapi-ts', 'openclaw', 'orval', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'preconstruct', 'prettier', 'prisma', 'quasar', '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', 'tauri', 'temporal', 'travis', 'ts-node', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'unplugin-auto-import', 'unplugin-icons', 'unplugin-vue-components', 'unplugin-vue-i18n', 'unplugin-vue-markdown', 'unplugin-vue-router', 'vercel', 'vercel-og', 'vike', 'vite', 'vite-plugin-pages', 'vite-plugin-pwa', 'vite-plugin-vue-layouts-next', 'vite-plus', 'vite-pwa-assets-generator', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
1
+ export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-markdoc' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'borp' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'catalyst' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'electron-vite' | 'eleventy' | 'esbuild' | 'eslint' | 'eve' | 'execa' | 'expo' | 'expressive-code' | 'fast' | 'fumadocs' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'laravel-vite-plugin' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lit' | 'lockfile-lint' | 'lost-pixel' | 'lunaria' | 'markdownlint' | 'marko' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-spawn' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nuxtjs-i18n' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'openclaw' | 'orval' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'pre-commit' | 'preconstruct' | 'prettier' | 'prisma' | 'quasar' | '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' | 'tauri' | 'temporal' | 'travis' | 'ts-node' | 'tsd' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'unplugin-auto-import' | 'unplugin-icons' | 'unplugin-vue-components' | 'unplugin-vue-i18n' | 'unplugin-vue-markdown' | 'unplugin-vue-router' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | 'vite-plugin-pages' | 'vite-plugin-pwa' | 'vite-plugin-vue-layouts-next' | 'vite-plus' | 'vite-pwa-assets-generator' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
2
+ export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-markdoc', 'astro-og-canvas', 'ava', 'babel', 'biome', 'borp', 'bumpp', 'bun', 'c8', 'capacitor', 'catalyst', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'electron-vite', 'eleventy', 'esbuild', 'eslint', 'eve', 'execa', 'expo', 'expressive-code', 'fast', 'fumadocs', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'laravel-vite-plugin', 'lefthook', 'lint-staged', 'linthtml', 'lit', 'lockfile-lint', 'lost-pixel', 'lunaria', 'markdownlint', 'marko', 'mdx', 'mdxlint', 'metro', 'mocha', 'moonrepo', 'msw', 'nano-spawn', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nuxtjs-i18n', 'nx', 'nyc', 'oclif', 'openapi-ts', 'openclaw', 'orval', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'pre-commit', 'preconstruct', 'prettier', 'prisma', 'quasar', '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', 'tauri', 'temporal', 'travis', 'ts-node', 'tsd', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'unplugin-auto-import', 'unplugin-icons', 'unplugin-vue-components', 'unplugin-vue-i18n', 'unplugin-vue-markdown', 'unplugin-vue-router', 'vercel', 'vercel-og', 'vike', 'vite', 'vite-plugin-pages', 'vite-plugin-pwa', 'vite-plugin-vue-layouts-next', 'vite-plus', 'vite-pwa-assets-generator', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
@@ -7,6 +7,7 @@ export const pluginNames = [
7
7
  'ava',
8
8
  'babel',
9
9
  'biome',
10
+ 'borp',
10
11
  'bumpp',
11
12
  'bun',
12
13
  'c8',
@@ -98,6 +99,7 @@ export const pluginNames = [
98
99
  'pm2',
99
100
  'pnpm',
100
101
  'postcss',
102
+ 'pre-commit',
101
103
  'preconstruct',
102
104
  'prettier',
103
105
  'prisma',
@@ -144,6 +146,7 @@ export const pluginNames = [
144
146
  'temporal',
145
147
  'travis',
146
148
  'ts-node',
149
+ 'tsd',
147
150
  'tsdown',
148
151
  'tsup',
149
152
  'tsx',
@@ -1,4 +1,5 @@
1
1
  import type { Program, VisitorObject } from 'oxc-parser';
2
+ import type { Word } from 'unbash';
2
3
  import type { z } from 'zod/mini';
3
4
  import type { AsyncCompilers, CompilerSync, HasDependency, SyncCompilers } from '../compilers/types.ts';
4
5
  import type { knipConfigurationSchema, workspaceConfigurationSchema } from '../schema/configuration.ts';
@@ -18,11 +19,12 @@ export interface GetInputsFromScriptsOptions extends BaseOptions {
18
19
  }
19
20
  export type GetInputsFromScripts<T = GetInputsFromScriptsOptions> = (npmScripts: string | string[] | Set<string>, options: T) => Input[];
20
21
  export type GetInputsFromScriptsPartial = (npmScripts: string | string[] | Set<string>, options?: Partial<GetInputsFromScriptsOptions>) => Input[];
21
- export type FromArgs = (args: string[], options?: Partial<GetInputsFromScriptsOptions>) => Input[];
22
+ export type ScriptArg = string | Word;
23
+ export type FromArgs = (args: ScriptArg[], options?: Partial<GetInputsFromScriptsOptions>) => Input[];
22
24
  export interface BinaryResolverOptions extends GetInputsFromScriptsOptions {
23
25
  fromArgs: FromArgs;
24
26
  }
25
- export type BinaryResolver = (binary: string, args: string[], options: BinaryResolverOptions) => Input[];
27
+ export type BinaryResolver = (binary: string, words: Word[], options: BinaryResolverOptions) => Input[];
26
28
  export type RawConfiguration = z.infer<typeof knipConfigurationSchema>;
27
29
  export type RawConfigurationOrFn = RawConfiguration | ((options: ParsedCLIArgs) => RawConfiguration | Promise<RawConfiguration>);
28
30
  export type RawPluginConfiguration = z.infer<typeof pluginSchema>;
@@ -56,6 +56,7 @@ export const createInputHandler = (deputy, chief, isGitIgnored, addIssue, extern
56
56
  const inputWorkspace = getWorkspaceFor(input, chief, workspace);
57
57
  if (inputWorkspace) {
58
58
  let isHandled = deputy.maybeAddReferencedExternalDependency(inputWorkspace, packageName, {
59
+ specifier,
59
60
  isDevOnly: isConfig(input),
60
61
  isTypeOnly: input.isTypeOnly,
61
62
  });
@@ -63,6 +64,7 @@ export const createInputHandler = (deputy, chief, isGitIgnored, addIssue, extern
63
64
  const owningWorkspace = chief.findWorkspaceByFilePath(input.containingFilePath);
64
65
  if (owningWorkspace && owningWorkspace !== inputWorkspace) {
65
66
  const isOwnerHandled = deputy.maybeAddReferencedExternalDependency(owningWorkspace, packageName, {
67
+ specifier,
66
68
  isDevOnly: isConfig(input),
67
69
  isTypeOnly: input.isTypeOnly,
68
70
  });
@@ -85,6 +85,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
85
85
  entry?: string | string[] | undefined;
86
86
  project?: string | string[] | undefined;
87
87
  } | undefined;
88
+ borp?: string | boolean | string[] | {
89
+ config?: string | string[] | undefined;
90
+ entry?: string | string[] | undefined;
91
+ project?: string | string[] | undefined;
92
+ } | undefined;
88
93
  bumpp?: string | boolean | string[] | {
89
94
  config?: string | string[] | undefined;
90
95
  entry?: string | string[] | undefined;
@@ -540,6 +545,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
540
545
  entry?: string | string[] | undefined;
541
546
  project?: string | string[] | undefined;
542
547
  } | undefined;
548
+ 'pre-commit'?: string | boolean | string[] | {
549
+ config?: string | string[] | undefined;
550
+ entry?: string | string[] | undefined;
551
+ project?: string | string[] | undefined;
552
+ } | undefined;
543
553
  preconstruct?: string | boolean | string[] | {
544
554
  config?: string | string[] | undefined;
545
555
  entry?: string | string[] | undefined;
@@ -770,6 +780,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
770
780
  entry?: string | string[] | undefined;
771
781
  project?: string | string[] | undefined;
772
782
  } | undefined;
783
+ tsd?: string | boolean | string[] | {
784
+ config?: string | string[] | undefined;
785
+ entry?: string | string[] | undefined;
786
+ project?: string | string[] | undefined;
787
+ } | undefined;
773
788
  tsdown?: string | boolean | string[] | {
774
789
  config?: string | string[] | undefined;
775
790
  entry?: string | string[] | undefined;
@@ -1008,6 +1023,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
1008
1023
  entry?: string | string[] | undefined;
1009
1024
  project?: string | string[] | undefined;
1010
1025
  } | undefined;
1026
+ borp?: string | boolean | string[] | {
1027
+ config?: string | string[] | undefined;
1028
+ entry?: string | string[] | undefined;
1029
+ project?: string | string[] | undefined;
1030
+ } | undefined;
1011
1031
  bumpp?: string | boolean | string[] | {
1012
1032
  config?: string | string[] | undefined;
1013
1033
  entry?: string | string[] | undefined;
@@ -1463,6 +1483,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
1463
1483
  entry?: string | string[] | undefined;
1464
1484
  project?: string | string[] | undefined;
1465
1485
  } | undefined;
1486
+ 'pre-commit'?: string | boolean | string[] | {
1487
+ config?: string | string[] | undefined;
1488
+ entry?: string | string[] | undefined;
1489
+ project?: string | string[] | undefined;
1490
+ } | undefined;
1466
1491
  preconstruct?: string | boolean | string[] | {
1467
1492
  config?: string | string[] | undefined;
1468
1493
  entry?: string | string[] | undefined;
@@ -1693,6 +1718,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
1693
1718
  entry?: string | string[] | undefined;
1694
1719
  project?: string | string[] | undefined;
1695
1720
  } | undefined;
1721
+ tsd?: string | boolean | string[] | {
1722
+ config?: string | string[] | undefined;
1723
+ entry?: string | string[] | undefined;
1724
+ project?: string | string[] | undefined;
1725
+ } | undefined;
1696
1726
  tsdown?: string | boolean | string[] | {
1697
1727
  config?: string | string[] | undefined;
1698
1728
  entry?: string | string[] | undefined;
@@ -175,6 +175,7 @@ export declare const getPublishedTypeManifest: (manifest: PackageJson) => {
175
175
  ava: unknown;
176
176
  babel: unknown;
177
177
  biome: unknown;
178
+ borp: unknown;
178
179
  bumpp: unknown;
179
180
  bun: unknown;
180
181
  c8: unknown;
@@ -265,6 +266,7 @@ export declare const getPublishedTypeManifest: (manifest: PackageJson) => {
265
266
  plop: unknown;
266
267
  pm2: unknown;
267
268
  postcss: unknown;
269
+ "pre-commit": unknown;
268
270
  preconstruct: unknown;
269
271
  prettier: unknown;
270
272
  prisma: unknown;
@@ -311,6 +313,7 @@ export declare const getPublishedTypeManifest: (manifest: PackageJson) => {
311
313
  temporal: unknown;
312
314
  travis: unknown;
313
315
  "ts-node": unknown;
316
+ tsd: unknown;
314
317
  tsdown: unknown;
315
318
  tsup: unknown;
316
319
  tsx: unknown;
@@ -1,5 +1,6 @@
1
1
  import { readFile, writeFile } from 'node:fs/promises';
2
2
  import { IS_DTS } from '../constants.js';
3
+ import { getPackageNameFromModuleSpecifier } from './modules.js';
3
4
  const INDENT = Symbol.for('indent');
4
5
  const NEWLINE = Symbol.for('newline');
5
6
  const DEFAULT_NEWLINE = '\n';
@@ -265,8 +266,11 @@ export const getManifestImportDependencies = (manifest) => {
265
266
  if (!entry.startsWith('#'))
266
267
  continue;
267
268
  for (const item of getEntriesFromExports(exportValue)) {
268
- if (!item.startsWith('.') && !item.startsWith('!'))
269
- dependencies.add(item);
269
+ if (item.startsWith('.') || item.startsWith('!'))
270
+ continue;
271
+ const packageName = getPackageNameFromModuleSpecifier(item);
272
+ if (packageName)
273
+ dependencies.add(packageName);
270
274
  }
271
275
  }
272
276
  return dependencies;
@@ -1,3 +1,4 @@
1
+ import type { Word } from 'unbash';
1
2
  type ParsedValue = any;
2
3
  export interface ParsedArgs {
3
4
  _: string[];
@@ -10,5 +11,5 @@ interface Opts {
10
11
  alias?: Record<string, string | string[]>;
11
12
  '--'?: boolean;
12
13
  }
13
- declare const parseArgs: (argv: string[], opts?: Opts) => ParsedArgs;
14
+ declare const parseArgs: (input: readonly (string | Word)[], opts?: Opts) => ParsedArgs;
14
15
  export default parseArgs;
@@ -17,7 +17,14 @@ const setNested = (target, key, value) => {
17
17
  }
18
18
  obj[parts[parts.length - 1]] = value;
19
19
  };
20
- const parseArgs = (argv, opts = {}) => {
20
+ const parseArgs = (input, opts = {}) => {
21
+ const argv = [];
22
+ for (const arg of input) {
23
+ if (typeof arg === 'string')
24
+ argv.push(arg);
25
+ else if (arg && typeof arg.value === 'string')
26
+ argv.push(arg.value);
27
+ }
21
28
  const strings = new Set(opts.string ?? []);
22
29
  const booleans = new Set(opts.boolean ?? []);
23
30
  const groups = new Map();
@@ -1,6 +1,6 @@
1
1
  import { parse } from 'unbash';
2
2
  import { extractBinary } from './modules.js';
3
- const spawningBinaries = new Set(['cross-env', 'retry-cli']);
3
+ const spawningBinaries = new Set(['c8', 'cross-env', 'retry-cli']);
4
4
  export function* walkCommands(node) {
5
5
  switch (node.type) {
6
6
  case 'Command':
@@ -64,11 +64,15 @@ export const getScriptCommands = (script) => {
64
64
  if (!text)
65
65
  continue;
66
66
  const binary = extractBinary(text);
67
- const args = node.suffix.map(word => word.value);
68
- if (spawningBinaries.has(binary))
69
- out.push(...getScriptCommands(args.filter(arg => arg !== '--').join(' ')));
67
+ if (spawningBinaries.has(binary)) {
68
+ const rest = node.suffix
69
+ .filter(word => word.text !== '--')
70
+ .map(word => word.text)
71
+ .join(' ');
72
+ out.push(...getScriptCommands(rest));
73
+ }
70
74
  else
71
- out.push({ binary, args });
75
+ out.push({ binary, args: node.suffix.map(word => word.value) });
72
76
  }
73
77
  }
74
78
  return out;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "6.31.0";
1
+ export declare const version = "6.32.1";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '6.31.0';
1
+ export const version = '6.32.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "6.31.0",
3
+ "version": "6.32.1",
4
4
  "description": "Find and fix unused dependencies, exports and files in your TypeScript and JavaScript projects",
5
5
  "keywords": [
6
6
  "analysis",
@@ -79,7 +79,7 @@
79
79
  "dependencies": {
80
80
  "fdir": "^6.5.0",
81
81
  "formatly": "^0.3.0",
82
- "get-tsconfig": "4.14.0",
82
+ "get-tsconfig": "4.14.1",
83
83
  "jiti": "^2.7.0",
84
84
  "oxc-parser": "^0.142.0",
85
85
  "oxc-resolver": "11.24.2",
@@ -98,7 +98,7 @@
98
98
  "@types/webpack": "^5.28.5",
99
99
  "codeclimate-types": "^0.3.1",
100
100
  "prettier": "^3.9.6",
101
- "tsx": "^4.23.1",
101
+ "tsx": "^4.23.5",
102
102
  "typescript": "7.0.2"
103
103
  },
104
104
  "engines": {
package/schema.json CHANGED
@@ -430,6 +430,10 @@
430
430
  "title": "biome plugin configuration (https://knip.dev/reference/plugins/biome)",
431
431
  "$ref": "#/definitions/plugin"
432
432
  },
433
+ "borp": {
434
+ "title": "borp plugin configuration (https://knip.dev/reference/plugins/borp)",
435
+ "$ref": "#/definitions/plugin"
436
+ },
433
437
  "bumpp": {
434
438
  "title": "bumpp plugin configuration (https://knip.dev/reference/plugins/bumpp)",
435
439
  "$ref": "#/definitions/plugin"
@@ -786,6 +790,10 @@
786
790
  "title": "PostCSS plugin configuration (https://knip.dev/reference/plugins/postcss)",
787
791
  "$ref": "#/definitions/plugin"
788
792
  },
793
+ "pre-commit": {
794
+ "title": "pre-commit plugin configuration (https://knip.dev/reference/plugins/pre-commit)",
795
+ "$ref": "#/definitions/plugin"
796
+ },
789
797
  "preconstruct": {
790
798
  "title": "preconstruct plugin configuration (https://knip.dev/reference/plugins/preconstruct)",
791
799
  "$ref": "#/definitions/plugin"
@@ -966,6 +974,10 @@
966
974
  "title": "ts-node plugin configuration (https://knip.dev/reference/plugins/ts-node)",
967
975
  "$ref": "#/definitions/plugin"
968
976
  },
977
+ "tsd": {
978
+ "title": "tsd plugin configuration (https://knip.dev/reference/plugins/tsd)",
979
+ "$ref": "#/definitions/plugin"
980
+ },
969
981
  "tsdown": {
970
982
  "title": "tsdown plugin configuration (https://knip.dev/reference/plugins/tsdown)",
971
983
  "$ref": "#/definitions/plugin"