knip 6.23.0 → 6.25.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 (128) hide show
  1. package/LICENSE +1 -1
  2. package/dist/ConfigurationChief.d.ts +13 -1
  3. package/dist/ConfigurationChief.js +3 -0
  4. package/dist/ProjectPrincipal.d.ts +2 -0
  5. package/dist/ProjectPrincipal.js +7 -6
  6. package/dist/WorkspaceWorker.d.ts +3 -1
  7. package/dist/WorkspaceWorker.js +5 -2
  8. package/dist/binaries/bash-parser.js +55 -83
  9. package/dist/binaries/index.js +3 -0
  10. package/dist/binaries/resolvers/yarn.js +4 -3
  11. package/dist/compilers/compilers.d.ts +2 -0
  12. package/dist/compilers/compilers.js +15 -4
  13. package/dist/compilers/index.d.ts +30 -6
  14. package/dist/compilers/index.js +25 -10
  15. package/dist/compilers/less.d.ts +7 -0
  16. package/dist/compilers/less.js +37 -0
  17. package/dist/compilers/mdx.d.ts +1 -2
  18. package/dist/compilers/mdx.js +14 -8
  19. package/dist/compilers/scss.d.ts +3 -2
  20. package/dist/compilers/scss.js +17 -14
  21. package/dist/compilers/shared.d.ts +6 -0
  22. package/dist/compilers/shared.js +9 -0
  23. package/dist/compilers/style-preprocessors.d.ts +2 -0
  24. package/dist/compilers/style-preprocessors.js +41 -0
  25. package/dist/compilers/stylus.d.ts +7 -0
  26. package/dist/compilers/stylus.js +36 -0
  27. package/dist/constants.d.ts +5 -1
  28. package/dist/constants.js +7 -0
  29. package/dist/graph/analyze.js +37 -2
  30. package/dist/graph/build.js +23 -1
  31. package/dist/graph-explorer/explorer.d.ts +1 -0
  32. package/dist/graph-explorer/explorer.js +2 -0
  33. package/dist/graph-explorer/operations/find-all-cycles.d.ts +3 -0
  34. package/dist/graph-explorer/operations/find-all-cycles.js +43 -0
  35. package/dist/graph-explorer/operations/find-cycles.js +3 -9
  36. package/dist/graph-explorer/utils.d.ts +10 -1
  37. package/dist/graph-explorer/utils.js +53 -0
  38. package/dist/plugins/astro/compiler-mdx.js +11 -2
  39. package/dist/plugins/astro/compiler.js +8 -4
  40. package/dist/plugins/bun/index.js +28 -14
  41. package/dist/plugins/eve/index.d.ts +3 -0
  42. package/dist/plugins/eve/index.js +22 -0
  43. package/dist/plugins/execa/visitors/execa.js +10 -18
  44. package/dist/plugins/fumadocs/index.d.ts +3 -0
  45. package/dist/plugins/fumadocs/index.js +18 -0
  46. package/dist/plugins/github-actions/index.js +3 -2
  47. package/dist/plugins/graphql-codegen/index.js +9 -7
  48. package/dist/plugins/index.d.ts +2 -0
  49. package/dist/plugins/index.js +4 -0
  50. package/dist/plugins/jest/index.js +13 -3
  51. package/dist/plugins/next/index.js +23 -10
  52. package/dist/plugins/node/index.js +4 -1
  53. package/dist/plugins/nuxt/index.js +4 -2
  54. package/dist/plugins/pnpm/index.js +21 -1
  55. package/dist/plugins/pnpm/types.d.ts +6 -0
  56. package/dist/plugins/pnpm/types.js +1 -0
  57. package/dist/plugins/prettier/index.js +19 -3
  58. package/dist/plugins/prettier/types.d.ts +6 -1
  59. package/dist/plugins/prisma/compiler.js +3 -0
  60. package/dist/plugins/rspack/index.js +5 -0
  61. package/dist/plugins/serverless-framework/index.js +12 -1
  62. package/dist/plugins/serverless-framework/types.d.ts +5 -2
  63. package/dist/plugins/stencil/index.js +59 -1
  64. package/dist/plugins/storybook/index.js +7 -0
  65. package/dist/plugins/svelte/compiler.d.ts +2 -1
  66. package/dist/plugins/svelte/compiler.js +8 -1
  67. package/dist/plugins/tailwind/compiler.js +3 -0
  68. package/dist/plugins/tailwind/index.js +5 -1
  69. package/dist/plugins/typedoc/index.js +9 -3
  70. package/dist/plugins/typedoc/types.d.ts +2 -0
  71. package/dist/plugins/vite/visitors/importMetaGlob.js +1 -8
  72. package/dist/plugins/vue/compiler.d.ts +2 -1
  73. package/dist/plugins/vue/compiler.js +8 -1
  74. package/dist/plugins/webpack/visitors/requireContext.js +2 -13
  75. package/dist/plugins/yarn/index.js +13 -4
  76. package/dist/plugins/yarn/types.d.ts +10 -0
  77. package/dist/plugins/yarn/types.js +1 -0
  78. package/dist/plugins/zx/visitors/zx.js +4 -4
  79. package/dist/reporters/compact.js +1 -2
  80. package/dist/reporters/cycles.d.ts +3 -0
  81. package/dist/reporters/cycles.js +79 -0
  82. package/dist/reporters/index.d.ts +1 -0
  83. package/dist/reporters/index.js +2 -0
  84. package/dist/reporters/json.d.ts +3 -0
  85. package/dist/reporters/json.js +2 -1
  86. package/dist/reporters/symbols.js +1 -2
  87. package/dist/reporters/util/util.d.ts +3 -1
  88. package/dist/reporters/util/util.js +5 -1
  89. package/dist/schema/configuration.d.ts +40 -6
  90. package/dist/schema/configuration.js +6 -0
  91. package/dist/schema/plugins.d.ts +10 -0
  92. package/dist/schema/plugins.js +2 -0
  93. package/dist/types/PluginNames.d.ts +2 -2
  94. package/dist/types/PluginNames.js +2 -0
  95. package/dist/types/config.d.ts +10 -0
  96. package/dist/types/issues.d.ts +3 -0
  97. package/dist/types/module-graph.d.ts +7 -0
  98. package/dist/types/package-json.d.ts +4 -1
  99. package/dist/types.d.ts +1 -1
  100. package/dist/typescript/SourceFileManager.js +3 -2
  101. package/dist/typescript/ast-nodes.d.ts +4 -1
  102. package/dist/typescript/ast-nodes.js +60 -2
  103. package/dist/typescript/comments.js +22 -3
  104. package/dist/typescript/get-imports-and-exports.js +10 -0
  105. package/dist/typescript/glob-imports.d.ts +3 -0
  106. package/dist/typescript/glob-imports.js +49 -0
  107. package/dist/typescript/resolve-module-names.d.ts +2 -0
  108. package/dist/typescript/resolve-module-names.js +35 -1
  109. package/dist/typescript/visitors/calls.js +4 -6
  110. package/dist/typescript/visitors/imports.js +8 -8
  111. package/dist/typescript/visitors/script-visitors.js +4 -4
  112. package/dist/typescript/visitors/walk.js +6 -1
  113. package/dist/util/cli-arguments.d.ts +2 -1
  114. package/dist/util/cli-arguments.js +4 -2
  115. package/dist/util/create-options.d.ts +32 -5
  116. package/dist/util/create-options.js +4 -1
  117. package/dist/util/get-included-issue-types.d.ts +1 -0
  118. package/dist/util/get-included-issue-types.js +4 -2
  119. package/dist/util/issue-initializers.js +1 -1
  120. package/dist/util/load-tsconfig.js +17 -4
  121. package/dist/util/module-graph.js +1 -0
  122. package/dist/util/modules.js +25 -4
  123. package/dist/util/scripts.d.ts +7 -0
  124. package/dist/util/scripts.js +75 -0
  125. package/dist/version.d.ts +1 -1
  126. package/dist/version.js +1 -1
  127. package/package.json +1 -1
  128. package/schema.json +40 -1
@@ -151,6 +151,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
151
151
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
152
152
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
153
153
  }, z.core.$strip>]>>;
154
+ eve: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
155
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
156
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
157
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
158
+ }, z.core.$strip>]>>;
154
159
  execa: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
155
160
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
156
161
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -171,6 +176,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
171
176
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
172
177
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
173
178
  }, z.core.$strip>]>>;
179
+ fumadocs: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
180
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
181
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
182
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
183
+ }, z.core.$strip>]>>;
174
184
  gatsby: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
175
185
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
176
186
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -798,7 +808,7 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
798
808
  ignoreExportsUsedInFile: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniObject<{
799
809
  [x: string]: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
800
810
  }, z.core.$strict>]>>;
801
- ignoreIssues: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"files">, z.ZodMiniLiteral<"dependencies">, z.ZodMiniLiteral<"devDependencies">, z.ZodMiniLiteral<"optionalPeerDependencies">, z.ZodMiniLiteral<"unlisted">, z.ZodMiniLiteral<"binaries">, z.ZodMiniLiteral<"unresolved">, z.ZodMiniLiteral<"exports">, z.ZodMiniLiteral<"types">, z.ZodMiniLiteral<"nsExports">, z.ZodMiniLiteral<"nsTypes">, z.ZodMiniLiteral<"duplicates">, z.ZodMiniLiteral<"enumMembers">, z.ZodMiniLiteral<"namespaceMembers">, z.ZodMiniLiteral<"catalog">]>>>>;
811
+ ignoreIssues: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"files">, z.ZodMiniLiteral<"dependencies">, z.ZodMiniLiteral<"devDependencies">, z.ZodMiniLiteral<"optionalPeerDependencies">, z.ZodMiniLiteral<"unlisted">, z.ZodMiniLiteral<"binaries">, z.ZodMiniLiteral<"unresolved">, z.ZodMiniLiteral<"exports">, z.ZodMiniLiteral<"types">, z.ZodMiniLiteral<"nsExports">, z.ZodMiniLiteral<"nsTypes">, z.ZodMiniLiteral<"duplicates">, z.ZodMiniLiteral<"enumMembers">, z.ZodMiniLiteral<"namespaceMembers">, z.ZodMiniLiteral<"catalog">, z.ZodMiniLiteral<"cycles">]>>>>;
802
812
  includeEntryExports: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
803
813
  }, z.core.$strict>;
804
814
  export declare const knipConfigurationSchema: z.ZodMiniObject<{
@@ -952,6 +962,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
952
962
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
953
963
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
954
964
  }, z.core.$strip>]>>;
965
+ eve: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
966
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
967
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
968
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
969
+ }, z.core.$strip>]>>;
955
970
  execa: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
956
971
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
957
972
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -972,6 +987,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
972
987
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
973
988
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
974
989
  }, z.core.$strip>]>>;
990
+ fumadocs: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
991
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
992
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
993
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
994
+ }, z.core.$strip>]>>;
975
995
  gatsby: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
976
996
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
977
997
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -1588,7 +1608,7 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1588
1608
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1589
1609
  }, z.core.$strip>]>>;
1590
1610
  $schema: z.ZodMiniOptional<z.ZodMiniString<string>>;
1591
- rules: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"files">, z.ZodMiniLiteral<"dependencies">, z.ZodMiniLiteral<"devDependencies">, z.ZodMiniLiteral<"optionalPeerDependencies">, z.ZodMiniLiteral<"unlisted">, z.ZodMiniLiteral<"binaries">, z.ZodMiniLiteral<"unresolved">, z.ZodMiniLiteral<"exports">, z.ZodMiniLiteral<"types">, z.ZodMiniLiteral<"nsExports">, z.ZodMiniLiteral<"nsTypes">, z.ZodMiniLiteral<"duplicates">, z.ZodMiniLiteral<"enumMembers">, z.ZodMiniLiteral<"namespaceMembers">, z.ZodMiniLiteral<"catalog">]> & z.core.$partial, z.ZodMiniEnum<{
1611
+ rules: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"files">, z.ZodMiniLiteral<"dependencies">, z.ZodMiniLiteral<"devDependencies">, z.ZodMiniLiteral<"optionalPeerDependencies">, z.ZodMiniLiteral<"unlisted">, z.ZodMiniLiteral<"binaries">, z.ZodMiniLiteral<"unresolved">, z.ZodMiniLiteral<"exports">, z.ZodMiniLiteral<"types">, z.ZodMiniLiteral<"nsExports">, z.ZodMiniLiteral<"nsTypes">, z.ZodMiniLiteral<"duplicates">, z.ZodMiniLiteral<"enumMembers">, z.ZodMiniLiteral<"namespaceMembers">, z.ZodMiniLiteral<"catalog">, z.ZodMiniLiteral<"cycles">]> & z.core.$partial, z.ZodMiniEnum<{
1592
1612
  error: "error";
1593
1613
  off: "off";
1594
1614
  warn: "warn";
@@ -1605,7 +1625,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1605
1625
  ignoreExportsUsedInFile: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniObject<{
1606
1626
  [x: string]: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1607
1627
  }, z.core.$strict>]>>;
1608
- ignoreIssues: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"files">, z.ZodMiniLiteral<"dependencies">, z.ZodMiniLiteral<"devDependencies">, z.ZodMiniLiteral<"optionalPeerDependencies">, z.ZodMiniLiteral<"unlisted">, z.ZodMiniLiteral<"binaries">, z.ZodMiniLiteral<"unresolved">, z.ZodMiniLiteral<"exports">, z.ZodMiniLiteral<"types">, z.ZodMiniLiteral<"nsExports">, z.ZodMiniLiteral<"nsTypes">, z.ZodMiniLiteral<"duplicates">, z.ZodMiniLiteral<"enumMembers">, z.ZodMiniLiteral<"namespaceMembers">, z.ZodMiniLiteral<"catalog">]>>>>;
1628
+ ignoreIssues: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"files">, z.ZodMiniLiteral<"dependencies">, z.ZodMiniLiteral<"devDependencies">, z.ZodMiniLiteral<"optionalPeerDependencies">, z.ZodMiniLiteral<"unlisted">, z.ZodMiniLiteral<"binaries">, z.ZodMiniLiteral<"unresolved">, z.ZodMiniLiteral<"exports">, z.ZodMiniLiteral<"types">, z.ZodMiniLiteral<"nsExports">, z.ZodMiniLiteral<"nsTypes">, z.ZodMiniLiteral<"duplicates">, z.ZodMiniLiteral<"enumMembers">, z.ZodMiniLiteral<"namespaceMembers">, z.ZodMiniLiteral<"catalog">, z.ZodMiniLiteral<"cycles">]>>>>;
1629
+ cycles: z.ZodMiniOptional<z.ZodMiniObject<{
1630
+ allow: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniArray<z.ZodMiniString<string>>>>;
1631
+ dynamicImports: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1632
+ }, z.core.$strict>>;
1609
1633
  ignoreWorkspaces: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
1610
1634
  includeEntryExports: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1611
1635
  compilers: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniUnion<readonly [z.ZodMiniLiteral<true>, z.ZodMiniCustom<CompilerSync, CompilerSync>]>, z.ZodMiniCustom<CompilerAsync, CompilerAsync>]>>>;
@@ -1614,8 +1638,8 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1614
1638
  tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
1615
1639
  treatConfigHintsAsErrors: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1616
1640
  treatTagHintsAsErrors: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1617
- include: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"files">, z.ZodMiniLiteral<"dependencies">, z.ZodMiniLiteral<"devDependencies">, z.ZodMiniLiteral<"optionalPeerDependencies">, z.ZodMiniLiteral<"unlisted">, z.ZodMiniLiteral<"binaries">, z.ZodMiniLiteral<"unresolved">, z.ZodMiniLiteral<"exports">, z.ZodMiniLiteral<"types">, z.ZodMiniLiteral<"nsExports">, z.ZodMiniLiteral<"nsTypes">, z.ZodMiniLiteral<"duplicates">, z.ZodMiniLiteral<"enumMembers">, z.ZodMiniLiteral<"namespaceMembers">, z.ZodMiniLiteral<"catalog">]>>>;
1618
- exclude: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"files">, z.ZodMiniLiteral<"dependencies">, z.ZodMiniLiteral<"devDependencies">, z.ZodMiniLiteral<"optionalPeerDependencies">, z.ZodMiniLiteral<"unlisted">, z.ZodMiniLiteral<"binaries">, z.ZodMiniLiteral<"unresolved">, z.ZodMiniLiteral<"exports">, z.ZodMiniLiteral<"types">, z.ZodMiniLiteral<"nsExports">, z.ZodMiniLiteral<"nsTypes">, z.ZodMiniLiteral<"duplicates">, z.ZodMiniLiteral<"enumMembers">, z.ZodMiniLiteral<"namespaceMembers">, z.ZodMiniLiteral<"catalog">]>>>;
1641
+ include: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"files">, z.ZodMiniLiteral<"dependencies">, z.ZodMiniLiteral<"devDependencies">, z.ZodMiniLiteral<"optionalPeerDependencies">, z.ZodMiniLiteral<"unlisted">, z.ZodMiniLiteral<"binaries">, z.ZodMiniLiteral<"unresolved">, z.ZodMiniLiteral<"exports">, z.ZodMiniLiteral<"types">, z.ZodMiniLiteral<"nsExports">, z.ZodMiniLiteral<"nsTypes">, z.ZodMiniLiteral<"duplicates">, z.ZodMiniLiteral<"enumMembers">, z.ZodMiniLiteral<"namespaceMembers">, z.ZodMiniLiteral<"catalog">, z.ZodMiniLiteral<"cycles">]>>>;
1642
+ exclude: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"files">, z.ZodMiniLiteral<"dependencies">, z.ZodMiniLiteral<"devDependencies">, z.ZodMiniLiteral<"optionalPeerDependencies">, z.ZodMiniLiteral<"unlisted">, z.ZodMiniLiteral<"binaries">, z.ZodMiniLiteral<"unresolved">, z.ZodMiniLiteral<"exports">, z.ZodMiniLiteral<"types">, z.ZodMiniLiteral<"nsExports">, z.ZodMiniLiteral<"nsTypes">, z.ZodMiniLiteral<"duplicates">, z.ZodMiniLiteral<"enumMembers">, z.ZodMiniLiteral<"namespaceMembers">, z.ZodMiniLiteral<"catalog">, z.ZodMiniLiteral<"cycles">]>>>;
1619
1643
  workspaces: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
1620
1644
  angular: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1621
1645
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -1767,6 +1791,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1767
1791
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1768
1792
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1769
1793
  }, z.core.$strip>]>>;
1794
+ eve: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1795
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1796
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1797
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1798
+ }, z.core.$strip>]>>;
1770
1799
  execa: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1771
1800
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1772
1801
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -1787,6 +1816,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1787
1816
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1788
1817
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1789
1818
  }, z.core.$strip>]>>;
1819
+ fumadocs: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1820
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1821
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1822
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1823
+ }, z.core.$strip>]>>;
1790
1824
  gatsby: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1791
1825
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1792
1826
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -2414,7 +2448,7 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
2414
2448
  ignoreExportsUsedInFile: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniObject<{
2415
2449
  [x: string]: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2416
2450
  }, z.core.$strict>]>>;
2417
- ignoreIssues: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"files">, z.ZodMiniLiteral<"dependencies">, z.ZodMiniLiteral<"devDependencies">, z.ZodMiniLiteral<"optionalPeerDependencies">, z.ZodMiniLiteral<"unlisted">, z.ZodMiniLiteral<"binaries">, z.ZodMiniLiteral<"unresolved">, z.ZodMiniLiteral<"exports">, z.ZodMiniLiteral<"types">, z.ZodMiniLiteral<"nsExports">, z.ZodMiniLiteral<"nsTypes">, z.ZodMiniLiteral<"duplicates">, z.ZodMiniLiteral<"enumMembers">, z.ZodMiniLiteral<"namespaceMembers">, z.ZodMiniLiteral<"catalog">]>>>>;
2451
+ ignoreIssues: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"files">, z.ZodMiniLiteral<"dependencies">, z.ZodMiniLiteral<"devDependencies">, z.ZodMiniLiteral<"optionalPeerDependencies">, z.ZodMiniLiteral<"unlisted">, z.ZodMiniLiteral<"binaries">, z.ZodMiniLiteral<"unresolved">, z.ZodMiniLiteral<"exports">, z.ZodMiniLiteral<"types">, z.ZodMiniLiteral<"nsExports">, z.ZodMiniLiteral<"nsTypes">, z.ZodMiniLiteral<"duplicates">, z.ZodMiniLiteral<"enumMembers">, z.ZodMiniLiteral<"namespaceMembers">, z.ZodMiniLiteral<"catalog">, z.ZodMiniLiteral<"cycles">]>>>>;
2418
2452
  includeEntryExports: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
2419
2453
  }, z.core.$strict>>>;
2420
2454
  }, z.core.$strict>;
@@ -23,12 +23,17 @@ const issueTypeSchema = z.union([
23
23
  z.literal('enumMembers'),
24
24
  z.literal('namespaceMembers'),
25
25
  z.literal('catalog'),
26
+ z.literal('cycles'),
26
27
  ]);
27
28
  const rulesSchema = z.partialRecord(issueTypeSchema, z.enum(['error', 'warn', 'off']));
28
29
  const ignorableSymbolTypes = Object.values(SYMBOL_TYPE).filter(type => type !== 'unknown');
29
30
  const ignoreExportsUsedInFileObjectSchema = z.strictObject(Object.fromEntries(ignorableSymbolTypes.map(type => [type, z.optional(z.boolean())])));
30
31
  const ignoreExportsUsedInFileSchema = z.union([z.boolean(), ignoreExportsUsedInFileObjectSchema]);
31
32
  const ignoreIssuesSchema = z.record(z.string(), z.array(issueTypeSchema));
33
+ const cyclesSchema = z.strictObject({
34
+ allow: z.optional(z.array(z.array(z.string()))),
35
+ dynamicImports: z.optional(z.boolean()),
36
+ });
32
37
  const rootConfigurationSchema = z.object({
33
38
  $schema: z.optional(z.string()),
34
39
  rules: z.optional(rulesSchema),
@@ -43,6 +48,7 @@ const rootConfigurationSchema = z.object({
43
48
  ignoreUnresolved: z.optional(stringOrRegexSchema),
44
49
  ignoreExportsUsedInFile: z.optional(ignoreExportsUsedInFileSchema),
45
50
  ignoreIssues: z.optional(ignoreIssuesSchema),
51
+ cycles: z.optional(cyclesSchema),
46
52
  ignoreWorkspaces: z.optional(z.array(z.string())),
47
53
  includeEntryExports: z.optional(z.boolean()),
48
54
  compilers: z.optional(compilersSchema),
@@ -156,6 +156,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
156
156
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
157
157
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
158
158
  }, z.core.$strip>]>;
159
+ eve: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
160
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
161
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
162
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
163
+ }, z.core.$strip>]>;
159
164
  execa: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
160
165
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
161
166
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -176,6 +181,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
176
181
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
177
182
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
178
183
  }, z.core.$strip>]>;
184
+ fumadocs: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
185
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
186
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
187
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
188
+ }, z.core.$strip>]>;
179
189
  gatsby: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
180
190
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
181
191
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -40,10 +40,12 @@ export const pluginsSchema = z.object({
40
40
  drizzle: pluginSchema,
41
41
  eleventy: pluginSchema,
42
42
  eslint: pluginSchema,
43
+ eve: pluginSchema,
43
44
  execa: pluginSchema,
44
45
  expo: pluginSchema,
45
46
  'expressive-code': pluginSchema,
46
47
  fast: pluginSchema,
48
+ fumadocs: pluginSchema,
47
49
  gatsby: pluginSchema,
48
50
  'github-action': pluginSchema,
49
51
  'github-actions': 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' | 'eleventy' | 'eslint' | 'execa' | 'expo' | 'expressive-code' | 'fast' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lit' | 'lockfile-lint' | 'lost-pixel' | 'lunaria' | 'markdownlint' | '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' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'orval' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | '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' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | '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', 'eleventy', 'eslint', 'execa', 'expo', 'expressive-code', 'fast', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'lefthook', 'lint-staged', 'linthtml', 'lit', 'lockfile-lint', 'lost-pixel', 'lunaria', 'markdownlint', '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', 'nx', 'nyc', 'oclif', 'openapi-ts', 'orval', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'preconstruct', 'prettier', 'prisma', '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', 'travis', 'ts-node', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'vercel', 'vercel-og', 'vike', 'vite', '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' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'catalyst' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'eve' | 'execa' | 'expo' | 'expressive-code' | 'fast' | 'fumadocs' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lit' | 'lockfile-lint' | 'lost-pixel' | 'lunaria' | 'markdownlint' | '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' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'orval' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | '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' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | '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', 'eleventy', 'eslint', 'eve', 'execa', 'expo', 'expressive-code', 'fast', 'fumadocs', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'lefthook', 'lint-staged', 'linthtml', 'lit', 'lockfile-lint', 'lost-pixel', 'lunaria', 'markdownlint', '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', 'nx', 'nyc', 'oclif', 'openapi-ts', 'orval', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'preconstruct', 'prettier', 'prisma', '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', 'travis', 'ts-node', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'vercel', 'vercel-og', 'vike', 'vite', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
@@ -29,10 +29,12 @@ export const pluginNames = [
29
29
  'drizzle',
30
30
  'eleventy',
31
31
  'eslint',
32
+ 'eve',
32
33
  'execa',
33
34
  'expo',
34
35
  'expressive-code',
35
36
  'fast',
37
+ 'fumadocs',
36
38
  'gatsby',
37
39
  'github-action',
38
40
  'github-actions',
@@ -30,6 +30,10 @@ export type IgnorePatterns = (string | RegExp)[];
30
30
  type IgnorableExport = Exclude<SymbolType, 'unknown'>;
31
31
  export type IgnoreExportsUsedInFile = boolean | Partial<Record<IgnorableExport, boolean>>;
32
32
  export type IgnoreIssues = Record<string, IssueType[]>;
33
+ export type CyclesConfig = {
34
+ allow?: string[][];
35
+ dynamicImports?: boolean;
36
+ };
33
37
  export type GetImportsAndExportsOptions = {
34
38
  skipTypeOnly: boolean;
35
39
  isFixExports: boolean;
@@ -43,6 +47,7 @@ export interface Configuration {
43
47
  ignoreDependencies: IgnorePatterns;
44
48
  ignoreExportsUsedInFile: IgnoreExportsUsedInFile;
45
49
  ignoreFiles: NormalizedGlob;
50
+ cycles: CyclesConfig;
46
51
  ignoreIssues: IgnoreIssues;
47
52
  ignoreMembers: IgnorePatterns;
48
53
  ignoreUnresolved: IgnorePatterns;
@@ -76,6 +81,7 @@ interface BaseOptions {
76
81
  cwd: string;
77
82
  manifest: Manifest;
78
83
  rootManifest: Manifest | undefined;
84
+ getManifest: (dir: string) => Manifest | undefined;
79
85
  }
80
86
  type IsPluginEnabledOptions = {
81
87
  cwd: string;
@@ -129,6 +135,10 @@ export type PluginVisitorContext = {
129
135
  sourceText: string;
130
136
  addScript: (script: string) => void;
131
137
  addImport: (specifier: string, pos: number, modifiers: number) => void;
138
+ addImportGlob: (patterns: string[], options?: {
139
+ base?: string;
140
+ filter?: RegExp;
141
+ }) => void;
132
142
  markExportRegistered: (name: string) => void;
133
143
  };
134
144
  export type PluginVisitorObject = VisitorObject;
@@ -3,6 +3,8 @@ import type { Fixes } from './exports.ts';
3
3
  export type SymbolType = (typeof SYMBOL_TYPE)[keyof typeof SYMBOL_TYPE];
4
4
  export interface IssueSymbol {
5
5
  symbol: string;
6
+ kind?: string;
7
+ specifier?: string;
6
8
  pos?: number;
7
9
  line?: number;
8
10
  col?: number;
@@ -40,6 +42,7 @@ export type Issues = {
40
42
  enumMembers: IssueRecords;
41
43
  namespaceMembers: IssueRecords;
42
44
  catalog: IssueRecords;
45
+ cycles: IssueRecords;
43
46
  };
44
47
  export type IssueType = keyof Issues;
45
48
  export type Report = {
@@ -29,6 +29,7 @@ export interface Import extends Position {
29
29
  readonly filePath: string | undefined;
30
30
  readonly identifier: string | undefined;
31
31
  readonly isTypeOnly: boolean;
32
+ readonly modifiers: number;
32
33
  }
33
34
  export interface ExternalRef {
34
35
  readonly specifier: string;
@@ -68,8 +69,14 @@ export type FileNode = {
68
69
  exports: ExportMap;
69
70
  duplicates: Iterable<Array<IssueSymbol>>;
70
71
  scripts: Set<string>;
72
+ importGlobs: ImportGlob[];
71
73
  importedBy: undefined | ImportMaps;
72
74
  internalImportCache: undefined | ImportMap;
73
75
  };
76
+ export interface ImportGlob {
77
+ patterns: string[];
78
+ base?: string;
79
+ filter?: RegExp;
80
+ }
74
81
  export type ModuleGraph = Map<FilePath, FileNode>;
75
82
  export {};
@@ -1,7 +1,6 @@
1
1
  import type { PluginMap, WorkspaceConfiguration } from './config.ts';
2
2
  type Primitive = null | undefined | string | number | boolean | symbol | bigint;
3
3
  type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
4
- type Dependencies = Record<string, string>;
5
4
  type C = 'import' | 'require' | 'node' | 'node-addons' | 'deno' | 'browser' | 'electron' | 'react-native' | 'default';
6
5
  type ExportCondition = LiteralUnion<C, string>;
7
6
  type Exports = null | string | string[] | {
@@ -25,6 +24,7 @@ type Plugins = PluginConfig<PluginMap>;
25
24
  export type Scripts = Record<string, string>;
26
25
  export type Catalog = Record<string, string>;
27
26
  export type Catalogs = Record<string, Catalog>;
27
+ export type Dependencies = Record<string, string>;
28
28
  export type PackageJson = {
29
29
  name?: string;
30
30
  main?: string;
@@ -57,6 +57,9 @@ export type PackageJson = {
57
57
  engines?: Record<string, string>;
58
58
  pnpm?: {
59
59
  overrides?: Dependencies;
60
+ packageExtensions?: Record<string, {
61
+ peerDependencies?: Dependencies;
62
+ }>;
60
63
  };
61
64
  knip?: WorkspaceConfiguration;
62
65
  } & Plugins;
package/dist/types.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export type { RawConfigurationOrFn as KnipConfig, RawConfiguration as KnipConfiguration, WorkspaceProjectConfig, } from './types/config.ts';
2
- export type { Preprocessor, Reporter, ReporterOptions } from './types/issues.ts';
2
+ export type { Issue, IssueRecords, IssueType, Preprocessor, Reporter, ReporterOptions } from './types/issues.ts';
3
3
  export type { JSONReport, JSONReportEntry, JSONReportItem, JSONReportNamedItem } from './reporters/json.ts';
@@ -11,8 +11,9 @@ export class SourceFileManager {
11
11
  this.asyncCompilers = compilers[1];
12
12
  }
13
13
  readFile(filePath) {
14
- if (this.sourceTextCache.has(filePath))
15
- return this.sourceTextCache.get(filePath);
14
+ const cachedSourceText = this.sourceTextCache.get(filePath);
15
+ if (cachedSourceText !== undefined)
16
+ return cachedSourceText;
16
17
  const ext = extname(filePath);
17
18
  const compiler = this.syncCompilers.get(ext);
18
19
  if (FOREIGN_FILE_EXTENSIONS.has(ext) && !compiler) {
@@ -1,4 +1,4 @@
1
- import { type TSEnumDeclaration, type TSModuleDeclaration } from 'oxc-parser';
1
+ import { type TemplateLiteral, type TSEnumDeclaration, type TSModuleDeclaration } from 'oxc-parser';
2
2
  import type { GetImportsAndExportsOptions, IgnoreExportsUsedInFile } from '../types/config.ts';
3
3
  import type { SymbolType } from '../types/issues.ts';
4
4
  import type { ExportMember } from '../types/module-graph.ts';
@@ -16,7 +16,10 @@ export declare const getLineAndCol: (lineStarts: number[], pos: number) => {
16
16
  export declare const stripQuotes: (name: string) => string;
17
17
  export declare const isStringLiteral: (node: any) => boolean;
18
18
  export declare const getStringValue: (node: any) => string | undefined;
19
+ export declare const getScriptFromTemplate: (template: TemplateLiteral) => string;
20
+ export declare const getScriptFromArg: (arg: any) => string | undefined;
19
21
  export declare const getSafeScriptFromArgs: (executable: any, argsArray: any) => string | undefined;
20
22
  export declare const shouldCountRefs: (ignoreExportsUsedInFile: IgnoreExportsUsedInFile, type: SymbolType) => boolean | undefined;
21
23
  export declare function extractNamespaceMembers(decl: TSModuleDeclaration, options: GetImportsAndExportsOptions, lineStarts: number[], getJSDocTags: (start: number) => Set<string>, prefix?: string): ExportMember[];
24
+ export declare const collectAugmentationRefs: (node: TSModuleDeclaration) => string[];
22
25
  export declare function extractEnumMembers(decl: TSEnumDeclaration, options: GetImportsAndExportsOptions, lineStarts: number[], getJSDocTags: (start: number) => Set<string>): ExportMember[];
@@ -1,5 +1,5 @@
1
- import { parseSync, rawTransferSupported, } from 'oxc-parser';
2
- import { DEFAULT_EXTENSIONS, FIX_FLAGS, SYMBOL_TYPE } from '../constants.js';
1
+ import { parseSync, rawTransferSupported, visitorKeys, } from 'oxc-parser';
2
+ import { DEFAULT_EXTENSIONS, FIX_FLAGS, SCRIPT_INTERPOLATION, SYMBOL_TYPE } from '../constants.js';
3
3
  import { extname } from '../util/path.js';
4
4
  import { timerify } from '../util/Performance.js';
5
5
  import { EMPTY_TAGS } from './visitors/jsdoc.js';
@@ -53,6 +53,14 @@ export const getStringValue = (node) => {
53
53
  return node.quasis[0].value?.cooked ?? node.quasis[0].value?.raw;
54
54
  return undefined;
55
55
  };
56
+ export const getScriptFromTemplate = (template) => {
57
+ const { quasis } = template;
58
+ let script = quasis[0].value.raw;
59
+ for (let i = 1; i < quasis.length; i++)
60
+ script += SCRIPT_INTERPOLATION + quasis[i].value.raw;
61
+ return script;
62
+ };
63
+ export const getScriptFromArg = (arg) => isStringLiteral(arg) ? getStringValue(arg) : arg?.type === 'TemplateLiteral' ? getScriptFromTemplate(arg) : undefined;
56
64
  const SAFE_SCRIPT_ARG = /^[\w@.,:/=+~-]+$/;
57
65
  export const getSafeScriptFromArgs = (executable, argsArray) => {
58
66
  if (!isStringLiteral(executable))
@@ -131,6 +139,56 @@ export function extractNamespaceMembers(decl, options, lineStarts, getJSDocTags,
131
139
  }
132
140
  return members;
133
141
  }
142
+ export const collectAugmentationRefs = (node) => {
143
+ if (!node.body || node.body.type !== 'TSModuleBlock')
144
+ return [];
145
+ const body = node.body.body;
146
+ const declared = new Set();
147
+ for (const stmt of body) {
148
+ const decl = stmt.type === 'ExportNamedDeclaration' && stmt.declaration ? stmt.declaration : stmt;
149
+ if ('id' in decl && decl.id?.type === 'Identifier')
150
+ declared.add(decl.id.name);
151
+ else if (decl.type === 'VariableDeclaration')
152
+ for (const d of decl.declarations)
153
+ if (d.id.type === 'Identifier')
154
+ declared.add(d.id.name);
155
+ }
156
+ const refs = [];
157
+ const seen = new Set();
158
+ const add = (ref) => {
159
+ if (ref?.type === 'Identifier' && !declared.has(ref.name) && !seen.has(ref.name)) {
160
+ seen.add(ref.name);
161
+ refs.push(ref.name);
162
+ }
163
+ };
164
+ const visit = (n) => {
165
+ const type = n?.type;
166
+ if (!type)
167
+ return;
168
+ if (type === 'TSTypeReference')
169
+ add(n.typeName);
170
+ else if (type === 'TSInterfaceHeritage')
171
+ add(n.expression);
172
+ const keys = visitorKeys[type];
173
+ if (!keys)
174
+ return;
175
+ for (const key of keys) {
176
+ const val = n[key];
177
+ if (!val)
178
+ continue;
179
+ if (Array.isArray(val)) {
180
+ for (const item of val)
181
+ if (item)
182
+ visit(item);
183
+ }
184
+ else
185
+ visit(val);
186
+ }
187
+ };
188
+ for (const stmt of body)
189
+ visit(stmt);
190
+ return refs;
191
+ };
134
192
  export function extractEnumMembers(decl, options, lineStarts, getJSDocTags) {
135
193
  if (!decl.body?.members)
136
194
  return [];
@@ -1,6 +1,7 @@
1
1
  import { IMPORT_FLAGS } from '../constants.js';
2
2
  const jsDocImportRe = /import\(\s*['"]([^'"]+)['"]\s*\)(?:\.(\w+))?/g;
3
3
  const jsDocImportTagRe = /@import\s+(?:\{[^}]*\}|\*\s+as\s+\w+)\s+from\s+['"]([^'"]+)['"]/g;
4
+ const jsDocTypeTagRe = /@(?:type|typedef|callback|param|arg|argument|property|prop|returns?|yields?|throws?|exception|this|extends|augments|implements|enum|template|satisfies|const|constant|member|var|namespace|module)\b/;
4
5
  const jsxImportSourceRe = /@jsxImportSource\s+(\S+)/;
5
6
  const referenceRe = /\s*<reference\s+(types|path)\s*=\s*"([^"]+)"[^/]*\/>/;
6
7
  const envPragmaRe = /@(vitest|jest)-environment\s+([@\w./-]+)/g;
@@ -18,6 +19,26 @@ const resolveEnvironmentPragma = (tool, value) => {
18
19
  return '@edge-runtime/vm';
19
20
  return value;
20
21
  };
22
+ const isInJsDocTypeExpression = (text, index) => {
23
+ let depth = 0;
24
+ for (let pos = index - 1; pos >= 0; pos--) {
25
+ const char = text.charCodeAt(pos);
26
+ if (char === 125) {
27
+ depth++;
28
+ }
29
+ else if (char === 123) {
30
+ if (depth > 0) {
31
+ depth--;
32
+ }
33
+ else {
34
+ const line = text.slice(text.lastIndexOf('\n', pos - 1) + 1, pos);
35
+ if (jsDocTypeTagRe.test(line))
36
+ return true;
37
+ }
38
+ }
39
+ }
40
+ return false;
41
+ };
21
42
  export const extractImportsFromComments = (comments, firstStmtStart, addImport) => {
22
43
  for (const comment of comments) {
23
44
  const text = comment.value;
@@ -25,9 +46,7 @@ export const extractImportsFromComments = (comments, firstStmtStart, addImport)
25
46
  if (comment.type === 'Block') {
26
47
  jsDocImportRe.lastIndex = 0;
27
48
  while ((results = jsDocImportRe.exec(text)) !== null) {
28
- const before = text.slice(0, results.index);
29
- const lastOpen = before.lastIndexOf('{');
30
- if (lastOpen === -1 || before.indexOf('}', lastOpen) !== -1)
49
+ if (!isInJsDocTypeExpression(text, results.index))
31
50
  continue;
32
51
  const specifier = results[1];
33
52
  const member = results[2];
@@ -24,6 +24,7 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
24
24
  const aliasedExports = new Map();
25
25
  const specifierExportNames = new Set();
26
26
  const scripts = new Set();
27
+ const importGlobs = [];
27
28
  const importAliases = new Map();
28
29
  const addImportAlias = (aliasName, id, importFilePath) => {
29
30
  const aliases = importAliases.get(aliasName);
@@ -58,6 +59,7 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
58
59
  line: opts.line,
59
60
  col: opts.col,
60
61
  isTypeOnly: isDts || !!(modifiers & IMPORT_FLAGS.TYPE_ONLY),
62
+ modifiers,
61
63
  });
62
64
  const file = internal.get(importFilePath);
63
65
  const importMaps = file ?? createImports();
@@ -93,6 +95,10 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
93
95
  if (!specifier || isBuiltin(specifier))
94
96
  return;
95
97
  const module = preResolvedModule ?? resolveModule(specifier, filePath);
98
+ if (modifiers & IMPORT_FLAGS.AUGMENT &&
99
+ (!module || module.isExternalLibraryImport || isInNodeModules(module.resolvedFileName))) {
100
+ return;
101
+ }
96
102
  if (module) {
97
103
  const resolvedFileName = module.resolvedFileName;
98
104
  if (resolvedFileName) {
@@ -134,6 +140,7 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
134
140
  line,
135
141
  col,
136
142
  isTypeOnly: isDts || !!(modifiers & IMPORT_FLAGS.TYPE_ONLY),
143
+ modifiers,
137
144
  });
138
145
  }
139
146
  }
@@ -158,6 +165,7 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
158
165
  line,
159
166
  col,
160
167
  isTypeOnly: isDts || !!(modifiers & IMPORT_FLAGS.TYPE_ONLY),
168
+ modifiers,
161
169
  });
162
170
  }
163
171
  }
@@ -266,6 +274,7 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
266
274
  pluginCtx.sourceText = sourceText;
267
275
  pluginCtx.addScript = (s) => scripts.add(s);
268
276
  pluginCtx.addImport = (spec, pos, mod) => addImport(spec, undefined, undefined, undefined, pos, mod);
277
+ pluginCtx.addImportGlob = (patterns, opts) => importGlobs.push({ patterns, base: opts?.base, filter: opts?.filter });
269
278
  pluginCtx.markExportRegistered = (name) => registeredCustomElements.add(name);
270
279
  }
271
280
  const localRefs = _walkAST(result.program, sourceText, filePath, {
@@ -314,6 +323,7 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
314
323
  exports,
315
324
  duplicates: [...aliasedExports.values()],
316
325
  scripts,
326
+ importGlobs,
317
327
  importedBy: undefined,
318
328
  internalImportCache: undefined,
319
329
  };
@@ -0,0 +1,3 @@
1
+ import type { ImportGlob } from '../types/module-graph.ts';
2
+ import type { ResolveGlobPattern } from './resolve-module-names.ts';
3
+ export declare function resolveImportGlobs(items: ImportGlob[], containingFile: string, resolveGlobPattern: ResolveGlobPattern, workspaceRoot: string): string[];