knip 2.0.0-beta.1 → 2.0.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 (574) hide show
  1. package/README.md +114 -64
  2. package/dist/binaries/resolvers/fallback.js +6 -5
  3. package/dist/binaries/resolvers/index.d.ts +1 -0
  4. package/dist/binaries/resolvers/index.js +1 -0
  5. package/dist/binaries/resolvers/node.d.ts +0 -1
  6. package/dist/binaries/resolvers/node.js +1 -15
  7. package/dist/binaries/resolvers/rollup.js +10 -0
  8. package/dist/binaries/resolvers/util.d.ts +2 -0
  9. package/dist/binaries/resolvers/util.js +15 -0
  10. package/dist/cli.js +0 -0
  11. package/dist/configuration-chief.js +3 -5
  12. package/dist/configuration-validator.d.ts +400 -8
  13. package/dist/configuration-validator.js +7 -0
  14. package/dist/plugins/eslint/helpers.js +9 -9
  15. package/dist/plugins/index.d.ts +1 -0
  16. package/dist/plugins/index.js +1 -0
  17. package/dist/plugins/tailwind/index.d.ts +5 -0
  18. package/dist/plugins/tailwind/index.js +5 -0
  19. package/dist/project-principal.js +0 -2
  20. package/dist/types/ast.d.ts +1 -1
  21. package/dist/types/issues.d.ts +9 -1
  22. package/dist/types/issues.js +10 -1
  23. package/dist/typescript/ast-walker.js +17 -16
  24. package/dist/typescript/resolveModuleNames.js +0 -4
  25. package/dist/util/cli-arguments.d.ts +1 -2
  26. package/dist/util/cli-arguments.js +1 -3
  27. package/dist/util/compilers.d.ts +72 -2
  28. package/dist/util/performance.js +1 -1
  29. package/dist/version.d.ts +1 -1
  30. package/dist/version.js +1 -1
  31. package/dist/workspace-worker.d.ts +1 -1
  32. package/package.json +12 -10
  33. package/schema.json +4 -0
  34. package/dist/commonjs.test.d.ts +0 -1
  35. package/dist/commonjs.test.js +0 -29
  36. package/dist/compilers.test.d.ts +0 -1
  37. package/dist/compilers.test.js +0 -18
  38. package/dist/definitely-typed.test.d.ts +0 -1
  39. package/dist/definitely-typed.test.js +0 -35
  40. package/dist/dependencies.test.d.ts +0 -1
  41. package/dist/dependencies.test.js +0 -76
  42. package/dist/entry-js.test.d.ts +0 -1
  43. package/dist/entry-js.test.js +0 -38
  44. package/dist/exports.test.d.ts +0 -1
  45. package/dist/exports.test.js +0 -48
  46. package/dist/fixtures/binaries/dir/index.d.ts +0 -1
  47. package/dist/fixtures/binaries/dir/index.js +0 -1
  48. package/dist/fixtures/binaries/main.d.ts +0 -1
  49. package/dist/fixtures/binaries/main.js +0 -1
  50. package/dist/fixtures/binaries/require.d.ts +0 -1
  51. package/dist/fixtures/binaries/require.js +0 -1
  52. package/dist/fixtures/binaries/script.d.ts +0 -1
  53. package/dist/fixtures/binaries/script.js +0 -1
  54. package/dist/fixtures/commonjs/dir/mod.d.ts +0 -1
  55. package/dist/fixtures/commonjs/dir/mod.js +0 -5
  56. package/dist/fixtures/commonjs/dir/mod1.d.ts +0 -7
  57. package/dist/fixtures/commonjs/dir/mod1.js +0 -5
  58. package/dist/fixtures/commonjs/dir/mod2.d.ts +0 -4
  59. package/dist/fixtures/commonjs/dir/mod2.js +0 -4
  60. package/dist/fixtures/commonjs/dir/mod3.d.ts +0 -2
  61. package/dist/fixtures/commonjs/dir/mod3.js +0 -4
  62. package/dist/fixtures/commonjs/export-is.d.ts +0 -2
  63. package/dist/fixtures/commonjs/export-is.js +0 -2
  64. package/dist/fixtures/commonjs/index.d.ts +0 -1
  65. package/dist/fixtures/commonjs/index.js +0 -31
  66. package/dist/fixtures/commonjs/odd.d.ts +0 -1
  67. package/dist/fixtures/commonjs/odd.js +0 -7
  68. package/dist/fixtures/compilers/component.d.ts +0 -2
  69. package/dist/fixtures/compilers/component.jsx +0 -1
  70. package/dist/fixtures/compilers/index.d.ts +0 -1
  71. package/dist/fixtures/compilers/index.js +0 -1
  72. package/dist/fixtures/compilers/knip.d.ts +0 -0
  73. package/dist/fixtures/compilers/knip.js +0 -7
  74. package/dist/fixtures/definitely-typed/index.d.ts +0 -1
  75. package/dist/fixtures/definitely-typed/index.js +0 -1
  76. package/dist/fixtures/dependencies/entry.d.ts +0 -1
  77. package/dist/fixtures/dependencies/entry.js +0 -6
  78. package/dist/fixtures/dependencies/my-module.d.ts +0 -3
  79. package/dist/fixtures/dependencies/my-module.js +0 -6
  80. package/dist/fixtures/dependencies/unused-module.d.ts +0 -1
  81. package/dist/fixtures/dependencies/unused-module.js +0 -6
  82. package/dist/fixtures/entry-js/dangling.d.ts +0 -1
  83. package/dist/fixtures/entry-js/dangling.js +0 -1
  84. package/dist/fixtures/entry-js/index.d.ts +0 -1
  85. package/dist/fixtures/entry-js/index.js +0 -2
  86. package/dist/fixtures/entry-js/my-module.d.ts +0 -4
  87. package/dist/fixtures/entry-js/my-module.js +0 -6
  88. package/dist/fixtures/entry-js/my-namespace.d.ts +0 -5
  89. package/dist/fixtures/entry-js/my-namespace.js +0 -3
  90. package/dist/fixtures/exports/dangling.d.ts +0 -1
  91. package/dist/fixtures/exports/dangling.js +0 -1
  92. package/dist/fixtures/exports/default-arrow-function.d.ts +0 -2
  93. package/dist/fixtures/exports/default-arrow-function.js +0 -1
  94. package/dist/fixtures/exports/default-class.d.ts +0 -2
  95. package/dist/fixtures/exports/default-class.js +0 -2
  96. package/dist/fixtures/exports/default-function.d.ts +0 -1
  97. package/dist/fixtures/exports/default-function.js +0 -1
  98. package/dist/fixtures/exports/default-generator-function.d.ts +0 -1
  99. package/dist/fixtures/exports/default-generator-function.js +0 -1
  100. package/dist/fixtures/exports/default-named-class.d.ts +0 -2
  101. package/dist/fixtures/exports/default-named-class.js +0 -2
  102. package/dist/fixtures/exports/default-named-function.d.ts +0 -1
  103. package/dist/fixtures/exports/default-named-function.js +0 -1
  104. package/dist/fixtures/exports/default-named-generator-function.d.ts +0 -1
  105. package/dist/fixtures/exports/default-named-generator-function.js +0 -1
  106. package/dist/fixtures/exports/default.d.ts +0 -3
  107. package/dist/fixtures/exports/default.js +0 -2
  108. package/dist/fixtures/exports/dynamic-import.d.ts +0 -4
  109. package/dist/fixtures/exports/dynamic-import.js +0 -3
  110. package/dist/fixtures/exports/index.d.ts +0 -2
  111. package/dist/fixtures/exports/index.js +0 -6
  112. package/dist/fixtures/exports/my-module.d.ts +0 -5
  113. package/dist/fixtures/exports/my-module.js +0 -7
  114. package/dist/fixtures/exports/my-namespace.d.ts +0 -5
  115. package/dist/fixtures/exports/my-namespace.js +0 -3
  116. package/dist/fixtures/exports/named.d.ts +0 -11
  117. package/dist/fixtures/exports/named.js +0 -11
  118. package/dist/fixtures/exports/types.d.ts +0 -9
  119. package/dist/fixtures/exports/types.js +0 -3
  120. package/dist/fixtures/gitignore/packages/a/build/dist.d.ts +0 -2
  121. package/dist/fixtures/gitignore/packages/a/build/dist.js +0 -1
  122. package/dist/fixtures/gitignore/packages/a/dist.d.ts +0 -1
  123. package/dist/fixtures/gitignore/packages/a/dist.js +0 -1
  124. package/dist/fixtures/gitignore/packages/a/index.d.ts +0 -1
  125. package/dist/fixtures/gitignore/packages/a/index.js +0 -1
  126. package/dist/fixtures/imports/dir/import-b.d.ts +0 -2
  127. package/dist/fixtures/imports/dir/import-b.js +0 -1
  128. package/dist/fixtures/imports/dir/mod.d.ts +0 -1
  129. package/dist/fixtures/imports/dir/mod.js +0 -1
  130. package/dist/fixtures/imports/index.d.ts +0 -1
  131. package/dist/fixtures/imports/index.js +0 -35
  132. package/dist/fixtures/js-only/dangling.d.ts +0 -1
  133. package/dist/fixtures/js-only/dangling.js +0 -1
  134. package/dist/fixtures/js-only/index.d.ts +0 -1
  135. package/dist/fixtures/js-only/index.js +0 -2
  136. package/dist/fixtures/js-only/my-namespace.d.ts +0 -3
  137. package/dist/fixtures/js-only/my-namespace.js +0 -3
  138. package/dist/fixtures/jsdoc/index.d.ts +0 -4
  139. package/dist/fixtures/jsdoc/index.js +0 -8
  140. package/dist/fixtures/members/index.d.ts +0 -1
  141. package/dist/fixtures/members/index.js +0 -16
  142. package/dist/fixtures/members/members.d.ts +0 -23
  143. package/dist/fixtures/members/members.js +0 -38
  144. package/dist/fixtures/namespace/index.d.ts +0 -1
  145. package/dist/fixtures/namespace/index.js +0 -5
  146. package/dist/fixtures/namespace/namespace.d.ts +0 -3
  147. package/dist/fixtures/namespace/namespace.js +0 -3
  148. package/dist/fixtures/namespace/re-exported-module.d.ts +0 -2
  149. package/dist/fixtures/namespace/re-exported-module.js +0 -2
  150. package/dist/fixtures/pathless/src/dir/module-a.d.ts +0 -2
  151. package/dist/fixtures/pathless/src/dir/module-a.js +0 -1
  152. package/dist/fixtures/pathless/src/index.d.ts +0 -2
  153. package/dist/fixtures/pathless/src/index.js +0 -2
  154. package/dist/fixtures/pathless/src/same.d.ts +0 -2
  155. package/dist/fixtures/pathless/src/same.js +0 -1
  156. package/dist/fixtures/paths-knip-config/abc/main.d.ts +0 -0
  157. package/dist/fixtures/paths-knip-config/abc/main.js +0 -1
  158. package/dist/fixtures/paths-knip-config/index.d.ts +0 -1
  159. package/dist/fixtures/paths-knip-config/index.js +0 -1
  160. package/dist/fixtures/paths-knip-config/knip.d.ts +0 -3
  161. package/dist/fixtures/paths-knip-config/knip.js +0 -9
  162. package/dist/fixtures/paths-knip-config/lib/fn.d.ts +0 -2
  163. package/dist/fixtures/paths-knip-config/lib/fn.js +0 -1
  164. package/dist/fixtures/paths-knip-config/lib/index.d.ts +0 -2
  165. package/dist/fixtures/paths-knip-config/lib/index.js +0 -1
  166. package/dist/fixtures/paths-knip-config/my-module.d.ts +0 -2
  167. package/dist/fixtures/paths-knip-config/my-module.js +0 -1
  168. package/dist/fixtures/paths-knip-config-workspaces/index.d.ts +0 -1
  169. package/dist/fixtures/paths-knip-config-workspaces/index.js +0 -1
  170. package/dist/fixtures/paths-knip-config-workspaces/lib/fn.d.ts +0 -2
  171. package/dist/fixtures/paths-knip-config-workspaces/lib/fn.js +0 -1
  172. package/dist/fixtures/paths-knip-config-workspaces/lib/index.d.ts +0 -2
  173. package/dist/fixtures/paths-knip-config-workspaces/lib/index.js +0 -1
  174. package/dist/fixtures/paths-knip-config-workspaces/my-module.d.ts +0 -1
  175. package/dist/fixtures/paths-knip-config-workspaces/my-module.js +0 -1
  176. package/dist/fixtures/paths-knip-config-workspaces/ws/index.d.ts +0 -1
  177. package/dist/fixtures/paths-knip-config-workspaces/ws/index.js +0 -1
  178. package/dist/fixtures/paths-knip-config-workspaces/ws/lib/main.d.ts +0 -0
  179. package/dist/fixtures/paths-knip-config-workspaces/ws/lib/main.js +0 -1
  180. package/dist/fixtures/paths-knip-config-workspaces/ws/util/lang.d.ts +0 -2
  181. package/dist/fixtures/paths-knip-config-workspaces/ws/util/lang.js +0 -1
  182. package/dist/fixtures/peer-dependencies/index.d.ts +0 -1
  183. package/dist/fixtures/peer-dependencies/index.js +0 -1
  184. package/dist/fixtures/plugins/ava/ava.config.d.mts +0 -13
  185. package/dist/fixtures/plugins/ava/ava.config.mjs +0 -13
  186. package/dist/fixtures/plugins/babel/babel.config.d.ts +0 -14
  187. package/dist/fixtures/plugins/babel/babel.config.js +0 -47
  188. package/dist/fixtures/plugins/capacitor/capacitor.config.d.ts +0 -3
  189. package/dist/fixtures/plugins/capacitor/capacitor.config.js +0 -15
  190. package/dist/fixtures/plugins/commitlint/commitlint.config.d.ts +0 -2
  191. package/dist/fixtures/plugins/commitlint/commitlint.config.js +0 -2
  192. package/dist/fixtures/plugins/cypress/cypress/support/commands.d.ts +0 -1
  193. package/dist/fixtures/plugins/cypress/cypress/support/commands.js +0 -5
  194. package/dist/fixtures/plugins/cypress/cypress/support/e2e.d.ts +0 -2
  195. package/dist/fixtures/plugins/cypress/cypress/support/e2e.js +0 -2
  196. package/dist/fixtures/plugins/cypress/cypress.config.d.ts +0 -2
  197. package/dist/fixtures/plugins/cypress/cypress.config.js +0 -9
  198. package/dist/fixtures/plugins/eslint/eslint.config.d.ts +0 -7
  199. package/dist/fixtures/plugins/eslint/eslint.config.js +0 -11
  200. package/dist/fixtures/plugins/eslint/index.d.ts +0 -1
  201. package/dist/fixtures/plugins/eslint/index.js +0 -1
  202. package/dist/fixtures/plugins/gatsby/gatsby-config.d.ts +0 -17
  203. package/dist/fixtures/plugins/gatsby/gatsby-config.js +0 -40
  204. package/dist/fixtures/plugins/gatsby/gatsby-node.d.ts +0 -3
  205. package/dist/fixtures/plugins/gatsby/gatsby-node.js +0 -15
  206. package/dist/fixtures/plugins/github-actions/comment.d.ts +0 -0
  207. package/dist/fixtures/plugins/github-actions/comment.js +0 -1
  208. package/dist/fixtures/plugins/github-actions/scripts/check-dependencies.d.ts +0 -0
  209. package/dist/fixtures/plugins/github-actions/scripts/check-dependencies.js +0 -1
  210. package/dist/fixtures/plugins/jest/jest.config.d.ts +0 -2
  211. package/dist/fixtures/plugins/jest/jest.config.js +0 -7
  212. package/dist/fixtures/plugins/jest/jest.config.shared.d.ts +0 -2
  213. package/dist/fixtures/plugins/jest/jest.config.shared.js +0 -15
  214. package/dist/fixtures/plugins/jest/jest.setup.d.ts +0 -1
  215. package/dist/fixtures/plugins/jest/jest.setup.js +0 -1
  216. package/dist/fixtures/plugins/jest/jest.transform.d.ts +0 -1
  217. package/dist/fixtures/plugins/jest/jest.transform.js +0 -2
  218. package/dist/fixtures/plugins/lefthook/example.d.mts +0 -2
  219. package/dist/fixtures/plugins/lefthook/example.mjs +0 -1
  220. package/dist/fixtures/plugins/next/next.config.d.ts +0 -2
  221. package/dist/fixtures/plugins/next/next.config.js +0 -9
  222. package/dist/fixtures/plugins/next/pages/[[...route]].d.ts +0 -3
  223. package/dist/fixtures/plugins/next/pages/[[...route]].jsx +0 -3
  224. package/dist/fixtures/plugins/next/pages/page.d.ts +0 -3
  225. package/dist/fixtures/plugins/next/pages/page.jsx +0 -3
  226. package/dist/fixtures/plugins/playwright/playwright.config.d.ts +0 -3
  227. package/dist/fixtures/plugins/playwright/playwright.config.js +0 -10
  228. package/dist/fixtures/plugins/playwright/test/some.spec.d.ts +0 -1
  229. package/dist/fixtures/plugins/playwright/test/some.spec.js +0 -6
  230. package/dist/fixtures/plugins/postcss/postcss.config.d.ts +0 -1
  231. package/dist/fixtures/plugins/postcss/postcss.config.js +0 -4
  232. package/dist/fixtures/plugins/remix/app/entry.client.d.ts +0 -1
  233. package/dist/fixtures/plugins/remix/app/entry.client.jsx +0 -11
  234. package/dist/fixtures/plugins/remix/app/entry.server.jsx +0 -3
  235. package/dist/fixtures/plugins/remix/app/root.d.ts +0 -5
  236. package/dist/fixtures/plugins/remix/app/root.jsx +0 -31
  237. package/dist/fixtures/plugins/remix/app/routes/index.d.ts +0 -1
  238. package/dist/fixtures/plugins/remix/app/routes/index.jsx +0 -8
  239. package/dist/fixtures/plugins/remix/app/utils.d.ts +0 -1
  240. package/dist/fixtures/plugins/remix/app/utils.js +0 -1
  241. package/dist/fixtures/plugins/remix/remix.config.d.ts +0 -2
  242. package/dist/fixtures/plugins/remix/remix.config.js +0 -5
  243. package/dist/fixtures/plugins/remix/remix.init/index.d.ts +0 -4
  244. package/dist/fixtures/plugins/remix/remix.init/index.js +0 -4
  245. package/dist/fixtures/plugins/remix/server.d.ts +0 -0
  246. package/dist/fixtures/plugins/remix/server.js +0 -1
  247. package/dist/fixtures/plugins/rollup/rollup.config.d.ts +0 -16
  248. package/dist/fixtures/plugins/rollup/rollup.config.js +0 -26
  249. package/dist/fixtures/plugins/sentry/sentry.client.config.d.ts +0 -1
  250. package/dist/fixtures/plugins/sentry/sentry.client.config.js +0 -6
  251. package/dist/fixtures/plugins/sentry/sentry.server.config.d.ts +0 -1
  252. package/dist/fixtures/plugins/sentry/sentry.server.config.js +0 -1
  253. package/dist/fixtures/plugins/storybook/addon/register.d.ts +0 -0
  254. package/dist/fixtures/plugins/storybook/addon/register.js +0 -1
  255. package/dist/fixtures/plugins/storybook/main.d.ts +0 -10
  256. package/dist/fixtures/plugins/storybook/main.js +0 -38
  257. package/dist/fixtures/plugins/storybook/preview.d.ts +0 -13
  258. package/dist/fixtures/plugins/storybook/preview.js +0 -14
  259. package/dist/fixtures/plugins/stryker/stryker.conf.cjs +0 -6
  260. package/dist/fixtures/plugins/stryker/stryker.conf.d.cts +0 -3
  261. package/dist/fixtures/plugins/stryker/stryker.conf.d.mts +0 -6
  262. package/dist/fixtures/plugins/stryker/stryker.conf.mjs +0 -6
  263. package/dist/fixtures/plugins/svelte/knip.d.ts +0 -11
  264. package/dist/fixtures/plugins/svelte/knip.js +0 -10
  265. package/dist/fixtures/plugins/svelte/src/routes/+page.d.ts +0 -1
  266. package/dist/fixtures/plugins/svelte/src/routes/+page.js +0 -1
  267. package/dist/fixtures/plugins/svelte/svelte.config.d.ts +0 -2
  268. package/dist/fixtures/plugins/svelte/svelte.config.js +0 -9
  269. package/dist/fixtures/plugins/svelte/vite.config.d.ts +0 -2
  270. package/dist/fixtures/plugins/svelte/vite.config.js +0 -5
  271. package/dist/fixtures/plugins/vitest/test/basic.spec.d.ts +0 -1
  272. package/dist/fixtures/plugins/vitest/test/basic.spec.js +0 -8
  273. package/dist/fixtures/plugins/vitest/vite.config.d.ts +0 -2
  274. package/dist/fixtures/plugins/vitest/vite.config.js +0 -10
  275. package/dist/fixtures/plugins/vitest/vitest.config.d.ts +0 -2
  276. package/dist/fixtures/plugins/vitest/vitest.config.js +0 -10
  277. package/dist/fixtures/plugins/webpack/merge.d.ts +0 -2
  278. package/dist/fixtures/plugins/webpack/merge.js +0 -9
  279. package/dist/fixtures/plugins/webpack/src/app-dep.d.ts +0 -2
  280. package/dist/fixtures/plugins/webpack/src/app-dep.js +0 -1
  281. package/dist/fixtures/plugins/webpack/src/app.d.ts +0 -1
  282. package/dist/fixtures/plugins/webpack/src/app.js +0 -1
  283. package/dist/fixtures/plugins/webpack/src/entry.d.ts +0 -0
  284. package/dist/fixtures/plugins/webpack/src/entry.js +0 -1
  285. package/dist/fixtures/plugins/webpack/src/unused.d.ts +0 -0
  286. package/dist/fixtures/plugins/webpack/src/unused.js +0 -1
  287. package/dist/fixtures/plugins/webpack/src/vendor.d.ts +0 -0
  288. package/dist/fixtures/plugins/webpack/src/vendor.js +0 -1
  289. package/dist/fixtures/plugins/webpack/webpack.common.d.ts +0 -65
  290. package/dist/fixtures/plugins/webpack/webpack.common.js +0 -81
  291. package/dist/fixtures/plugins/webpack/webpack.config.d.ts +0 -2
  292. package/dist/fixtures/plugins/webpack/webpack.config.js +0 -4
  293. package/dist/fixtures/plugins/webpack/webpack.dev.d.ts +0 -2
  294. package/dist/fixtures/plugins/webpack/webpack.dev.js +0 -19
  295. package/dist/fixtures/plugins/webpack/webpack.prod.d.ts +0 -2
  296. package/dist/fixtures/plugins/webpack/webpack.prod.js +0 -16
  297. package/dist/fixtures/re-exports/barrel.d.ts +0 -1
  298. package/dist/fixtures/re-exports/barrel.js +0 -1
  299. package/dist/fixtures/re-exports/entry.d.ts +0 -1
  300. package/dist/fixtures/re-exports/entry.js +0 -2
  301. package/dist/fixtures/re-exports/my-module.d.ts +0 -4
  302. package/dist/fixtures/re-exports/my-module.js +0 -6
  303. package/dist/fixtures/react/App.d.ts +0 -1
  304. package/dist/fixtures/react/App.jsx +0 -7
  305. package/dist/fixtures/react/Component.d.ts +0 -1
  306. package/dist/fixtures/react/Component.jsx +0 -4
  307. package/dist/fixtures/self-reference/entry.d.ts +0 -1
  308. package/dist/fixtures/self-reference/entry.js +0 -8
  309. package/dist/fixtures/self-reference/lib/module.d.ts +0 -2
  310. package/dist/fixtures/self-reference/lib/module.js +0 -1
  311. package/dist/fixtures/self-reference/out/entry.d.ts +0 -1
  312. package/dist/fixtures/self-reference/out/entry.js +0 -11
  313. package/dist/fixtures/self-reference/out/lib/module.d.mts +0 -3
  314. package/dist/fixtures/self-reference/out/lib/module.mjs +0 -4
  315. package/dist/fixtures/self-reference-from-plugin/entry.d.ts +0 -0
  316. package/dist/fixtures/self-reference-from-plugin/entry.js +0 -2
  317. package/dist/fixtures/self-reference-from-plugin/file.d.ts +0 -2
  318. package/dist/fixtures/self-reference-from-plugin/file.js +0 -1
  319. package/dist/fixtures/tsconfig-paths/aliased-dir/a.d.ts +0 -1
  320. package/dist/fixtures/tsconfig-paths/aliased-dir/a.js +0 -1
  321. package/dist/fixtures/tsconfig-paths/index.d.ts +0 -1
  322. package/dist/fixtures/tsconfig-paths/index.js +0 -6
  323. package/dist/fixtures/tsconfig-paths/internal-package/index.d.ts +0 -2
  324. package/dist/fixtures/tsconfig-paths/internal-package/index.js +0 -2
  325. package/dist/fixtures/tsconfig-paths/unprefixed/module.d.ts +0 -2
  326. package/dist/fixtures/tsconfig-paths/unprefixed/module.js +0 -2
  327. package/dist/fixtures/tsconfig-paths-extends/src/cli.d.ts +0 -1
  328. package/dist/fixtures/tsconfig-paths-extends/src/cli.js +0 -3
  329. package/dist/fixtures/tsconfig-paths-extends/src/index.d.ts +0 -3
  330. package/dist/fixtures/tsconfig-paths-extends/src/index.js +0 -3
  331. package/dist/fixtures/tsconfig-paths-extends/src/lib/main.d.ts +0 -2
  332. package/dist/fixtures/tsconfig-paths-extends/src/lib/main.js +0 -1
  333. package/dist/fixtures/tsconfig-paths-extends/src/util/index.d.ts +0 -2
  334. package/dist/fixtures/tsconfig-paths-extends/src/util/index.js +0 -1
  335. package/dist/fixtures/tsconfig-paths-implicit/src/hello/world.d.ts +0 -1
  336. package/dist/fixtures/tsconfig-paths-implicit/src/hello/world.js +0 -1
  337. package/dist/fixtures/tsconfig-paths-implicit/src/index.d.ts +0 -1
  338. package/dist/fixtures/tsconfig-paths-implicit/src/index.js +0 -2
  339. package/dist/fixtures/workspaces/apps/a/index.d.ts +0 -1
  340. package/dist/fixtures/workspaces/apps/a/index.js +0 -6
  341. package/dist/fixtures/workspaces/apps/b/index.d.ts +0 -1
  342. package/dist/fixtures/workspaces/apps/b/index.js +0 -4
  343. package/dist/fixtures/workspaces/docs/dangling.d.ts +0 -1
  344. package/dist/fixtures/workspaces/docs/dangling.js +0 -1
  345. package/dist/fixtures/workspaces/packages/lib-a/index.d.ts +0 -4
  346. package/dist/fixtures/workspaces/packages/lib-a/index.js +0 -3
  347. package/dist/fixtures/workspaces/packages/lib-b/ignored/index.d.ts +0 -0
  348. package/dist/fixtures/workspaces/packages/lib-b/ignored/index.js +0 -1
  349. package/dist/fixtures/workspaces/packages/lib-b/index.d.ts +0 -3
  350. package/dist/fixtures/workspaces/packages/lib-b/index.js +0 -2
  351. package/dist/fixtures/workspaces-nested/level-1-1/index.d.ts +0 -1
  352. package/dist/fixtures/workspaces-nested/level-1-1/index.js +0 -1
  353. package/dist/fixtures/workspaces-nested/level-1-1/index.spec.d.ts +0 -1
  354. package/dist/fixtures/workspaces-nested/level-1-1/index.spec.js +0 -1
  355. package/dist/fixtures/workspaces-nested/level-1-1/level-1-2/index.d.ts +0 -1
  356. package/dist/fixtures/workspaces-nested/level-1-1/level-1-2/index.js +0 -1
  357. package/dist/fixtures/workspaces-nested/level-1-1/level-1-2/index.spec.d.ts +0 -1
  358. package/dist/fixtures/workspaces-nested/level-1-1/level-1-2/index.spec.js +0 -1
  359. package/dist/fixtures/workspaces-nested/level-1-1/level-1-2/level-1-3/index.d.ts +0 -1
  360. package/dist/fixtures/workspaces-nested/level-1-1/level-1-2/level-1-3/index.js +0 -1
  361. package/dist/fixtures/workspaces-nested/level-1-1/level-1-2/level-1-3/index.spec.d.ts +0 -1
  362. package/dist/fixtures/workspaces-nested/level-1-1/level-1-2/level-1-3/index.spec.js +0 -1
  363. package/dist/fixtures/workspaces-paths/packages/lib-a/src/dir/module-a.d.ts +0 -2
  364. package/dist/fixtures/workspaces-paths/packages/lib-a/src/dir/module-a.js +0 -1
  365. package/dist/fixtures/workspaces-paths/packages/lib-a/src/index.d.ts +0 -2
  366. package/dist/fixtures/workspaces-paths/packages/lib-a/src/index.js +0 -2
  367. package/dist/fixtures/workspaces-paths/packages/lib-a/src/same.d.ts +0 -2
  368. package/dist/fixtures/workspaces-paths/packages/lib-a/src/same.js +0 -1
  369. package/dist/fixtures/workspaces-paths/packages/lib-b/src/dir/module-b.d.ts +0 -2
  370. package/dist/fixtures/workspaces-paths/packages/lib-b/src/dir/module-b.js +0 -1
  371. package/dist/fixtures/workspaces-paths/packages/lib-b/src/index.d.ts +0 -2
  372. package/dist/fixtures/workspaces-paths/packages/lib-b/src/index.js +0 -2
  373. package/dist/fixtures/workspaces-paths/packages/lib-c/src/dir/module.d.ts +0 -2
  374. package/dist/fixtures/workspaces-paths/packages/lib-c/src/dir/module.js +0 -1
  375. package/dist/fixtures/workspaces-paths/packages/lib-c/src/index.d.ts +0 -2
  376. package/dist/fixtures/workspaces-paths/packages/lib-c/src/index.js +0 -2
  377. package/dist/fixtures/workspaces-paths/packages/lib-d/src/dir/module.d.ts +0 -2
  378. package/dist/fixtures/workspaces-paths/packages/lib-d/src/dir/module.js +0 -1
  379. package/dist/fixtures/workspaces-paths/packages/lib-d/src/index.d.ts +0 -2
  380. package/dist/fixtures/workspaces-paths/packages/lib-d/src/index.js +0 -2
  381. package/dist/fixtures/workspaces-paths/packages/lib-e/src/dir/module-e.d.ts +0 -2
  382. package/dist/fixtures/workspaces-paths/packages/lib-e/src/dir/module-e.js +0 -1
  383. package/dist/fixtures/workspaces-paths/packages/lib-e/src/index.d.ts +0 -2
  384. package/dist/fixtures/workspaces-paths/packages/lib-e/src/index.js +0 -2
  385. package/dist/fixtures/workspaces-pnpm/apps/a/index.d.ts +0 -1
  386. package/dist/fixtures/workspaces-pnpm/apps/a/index.js +0 -6
  387. package/dist/fixtures/workspaces-pnpm/apps/b/index.d.ts +0 -1
  388. package/dist/fixtures/workspaces-pnpm/apps/b/index.js +0 -4
  389. package/dist/fixtures/workspaces-pnpm/docs/dangling.d.ts +0 -1
  390. package/dist/fixtures/workspaces-pnpm/docs/dangling.js +0 -1
  391. package/dist/fixtures/workspaces-pnpm/packages/lib-a/index.d.ts +0 -4
  392. package/dist/fixtures/workspaces-pnpm/packages/lib-a/index.js +0 -3
  393. package/dist/fixtures/workspaces-pnpm/packages/lib-b/index.d.ts +0 -3
  394. package/dist/fixtures/workspaces-pnpm/packages/lib-b/index.js +0 -2
  395. package/dist/fixtures/workspaces-self-reference/packages/self-reference/entry.d.ts +0 -1
  396. package/dist/fixtures/workspaces-self-reference/packages/self-reference/entry.js +0 -4
  397. package/dist/fixtures/workspaces-self-reference/packages/self-reference-from-plugin/entry.d.ts +0 -0
  398. package/dist/fixtures/workspaces-self-reference/packages/self-reference-from-plugin/entry.js +0 -2
  399. package/dist/fixtures/workspaces-self-reference/packages/self-reference-from-plugin/file.d.ts +0 -2
  400. package/dist/fixtures/workspaces-self-reference/packages/self-reference-from-plugin/file.js +0 -1
  401. package/dist/fixtures/zero-config/exclude.d.ts +0 -1
  402. package/dist/fixtures/zero-config/exclude.js +0 -1
  403. package/dist/fixtures/zero-config/index.d.ts +0 -1
  404. package/dist/fixtures/zero-config/index.js +0 -2
  405. package/dist/fixtures/zero-config/my-module.d.ts +0 -4
  406. package/dist/fixtures/zero-config/my-module.js +0 -6
  407. package/dist/fixtures/zero-config/my-namespace.d.ts +0 -5
  408. package/dist/fixtures/zero-config/my-namespace.js +0 -3
  409. package/dist/gitignore.test.d.ts +0 -1
  410. package/dist/gitignore.test.js +0 -22
  411. package/dist/helpers/baseArguments.d.ts +0 -8
  412. package/dist/helpers/baseArguments.js +0 -8
  413. package/dist/helpers/baseCounters.d.ts +0 -17
  414. package/dist/helpers/baseCounters.js +0 -7
  415. package/dist/helpers/index.d.ts +0 -2
  416. package/dist/helpers/index.js +0 -4
  417. package/dist/imports.test.d.ts +0 -1
  418. package/dist/imports.test.js +0 -39
  419. package/dist/js-only.test.d.ts +0 -1
  420. package/dist/js-only.test.js +0 -26
  421. package/dist/jsdoc.test.d.ts +0 -1
  422. package/dist/jsdoc.test.js +0 -21
  423. package/dist/members.test.d.ts +0 -1
  424. package/dist/members.test.js +0 -28
  425. package/dist/namespace.test.d.ts +0 -1
  426. package/dist/namespace.test.js +0 -18
  427. package/dist/npm-scripts.test.d.ts +0 -1
  428. package/dist/npm-scripts.test.js +0 -78
  429. package/dist/pathless.test.d.ts +0 -1
  430. package/dist/pathless.test.js +0 -14
  431. package/dist/paths-knip-config-workspaces.test.d.ts +0 -1
  432. package/dist/paths-knip-config-workspaces.test.js +0 -18
  433. package/dist/paths-knip-config.test.d.ts +0 -1
  434. package/dist/paths-knip-config.test.js +0 -18
  435. package/dist/peer-dependencies.test.d.ts +0 -1
  436. package/dist/peer-dependencies.test.js +0 -20
  437. package/dist/plugins/_template.test.d.ts +0 -1
  438. package/dist/plugins/_template.test.js +0 -12
  439. package/dist/plugins/ava.test.d.ts +0 -1
  440. package/dist/plugins/ava.test.js +0 -18
  441. package/dist/plugins/babel.test.d.ts +0 -1
  442. package/dist/plugins/babel.test.js +0 -62
  443. package/dist/plugins/capacitor.test.d.ts +0 -1
  444. package/dist/plugins/capacitor.test.js +0 -31
  445. package/dist/plugins/changesets.test.d.ts +0 -1
  446. package/dist/plugins/changesets.test.js +0 -12
  447. package/dist/plugins/commitlint.test.d.ts +0 -1
  448. package/dist/plugins/commitlint.test.js +0 -22
  449. package/dist/plugins/cspell.test.d.ts +0 -1
  450. package/dist/plugins/cspell.test.js +0 -10
  451. package/dist/plugins/cypress.test.d.ts +0 -1
  452. package/dist/plugins/cypress.test.js +0 -23
  453. package/dist/plugins/eslint.test.d.ts +0 -1
  454. package/dist/plugins/eslint.test.js +0 -43
  455. package/dist/plugins/gatsby.test.d.ts +0 -1
  456. package/dist/plugins/gatsby.test.js +0 -31
  457. package/dist/plugins/github-actions.test.d.ts +0 -1
  458. package/dist/plugins/github-actions.test.js +0 -25
  459. package/dist/plugins/husky.test.d.ts +0 -1
  460. package/dist/plugins/husky.test.js +0 -32
  461. package/dist/plugins/jest.test.d.ts +0 -1
  462. package/dist/plugins/jest.test.js +0 -18
  463. package/dist/plugins/lefthook.test.d.ts +0 -1
  464. package/dist/plugins/lefthook.test.js +0 -16
  465. package/dist/plugins/lint-staged.test.d.ts +0 -1
  466. package/dist/plugins/lint-staged.test.js +0 -18
  467. package/dist/plugins/markdownlint.test.d.ts +0 -1
  468. package/dist/plugins/markdownlint.test.js +0 -12
  469. package/dist/plugins/mocha.test.d.ts +0 -1
  470. package/dist/plugins/mocha.test.js +0 -22
  471. package/dist/plugins/next.test.d.ts +0 -1
  472. package/dist/plugins/next.test.js +0 -24
  473. package/dist/plugins/npm-package-json-lint.test.d.ts +0 -1
  474. package/dist/plugins/npm-package-json-lint.test.js +0 -12
  475. package/dist/plugins/nx.test.d.ts +0 -1
  476. package/dist/plugins/nx.test.js +0 -15
  477. package/dist/plugins/nyc.test.d.ts +0 -1
  478. package/dist/plugins/nyc.test.js +0 -10
  479. package/dist/plugins/playwright.test.d.ts +0 -1
  480. package/dist/plugins/playwright.test.js +0 -20
  481. package/dist/plugins/postcss.test.d.ts +0 -1
  482. package/dist/plugins/postcss.test.js +0 -33
  483. package/dist/plugins/prettier.test.d.ts +0 -1
  484. package/dist/plugins/prettier.test.js +0 -10
  485. package/dist/plugins/release-it.test.d.ts +0 -1
  486. package/dist/plugins/release-it.test.js +0 -10
  487. package/dist/plugins/remark.test.d.ts +0 -1
  488. package/dist/plugins/remark.test.js +0 -12
  489. package/dist/plugins/remix.test.d.ts +0 -1
  490. package/dist/plugins/remix.test.js +0 -39
  491. package/dist/plugins/rollup.test.d.ts +0 -1
  492. package/dist/plugins/rollup.test.js +0 -24
  493. package/dist/plugins/semantic-release.test.d.ts +0 -1
  494. package/dist/plugins/semantic-release.test.js +0 -31
  495. package/dist/plugins/sentry.test.d.ts +0 -1
  496. package/dist/plugins/sentry.test.js +0 -14
  497. package/dist/plugins/storybook.test.d.ts +0 -1
  498. package/dist/plugins/storybook.test.js +0 -18
  499. package/dist/plugins/stryker.test.d.ts +0 -1
  500. package/dist/plugins/stryker.test.js +0 -44
  501. package/dist/plugins/svelte.test.d.ts +0 -1
  502. package/dist/plugins/svelte.test.js +0 -21
  503. package/dist/plugins/typedoc.test.d.ts +0 -1
  504. package/dist/plugins/typedoc.test.js +0 -14
  505. package/dist/plugins/vitest.test.d.ts +0 -1
  506. package/dist/plugins/vitest.test.js +0 -17
  507. package/dist/plugins/webpack.test.d.ts +0 -1
  508. package/dist/plugins/webpack.test.js +0 -56
  509. package/dist/re-exports.test.d.ts +0 -1
  510. package/dist/re-exports.test.js +0 -18
  511. package/dist/react.test.d.ts +0 -1
  512. package/dist/react.test.js +0 -19
  513. package/dist/self-reference-from-plugin.test.d.ts +0 -1
  514. package/dist/self-reference-from-plugin.test.js +0 -47
  515. package/dist/self-reference.test.d.ts +0 -1
  516. package/dist/self-reference.test.js +0 -46
  517. package/dist/source-lab.d.ts +0 -21
  518. package/dist/source-lab.js +0 -135
  519. package/dist/tsconfig-paths-extends.test.d.ts +0 -1
  520. package/dist/tsconfig-paths-extends.test.js +0 -18
  521. package/dist/tsconfig-paths-implicit.test.d.ts +0 -1
  522. package/dist/tsconfig-paths-implicit.test.js +0 -18
  523. package/dist/tsconfig-paths.test.d.ts +0 -1
  524. package/dist/tsconfig-paths.test.js +0 -26
  525. package/dist/util/binaries/bash-parser.d.ts +0 -6
  526. package/dist/util/binaries/bash-parser.js +0 -57
  527. package/dist/util/binaries/index.d.ts +0 -2
  528. package/dist/util/binaries/index.js +0 -27
  529. package/dist/util/binaries/resolvers/fallback.js +0 -14
  530. package/dist/util/binaries/resolvers/index.d.ts +0 -4
  531. package/dist/util/binaries/resolvers/index.js +0 -4
  532. package/dist/util/binaries/resolvers/node.d.ts +0 -3
  533. package/dist/util/binaries/resolvers/node.js +0 -20
  534. package/dist/util/binaries/resolvers/npx.d.ts +0 -2
  535. package/dist/util/binaries/resolvers/npx.js +0 -5
  536. package/dist/util/binaries/resolvers/pnpm.d.ts +0 -2
  537. package/dist/util/binaries/resolvers/pnpm.js +0 -45
  538. package/dist/util/binaries/resolvers/yarn.d.ts +0 -2
  539. package/dist/util/binaries/resolvers/yarn.js +0 -46
  540. package/dist/util/binaries/types.d.ts +0 -18
  541. package/dist/util/binaries/types.js +0 -1
  542. package/dist/util/find-import-specifiers.d.ts +0 -5
  543. package/dist/util/find-import-specifiers.js +0 -48
  544. package/dist/util/get-included-issue-types.test.d.ts +0 -1
  545. package/dist/util/get-included-issue-types.test.js +0 -70
  546. package/dist/util/getReferencesFromScripts.test.d.ts +0 -1
  547. package/dist/util/getReferencesFromScripts.test.js +0 -126
  548. package/dist/util/log.d.ts +0 -7
  549. package/dist/util/log.js +0 -21
  550. package/dist/util/members.d.ts +0 -3
  551. package/dist/util/members.js +0 -25
  552. package/dist/util/module.test.d.ts +0 -1
  553. package/dist/util/module.test.js +0 -12
  554. package/dist/util/os.d.ts +0 -1
  555. package/dist/util/os.js +0 -1
  556. package/dist/util/project.d.ts +0 -13
  557. package/dist/util/project.js +0 -48
  558. package/dist/util/resolve-included-issue-types.d.ts +0 -16
  559. package/dist/util/resolve-included-issue-types.js +0 -30
  560. package/dist/util/type.d.ts +0 -2
  561. package/dist/util/type.js +0 -9
  562. package/dist/util/workspace.test.d.ts +0 -1
  563. package/dist/util/workspace.test.js +0 -13
  564. package/dist/workspaces-nested.test.d.ts +0 -1
  565. package/dist/workspaces-nested.test.js +0 -44
  566. package/dist/workspaces-paths.test.d.ts +0 -1
  567. package/dist/workspaces-paths.test.js +0 -21
  568. package/dist/workspaces-pnpm.test.d.ts +0 -1
  569. package/dist/workspaces-pnpm.test.js +0 -21
  570. package/dist/workspaces.test.d.ts +0 -1
  571. package/dist/workspaces.test.js +0 -56
  572. package/dist/zero-config.test.d.ts +0 -1
  573. package/dist/zero-config.test.js +0 -37
  574. /package/dist/{util/binaries/resolvers/fallback.d.ts → binaries/resolvers/rollup.d.ts} +0 -0
@@ -1,12 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as changesets from '../../src/plugins/changesets/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- const cwd = resolve('tests/fixtures/plugins/changesets');
6
- test('Find dependencies in Changesets configuration', async () => {
7
- const configFilePaths = changesets.CONFIG_FILE_PATTERNS.map(filePath => join(cwd, filePath));
8
- for (const configFilePath of configFilePaths) {
9
- const dependencies = await changesets.findDependencies(configFilePath);
10
- assert.deepEqual(dependencies, ['@changesets/changelog-github']);
11
- }
12
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as commitlint from '../../src/plugins/commitlint/index.js';
4
- import { join, resolve } from '../../src/util/path.js';
5
- import { getManifest } from '../helpers/index.js';
6
- const cwd = resolve('tests/fixtures/plugins/commitlint');
7
- const manifest = getManifest(cwd);
8
- test('Find dependencies in commitlint configuration (js)', async () => {
9
- const configFilePath = join(cwd, 'commitlint.config.js');
10
- const dependencies = await commitlint.findDependencies(configFilePath, {});
11
- assert.deepEqual(dependencies, ['@commitlint/config-conventional']);
12
- });
13
- test('Find dependencies in commitlint configuration (json)', async () => {
14
- const configFilePath = join(cwd, '.commitlintrc.json');
15
- const dependencies = await commitlint.findDependencies(configFilePath, {});
16
- assert.deepEqual(dependencies, ['@commitlint/config-conventional']);
17
- });
18
- test('Find dependencies in commitlint configuration (package.json)', async () => {
19
- const configFilePath = join(cwd, 'package.json');
20
- const dependencies = await commitlint.findDependencies(configFilePath, { manifest });
21
- assert.deepEqual(dependencies, ['@commitlint/config-conventional']);
22
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import path from 'node:path';
3
- import test from 'node:test';
4
- import * as cspell from '../../src/plugins/cspell/index.js';
5
- const cwd = path.resolve('tests/fixtures/plugins/cspell');
6
- test('Find dependencies in cspell configuration (json)', async () => {
7
- const configFilePath = path.join(cwd, '.cspell.json');
8
- const dependencies = await cspell.findDependencies(configFilePath, {});
9
- assert.deepEqual(dependencies, ['@cspell/dict-cryptocurrencies/cspell-ext.json']);
10
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,23 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import { main } from '../../src/index.js';
4
- import { resolve } from '../../src/util/path.js';
5
- import baseArguments from '../helpers/baseArguments.js';
6
- import baseCounters from '../helpers/baseCounters.js';
7
- const cwd = resolve('tests/fixtures/plugins/cypress');
8
- test('Find dependencies in Cypress configuration', async () => {
9
- const { issues, counters } = await main({
10
- ...baseArguments,
11
- cwd,
12
- });
13
- assert(issues.unlisted['cypress.config.ts']['@nrwl/cypress/plugins/cypress-preset']);
14
- assert(issues.unlisted['cypress/support/commands.ts']['@faker-js/faker']);
15
- assert(issues.unlisted['cypress/support/e2e.ts']['@testing-library/cypress/add-commands']);
16
- assert.deepEqual(counters, {
17
- ...baseCounters,
18
- devDependencies: 0,
19
- unlisted: 3,
20
- processed: 3,
21
- total: 3,
22
- });
23
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,43 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as eslint from '../../src/plugins/eslint/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- import { getManifest } from '../helpers/index.js';
6
- const cwd = resolve('tests/fixtures/plugins/eslint');
7
- const manifest = getManifest(cwd);
8
- const workspaceConfig = {
9
- entry: ['index.{js,ts,tsx}', 'src/index.{js,ts,tsx}'],
10
- project: ['**/*.{js,ts,tsx}'],
11
- ignore: [],
12
- };
13
- test('Find dependencies in ESLint configuration (legacy json)', async () => {
14
- const configFilePath = join(cwd, '.eslintrc.json');
15
- const dependencies = await eslint.findDependencies(configFilePath, { cwd, manifest, workspaceConfig });
16
- assert.deepEqual(dependencies, [
17
- 'eslint-plugin-import',
18
- '@typescript-eslint/parser',
19
- 'eslint-config-airbnb',
20
- '@typescript-eslint/eslint-plugin',
21
- 'eslint-plugin-prettier',
22
- 'eslint-config-prettier',
23
- ]);
24
- });
25
- test('Find dependencies in ESLint configuration (legacy js)', async () => {
26
- const configFilePath = join(cwd, '.eslintrc.js');
27
- const dependencies = await eslint.findDependencies(configFilePath, { cwd, manifest, workspaceConfig });
28
- assert.deepEqual(dependencies, [
29
- 'eslint-plugin-import',
30
- '@typescript-eslint/parser',
31
- 'eslint-config-airbnb',
32
- 'eslint-plugin-prettier',
33
- '@typescript-eslint/eslint-plugin',
34
- '@scope/eslint-config/file',
35
- 'eslint-config-prettier',
36
- '@nrwl/eslint-plugin-nx',
37
- ]);
38
- });
39
- test('Find dependencies in ESLint configuration (legacy yaml)', async () => {
40
- const configFilePath = join(cwd, '.eslintrc.yml');
41
- const dependencies = await eslint.findDependencies(configFilePath, { cwd, manifest, workspaceConfig });
42
- assert.deepEqual(dependencies, ['@sinonjs/eslint-config', '@sinonjs/eslint-plugin-no-prototype-methods']);
43
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,31 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as gatsby from '../../src/plugins/gatsby/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- const cwd = resolve('tests/fixtures/plugins/gatsby');
6
- test('Find dependencies in Gatsby configuration (gatsby-config.js)', async () => {
7
- const configFilePath = join(cwd, 'gatsby-config.js');
8
- const dependencies = await gatsby.findDependencies(configFilePath);
9
- assert.deepEqual(dependencies, [
10
- '@sentry/gatsby',
11
- 'gatsby-plugin-webpack-bundle-analyser-v2',
12
- 'gatsby-plugin-react-helmet',
13
- 'gatsby-plugin-postcss',
14
- 'gatsby-plugin-create-client-paths',
15
- 'gatsby-source-filesystem',
16
- 'gatsby-transformer-remark',
17
- 'gatsby-remark-node-identity',
18
- 'gatsby-remark-node-identity',
19
- 'gatsby-plugin-manifest',
20
- 'gatsby-plugin-remove-serviceworker',
21
- ]);
22
- });
23
- test('Find dependencies in Gatsby configuration (gatsby-node.js)', async () => {
24
- const configFilePath = join(cwd, 'gatsby-node.js');
25
- const dependencies = await gatsby.findDependencies(configFilePath);
26
- assert.deepEqual(dependencies, [
27
- '@babel/plugin-proposal-function-bind',
28
- '@babel/plugin-proposal-export-default-from',
29
- 'babel-plugin-transform-imports',
30
- ]);
31
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,25 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as GithubActions from '../../src/plugins/github-actions/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- import { getManifest } from '../helpers/index.js';
6
- const cwd = resolve('tests/fixtures/plugins/github-actions');
7
- const manifest = getManifest(cwd);
8
- const workspaceConfig = { ignoreBinaries: ['knip'] };
9
- test('Find dependencies in github-actions workflow configurations', async () => {
10
- const configFilePath = join(cwd, '.github/workflows/test.yml');
11
- const dependencies = await GithubActions.findDependencies(configFilePath, { manifest, workspaceConfig });
12
- assert.deepEqual(dependencies, [
13
- 'esbuild-register',
14
- 'playwright',
15
- 'prisma',
16
- 'eslint',
17
- 'release-it',
18
- 'nyc',
19
- 'retry-cli',
20
- 'curl',
21
- '@scope/retry-cli',
22
- 'changeset',
23
- 'wait-on',
24
- ]);
25
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,32 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import { main } from '../../src/index.js';
4
- import * as husky from '../../src/plugins/husky/index.js';
5
- import { resolve, join } from '../../src/util/path.js';
6
- import baseArguments from '../helpers/baseArguments.js';
7
- import baseCounters from '../helpers/baseCounters.js';
8
- import { getManifest } from '../helpers/index.js';
9
- const cwd = resolve('tests/fixtures/plugins/husky');
10
- const manifest = getManifest(cwd);
11
- const workspaceConfig = { ignoreBinaries: ['knip'] };
12
- test('Find dependencies in husky configuration (plugin)', async () => {
13
- const configFilePath = join(cwd, '.husky/pre-commit');
14
- const dependencies = await husky.findDependencies(configFilePath, { manifest, workspaceConfig });
15
- assert.deepEqual(dependencies, ['lint-staged', 'commitlint']);
16
- });
17
- test('Find dependencies in husky configuration (main)', async () => {
18
- const { issues, counters } = await main({
19
- ...baseArguments,
20
- cwd,
21
- });
22
- assert(issues.unlisted['.husky/pre-commit']['commitlint']);
23
- assert(issues.unlisted['.husky/pre-push']['jest']);
24
- assert(issues.unlisted['.husky/pre-push']['pretty-quick']);
25
- assert(issues.unlisted['.husky/pre-rebase']['eslint']);
26
- assert.deepEqual(counters, {
27
- ...baseCounters,
28
- unlisted: 4,
29
- processed: 0,
30
- total: 0,
31
- });
32
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,18 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import path from 'node:path';
3
- import test from 'node:test';
4
- import * as jest from '../../src/plugins/jest/index.js';
5
- import { resolve, join } from '../../src/util/path.js';
6
- const cwd = resolve('tests/fixtures/plugins/jest');
7
- test('Find dependencies in Jest configuration (jest.config.js)', async () => {
8
- const configFilePath = join(cwd, 'jest.config.js');
9
- const dependencies = await jest.findDependencies(configFilePath, { cwd });
10
- assert.deepEqual(dependencies, [
11
- 'jest-environment-jsdom',
12
- path.join(cwd, 'node_modules/jest-watch-select-projects/index.js'),
13
- join(cwd, 'jest.setup.js'),
14
- '@nrwl/react/plugins/jest',
15
- 'babel-jest',
16
- join(cwd, 'jest.transform.js'),
17
- ]);
18
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,16 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as lefthook from '../../src/plugins/lefthook/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- import { getManifest } from '../helpers/index.js';
6
- const cwd = resolve('tests/fixtures/plugins/lefthook');
7
- const manifest = getManifest(cwd);
8
- test('Find dependencies in lefthook configuration (json)', async () => {
9
- const configFilePath = join(cwd, 'lefthook.yml');
10
- const dependencies = await lefthook.findDependencies(configFilePath, {
11
- manifest,
12
- cwd,
13
- workspaceConfig: { ignoreBinaries: [] },
14
- });
15
- assert.deepEqual(dependencies, ['eslint', join(cwd, 'example.mjs')]);
16
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,18 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as lintStaged from '../../src/plugins/lint-staged/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- import { getManifest } from '../helpers/index.js';
6
- const cwd = resolve('tests/fixtures/plugins/lint-staged');
7
- const manifest = getManifest(cwd);
8
- const workspaceConfig = { ignoreBinaries: [] };
9
- test('Find dependencies in lint-staged configuration (json)', async () => {
10
- const configFilePath = join(cwd, 'package.json');
11
- const dependencies = await lintStaged.findDependencies(configFilePath, { manifest, workspaceConfig });
12
- assert.deepEqual(dependencies, ['eslint', 'prettier']);
13
- });
14
- test('Find dependencies in lint-staged configuration (js)', async () => {
15
- const configFilePath = join(cwd, '.lintstagedrc.js');
16
- const dependencies = await lintStaged.findDependencies(configFilePath, { manifest, workspaceConfig });
17
- assert.deepEqual(dependencies, ['eslint', 'prettier']);
18
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as markdownlint from '../../src/plugins/markdownlint/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- import { getManifest } from '../helpers/index.js';
6
- const cwd = resolve('tests/fixtures/plugins/markdownlint');
7
- const manifest = getManifest(cwd);
8
- test('Find dependencies in markdownlint configuration (json)', async () => {
9
- const configFilePath = join(cwd, '.markdownlint.json');
10
- const dependencies = await markdownlint.findDependencies(configFilePath, { manifest });
11
- assert.deepEqual(dependencies, ['markdownlint/style/prettier', 'rule-package']);
12
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as mocha from '../../src/plugins/mocha/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- import { getManifest } from '../helpers/index.js';
6
- const cwd = resolve('tests/fixtures/plugins/mocha');
7
- const manifest = getManifest(cwd);
8
- test('Find dependencies in Mocha configuration (.mocharc.json)', async () => {
9
- const configFilePath = join(cwd, '.mocharc.json');
10
- const dependencies = await mocha.findDependencies(configFilePath, { manifest });
11
- assert.deepEqual(dependencies, ['ts-node/register']);
12
- });
13
- test('Find dependencies in Mocha configuration (package.json)', async () => {
14
- const configFilePath = join(cwd, 'package.json');
15
- const dependencies = await mocha.findDependencies(configFilePath, { manifest });
16
- assert.deepEqual(dependencies, ['ts-node/register']);
17
- });
18
- test('Find dependencies in Mocha configuration (.mocharc.yml)', async () => {
19
- const configFilePath = join(cwd, '.mocharc.yml');
20
- const dependencies = await mocha.findDependencies(configFilePath, { manifest });
21
- assert.deepEqual(dependencies, ['ts-node/register']);
22
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,24 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import { main } from '../../src/index.js';
4
- import { resolve } from '../../src/util/path.js';
5
- import baseArguments from '../helpers/baseArguments.js';
6
- import baseCounters from '../helpers/baseCounters.js';
7
- const cwd = resolve('tests/fixtures/plugins/next');
8
- test('Find dependencies in Next.js configuration', async () => {
9
- const { issues, counters } = await main({
10
- ...baseArguments,
11
- cwd,
12
- });
13
- assert(issues.unlisted['next.config.js']['next-transpile-modules']);
14
- assert(issues.unlisted['pages/[[...route]].tsx']['react']);
15
- assert(issues.unlisted['pages/[[...route]].tsx']['react-helmet']);
16
- assert(issues.unlisted['pages/page.tsx']['react']);
17
- assert.deepEqual(counters, {
18
- ...baseCounters,
19
- devDependencies: 0,
20
- unlisted: 4,
21
- processed: 3,
22
- total: 3,
23
- });
24
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as NpmPkgJsonLintConfig from '../../src/plugins/npm-package-json-lint/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- import { getManifest } from '../helpers/index.js';
6
- const cwd = resolve('tests/fixtures/plugins/npm-package-json-lint');
7
- const manifest = getManifest(cwd);
8
- test('Find dependencies in npm-package-json-lint configuration (json)', async () => {
9
- const configFilePath = join(cwd, '.npmpackagejsonlintrc.json');
10
- const dependencies = await NpmPkgJsonLintConfig.findDependencies(configFilePath, { manifest });
11
- assert.deepEqual(dependencies, ['npm-package-json-lint-config-default']);
12
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as nx from '../../src/plugins/nx/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- const cwd = resolve('tests/fixtures/plugins/nx');
6
- test('Find dependencies in Nx configuration (project.json)', async () => {
7
- const configFilePath = join(cwd, 'apps/a/project.json');
8
- const dependencies = await nx.findDependencies(configFilePath, { cwd });
9
- assert.deepEqual(dependencies, ['@nrwl/next', '@nrwl/linter', '@nrwl/cypress']);
10
- });
11
- test('Find dependencies in Nx configuration (project.json)', async () => {
12
- const configFilePath = join(cwd, 'libs/b/project.json');
13
- const dependencies = await nx.findDependencies(configFilePath, { cwd });
14
- assert.deepEqual(dependencies, ['nx', '@nrwl/jest', 'compodoc']);
15
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as nyc from '../../src/plugins/nyc/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- const cwd = resolve('tests/fixtures/plugins/nyc');
6
- test('Find dependencies in nyc configuration', async () => {
7
- const configFilePath = join(cwd, '.nycrc.json');
8
- const dependencies = await nyc.findDependencies(configFilePath);
9
- assert.deepEqual(dependencies, ['@istanbuljs/nyc-config-typescript']);
10
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,20 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import { main } from '../../src/index.js';
4
- import { resolve } from '../../src/util/path.js';
5
- import baseArguments from '../helpers/baseArguments.js';
6
- import baseCounters from '../helpers/baseCounters.js';
7
- const cwd = resolve('tests/fixtures/plugins/playwright');
8
- test('Find dependencies in Playwright configuration', async () => {
9
- const { counters } = await main({
10
- ...baseArguments,
11
- cwd,
12
- });
13
- assert.deepEqual(counters, {
14
- ...baseCounters,
15
- devDependencies: 0,
16
- unlisted: 0,
17
- processed: 2,
18
- total: 2,
19
- });
20
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,33 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import { main } from '../../src/index.js';
4
- import * as postcss from '../../src/plugins/postcss/index.js';
5
- import { resolve, join } from '../../src/util/path.js';
6
- import baseArguments from '../helpers/baseArguments.js';
7
- import baseCounters from '../helpers/baseCounters.js';
8
- import { getManifest } from '../helpers/index.js';
9
- const cwd = resolve('tests/fixtures/plugins/postcss');
10
- const manifestFilePath = join(cwd, 'package.json');
11
- const manifest = getManifest(cwd);
12
- test('Find dependencies in PostCSS configuration (package.json)', async () => {
13
- const dependencies = await postcss.findDependencies(manifestFilePath, { manifest });
14
- assert.deepEqual(dependencies, ['autoprefixer']);
15
- });
16
- test('Find dependencies in PostCSS configuration (postcss.config.js)', async () => {
17
- const configFilePath = join(cwd, 'postcss.config.js');
18
- const dependencies = await postcss.findDependencies(configFilePath, { manifest });
19
- assert.deepEqual(dependencies, []);
20
- });
21
- test('Find dependencies in PostCSS configuration (postcss.config.js function)', async () => {
22
- const { issues, counters } = await main({
23
- ...baseArguments,
24
- cwd,
25
- });
26
- assert(issues.unlisted['postcss.config.js']['autoprefixer']);
27
- assert.deepEqual(counters, {
28
- ...baseCounters,
29
- unlisted: 1,
30
- processed: 1,
31
- total: 1,
32
- });
33
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as prettier from '../../src/plugins/prettier/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- const cwd = resolve('tests/fixtures/plugins/prettier');
6
- test('Find dependencies in Prettier configuration', async () => {
7
- const configFilePath = join(cwd, '.prettierrc');
8
- const dependencies = await prettier.findDependencies(configFilePath, {});
9
- assert.deepEqual(dependencies, ['prettier-plugin-xml']);
10
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as releaseIt from '../../src/plugins/release-it/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- const cwd = resolve('tests/fixtures/plugins/release-it');
6
- test('Find dependencies in Release It configuration (json)', async () => {
7
- const configFilePath = join(cwd, '.release-it.json');
8
- const dependencies = await releaseIt.findDependencies(configFilePath, { cwd });
9
- assert.deepEqual(dependencies, ['@release-it/bumper', '@release-it/conventional-changelog', 'from-hook']);
10
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import * as remark from '../../src/plugins/remark/index.js';
4
- import { resolve, join } from '../../src/util/path.js';
5
- import { getManifest } from '../helpers/index.js';
6
- const cwd = resolve('tests/fixtures/plugins/remark');
7
- const manifestFilePath = join(cwd, 'package.json');
8
- const manifest = getManifest(cwd);
9
- test('Find dependencies in Remark configuration', async () => {
10
- const dependencies = await remark.findDependencies(manifestFilePath, { manifest });
11
- assert.deepEqual(dependencies, ['remark-preset-webpro']);
12
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,39 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import { main } from '../../src/index.js';
4
- import { resolve } from '../../src/util/path.js';
5
- import baseArguments from '../helpers/baseArguments.js';
6
- import baseCounters from '../helpers/baseCounters.js';
7
- const cwd = resolve('tests/fixtures/plugins/remix');
8
- test('Find dependencies in Remix configuration', async () => {
9
- const { issues, counters } = await main({
10
- ...baseArguments,
11
- cwd,
12
- });
13
- assert(issues.unresolved['app/root.tsx']['./session.server']);
14
- assert(issues.unlisted['package.json']['run-s']);
15
- assert(issues.unlisted['package.json']['run-p']);
16
- assert(issues.unlisted['package.json']['cross-env']);
17
- assert(issues.unlisted['package.json']['dotenv']);
18
- assert(issues.unlisted['package.json']['tailwindcss']);
19
- assert(issues.unlisted['package.json']['prisma']);
20
- assert(issues.unlisted['app/entry.client.tsx']['@remix-run/react']);
21
- assert(issues.unlisted['app/entry.client.tsx']['react']);
22
- assert(issues.unlisted['app/entry.client.tsx']['react-dom/client']);
23
- assert(issues.unlisted['app/entry.server.tsx']['@remix-run/node']);
24
- assert(issues.unlisted['app/entry.server.tsx']['@remix-run/react']);
25
- assert(issues.unlisted['app/entry.server.tsx']['react-dom/server']);
26
- assert(issues.unlisted['app/root.tsx']['@remix-run/node']);
27
- assert(issues.unlisted['app/root.tsx']['@remix-run/react']);
28
- assert(issues.unlisted['app/utils.ts']['@remix-run/react']);
29
- assert(issues.unlisted['app/utils.ts']['react']);
30
- assert(issues.unlisted['app/routes/index.tsx']['@remix-run/react']);
31
- assert.deepEqual(counters, {
32
- ...baseCounters,
33
- devDependencies: 1,
34
- unlisted: 17,
35
- unresolved: 1,
36
- processed: 8,
37
- total: 8,
38
- });
39
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,24 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import { main } from '../../src/index.js';
4
- import { resolve } from '../../src/util/path.js';
5
- import baseArguments from '../helpers/baseArguments.js';
6
- import baseCounters from '../helpers/baseCounters.js';
7
- const cwd = resolve('tests/fixtures/plugins/rollup');
8
- test('Find dependencies in Rollup configuration', async () => {
9
- const { issues, counters } = await main({
10
- ...baseArguments,
11
- cwd,
12
- });
13
- assert(issues.unlisted['rollup.config.js']['rollup-plugin-terser']);
14
- assert(issues.unlisted['rollup.config.js']['@rollup/plugin-node-resolve']);
15
- assert(issues.unlisted['rollup.config.js']['@rollup/plugin-commonjs']);
16
- assert(issues.unlisted['rollup.config.js']['acorn-jsx']);
17
- assert.deepEqual(counters, {
18
- ...baseCounters,
19
- devDependencies: 0,
20
- unlisted: 4,
21
- processed: 1,
22
- total: 1,
23
- });
24
- });
@@ -1 +0,0 @@
1
- export {};