knip 0.0.0-angular.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 (326) hide show
  1. package/README.md +907 -0
  2. package/dist/ConfigurationChief.d.ts +53 -0
  3. package/dist/ConfigurationChief.js +297 -0
  4. package/dist/ConfigurationValidator.d.ts +2325 -0
  5. package/dist/ConfigurationValidator.js +119 -0
  6. package/dist/ConsoleStreamer.d.ts +12 -0
  7. package/dist/ConsoleStreamer.js +34 -0
  8. package/dist/DependencyDeputy.d.ts +64 -0
  9. package/dist/DependencyDeputy.js +254 -0
  10. package/dist/IssueCollector.d.ts +27 -0
  11. package/dist/IssueCollector.js +52 -0
  12. package/dist/PrincipalFactory.d.ts +25 -0
  13. package/dist/PrincipalFactory.js +56 -0
  14. package/dist/ProjectPrincipal.d.ts +64 -0
  15. package/dist/ProjectPrincipal.js +197 -0
  16. package/dist/WorkspaceWorker.d.ts +56 -0
  17. package/dist/WorkspaceWorker.js +244 -0
  18. package/dist/binaries/bash-parser.d.ts +6 -0
  19. package/dist/binaries/bash-parser.js +58 -0
  20. package/dist/binaries/index.d.ts +2 -0
  21. package/dist/binaries/index.js +18 -0
  22. package/dist/binaries/resolvers/c8.d.ts +2 -0
  23. package/dist/binaries/resolvers/c8.js +10 -0
  24. package/dist/binaries/resolvers/dotenv.d.ts +2 -0
  25. package/dist/binaries/resolvers/dotenv.js +6 -0
  26. package/dist/binaries/resolvers/fallback.d.ts +2 -0
  27. package/dist/binaries/resolvers/fallback.js +22 -0
  28. package/dist/binaries/resolvers/index.d.ts +8 -0
  29. package/dist/binaries/resolvers/index.js +8 -0
  30. package/dist/binaries/resolvers/node.d.ts +2 -0
  31. package/dist/binaries/resolvers/node.js +10 -0
  32. package/dist/binaries/resolvers/nodemon.d.ts +2 -0
  33. package/dist/binaries/resolvers/nodemon.js +15 -0
  34. package/dist/binaries/resolvers/npx.d.ts +2 -0
  35. package/dist/binaries/resolvers/npx.js +20 -0
  36. package/dist/binaries/resolvers/pnpm.d.ts +2 -0
  37. package/dist/binaries/resolvers/pnpm.js +63 -0
  38. package/dist/binaries/resolvers/rollup.d.ts +2 -0
  39. package/dist/binaries/resolvers/rollup.js +11 -0
  40. package/dist/binaries/resolvers/yarn.d.ts +2 -0
  41. package/dist/binaries/resolvers/yarn.js +48 -0
  42. package/dist/binaries/types.d.ts +15 -0
  43. package/dist/binaries/types.js +1 -0
  44. package/dist/binaries/util.d.ts +8 -0
  45. package/dist/binaries/util.js +33 -0
  46. package/dist/cli.d.ts +2 -0
  47. package/dist/cli.js +72 -0
  48. package/dist/constants.d.ts +12 -0
  49. package/dist/constants.js +90 -0
  50. package/dist/index.d.ts +10 -0
  51. package/dist/index.js +334 -0
  52. package/dist/issues/initializers.d.ts +4 -0
  53. package/dist/issues/initializers.js +11 -0
  54. package/dist/manifest/helpers.d.ts +7 -0
  55. package/dist/manifest/helpers.js +16 -0
  56. package/dist/manifest/index.d.ts +16 -0
  57. package/dist/manifest/index.js +56 -0
  58. package/dist/plugins/_template/index.d.ts +9 -0
  59. package/dist/plugins/_template/index.js +14 -0
  60. package/dist/plugins/_template/types.d.ts +3 -0
  61. package/dist/plugins/_template/types.js +1 -0
  62. package/dist/plugins/angular/index.d.ts +6 -0
  63. package/dist/plugins/angular/index.js +36 -0
  64. package/dist/plugins/angular/types.d.ts +745 -0
  65. package/dist/plugins/angular/types.js +1 -0
  66. package/dist/plugins/ava/index.d.ts +7 -0
  67. package/dist/plugins/ava/index.js +20 -0
  68. package/dist/plugins/ava/types.d.ts +4 -0
  69. package/dist/plugins/ava/types.js +1 -0
  70. package/dist/plugins/babel/helpers.d.ts +15 -0
  71. package/dist/plugins/babel/helpers.js +34 -0
  72. package/dist/plugins/babel/index.d.ts +8 -0
  73. package/dist/plugins/babel/index.js +30 -0
  74. package/dist/plugins/babel/types.d.ts +9 -0
  75. package/dist/plugins/babel/types.js +1 -0
  76. package/dist/plugins/capacitor/index.d.ts +6 -0
  77. package/dist/plugins/capacitor/index.js +11 -0
  78. package/dist/plugins/capacitor/types.d.ts +3 -0
  79. package/dist/plugins/capacitor/types.js +1 -0
  80. package/dist/plugins/changesets/index.d.ts +6 -0
  81. package/dist/plugins/changesets/index.js +15 -0
  82. package/dist/plugins/commitizen/index.d.ts +6 -0
  83. package/dist/plugins/commitizen/index.js +14 -0
  84. package/dist/plugins/commitizen/types.d.ts +3 -0
  85. package/dist/plugins/commitizen/types.js +1 -0
  86. package/dist/plugins/commitlint/index.d.ts +6 -0
  87. package/dist/plugins/commitlint/index.js +18 -0
  88. package/dist/plugins/cspell/index.d.ts +6 -0
  89. package/dist/plugins/cspell/index.js +17 -0
  90. package/dist/plugins/cspell/types.d.ts +3 -0
  91. package/dist/plugins/cspell/types.js +1 -0
  92. package/dist/plugins/cypress/index.d.ts +5 -0
  93. package/dist/plugins/cypress/index.js +10 -0
  94. package/dist/plugins/eslint/fallback.d.ts +1 -0
  95. package/dist/plugins/eslint/fallback.js +13 -0
  96. package/dist/plugins/eslint/helpers.d.ts +14 -0
  97. package/dist/plugins/eslint/helpers.js +83 -0
  98. package/dist/plugins/eslint/index.d.ts +7 -0
  99. package/dist/plugins/eslint/index.js +15 -0
  100. package/dist/plugins/eslint/types.d.ts +27 -0
  101. package/dist/plugins/eslint/types.js +1 -0
  102. package/dist/plugins/gatsby/index.d.ts +7 -0
  103. package/dist/plugins/gatsby/index.js +30 -0
  104. package/dist/plugins/gatsby/types.d.ts +15 -0
  105. package/dist/plugins/gatsby/types.js +1 -0
  106. package/dist/plugins/github-actions/index.d.ts +6 -0
  107. package/dist/plugins/github-actions/index.js +21 -0
  108. package/dist/plugins/husky/index.d.ts +6 -0
  109. package/dist/plugins/husky/index.js +19 -0
  110. package/dist/plugins/index.d.ts +41 -0
  111. package/dist/plugins/index.js +41 -0
  112. package/dist/plugins/jest/index.d.ts +7 -0
  113. package/dist/plugins/jest/index.js +68 -0
  114. package/dist/plugins/lefthook/index.d.ts +6 -0
  115. package/dist/plugins/lefthook/index.js +28 -0
  116. package/dist/plugins/lint-staged/index.d.ts +6 -0
  117. package/dist/plugins/lint-staged/index.js +32 -0
  118. package/dist/plugins/lint-staged/types.d.ts +5 -0
  119. package/dist/plugins/lint-staged/types.js +1 -0
  120. package/dist/plugins/markdownlint/helpers.d.ts +1 -0
  121. package/dist/plugins/markdownlint/helpers.js +6 -0
  122. package/dist/plugins/markdownlint/index.d.ts +6 -0
  123. package/dist/plugins/markdownlint/index.js +19 -0
  124. package/dist/plugins/markdownlint/types.d.ts +3 -0
  125. package/dist/plugins/markdownlint/types.js +1 -0
  126. package/dist/plugins/mocha/index.d.ts +6 -0
  127. package/dist/plugins/mocha/index.js +15 -0
  128. package/dist/plugins/next/index.d.ts +6 -0
  129. package/dist/plugins/next/index.js +11 -0
  130. package/dist/plugins/npm-package-json-lint/index.d.ts +6 -0
  131. package/dist/plugins/npm-package-json-lint/index.js +13 -0
  132. package/dist/plugins/npm-package-json-lint/types.d.ts +3 -0
  133. package/dist/plugins/npm-package-json-lint/types.js +1 -0
  134. package/dist/plugins/nx/index.d.ts +6 -0
  135. package/dist/plugins/nx/index.js +24 -0
  136. package/dist/plugins/nx/types.d.ts +11 -0
  137. package/dist/plugins/nx/types.js +1 -0
  138. package/dist/plugins/nyc/index.d.ts +6 -0
  139. package/dist/plugins/nyc/index.js +11 -0
  140. package/dist/plugins/playwright/index.d.ts +5 -0
  141. package/dist/plugins/playwright/index.js +5 -0
  142. package/dist/plugins/postcss/index.d.ts +6 -0
  143. package/dist/plugins/postcss/index.js +23 -0
  144. package/dist/plugins/postcss/types.d.ts +3 -0
  145. package/dist/plugins/postcss/types.js +1 -0
  146. package/dist/plugins/prettier/index.d.ts +6 -0
  147. package/dist/plugins/prettier/index.js +20 -0
  148. package/dist/plugins/release-it/index.d.ts +6 -0
  149. package/dist/plugins/release-it/index.js +30 -0
  150. package/dist/plugins/release-it/types.d.ts +10 -0
  151. package/dist/plugins/release-it/types.js +1 -0
  152. package/dist/plugins/remark/index.d.ts +6 -0
  153. package/dist/plugins/remark/index.js +18 -0
  154. package/dist/plugins/remix/index.d.ts +6 -0
  155. package/dist/plugins/remix/index.js +11 -0
  156. package/dist/plugins/rollup/index.d.ts +5 -0
  157. package/dist/plugins/rollup/index.js +5 -0
  158. package/dist/plugins/semantic-release/index.d.ts +6 -0
  159. package/dist/plugins/semantic-release/index.js +17 -0
  160. package/dist/plugins/semantic-release/types.d.ts +3 -0
  161. package/dist/plugins/semantic-release/types.js +1 -0
  162. package/dist/plugins/sentry/index.d.ts +5 -0
  163. package/dist/plugins/sentry/index.js +5 -0
  164. package/dist/plugins/storybook/index.d.ts +8 -0
  165. package/dist/plugins/storybook/index.js +19 -0
  166. package/dist/plugins/storybook/types.d.ts +11 -0
  167. package/dist/plugins/storybook/types.js +1 -0
  168. package/dist/plugins/stryker/index.d.ts +6 -0
  169. package/dist/plugins/stryker/index.js +17 -0
  170. package/dist/plugins/stryker/types.d.ts +5 -0
  171. package/dist/plugins/stryker/types.js +1 -0
  172. package/dist/plugins/stylelint/index.d.ts +6 -0
  173. package/dist/plugins/stylelint/index.js +22 -0
  174. package/dist/plugins/stylelint/types.d.ts +4 -0
  175. package/dist/plugins/stylelint/types.js +1 -0
  176. package/dist/plugins/svelte/index.d.ts +7 -0
  177. package/dist/plugins/svelte/index.js +9 -0
  178. package/dist/plugins/tailwind/index.d.ts +5 -0
  179. package/dist/plugins/tailwind/index.js +5 -0
  180. package/dist/plugins/typedoc/index.d.ts +6 -0
  181. package/dist/plugins/typedoc/index.js +22 -0
  182. package/dist/plugins/typedoc/types.d.ts +3 -0
  183. package/dist/plugins/typedoc/types.js +1 -0
  184. package/dist/plugins/typescript/index.d.ts +7 -0
  185. package/dist/plugins/typescript/index.js +42 -0
  186. package/dist/plugins/vite/index.d.ts +6 -0
  187. package/dist/plugins/vite/index.js +12 -0
  188. package/dist/plugins/vite/types.d.ts +4 -0
  189. package/dist/plugins/vite/types.js +1 -0
  190. package/dist/plugins/vitest/helpers.d.ts +6 -0
  191. package/dist/plugins/vitest/helpers.js +22 -0
  192. package/dist/plugins/vitest/index.d.ts +9 -0
  193. package/dist/plugins/vitest/index.js +25 -0
  194. package/dist/plugins/vitest/types.d.ts +11 -0
  195. package/dist/plugins/vitest/types.js +1 -0
  196. package/dist/plugins/webpack/index.d.ts +6 -0
  197. package/dist/plugins/webpack/index.js +82 -0
  198. package/dist/plugins/webpack/types.d.ts +10 -0
  199. package/dist/plugins/webpack/types.js +1 -0
  200. package/dist/reporters/codeowners.d.ts +3 -0
  201. package/dist/reporters/codeowners.js +62 -0
  202. package/dist/reporters/compact.d.ts +3 -0
  203. package/dist/reporters/compact.js +36 -0
  204. package/dist/reporters/index.d.ts +7 -0
  205. package/dist/reporters/index.js +10 -0
  206. package/dist/reporters/json.d.ts +3 -0
  207. package/dist/reporters/json.js +67 -0
  208. package/dist/reporters/symbols.d.ts +3 -0
  209. package/dist/reporters/symbols.js +54 -0
  210. package/dist/reporters/util.d.ts +15 -0
  211. package/dist/reporters/util.js +17 -0
  212. package/dist/types/cli.d.ts +10 -0
  213. package/dist/types/cli.js +1 -0
  214. package/dist/types/compilers.d.ts +6 -0
  215. package/dist/types/compilers.js +1 -0
  216. package/dist/types/config.d.ts +39 -0
  217. package/dist/types/config.js +3 -0
  218. package/dist/types/exports.d.ts +20 -0
  219. package/dist/types/exports.js +1 -0
  220. package/dist/types/imports.d.ts +13 -0
  221. package/dist/types/imports.js +1 -0
  222. package/dist/types/issues.d.ts +62 -0
  223. package/dist/types/issues.js +10 -0
  224. package/dist/types/plugins.d.ts +19 -0
  225. package/dist/types/plugins.js +1 -0
  226. package/dist/types/workspace.d.ts +17 -0
  227. package/dist/types/workspace.js +1 -0
  228. package/dist/typescript/SourceFile.d.ts +18 -0
  229. package/dist/typescript/SourceFile.js +1 -0
  230. package/dist/typescript/SourceFileManager.d.ts +13 -0
  231. package/dist/typescript/SourceFileManager.js +57 -0
  232. package/dist/typescript/ast-helpers.d.ts +27 -0
  233. package/dist/typescript/ast-helpers.js +101 -0
  234. package/dist/typescript/createHosts.d.ts +15 -0
  235. package/dist/typescript/createHosts.js +39 -0
  236. package/dist/typescript/getImportsAndExports.d.ts +29 -0
  237. package/dist/typescript/getImportsAndExports.js +159 -0
  238. package/dist/typescript/resolveModuleNames.d.ts +2 -0
  239. package/dist/typescript/resolveModuleNames.js +27 -0
  240. package/dist/typescript/sys.d.ts +35 -0
  241. package/dist/typescript/sys.js +16 -0
  242. package/dist/typescript/utils.d.ts +2 -0
  243. package/dist/typescript/utils.js +9 -0
  244. package/dist/typescript/visitors/exports/exportAssignment.d.ts +3 -0
  245. package/dist/typescript/visitors/exports/exportAssignment.js +9 -0
  246. package/dist/typescript/visitors/exports/exportDeclaration.d.ts +3 -0
  247. package/dist/typescript/visitors/exports/exportDeclaration.js +13 -0
  248. package/dist/typescript/visitors/exports/exportKeyword.d.ts +3 -0
  249. package/dist/typescript/visitors/exports/exportKeyword.js +77 -0
  250. package/dist/typescript/visitors/exports/index.d.ts +3 -0
  251. package/dist/typescript/visitors/exports/index.js +7 -0
  252. package/dist/typescript/visitors/exports/moduleExportsAccessExpression.d.ts +3 -0
  253. package/dist/typescript/visitors/exports/moduleExportsAccessExpression.js +31 -0
  254. package/dist/typescript/visitors/helpers.d.ts +4 -0
  255. package/dist/typescript/visitors/helpers.js +10 -0
  256. package/dist/typescript/visitors/imports/importCall.d.ts +3 -0
  257. package/dist/typescript/visitors/imports/importCall.js +11 -0
  258. package/dist/typescript/visitors/imports/importDeclaration.d.ts +3 -0
  259. package/dist/typescript/visitors/imports/importDeclaration.js +32 -0
  260. package/dist/typescript/visitors/imports/importEqualsDeclaration.d.ts +3 -0
  261. package/dist/typescript/visitors/imports/importEqualsDeclaration.js +11 -0
  262. package/dist/typescript/visitors/imports/index.d.ts +3 -0
  263. package/dist/typescript/visitors/imports/index.js +18 -0
  264. package/dist/typescript/visitors/imports/jsDocType.d.ts +3 -0
  265. package/dist/typescript/visitors/imports/jsDocType.js +11 -0
  266. package/dist/typescript/visitors/imports/reExportDeclaration.d.ts +3 -0
  267. package/dist/typescript/visitors/imports/reExportDeclaration.js +21 -0
  268. package/dist/typescript/visitors/imports/requireCall.d.ts +3 -0
  269. package/dist/typescript/visitors/imports/requireCall.js +45 -0
  270. package/dist/typescript/visitors/imports/requireResolveCall.d.ts +3 -0
  271. package/dist/typescript/visitors/imports/requireResolveCall.js +12 -0
  272. package/dist/typescript/visitors/index.d.ts +10 -0
  273. package/dist/typescript/visitors/index.js +16 -0
  274. package/dist/typescript/visitors/scripts/execa.d.ts +3 -0
  275. package/dist/typescript/visitors/scripts/execa.js +18 -0
  276. package/dist/typescript/visitors/scripts/index.d.ts +3 -0
  277. package/dist/typescript/visitors/scripts/index.js +5 -0
  278. package/dist/typescript/visitors/scripts/zx.d.ts +3 -0
  279. package/dist/typescript/visitors/scripts/zx.js +8 -0
  280. package/dist/util/Performance.d.ts +23 -0
  281. package/dist/util/Performance.js +80 -0
  282. package/dist/util/array.d.ts +2 -0
  283. package/dist/util/array.js +2 -0
  284. package/dist/util/cli-arguments.d.ts +28 -0
  285. package/dist/util/cli-arguments.js +83 -0
  286. package/dist/util/compilers.d.ts +426 -0
  287. package/dist/util/compilers.js +20 -0
  288. package/dist/util/debug.d.ts +3 -0
  289. package/dist/util/debug.js +34 -0
  290. package/dist/util/errors.d.ts +12 -0
  291. package/dist/util/errors.js +14 -0
  292. package/dist/util/fs.d.ts +7 -0
  293. package/dist/util/fs.js +42 -0
  294. package/dist/util/get-included-issue-types.d.ts +16 -0
  295. package/dist/util/get-included-issue-types.js +37 -0
  296. package/dist/util/git.d.ts +1 -0
  297. package/dist/util/git.js +20 -0
  298. package/dist/util/glob.d.ts +19 -0
  299. package/dist/util/glob.js +59 -0
  300. package/dist/util/loader.d.ts +1 -0
  301. package/dist/util/loader.js +31 -0
  302. package/dist/util/map.d.ts +1 -0
  303. package/dist/util/map.js +6 -0
  304. package/dist/util/modules.d.ts +8 -0
  305. package/dist/util/modules.js +52 -0
  306. package/dist/util/object.d.ts +3 -0
  307. package/dist/util/object.js +37 -0
  308. package/dist/util/path.d.ts +11 -0
  309. package/dist/util/path.js +13 -0
  310. package/dist/util/plugin.d.ts +3 -0
  311. package/dist/util/plugin.js +14 -0
  312. package/dist/util/register.d.ts +1 -0
  313. package/dist/util/register.js +14 -0
  314. package/dist/util/reporter.d.ts +3 -0
  315. package/dist/util/reporter.js +16 -0
  316. package/dist/util/require.d.ts +5 -0
  317. package/dist/util/require.js +34 -0
  318. package/dist/util/tsconfig-loader.d.ts +2 -0
  319. package/dist/util/tsconfig-loader.js +11 -0
  320. package/dist/util/workspace.d.ts +1 -0
  321. package/dist/util/workspace.js +11 -0
  322. package/dist/version.d.ts +1 -0
  323. package/dist/version.js +1 -0
  324. package/license +12 -0
  325. package/package.json +150 -0
  326. package/schema.json +403 -0
@@ -0,0 +1,426 @@
1
+ import type { AsyncCompilerFn, SyncCompilerFn } from '../types/compilers.js';
2
+ import type { RawConfiguration } from '../types/config.js';
3
+ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
4
+ syncCompilers: Record<string, SyncCompilerFn>;
5
+ asyncCompilers: Record<string, AsyncCompilerFn>;
6
+ exclude?: string[] | undefined;
7
+ rules?: Partial<Record<"files" | "dependencies" | "devDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
8
+ entry?: string | string[] | undefined;
9
+ project?: string | string[] | undefined;
10
+ paths?: Record<string, string[]> | undefined;
11
+ ignore?: string | string[] | undefined;
12
+ ignoreBinaries?: string[] | undefined;
13
+ ignoreExportsUsedInFile?: boolean | Partial<Record<"function" | "type" | "enum" | "class" | "interface" | "member", boolean>> | undefined;
14
+ ignoreDependencies?: string[] | undefined;
15
+ ignoreWorkspaces?: string[] | undefined;
16
+ compilers?: Record<string, ((args_0: string, ...args_1: unknown[]) => string) | ((args_0: string, ...args_1: unknown[]) => Promise<string>)> | undefined;
17
+ include?: string[] | undefined;
18
+ workspaces?: Record<string, {
19
+ entry?: string | string[] | undefined;
20
+ project?: string | string[] | undefined;
21
+ paths?: Record<string, string[]> | undefined;
22
+ ignore?: string | string[] | undefined;
23
+ ignoreBinaries?: string[] | undefined;
24
+ ignoreDependencies?: string[] | undefined;
25
+ angular?: string | false | string[] | {
26
+ config?: string | string[] | undefined;
27
+ entry?: string | string[] | undefined;
28
+ project?: string | string[] | undefined;
29
+ } | undefined;
30
+ ava?: string | false | string[] | {
31
+ config?: string | string[] | undefined;
32
+ entry?: string | string[] | undefined;
33
+ project?: string | string[] | undefined;
34
+ } | undefined;
35
+ babel?: string | false | string[] | {
36
+ config?: string | string[] | undefined;
37
+ entry?: string | string[] | undefined;
38
+ project?: string | string[] | undefined;
39
+ } | undefined;
40
+ capacitor?: string | false | string[] | {
41
+ config?: string | string[] | undefined;
42
+ entry?: string | string[] | undefined;
43
+ project?: string | string[] | undefined;
44
+ } | undefined;
45
+ changesets?: string | false | string[] | {
46
+ config?: string | string[] | undefined;
47
+ entry?: string | string[] | undefined;
48
+ project?: string | string[] | undefined;
49
+ } | undefined;
50
+ commitizen?: string | false | string[] | {
51
+ config?: string | string[] | undefined;
52
+ entry?: string | string[] | undefined;
53
+ project?: string | string[] | undefined;
54
+ } | undefined;
55
+ commitlint?: string | false | string[] | {
56
+ config?: string | string[] | undefined;
57
+ entry?: string | string[] | undefined;
58
+ project?: string | string[] | undefined;
59
+ } | undefined;
60
+ cspell?: string | false | string[] | {
61
+ config?: string | string[] | undefined;
62
+ entry?: string | string[] | undefined;
63
+ project?: string | string[] | undefined;
64
+ } | undefined;
65
+ cypress?: string | false | string[] | {
66
+ config?: string | string[] | undefined;
67
+ entry?: string | string[] | undefined;
68
+ project?: string | string[] | undefined;
69
+ } | undefined;
70
+ eslint?: string | false | string[] | {
71
+ config?: string | string[] | undefined;
72
+ entry?: string | string[] | undefined;
73
+ project?: string | string[] | undefined;
74
+ } | undefined;
75
+ gatsby?: string | false | string[] | {
76
+ config?: string | string[] | undefined;
77
+ entry?: string | string[] | undefined;
78
+ project?: string | string[] | undefined;
79
+ } | undefined;
80
+ 'github-actions'?: string | false | string[] | {
81
+ config?: string | string[] | undefined;
82
+ entry?: string | string[] | undefined;
83
+ project?: string | string[] | undefined;
84
+ } | undefined;
85
+ husky?: string | false | string[] | {
86
+ config?: string | string[] | undefined;
87
+ entry?: string | string[] | undefined;
88
+ project?: string | string[] | undefined;
89
+ } | undefined;
90
+ jest?: string | false | string[] | {
91
+ config?: string | string[] | undefined;
92
+ entry?: string | string[] | undefined;
93
+ project?: string | string[] | undefined;
94
+ } | undefined;
95
+ lefthook?: string | false | string[] | {
96
+ config?: string | string[] | undefined;
97
+ entry?: string | string[] | undefined;
98
+ project?: string | string[] | undefined;
99
+ } | undefined;
100
+ 'lint-staged'?: string | false | string[] | {
101
+ config?: string | string[] | undefined;
102
+ entry?: string | string[] | undefined;
103
+ project?: string | string[] | undefined;
104
+ } | undefined;
105
+ markdownlint?: string | false | string[] | {
106
+ config?: string | string[] | undefined;
107
+ entry?: string | string[] | undefined;
108
+ project?: string | string[] | undefined;
109
+ } | undefined;
110
+ mocha?: string | false | string[] | {
111
+ config?: string | string[] | undefined;
112
+ entry?: string | string[] | undefined;
113
+ project?: string | string[] | undefined;
114
+ } | undefined;
115
+ next?: string | false | string[] | {
116
+ config?: string | string[] | undefined;
117
+ entry?: string | string[] | undefined;
118
+ project?: string | string[] | undefined;
119
+ } | undefined;
120
+ 'npm-package-json-lint'?: string | false | string[] | {
121
+ config?: string | string[] | undefined;
122
+ entry?: string | string[] | undefined;
123
+ project?: string | string[] | undefined;
124
+ } | undefined;
125
+ nx?: string | false | string[] | {
126
+ config?: string | string[] | undefined;
127
+ entry?: string | string[] | undefined;
128
+ project?: string | string[] | undefined;
129
+ } | undefined;
130
+ nyc?: string | false | string[] | {
131
+ config?: string | string[] | undefined;
132
+ entry?: string | string[] | undefined;
133
+ project?: string | string[] | undefined;
134
+ } | undefined;
135
+ playwright?: string | false | string[] | {
136
+ config?: string | string[] | undefined;
137
+ entry?: string | string[] | undefined;
138
+ project?: string | string[] | undefined;
139
+ } | undefined;
140
+ postcss?: string | false | string[] | {
141
+ config?: string | string[] | undefined;
142
+ entry?: string | string[] | undefined;
143
+ project?: string | string[] | undefined;
144
+ } | undefined;
145
+ prettier?: string | false | string[] | {
146
+ config?: string | string[] | undefined;
147
+ entry?: string | string[] | undefined;
148
+ project?: string | string[] | undefined;
149
+ } | undefined;
150
+ 'release-it'?: string | false | string[] | {
151
+ config?: string | string[] | undefined;
152
+ entry?: string | string[] | undefined;
153
+ project?: string | string[] | undefined;
154
+ } | undefined;
155
+ remark?: string | false | string[] | {
156
+ config?: string | string[] | undefined;
157
+ entry?: string | string[] | undefined;
158
+ project?: string | string[] | undefined;
159
+ } | undefined;
160
+ remix?: string | false | string[] | {
161
+ config?: string | string[] | undefined;
162
+ entry?: string | string[] | undefined;
163
+ project?: string | string[] | undefined;
164
+ } | undefined;
165
+ rollup?: string | false | string[] | {
166
+ config?: string | string[] | undefined;
167
+ entry?: string | string[] | undefined;
168
+ project?: string | string[] | undefined;
169
+ } | undefined;
170
+ 'semantic-release'?: string | false | string[] | {
171
+ config?: string | string[] | undefined;
172
+ entry?: string | string[] | undefined;
173
+ project?: string | string[] | undefined;
174
+ } | undefined;
175
+ sentry?: string | false | string[] | {
176
+ config?: string | string[] | undefined;
177
+ entry?: string | string[] | undefined;
178
+ project?: string | string[] | undefined;
179
+ } | undefined;
180
+ storybook?: string | false | string[] | {
181
+ config?: string | string[] | undefined;
182
+ entry?: string | string[] | undefined;
183
+ project?: string | string[] | undefined;
184
+ } | undefined;
185
+ stryker?: string | false | string[] | {
186
+ config?: string | string[] | undefined;
187
+ entry?: string | string[] | undefined;
188
+ project?: string | string[] | undefined;
189
+ } | undefined;
190
+ stylelint?: string | false | string[] | {
191
+ config?: string | string[] | undefined;
192
+ entry?: string | string[] | undefined;
193
+ project?: string | string[] | undefined;
194
+ } | undefined;
195
+ tailwind?: string | false | string[] | {
196
+ config?: string | string[] | undefined;
197
+ entry?: string | string[] | undefined;
198
+ project?: string | string[] | undefined;
199
+ } | undefined;
200
+ typedoc?: string | false | string[] | {
201
+ config?: string | string[] | undefined;
202
+ entry?: string | string[] | undefined;
203
+ project?: string | string[] | undefined;
204
+ } | undefined;
205
+ typescript?: string | false | string[] | {
206
+ config?: string | string[] | undefined;
207
+ entry?: string | string[] | undefined;
208
+ project?: string | string[] | undefined;
209
+ } | undefined;
210
+ vite?: string | false | string[] | {
211
+ config?: string | string[] | undefined;
212
+ entry?: string | string[] | undefined;
213
+ project?: string | string[] | undefined;
214
+ } | undefined;
215
+ vitest?: string | false | string[] | {
216
+ config?: string | string[] | undefined;
217
+ entry?: string | string[] | undefined;
218
+ project?: string | string[] | undefined;
219
+ } | undefined;
220
+ webpack?: string | false | string[] | {
221
+ config?: string | string[] | undefined;
222
+ entry?: string | string[] | undefined;
223
+ project?: string | string[] | undefined;
224
+ } | undefined;
225
+ }> | undefined;
226
+ angular?: string | false | string[] | {
227
+ config?: string | string[] | undefined;
228
+ entry?: string | string[] | undefined;
229
+ project?: string | string[] | undefined;
230
+ } | undefined;
231
+ ava?: string | false | string[] | {
232
+ config?: string | string[] | undefined;
233
+ entry?: string | string[] | undefined;
234
+ project?: string | string[] | undefined;
235
+ } | undefined;
236
+ babel?: string | false | string[] | {
237
+ config?: string | string[] | undefined;
238
+ entry?: string | string[] | undefined;
239
+ project?: string | string[] | undefined;
240
+ } | undefined;
241
+ capacitor?: string | false | string[] | {
242
+ config?: string | string[] | undefined;
243
+ entry?: string | string[] | undefined;
244
+ project?: string | string[] | undefined;
245
+ } | undefined;
246
+ changesets?: string | false | string[] | {
247
+ config?: string | string[] | undefined;
248
+ entry?: string | string[] | undefined;
249
+ project?: string | string[] | undefined;
250
+ } | undefined;
251
+ commitizen?: string | false | string[] | {
252
+ config?: string | string[] | undefined;
253
+ entry?: string | string[] | undefined;
254
+ project?: string | string[] | undefined;
255
+ } | undefined;
256
+ commitlint?: string | false | string[] | {
257
+ config?: string | string[] | undefined;
258
+ entry?: string | string[] | undefined;
259
+ project?: string | string[] | undefined;
260
+ } | undefined;
261
+ cspell?: string | false | string[] | {
262
+ config?: string | string[] | undefined;
263
+ entry?: string | string[] | undefined;
264
+ project?: string | string[] | undefined;
265
+ } | undefined;
266
+ cypress?: string | false | string[] | {
267
+ config?: string | string[] | undefined;
268
+ entry?: string | string[] | undefined;
269
+ project?: string | string[] | undefined;
270
+ } | undefined;
271
+ eslint?: string | false | string[] | {
272
+ config?: string | string[] | undefined;
273
+ entry?: string | string[] | undefined;
274
+ project?: string | string[] | undefined;
275
+ } | undefined;
276
+ gatsby?: string | false | string[] | {
277
+ config?: string | string[] | undefined;
278
+ entry?: string | string[] | undefined;
279
+ project?: string | string[] | undefined;
280
+ } | undefined;
281
+ 'github-actions'?: string | false | string[] | {
282
+ config?: string | string[] | undefined;
283
+ entry?: string | string[] | undefined;
284
+ project?: string | string[] | undefined;
285
+ } | undefined;
286
+ husky?: string | false | string[] | {
287
+ config?: string | string[] | undefined;
288
+ entry?: string | string[] | undefined;
289
+ project?: string | string[] | undefined;
290
+ } | undefined;
291
+ jest?: string | false | string[] | {
292
+ config?: string | string[] | undefined;
293
+ entry?: string | string[] | undefined;
294
+ project?: string | string[] | undefined;
295
+ } | undefined;
296
+ lefthook?: string | false | string[] | {
297
+ config?: string | string[] | undefined;
298
+ entry?: string | string[] | undefined;
299
+ project?: string | string[] | undefined;
300
+ } | undefined;
301
+ 'lint-staged'?: string | false | string[] | {
302
+ config?: string | string[] | undefined;
303
+ entry?: string | string[] | undefined;
304
+ project?: string | string[] | undefined;
305
+ } | undefined;
306
+ markdownlint?: string | false | string[] | {
307
+ config?: string | string[] | undefined;
308
+ entry?: string | string[] | undefined;
309
+ project?: string | string[] | undefined;
310
+ } | undefined;
311
+ mocha?: string | false | string[] | {
312
+ config?: string | string[] | undefined;
313
+ entry?: string | string[] | undefined;
314
+ project?: string | string[] | undefined;
315
+ } | undefined;
316
+ next?: string | false | string[] | {
317
+ config?: string | string[] | undefined;
318
+ entry?: string | string[] | undefined;
319
+ project?: string | string[] | undefined;
320
+ } | undefined;
321
+ 'npm-package-json-lint'?: string | false | string[] | {
322
+ config?: string | string[] | undefined;
323
+ entry?: string | string[] | undefined;
324
+ project?: string | string[] | undefined;
325
+ } | undefined;
326
+ nx?: string | false | string[] | {
327
+ config?: string | string[] | undefined;
328
+ entry?: string | string[] | undefined;
329
+ project?: string | string[] | undefined;
330
+ } | undefined;
331
+ nyc?: string | false | string[] | {
332
+ config?: string | string[] | undefined;
333
+ entry?: string | string[] | undefined;
334
+ project?: string | string[] | undefined;
335
+ } | undefined;
336
+ playwright?: string | false | string[] | {
337
+ config?: string | string[] | undefined;
338
+ entry?: string | string[] | undefined;
339
+ project?: string | string[] | undefined;
340
+ } | undefined;
341
+ postcss?: string | false | string[] | {
342
+ config?: string | string[] | undefined;
343
+ entry?: string | string[] | undefined;
344
+ project?: string | string[] | undefined;
345
+ } | undefined;
346
+ prettier?: string | false | string[] | {
347
+ config?: string | string[] | undefined;
348
+ entry?: string | string[] | undefined;
349
+ project?: string | string[] | undefined;
350
+ } | undefined;
351
+ 'release-it'?: string | false | string[] | {
352
+ config?: string | string[] | undefined;
353
+ entry?: string | string[] | undefined;
354
+ project?: string | string[] | undefined;
355
+ } | undefined;
356
+ remark?: string | false | string[] | {
357
+ config?: string | string[] | undefined;
358
+ entry?: string | string[] | undefined;
359
+ project?: string | string[] | undefined;
360
+ } | undefined;
361
+ remix?: string | false | string[] | {
362
+ config?: string | string[] | undefined;
363
+ entry?: string | string[] | undefined;
364
+ project?: string | string[] | undefined;
365
+ } | undefined;
366
+ rollup?: string | false | string[] | {
367
+ config?: string | string[] | undefined;
368
+ entry?: string | string[] | undefined;
369
+ project?: string | string[] | undefined;
370
+ } | undefined;
371
+ 'semantic-release'?: string | false | string[] | {
372
+ config?: string | string[] | undefined;
373
+ entry?: string | string[] | undefined;
374
+ project?: string | string[] | undefined;
375
+ } | undefined;
376
+ sentry?: string | false | string[] | {
377
+ config?: string | string[] | undefined;
378
+ entry?: string | string[] | undefined;
379
+ project?: string | string[] | undefined;
380
+ } | undefined;
381
+ storybook?: string | false | string[] | {
382
+ config?: string | string[] | undefined;
383
+ entry?: string | string[] | undefined;
384
+ project?: string | string[] | undefined;
385
+ } | undefined;
386
+ stryker?: string | false | string[] | {
387
+ config?: string | string[] | undefined;
388
+ entry?: string | string[] | undefined;
389
+ project?: string | string[] | undefined;
390
+ } | undefined;
391
+ stylelint?: string | false | string[] | {
392
+ config?: string | string[] | undefined;
393
+ entry?: string | string[] | undefined;
394
+ project?: string | string[] | undefined;
395
+ } | undefined;
396
+ tailwind?: string | false | string[] | {
397
+ config?: string | string[] | undefined;
398
+ entry?: string | string[] | undefined;
399
+ project?: string | string[] | undefined;
400
+ } | undefined;
401
+ typedoc?: string | false | string[] | {
402
+ config?: string | string[] | undefined;
403
+ entry?: string | string[] | undefined;
404
+ project?: string | string[] | undefined;
405
+ } | undefined;
406
+ typescript?: string | false | string[] | {
407
+ config?: string | string[] | undefined;
408
+ entry?: string | string[] | undefined;
409
+ project?: string | string[] | undefined;
410
+ } | undefined;
411
+ vite?: string | false | string[] | {
412
+ config?: string | string[] | undefined;
413
+ entry?: string | string[] | undefined;
414
+ project?: string | string[] | undefined;
415
+ } | undefined;
416
+ vitest?: string | false | string[] | {
417
+ config?: string | string[] | undefined;
418
+ entry?: string | string[] | undefined;
419
+ project?: string | string[] | undefined;
420
+ } | undefined;
421
+ webpack?: string | false | string[] | {
422
+ config?: string | string[] | undefined;
423
+ entry?: string | string[] | undefined;
424
+ project?: string | string[] | undefined;
425
+ } | undefined;
426
+ };
@@ -0,0 +1,20 @@
1
+ const isAsync = (fn) => (fn ? fn.constructor.name === 'AsyncFunction' : false);
2
+ const normalizeExt = (ext) => ext.replace(/^\.*/, '.');
3
+ export const partitionCompilers = (rawLocalConfig) => {
4
+ const syncCompilers = {};
5
+ const asyncCompilers = {};
6
+ for (const extension in rawLocalConfig.compilers) {
7
+ const ext = normalizeExt(extension);
8
+ if (!rawLocalConfig.asyncCompilers?.[ext] && isAsync(rawLocalConfig.compilers[extension])) {
9
+ asyncCompilers[ext] = rawLocalConfig.compilers[extension];
10
+ }
11
+ else {
12
+ syncCompilers[ext] = rawLocalConfig.compilers[extension];
13
+ }
14
+ }
15
+ for (const extension in rawLocalConfig.asyncCompilers) {
16
+ const ext = normalizeExt(extension);
17
+ asyncCompilers[ext] = rawLocalConfig.asyncCompilers[extension];
18
+ }
19
+ return { ...rawLocalConfig, syncCompilers, asyncCompilers };
20
+ };
@@ -0,0 +1,3 @@
1
+ export declare const debugLog: (message: string) => void;
2
+ export declare const debugLogObject: (name: string, obj: unknown) => void;
3
+ export declare const debugLogArray: (name: string, sourceFiles: string[] | Set<string>) => void;
@@ -0,0 +1,34 @@
1
+ import util from 'node:util';
2
+ import parsedArgValues from './cli-arguments.js';
3
+ const { debug, 'debug-file-filter': debugFileFilter } = parsedArgValues;
4
+ const IS_ENABLED = debug ?? false;
5
+ const FILE_FILTER = debugFileFilter;
6
+ const inspectOptions = { maxArrayLength: null, depth: null, colors: true };
7
+ const logArray = (collection) => {
8
+ if (FILE_FILTER) {
9
+ const fileFilter = new RegExp(FILE_FILTER);
10
+ const files = collection.filter(filePath => fileFilter.test(filePath));
11
+ console.log(util.inspect(files.sort(), inspectOptions));
12
+ }
13
+ else {
14
+ console.log(util.inspect(collection.sort(), inspectOptions));
15
+ }
16
+ };
17
+ export const debugLog = (message) => {
18
+ if (!IS_ENABLED)
19
+ return;
20
+ console.log(`[knip] ${message}`);
21
+ };
22
+ export const debugLogObject = (name, obj) => {
23
+ if (!IS_ENABLED)
24
+ return;
25
+ console.log(`[knip] ${name}`);
26
+ console.log(util.inspect(obj, inspectOptions));
27
+ };
28
+ export const debugLogArray = (name, sourceFiles) => {
29
+ if (!IS_ENABLED)
30
+ return;
31
+ const collection = Array.from(sourceFiles);
32
+ console.debug(`[knip] ${name} (${collection.length})`);
33
+ logArray(collection);
34
+ };
@@ -0,0 +1,12 @@
1
+ interface ErrorWithCause extends Error {
2
+ cause: Error;
3
+ }
4
+ export declare class ConfigurationError extends Error {
5
+ }
6
+ export declare class LoaderError extends Error {
7
+ }
8
+ export declare const isKnownError: (error: Error) => boolean;
9
+ export declare const hasCause: (error: Error) => error is ErrorWithCause;
10
+ export declare const isConfigurationError: (error: Error) => boolean;
11
+ export declare const getKnownError: (error: Error) => Error;
12
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ZodError } from 'zod';
2
+ import { fromZodError } from 'zod-validation-error';
3
+ export class ConfigurationError extends Error {
4
+ }
5
+ export class LoaderError extends Error {
6
+ }
7
+ export const isKnownError = (error) => error instanceof ConfigurationError || error instanceof LoaderError || error instanceof ZodError;
8
+ export const hasCause = (error) => error.cause instanceof Error;
9
+ export const isConfigurationError = (error) => error instanceof ConfigurationError;
10
+ export const getKnownError = (error) => {
11
+ if (error instanceof ZodError)
12
+ return fromZodError(error);
13
+ return error;
14
+ };
@@ -0,0 +1,7 @@
1
+ export declare const isFile: (filePath: string) => boolean;
2
+ export declare const findFile: (workingDir: string, fileName: string) => string | undefined;
3
+ export declare const loadFile: (filePath: string) => Promise<string>;
4
+ export declare const loadJSON: (filePath: string) => Promise<any>;
5
+ export declare const loadYAML: (filePath: string) => Promise<unknown>;
6
+ export declare const parseJSON: (filePath: string, contents: string) => Promise<any>;
7
+ export declare const parseYAML: (contents: string) => Promise<unknown>;
@@ -0,0 +1,42 @@
1
+ import { statSync } from 'node:fs';
2
+ import { readFile } from 'node:fs/promises';
3
+ import yaml from 'js-yaml';
4
+ import stripJsonComments from 'strip-json-comments';
5
+ import { LoaderError } from './errors.js';
6
+ import { join } from './path.js';
7
+ export const isFile = (filePath) => {
8
+ const stat = statSync(filePath, { throwIfNoEntry: false });
9
+ return stat !== undefined && stat.isFile();
10
+ };
11
+ export const findFile = (workingDir, fileName) => {
12
+ const filePath = join(workingDir, fileName);
13
+ return isFile(filePath) ? filePath : undefined;
14
+ };
15
+ export const loadFile = async (filePath) => {
16
+ try {
17
+ const contents = await readFile(filePath);
18
+ return contents.toString();
19
+ }
20
+ catch (error) {
21
+ throw new LoaderError(`Error loading ${filePath}`, { cause: error });
22
+ }
23
+ };
24
+ export const loadJSON = async (filePath) => {
25
+ const contents = await loadFile(filePath);
26
+ return parseJSON(filePath, contents);
27
+ };
28
+ export const loadYAML = async (filePath) => {
29
+ const contents = await loadFile(filePath);
30
+ return parseYAML(contents);
31
+ };
32
+ export const parseJSON = async (filePath, contents) => {
33
+ try {
34
+ return JSON.parse(stripJsonComments(contents, { trailingCommas: true }));
35
+ }
36
+ catch (error) {
37
+ throw new LoaderError(`Error loading ${filePath}`, { cause: error });
38
+ }
39
+ };
40
+ export const parseYAML = async (contents) => {
41
+ return yaml.load(contents);
42
+ };
@@ -0,0 +1,16 @@
1
+ import type { Report } from '../types/issues.js';
2
+ type CLIArguments = {
3
+ include: string[];
4
+ exclude: string[];
5
+ dependencies: boolean;
6
+ exports: boolean;
7
+ };
8
+ type Options = {
9
+ isProduction?: boolean;
10
+ include?: string[];
11
+ exclude?: string[];
12
+ dependencies?: boolean;
13
+ exports?: boolean;
14
+ };
15
+ export declare const getIncludedIssueTypes: (cliArgs: CLIArguments, { include, exclude, isProduction }?: Options) => Report;
16
+ export {};
@@ -0,0 +1,37 @@
1
+ import { ISSUE_TYPES } from '../constants.js';
2
+ export const getIncludedIssueTypes = (cliArgs, { include = [], exclude = [], isProduction = false } = {}) => {
3
+ if (cliArgs.dependencies) {
4
+ cliArgs.include = [
5
+ ...cliArgs.include,
6
+ 'dependencies',
7
+ 'optionalPeerDependencies',
8
+ 'unlisted',
9
+ 'binaries',
10
+ 'unresolved',
11
+ ];
12
+ }
13
+ if (cliArgs.exports) {
14
+ const exports = ['exports', 'nsExports', 'classMembers', 'types', 'nsTypes', 'enumMembers', 'duplicates'];
15
+ cliArgs.include = [...cliArgs.include, ...exports];
16
+ }
17
+ const normalizedIncludesArg = cliArgs.include.map(value => value.split(',')).flat();
18
+ const normalizedExcludesArg = cliArgs.exclude.map(value => value.split(',')).flat();
19
+ const excludes = exclude.filter(exclude => !normalizedIncludesArg.includes(exclude));
20
+ const includes = include.filter(include => !normalizedExcludesArg.includes(include));
21
+ const _include = [normalizedIncludesArg, includes].flat();
22
+ const _exclude = [normalizedExcludesArg, excludes].flat();
23
+ if (isProduction) {
24
+ _exclude.push('types');
25
+ _exclude.push('nsTypes');
26
+ _exclude.push('enumMembers');
27
+ _exclude.push('devDependencies');
28
+ }
29
+ else {
30
+ if (_include.includes('dependencies'))
31
+ _include.push('devDependencies', 'optionalPeerDependencies');
32
+ if (_exclude.includes('dependencies'))
33
+ _exclude.push('devDependencies', 'optionalPeerDependencies');
34
+ }
35
+ const included = (_include.length > 0 ? _include : ISSUE_TYPES).filter(group => !_exclude.includes(group));
36
+ return ISSUE_TYPES.reduce((types, group) => ((types[group] = included.includes(group)), types), {});
37
+ };
@@ -0,0 +1 @@
1
+ export declare const getGitHookPaths: (defaultPath?: string) => string[];
@@ -0,0 +1,20 @@
1
+ import { execSync } from 'child_process';
2
+ import { join } from './path.js';
3
+ const hookFileNames = [
4
+ `prepare-commit-msg`,
5
+ `commit-msg`,
6
+ `pre-{applypatch,commit,merge-commit,push,rebase,receive}`,
7
+ `post-{checkout,commit,merge,rewrite}`,
8
+ ];
9
+ const getGitHooksPath = (defaultPath = '.git/hooks') => {
10
+ try {
11
+ return execSync('git config --get core.hooksPath', { encoding: 'utf8' }).trim();
12
+ }
13
+ catch (error) {
14
+ return defaultPath;
15
+ }
16
+ };
17
+ export const getGitHookPaths = (defaultPath = '.git/hooks') => {
18
+ const gitHooksPath = getGitHooksPath(defaultPath);
19
+ return hookFileNames.map(fileName => join(gitHooksPath, fileName));
20
+ };
@@ -0,0 +1,19 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ export declare const prependDirToPattern: (workingDir: string, pattern: string) => string;
3
+ export declare const negate: (pattern: string) => string;
4
+ export declare const hasProductionSuffix: (pattern: string) => boolean;
5
+ export declare const hasNoProductionSuffix: (pattern: string) => boolean;
6
+ interface BaseGlobOptions {
7
+ cwd: string;
8
+ patterns: string[];
9
+ ignore?: string[];
10
+ gitignore?: boolean;
11
+ }
12
+ interface GlobOptions extends BaseGlobOptions {
13
+ workingDir?: string;
14
+ }
15
+ export declare const _glob: ({ cwd, workingDir, patterns, ignore, gitignore }: GlobOptions) => Promise<string[]>;
16
+ export declare const _pureGlob: ({ cwd, patterns, ignore, gitignore }: BaseGlobOptions) => Promise<string[]>;
17
+ export declare const _firstGlob: ({ cwd, patterns }: BaseGlobOptions) => Promise<string | Buffer | undefined>;
18
+ export declare const _dirGlob: ({ cwd, patterns }: BaseGlobOptions) => Promise<string[]>;
19
+ export {};