knip 5.33.3 → 5.34.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 (304) hide show
  1. package/dist/ConfigurationChief.d.ts +27 -27
  2. package/dist/ConfigurationChief.js +20 -36
  3. package/dist/ConfigurationValidator.d.ts +392 -0
  4. package/dist/ConfigurationValidator.js +7 -0
  5. package/dist/DependencyDeputy.js +5 -2
  6. package/dist/PrincipalFactory.d.ts +3 -20
  7. package/dist/PrincipalFactory.js +4 -4
  8. package/dist/ProjectPrincipal.d.ts +2 -5
  9. package/dist/ProjectPrincipal.js +0 -5
  10. package/dist/WorkspaceWorker.d.ts +15 -13
  11. package/dist/WorkspaceWorker.js +144 -105
  12. package/dist/binaries/bash-parser.d.ts +3 -2
  13. package/dist/binaries/bash-parser.js +33 -22
  14. package/dist/binaries/fallback.d.ts +2 -0
  15. package/dist/binaries/fallback.js +12 -0
  16. package/dist/binaries/index.d.ts +2 -2
  17. package/dist/binaries/index.js +15 -26
  18. package/dist/binaries/package-manager/bun.d.ts +2 -0
  19. package/dist/binaries/{resolvers → package-manager}/bun.js +6 -4
  20. package/dist/binaries/package-manager/index.d.ts +8 -0
  21. package/dist/binaries/package-manager/index.js +12 -0
  22. package/dist/binaries/{resolvers → package-manager}/node.d.ts +0 -2
  23. package/dist/binaries/package-manager/node.js +5 -0
  24. package/dist/binaries/package-manager/npm.d.ts +2 -0
  25. package/dist/binaries/package-manager/npm.js +8 -0
  26. package/dist/binaries/package-manager/npx.d.ts +2 -0
  27. package/dist/binaries/{resolvers → package-manager}/npx.js +6 -6
  28. package/dist/binaries/package-manager/pnpm.d.ts +2 -0
  29. package/dist/binaries/{resolvers → package-manager}/pnpm.js +6 -3
  30. package/dist/binaries/package-manager/yarn.d.ts +2 -0
  31. package/dist/binaries/{resolvers → package-manager}/yarn.js +9 -7
  32. package/dist/binaries/plugins.d.ts +2 -0
  33. package/dist/binaries/plugins.js +61 -0
  34. package/dist/binaries/util.d.ts +0 -2
  35. package/dist/binaries/util.js +0 -25
  36. package/dist/compilers/index.d.ts +70 -0
  37. package/dist/constants.d.ts +1 -0
  38. package/dist/constants.js +2 -1
  39. package/dist/index.js +74 -46
  40. package/dist/manifest/helpers.d.ts +1 -5
  41. package/dist/manifest/helpers.js +8 -7
  42. package/dist/plugins/_template/index.d.ts +2 -2
  43. package/dist/plugins/_template/index.js +4 -3
  44. package/dist/plugins/angular/index.d.ts +1 -1
  45. package/dist/plugins/angular/index.js +13 -10
  46. package/dist/plugins/astro/index.d.ts +1 -1
  47. package/dist/plugins/astro/index.js +6 -5
  48. package/dist/plugins/ava/index.d.ts +1 -1
  49. package/dist/plugins/ava/index.js +4 -5
  50. package/dist/plugins/babel/helpers.js +1 -1
  51. package/dist/plugins/babel/index.d.ts +3 -2
  52. package/dist/plugins/babel/index.js +4 -3
  53. package/dist/plugins/c8/index.d.ts +10 -0
  54. package/dist/plugins/c8/index.js +11 -0
  55. package/dist/plugins/capacitor/index.d.ts +1 -1
  56. package/dist/plugins/capacitor/index.js +5 -4
  57. package/dist/plugins/changesets/index.d.ts +1 -1
  58. package/dist/plugins/changesets/index.js +4 -3
  59. package/dist/plugins/commitizen/index.d.ts +1 -1
  60. package/dist/plugins/commitizen/index.js +3 -2
  61. package/dist/plugins/commitlint/index.d.ts +1 -1
  62. package/dist/plugins/commitlint/index.js +4 -2
  63. package/dist/plugins/cspell/index.d.ts +1 -1
  64. package/dist/plugins/cspell/index.js +3 -2
  65. package/dist/plugins/cucumber/index.d.ts +2 -2
  66. package/dist/plugins/cucumber/index.js +4 -4
  67. package/dist/plugins/cypress/helpers.d.ts +1 -1
  68. package/dist/plugins/cypress/helpers.js +3 -4
  69. package/dist/plugins/cypress/index.d.ts +1 -1
  70. package/dist/plugins/cypress/index.js +6 -5
  71. package/dist/plugins/dotenv/index.d.ts +8 -0
  72. package/dist/plugins/dotenv/index.js +9 -0
  73. package/dist/plugins/drizzle/index.d.ts +1 -1
  74. package/dist/plugins/drizzle/index.js +3 -3
  75. package/dist/plugins/eleventy/index.d.ts +1 -1
  76. package/dist/plugins/eleventy/index.js +6 -6
  77. package/dist/plugins/eslint/helpers.d.ts +4 -5
  78. package/dist/plugins/eslint/helpers.js +10 -32
  79. package/dist/plugins/eslint/index.d.ts +1 -1
  80. package/dist/plugins/eslint/index.js +3 -6
  81. package/dist/plugins/gatsby/index.d.ts +1 -1
  82. package/dist/plugins/gatsby/index.js +6 -3
  83. package/dist/plugins/github-actions/index.d.ts +1 -1
  84. package/dist/plugins/github-actions/index.js +23 -7
  85. package/dist/plugins/graphql-codegen/index.d.ts +1 -1
  86. package/dist/plugins/graphql-codegen/index.js +7 -7
  87. package/dist/plugins/husky/index.d.ts +1 -1
  88. package/dist/plugins/husky/index.js +4 -3
  89. package/dist/plugins/index.d.ts +685 -77
  90. package/dist/plugins/index.js +170 -77
  91. package/dist/plugins/jest/index.d.ts +1 -1
  92. package/dist/plugins/jest/index.js +22 -24
  93. package/dist/plugins/ladle/index.d.ts +2 -2
  94. package/dist/plugins/ladle/index.js +4 -4
  95. package/dist/plugins/lefthook/index.d.ts +1 -1
  96. package/dist/plugins/lefthook/index.js +18 -14
  97. package/dist/plugins/lint-staged/index.d.ts +1 -1
  98. package/dist/plugins/lint-staged/index.js +6 -5
  99. package/dist/plugins/linthtml/index.d.ts +1 -1
  100. package/dist/plugins/linthtml/index.js +6 -8
  101. package/dist/plugins/lockfile-lint/index.d.ts +2 -2
  102. package/dist/plugins/lockfile-lint/index.js +2 -1
  103. package/dist/plugins/lost-pixel/index.d.ts +2 -2
  104. package/dist/plugins/lost-pixel/index.js +1 -1
  105. package/dist/plugins/markdownlint/index.d.ts +1 -1
  106. package/dist/plugins/markdownlint/index.js +3 -2
  107. package/dist/plugins/mocha/index.d.ts +4 -1
  108. package/dist/plugins/mocha/index.js +8 -4
  109. package/dist/plugins/moonrepo/index.d.ts +2 -2
  110. package/dist/plugins/moonrepo/index.js +4 -4
  111. package/dist/plugins/msw/index.d.ts +1 -1
  112. package/dist/plugins/msw/index.js +4 -4
  113. package/dist/plugins/nest/index.d.ts +2 -2
  114. package/dist/plugins/nest/index.js +4 -3
  115. package/dist/plugins/netlify/index.d.ts +1 -1
  116. package/dist/plugins/netlify/index.js +6 -6
  117. package/dist/plugins/next/index.d.ts +1 -1
  118. package/dist/plugins/next/index.js +1 -1
  119. package/dist/plugins/node/index.d.ts +8 -0
  120. package/dist/plugins/node/index.js +9 -0
  121. package/dist/plugins/node-test-runner/index.d.ts +1 -1
  122. package/dist/plugins/nodemon/index.d.ts +10 -0
  123. package/dist/plugins/nodemon/index.js +11 -0
  124. package/dist/plugins/npm-package-json-lint/index.d.ts +1 -1
  125. package/dist/plugins/npm-package-json-lint/index.js +4 -2
  126. package/dist/plugins/nuxt/index.d.ts +1 -1
  127. package/dist/plugins/nuxt/index.js +4 -4
  128. package/dist/plugins/nx/index.d.ts +5 -1
  129. package/dist/plugins/nx/index.js +10 -8
  130. package/dist/plugins/nyc/index.d.ts +1 -1
  131. package/dist/plugins/nyc/index.js +3 -2
  132. package/dist/plugins/oclif/index.d.ts +2 -2
  133. package/dist/plugins/oclif/index.js +3 -2
  134. package/dist/plugins/playwright/index.d.ts +13 -1
  135. package/dist/plugins/playwright/index.js +13 -6
  136. package/dist/plugins/playwright-ct/index.d.ts +9 -3
  137. package/dist/plugins/playwright-ct/index.js +3 -2
  138. package/dist/plugins/playwright-test/index.d.ts +13 -0
  139. package/dist/plugins/playwright-test/index.js +16 -0
  140. package/dist/plugins/postcss/index.d.ts +1 -1
  141. package/dist/plugins/postcss/index.js +5 -2
  142. package/dist/plugins/preconstruct/index.d.ts +1 -1
  143. package/dist/plugins/preconstruct/index.js +3 -3
  144. package/dist/plugins/prettier/index.d.ts +1 -1
  145. package/dist/plugins/prettier/index.js +5 -5
  146. package/dist/plugins/react-cosmos/index.d.ts +2 -2
  147. package/dist/plugins/react-cosmos/index.js +5 -6
  148. package/dist/plugins/release-it/index.d.ts +1 -1
  149. package/dist/plugins/release-it/index.js +4 -3
  150. package/dist/plugins/remark/index.d.ts +1 -1
  151. package/dist/plugins/remark/index.js +3 -2
  152. package/dist/plugins/remix/index.d.ts +1 -1
  153. package/dist/plugins/remix/index.js +1 -1
  154. package/dist/plugins/rollup/index.d.ts +3 -1
  155. package/dist/plugins/rollup/index.js +8 -1
  156. package/dist/plugins/rsbuild/index.d.ts +2 -2
  157. package/dist/plugins/rsbuild/index.js +1 -1
  158. package/dist/plugins/rspack/index.d.ts +2 -2
  159. package/dist/plugins/rspack/index.js +4 -8
  160. package/dist/plugins/semantic-release/index.d.ts +1 -1
  161. package/dist/plugins/semantic-release/index.js +4 -2
  162. package/dist/plugins/sentry/index.d.ts +1 -1
  163. package/dist/plugins/sentry/index.js +1 -1
  164. package/dist/plugins/simple-git-hooks/index.d.ts +2 -2
  165. package/dist/plugins/simple-git-hooks/index.js +5 -5
  166. package/dist/plugins/size-limit/index.d.ts +2 -2
  167. package/dist/plugins/size-limit/index.js +2 -1
  168. package/dist/plugins/storybook/index.d.ts +1 -1
  169. package/dist/plugins/storybook/index.js +5 -5
  170. package/dist/plugins/stryker/index.d.ts +1 -1
  171. package/dist/plugins/stryker/index.js +3 -2
  172. package/dist/plugins/stylelint/index.d.ts +1 -1
  173. package/dist/plugins/stylelint/index.js +4 -3
  174. package/dist/plugins/svelte/index.d.ts +1 -1
  175. package/dist/plugins/svelte/index.js +1 -1
  176. package/dist/plugins/syncpack/index.d.ts +2 -3
  177. package/dist/plugins/syncpack/index.js +2 -4
  178. package/dist/plugins/tailwind/index.d.ts +1 -1
  179. package/dist/plugins/tailwind/index.js +1 -1
  180. package/dist/plugins/travis/index.d.ts +1 -1
  181. package/dist/plugins/travis/index.js +2 -3
  182. package/dist/plugins/ts-node/index.d.ts +15 -0
  183. package/dist/plugins/ts-node/index.js +12 -0
  184. package/dist/plugins/tsup/index.d.ts +4 -1
  185. package/dist/plugins/tsup/index.js +7 -3
  186. package/dist/plugins/tsx/index.d.ts +9 -0
  187. package/dist/plugins/tsx/index.js +10 -0
  188. package/dist/plugins/typedoc/index.d.ts +4 -1
  189. package/dist/plugins/typedoc/index.js +10 -3
  190. package/dist/plugins/typedoc/types.d.ts +1 -0
  191. package/dist/plugins/typescript/index.d.ts +11 -2
  192. package/dist/plugins/typescript/index.js +19 -34
  193. package/dist/plugins/unbuild/index.d.ts +1 -1
  194. package/dist/plugins/unbuild/index.js +3 -3
  195. package/dist/plugins/unocss/index.d.ts +2 -2
  196. package/dist/plugins/unocss/index.js +2 -1
  197. package/dist/plugins/vercel-og/index.d.ts +1 -1
  198. package/dist/plugins/vercel-og/index.js +1 -1
  199. package/dist/plugins/vike/index.d.ts +2 -2
  200. package/dist/plugins/vike/index.js +1 -1
  201. package/dist/plugins/vite/index.d.ts +3 -3
  202. package/dist/plugins/vite/index.js +2 -2
  203. package/dist/plugins/vitest/index.d.ts +4 -1
  204. package/dist/plugins/vitest/index.js +31 -20
  205. package/dist/plugins/vue/index.d.ts +1 -1
  206. package/dist/plugins/vue/index.js +10 -10
  207. package/dist/plugins/webdriver-io/index.d.ts +1 -1
  208. package/dist/plugins/webdriver-io/index.js +3 -2
  209. package/dist/plugins/webpack/index.d.ts +3 -5
  210. package/dist/plugins/webpack/index.js +18 -19
  211. package/dist/plugins/wireit/index.d.ts +1 -1
  212. package/dist/plugins/wireit/index.js +2 -2
  213. package/dist/plugins/wrangler/index.d.ts +1 -1
  214. package/dist/plugins/wrangler/index.js +3 -2
  215. package/dist/plugins/xo/index.d.ts +2 -2
  216. package/dist/plugins/xo/index.js +4 -4
  217. package/dist/plugins/yorkie/index.d.ts +1 -1
  218. package/dist/plugins/yorkie/index.js +6 -5
  219. package/dist/plugins.d.ts +7 -4
  220. package/dist/plugins.js +17 -10
  221. package/dist/reporters/symbols.js +1 -1
  222. package/dist/types/PluginNames.d.ts +2 -0
  223. package/dist/types/PluginNames.js +86 -0
  224. package/dist/types/args.d.ts +14 -0
  225. package/dist/types/config.d.ts +84 -21
  226. package/dist/types/package-json.d.ts +10 -0
  227. package/dist/types/project.d.ts +18 -0
  228. package/dist/typescript/get-imports-and-exports.d.ts +1 -11
  229. package/dist/typescript/get-imports-and-exports.js +3 -1
  230. package/dist/typescript/visitors/dynamic-imports/importCall.d.ts +1 -1
  231. package/dist/typescript/visitors/dynamic-imports/importType.d.ts +1 -1
  232. package/dist/typescript/visitors/dynamic-imports/index.d.ts +1 -1
  233. package/dist/typescript/visitors/dynamic-imports/jsDocType.d.ts +1 -1
  234. package/dist/typescript/visitors/dynamic-imports/requireCall.d.ts +1 -1
  235. package/dist/typescript/visitors/dynamic-imports/resolveCall.d.ts +1 -1
  236. package/dist/typescript/visitors/exports/exportAssignment.d.ts +1 -1
  237. package/dist/typescript/visitors/exports/exportDeclaration.d.ts +1 -1
  238. package/dist/typescript/visitors/exports/exportKeyword.d.ts +1 -1
  239. package/dist/typescript/visitors/exports/exportsAccessExpression.d.ts +1 -1
  240. package/dist/typescript/visitors/exports/index.d.ts +1 -1
  241. package/dist/typescript/visitors/exports/moduleExportsAccessExpression.d.ts +1 -1
  242. package/dist/typescript/visitors/imports/importDeclaration.d.ts +1 -1
  243. package/dist/typescript/visitors/imports/importEqualsDeclaration.d.ts +1 -1
  244. package/dist/typescript/visitors/imports/index.d.ts +1 -1
  245. package/dist/typescript/visitors/imports/reExportDeclaration.d.ts +1 -1
  246. package/dist/typescript/visitors/index.d.ts +1 -1
  247. package/dist/typescript/visitors/scripts/bun.d.ts +1 -1
  248. package/dist/typescript/visitors/scripts/execa.d.ts +1 -1
  249. package/dist/typescript/visitors/scripts/index.d.ts +1 -1
  250. package/dist/typescript/visitors/scripts/zx.d.ts +1 -1
  251. package/dist/util/create-workspace-graph.d.ts +1 -1
  252. package/dist/util/create-workspace-graph.js +7 -7
  253. package/dist/util/debug.d.ts +2 -2
  254. package/dist/util/debug.js +1 -1
  255. package/dist/util/glob.js +2 -2
  256. package/dist/util/{handle-dependency.d.ts → handle-referenced-dependency.d.ts} +2 -1
  257. package/dist/util/handle-referenced-dependency.js +82 -0
  258. package/dist/util/input.d.ts +37 -0
  259. package/dist/util/input.js +36 -0
  260. package/dist/util/map-workspaces.d.ts +5 -2
  261. package/dist/util/map-workspaces.js +6 -6
  262. package/dist/util/modules.d.ts +1 -0
  263. package/dist/util/modules.js +4 -3
  264. package/dist/util/object.d.ts +1 -0
  265. package/dist/util/object.js +19 -0
  266. package/dist/util/plugin-config.d.ts +24 -0
  267. package/dist/util/plugin-config.js +32 -0
  268. package/dist/util/plugin.d.ts +3 -31
  269. package/dist/util/plugin.js +9 -54
  270. package/dist/util/regex.js +3 -2
  271. package/dist/version.d.ts +1 -1
  272. package/dist/version.js +1 -1
  273. package/package.json +7 -10
  274. package/schema.json +28 -0
  275. package/dist/binaries/resolvers/bun.d.ts +0 -2
  276. package/dist/binaries/resolvers/c8.d.ts +0 -2
  277. package/dist/binaries/resolvers/c8.js +0 -11
  278. package/dist/binaries/resolvers/dotenv.d.ts +0 -2
  279. package/dist/binaries/resolvers/dotenv.js +0 -7
  280. package/dist/binaries/resolvers/fallback.d.ts +0 -2
  281. package/dist/binaries/resolvers/fallback.js +0 -26
  282. package/dist/binaries/resolvers/index.d.ts +0 -15
  283. package/dist/binaries/resolvers/index.js +0 -26
  284. package/dist/binaries/resolvers/node.js +0 -11
  285. package/dist/binaries/resolvers/nodemon.d.ts +0 -2
  286. package/dist/binaries/resolvers/nodemon.js +0 -16
  287. package/dist/binaries/resolvers/npx.d.ts +0 -2
  288. package/dist/binaries/resolvers/nx.d.ts +0 -2
  289. package/dist/binaries/resolvers/nx.js +0 -9
  290. package/dist/binaries/resolvers/pnpm.d.ts +0 -2
  291. package/dist/binaries/resolvers/rollup.d.ts +0 -2
  292. package/dist/binaries/resolvers/rollup.js +0 -12
  293. package/dist/binaries/resolvers/ts-node.d.ts +0 -2
  294. package/dist/binaries/resolvers/ts-node.js +0 -16
  295. package/dist/binaries/resolvers/tsx.d.ts +0 -2
  296. package/dist/binaries/resolvers/tsx.js +0 -6
  297. package/dist/binaries/resolvers/yarn.d.ts +0 -2
  298. package/dist/binaries/types.d.ts +0 -11
  299. package/dist/types/plugins.d.ts +0 -42
  300. package/dist/util/handle-dependency.js +0 -63
  301. package/dist/util/protocols.d.ts +0 -9
  302. package/dist/util/protocols.js +0 -9
  303. /package/dist/{binaries/types.js → types/args.js} +0 -0
  304. /package/dist/types/{plugins.js → project.js} +0 -0
@@ -1,18 +1,25 @@
1
1
  import parse, {} from '../../vendor/bash-parser/index.js';
2
+ import { pluginArgsMap } from '../plugins.js';
2
3
  import { debugLogObject } from '../util/debug.js';
3
- import { toBinary } from '../util/protocols.js';
4
- import * as FallbackResolver from './resolvers/fallback.js';
5
- import KnownResolvers from './resolvers/index.js';
6
- import { parseNodeArgs } from './resolvers/node.js';
4
+ import { toBinary, toDeferResolve } from '../util/input.js';
5
+ import { resolve as fallbackResolve } from './fallback.js';
6
+ import PackageManagerResolvers from './package-manager/index.js';
7
+ import { parseNodeArgs } from './package-manager/node.js';
8
+ import { resolve as resolverFromPlugins } from './plugins.js';
7
9
  import { trimBinary } from './util.js';
8
10
  const spawningBinaries = ['cross-env', 'retry-cli'];
9
11
  const isExpansion = (node) => 'expansion' in node;
10
12
  const isAssignment = (node) => 'type' in node && node.type === 'AssignmentWord';
11
- export const getBinariesFromScript = (script, options) => {
13
+ export const getDependenciesFromScript = (script, options) => {
12
14
  if (!script)
13
15
  return [];
14
- const fromArgs = (args) => getBinariesFromScript(args.filter(arg => arg !== '--').join(' '), { ...options, knownGlobalsOnly: false });
15
- const getBinariesFromNodes = (nodes) => nodes.flatMap(node => {
16
+ const fromArgs = (args) => {
17
+ return getDependenciesFromScript(args.filter(arg => arg !== '--').join(' '), {
18
+ ...options,
19
+ knownBinsOnly: false,
20
+ });
21
+ };
22
+ const getDependenciesFromNodes = (nodes) => nodes.flatMap(node => {
16
23
  switch (node.type) {
17
24
  case 'Command': {
18
25
  const text = node.name?.text;
@@ -22,7 +29,7 @@ export const getBinariesFromScript = (script, options) => {
22
29
  .map(prefix => prefix.expansion)
23
30
  .flatMap(expansion => expansion.filter(expansion => expansion.type === 'CommandExpansion') ?? []) ?? [];
24
31
  if (commandExpansions.length > 0) {
25
- return commandExpansions.flatMap(expansion => getBinariesFromNodes(expansion.commandAST.commands)) ?? [];
32
+ return (commandExpansions.flatMap(expansion => getDependenciesFromNodes(expansion.commandAST.commands)) ?? []);
26
33
  }
27
34
  if (!binary || binary === '.' || binary === 'source' || binary === '[')
28
35
  return [];
@@ -37,38 +44,42 @@ export const getBinariesFromScript = (script, options) => {
37
44
  .flatMap(node => node.text.split('=')[1])
38
45
  .map(arg => parseNodeArgs(arg.split(' ')))
39
46
  .filter(args => args.require)
40
- .flatMap(arg => arg.require) ?? [];
41
- if (binary in KnownResolvers) {
42
- const resolver = KnownResolvers[binary];
47
+ .flatMap(arg => arg.require)
48
+ .map(toDeferResolve) ?? [];
49
+ if (binary in PackageManagerResolvers) {
50
+ const resolver = PackageManagerResolvers[binary];
43
51
  return resolver(binary, args, { ...options, fromArgs });
44
52
  }
53
+ if (pluginArgsMap.has(binary)) {
54
+ return [...resolverFromPlugins(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
55
+ }
45
56
  if (spawningBinaries.includes(binary)) {
46
- const command = script.replace(new RegExp(`.*${node.name?.text ?? binary}(\\s--\\s)?`), '');
47
- return [toBinary(binary), ...getBinariesFromScript(command, options)];
57
+ const command = script.replace(new RegExp(`.*${text ?? binary}(\\s--\\s)?`), '');
58
+ return [toBinary(binary), ...getDependenciesFromScript(command, options)];
48
59
  }
49
- if (options.knownGlobalsOnly && !text?.startsWith('.'))
60
+ if (options.knownBinsOnly && !text?.startsWith('.'))
50
61
  return [];
51
- return [...FallbackResolver.resolve(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
62
+ return [...fallbackResolve(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
52
63
  }
53
64
  case 'LogicalExpression':
54
- return getBinariesFromNodes([node.left, node.right]);
65
+ return getDependenciesFromNodes([node.left, node.right]);
55
66
  case 'If':
56
- return getBinariesFromNodes([node.clause, node.then, ...(node.else ? [node.else] : [])]);
67
+ return getDependenciesFromNodes([node.clause, node.then, ...(node.else ? [node.else] : [])]);
57
68
  case 'For':
58
- return getBinariesFromNodes(node.do.commands);
69
+ return getDependenciesFromNodes(node.do.commands);
59
70
  case 'CompoundList':
60
- return getBinariesFromNodes(node.commands);
71
+ return getDependenciesFromNodes(node.commands);
61
72
  case 'Pipeline':
62
- return getBinariesFromNodes(node.commands);
73
+ return getDependenciesFromNodes(node.commands);
63
74
  case 'Function':
64
- return getBinariesFromNodes(node.body.commands);
75
+ return getDependenciesFromNodes(node.body.commands);
65
76
  default:
66
77
  return [];
67
78
  }
68
79
  });
69
80
  try {
70
81
  const parsed = parse(script);
71
- return parsed?.commands ? getBinariesFromNodes(parsed.commands) : [];
82
+ return parsed?.commands ? getDependenciesFromNodes(parsed.commands) : [];
72
83
  }
73
84
  catch (error) {
74
85
  debugLogObject('*', 'Bash parser error', error);
@@ -0,0 +1,2 @@
1
+ import type { BinaryResolver } from '../types/config.js';
2
+ export declare const resolve: BinaryResolver;
@@ -0,0 +1,12 @@
1
+ import parseArgs from 'minimist';
2
+ import { compact } from '../util/array.js';
3
+ import { toBinary, toDeferResolve, toEntry } from '../util/input.js';
4
+ const spawningBinaries = ['cross-env', 'retry-cli'];
5
+ const positionals = new Set(['babel-node', 'esbuild', 'execa', 'vite-node', 'zx']);
6
+ export const resolve = (binary, args, { fromArgs }) => {
7
+ const parsed = parseArgs(args, { boolean: ['quiet', 'verbose'] });
8
+ const bin = binary.startsWith('.') ? toEntry(binary) : toBinary(binary);
9
+ const shiftedArgs = spawningBinaries.includes(binary) ? fromArgs(args) : [];
10
+ const pos = positionals.has(binary) ? [toDeferResolve(parsed._[0])] : [];
11
+ return compact([bin, ...shiftedArgs, ...pos]);
12
+ };
@@ -1,2 +1,2 @@
1
- import type { GetDependenciesFromScripts } from './types.js';
2
- export declare const _getDependenciesFromScripts: GetDependenciesFromScripts;
1
+ import type { GetInputsFromScripts } from '../types/config.js';
2
+ export declare const _getInputsFromScripts: GetInputsFromScripts;
@@ -1,28 +1,17 @@
1
- import { FOREIGN_FILE_EXTENSIONS } from '../constants.js';
2
1
  import { timerify } from '../util/Performance.js';
3
- import { compact } from '../util/array.js';
4
- import { getPackageNameFromModuleSpecifier } from '../util/modules.js';
5
- import { extname, isInternal } from '../util/path.js';
6
- import { fromBinary, isBinary } from '../util/protocols.js';
7
- import { getBinariesFromScript } from './bash-parser.js';
8
- const getDependenciesFromScripts = (npmScripts, options) => {
9
- const scripts = typeof npmScripts === 'string' ? [npmScripts] : [...npmScripts];
10
- const results = scripts.flatMap(script => getBinariesFromScript(script, options));
11
- return compact(results.map(identifier => {
12
- if (identifier.startsWith('http'))
13
- return;
14
- if (isBinary(identifier)) {
15
- if (!/^\b/.test(fromBinary(identifier)))
16
- return;
17
- return identifier;
18
- }
19
- if (isInternal(identifier)) {
20
- const ext = extname(identifier);
21
- if (ext && FOREIGN_FILE_EXTENSIONS.has(ext))
22
- return;
23
- return identifier;
24
- }
25
- return getPackageNameFromModuleSpecifier(identifier);
26
- }));
2
+ import { fromBinary, isBinary } from '../util/input.js';
3
+ import { getDependenciesFromScript } from './bash-parser.js';
4
+ const getInputsFromScripts = (npmScripts, options) => {
5
+ const scripts = typeof npmScripts === 'string' ? [npmScripts] : Array.from(npmScripts);
6
+ const results = scripts.flatMap(script => getDependenciesFromScript(script, options));
7
+ const inputs = new Set();
8
+ for (const input of results) {
9
+ if (!input.specifier || input.specifier.startsWith('http'))
10
+ continue;
11
+ if (isBinary(input) && !/^\b/.test(fromBinary(input)))
12
+ continue;
13
+ inputs.add(input);
14
+ }
15
+ return Array.from(inputs);
27
16
  };
28
- export const _getDependenciesFromScripts = timerify(getDependenciesFromScripts);
17
+ export const _getInputsFromScripts = timerify(getInputsFromScripts);
@@ -0,0 +1,2 @@
1
+ import type { BinaryResolver } from '../../types/config.js';
2
+ export declare const resolve: BinaryResolver;
@@ -1,5 +1,7 @@
1
1
  import parseArgs from 'minimist';
2
- import { tryResolveFilePath } from '../util.js';
2
+ import { isFile } from '../../util/fs.js';
3
+ import { toEntry } from '../../util/input.js';
4
+ import { isAbsolute, join } from '../../util/path.js';
3
5
  const commands = ['add', 'create', 'init', 'install', 'link', 'pm', 'remove', 'run', 'test', 'update', 'upgrade'];
4
6
  export const resolve = (_binary, args, { manifestScriptNames, cwd, fromArgs }) => {
5
7
  const parsed = parseArgs(args);
@@ -9,8 +11,8 @@ export const resolve = (_binary, args, { manifestScriptNames, cwd, fromArgs }) =
9
11
  if (manifestScriptNames.has(command) || commands.includes(command))
10
12
  return [];
11
13
  const filePath = command === 'run' ? script : command;
12
- const specifier = tryResolveFilePath(cwd, filePath);
13
- if (specifier)
14
- return [specifier];
14
+ const absFilePath = isAbsolute(filePath) ? filePath : join(cwd, filePath);
15
+ if (isFile(absFilePath))
16
+ return [toEntry(absFilePath)];
15
17
  return fromArgs(args);
16
18
  };
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ bun: import("../../types/config.js").BinaryResolver;
3
+ npm: import("../../types/config.js").BinaryResolver;
4
+ npx: import("../../types/config.js").BinaryResolver;
5
+ pnpm: import("../../types/config.js").BinaryResolver;
6
+ yarn: import("../../types/config.js").BinaryResolver;
7
+ };
8
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import * as bun from './bun.js';
2
+ import * as npm from './npm.js';
3
+ import * as npx from './npx.js';
4
+ import * as pnpm from './pnpm.js';
5
+ import * as yarn from './yarn.js';
6
+ export default {
7
+ bun: bun.resolve,
8
+ npm: npm.resolve,
9
+ npx: npx.resolve,
10
+ pnpm: pnpm.resolve,
11
+ yarn: yarn.resolve,
12
+ };
@@ -1,4 +1,2 @@
1
1
  import parseArgs from 'minimist';
2
- import type { Resolver } from '../types.js';
3
2
  export declare const parseNodeArgs: (args: string[]) => parseArgs.ParsedArgs;
4
- export declare const resolve: Resolver;
@@ -0,0 +1,5 @@
1
+ import parseArgs from 'minimist';
2
+ export const parseNodeArgs = (args) => parseArgs(args, {
3
+ string: ['r'],
4
+ alias: { require: ['r', 'loader', 'experimental-loader', 'test-reporter', 'watch', 'import'] },
5
+ });
@@ -0,0 +1,2 @@
1
+ import type { BinaryResolver } from '../../types/config.js';
2
+ export declare const resolve: BinaryResolver;
@@ -0,0 +1,8 @@
1
+ import parseArgs from 'minimist';
2
+ import { toBinary } from '../../util/input.js';
3
+ export const resolve = (_binary, args, options) => {
4
+ const { fromArgs } = options;
5
+ const parsed = parseArgs(args);
6
+ const [command] = parsed._;
7
+ return [toBinary(_binary), ...(command !== 'exec' ? [] : fromArgs(parsed._.slice(1)))];
8
+ };
@@ -0,0 +1,2 @@
1
+ import type { BinaryResolver } from '../../types/config.js';
2
+ export declare const resolve: BinaryResolver;
@@ -1,11 +1,11 @@
1
1
  import parseArgs from 'minimist';
2
+ import { toBinary, toDependency } from '../../util/input.js';
2
3
  import { isInternal } from '../../util/path.js';
3
- import { toBinary } from '../../util/protocols.js';
4
4
  import { argsFrom, stripVersionFromSpecifier } from '../util.js';
5
5
  export const resolve = (_binary, args, options) => {
6
- const { fromArgs, dependencies } = options;
6
+ const { fromArgs } = options;
7
7
  const parsed = parseArgs(args, {
8
- boolean: ['yes', 'no'],
8
+ boolean: ['yes', 'no', 'quiet'],
9
9
  alias: { yes: 'y', no: 'no-install', package: 'p', call: 'c' },
10
10
  });
11
11
  const packageSpecifier = parsed._[0];
@@ -13,8 +13,8 @@ export const resolve = (_binary, args, options) => {
13
13
  const packages = parsed.package && !parsed.yes ? [parsed.package].flat().map(stripVersionFromSpecifier) : [];
14
14
  const command = parsed.call ? fromArgs([parsed.call]) : [];
15
15
  const restArgs = argsFrom(args, packageSpecifier);
16
- const isBinary = specifier && !packageSpecifier.includes('@') && !isInternal(specifier) && !dependencies.has(specifier);
17
- const dependency = isBinary ? toBinary(specifier) : specifier;
16
+ const isBinary = specifier && !packageSpecifier.includes('@') && !isInternal(specifier);
17
+ const dependency = isBinary ? toBinary(specifier) : toDependency(specifier);
18
18
  const specifiers = dependency && !parsed.yes ? [dependency] : [];
19
- return [...specifiers, ...packages, ...command, ...fromArgs(restArgs).slice(1)];
19
+ return [toBinary(_binary), ...specifiers, ...packages.map(toDependency), ...command, ...fromArgs(restArgs).slice(1)];
20
20
  };
@@ -0,0 +1,2 @@
1
+ import type { BinaryResolver } from '../../types/config.js';
2
+ export declare const resolve: BinaryResolver;
@@ -1,5 +1,5 @@
1
1
  import parseArgs from 'minimist';
2
- import { toBinary } from '../../util/protocols.js';
2
+ import { toBinary } from '../../util/input.js';
3
3
  const commands = [
4
4
  'add',
5
5
  'audit',
@@ -51,7 +51,7 @@ const commands = [
51
51
  'upgrade',
52
52
  'why',
53
53
  ];
54
- export const resolve = (_binary, args, { manifestScriptNames }) => {
54
+ export const resolve = (_binary, args, { manifestScriptNames, fromArgs }) => {
55
55
  const parsed = parseArgs(args, {
56
56
  boolean: ['recursive', 'silent', 'shell-mode'],
57
57
  alias: { recursive: 'r', silent: 's', 'shell-mode': 'c' },
@@ -59,7 +59,10 @@ export const resolve = (_binary, args, { manifestScriptNames }) => {
59
59
  const [command, binary] = parsed._;
60
60
  if (manifestScriptNames.has(command) || commands.includes(command))
61
61
  return [];
62
- if (command === 'exec')
62
+ if (command === 'exec') {
63
+ if (parsed._.length > 2)
64
+ return [toBinary(binary), ...fromArgs(parsed._.slice(1))];
63
65
  return [toBinary(binary)];
66
+ }
64
67
  return command ? [toBinary(command)] : [];
65
68
  };
@@ -0,0 +1,2 @@
1
+ import type { BinaryResolver } from '../../types/config.js';
2
+ export declare const resolve: BinaryResolver;
@@ -1,5 +1,6 @@
1
1
  import parseArgs from 'minimist';
2
- import { toBinary } from '../../util/protocols.js';
2
+ import { toBinary } from '../../util/input.js';
3
+ import { join } from '../../util/path.js';
3
4
  const commands = [
4
5
  'add',
5
6
  'bin',
@@ -32,16 +33,17 @@ const commands = [
32
33
  'workspace',
33
34
  'workspaces',
34
35
  ];
35
- export const resolve = (_binary, args, { manifestScriptNames, fromArgs }) => {
36
- const parsed = parseArgs(args, {});
36
+ export const resolve = (_binary, args, { manifestScriptNames, fromArgs, cwd, rootCwd }) => {
37
+ const parsed = parseArgs(args, { boolean: ['top-level'], string: ['cwd'] });
37
38
  const [command, binary] = parsed._;
38
- if (manifestScriptNames.has(command) || commands.includes(command))
39
+ const dir = parsed['top-level'] ? rootCwd : parsed.cwd ? join(cwd, parsed.cwd) : undefined;
40
+ if ((!dir && manifestScriptNames.has(command)) || commands.includes(command))
39
41
  return [];
40
- if (command === 'run' && manifestScriptNames.has(binary))
42
+ if (!dir && command === 'run' && manifestScriptNames.has(binary))
41
43
  return [];
42
44
  if (command === 'run' || command === 'exec')
43
- return [toBinary(binary)];
45
+ return dir ? [{ ...toBinary(binary), dir }] : [toBinary(binary)];
44
46
  if (command === 'node')
45
47
  return fromArgs(parsed._);
46
- return command ? [toBinary(command)] : [];
48
+ return command ? (dir ? [{ ...toBinary(command), dir }] : [toBinary(command)]) : [];
47
49
  };
@@ -0,0 +1,2 @@
1
+ import type { BinaryResolver } from '../types/config.js';
2
+ export declare const resolve: BinaryResolver;
@@ -0,0 +1,61 @@
1
+ import parseArgs from 'minimist';
2
+ import { pluginArgsMap } from '../plugins.js';
3
+ import { compact } from '../util/array.js';
4
+ import { toBinary, toConfig, toDeferResolve, toDeferResolveEntry, toEntry } from '../util/input.js';
5
+ import { resolve as fallbackResolve } from './fallback.js';
6
+ const isGlobLikeMatch = /(^!|[*+\\(|{^$])/;
7
+ const isGlobLike = (value) => isGlobLikeMatch.test(value);
8
+ const nodeLoadersArgs = { import: ['r', 'experimental-loader', 'require', 'loader', 'test-reporter'] };
9
+ export const resolve = (binary, _args, options) => {
10
+ const { fromArgs, containingFilePath } = options;
11
+ const [pluginName, pluginArgs] = pluginArgsMap.get(binary) ?? [];
12
+ if (!pluginArgs)
13
+ return fallbackResolve(binary, _args, options);
14
+ const opts = pluginArgs;
15
+ const args = typeof opts.args === 'function' ? opts.args(_args) : _args;
16
+ const parsed = parseArgs(args, {
17
+ string: [
18
+ ...(opts.nodeImportArgs ? ['import'] : []),
19
+ ...(opts.config === true ? ['config'] : []),
20
+ ...(opts.string ?? []),
21
+ ],
22
+ boolean: ['quiet', 'verbose', 'watch', ...(opts.boolean ?? [])],
23
+ alias: {
24
+ ...(opts.nodeImportArgs ? nodeLoadersArgs : {}),
25
+ ...(opts.config === true ? { config: ['c'] } : {}),
26
+ ...opts.alias,
27
+ },
28
+ });
29
+ const positionals = [];
30
+ if (opts.positional) {
31
+ const id = parsed._[0];
32
+ if (isGlobLike(id))
33
+ positionals.push(toEntry(id));
34
+ else
35
+ positionals.push(toDeferResolveEntry(id));
36
+ }
37
+ const mapToParsedKey = (id) => parsed[id];
38
+ const resolved = compact(opts.resolve ? opts.resolve.flatMap(mapToParsedKey) : []);
39
+ const resolvedImports = opts.nodeImportArgs && parsed.import ? [parsed.import].flat() : [];
40
+ const resolvedFromArgs = typeof opts.fromArgs === 'function'
41
+ ? fromArgs(opts.fromArgs(parsed, args))
42
+ : Array.isArray(opts.fromArgs)
43
+ ? fromArgs(opts.fromArgs.flatMap(mapToParsedKey))
44
+ : [];
45
+ const config = opts.config === true ? ['config'] : opts.config || [];
46
+ const mapToConfigPattern = (value) => {
47
+ if (typeof value === 'string')
48
+ return parsed[value] && pluginName ? [toConfig(pluginName, parsed[value], containingFilePath)] : [];
49
+ const [id, fn] = value;
50
+ return parsed[id] && pluginName ? [toConfig(pluginName, fn(parsed[id]), containingFilePath)] : [];
51
+ };
52
+ const configFilePaths = config.flatMap(mapToConfigPattern);
53
+ return [
54
+ toBinary(binary),
55
+ ...positionals,
56
+ ...resolved.map(toDeferResolve),
57
+ ...resolvedImports.map(toDeferResolve),
58
+ ...resolvedFromArgs,
59
+ ...configFilePaths,
60
+ ];
61
+ };
@@ -1,5 +1,3 @@
1
- export declare const tryResolveFilePath: (cwd: string, specifier: string, acceptModuleSpecifier?: boolean) => string | undefined;
2
- export declare const tryResolveSpecifiers: (cwd: string, specifiers: string[]) => (string | undefined)[];
3
1
  export declare const stripVersionFromSpecifier: (specifier: string) => string;
4
2
  export declare const trimBinary: (command: string) => string;
5
3
  export declare const argsFrom: (args: string[], from: string) => string[];
@@ -1,28 +1,3 @@
1
- import { getPackageNameFromFilePath, getPackageNameFromModuleSpecifier } from '../util/modules.js';
2
- import { isAbsolute, isInNodeModules, join } from '../util/path.js';
3
- import { toBinary } from '../util/protocols.js';
4
- import { _resolveSync } from '../util/resolve.js';
5
- export const tryResolveFilePath = (cwd, specifier, acceptModuleSpecifier) => {
6
- if (specifier) {
7
- const filePath = isAbsolute(specifier) ? specifier : join(cwd, specifier);
8
- if (!isInNodeModules(filePath)) {
9
- const resolvedFilePath = _resolveSync(filePath, cwd);
10
- if (resolvedFilePath) {
11
- return resolvedFilePath;
12
- }
13
- if (acceptModuleSpecifier) {
14
- return getPackageNameFromModuleSpecifier(specifier);
15
- }
16
- }
17
- else if (specifier.includes('node_modules/.bin')) {
18
- return toBinary(trimBinary(specifier));
19
- }
20
- else {
21
- return getPackageNameFromFilePath(specifier);
22
- }
23
- }
24
- };
25
- export const tryResolveSpecifiers = (cwd, specifiers) => specifiers.map(specifier => tryResolveFilePath(cwd, specifier, true));
26
1
  export const stripVersionFromSpecifier = (specifier) => specifier.replace(/(\S+)@.*/, '$1');
27
2
  const stripNodeModulesFromPath = (command) => command.replace(/^(\.\/)?node_modules\//, '');
28
3
  export const trimBinary = (command) => stripVersionFromSpecifier(stripNodeModulesFromPath(command)
@@ -6,6 +6,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
6
6
  asyncCompilers: Record<string, AsyncCompilerFn>;
7
7
  exclude?: ("dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
8
8
  include?: ("dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
9
+ node?: string | boolean | string[] | {
10
+ config?: string | string[] | undefined;
11
+ entry?: string | string[] | undefined;
12
+ project?: string | string[] | undefined;
13
+ } | undefined;
9
14
  rules?: Partial<Record<"dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
10
15
  entry?: string | string[] | undefined;
11
16
  project?: string | string[] | undefined;
@@ -38,6 +43,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
38
43
  entry?: string | string[] | undefined;
39
44
  project?: string | string[] | undefined;
40
45
  } | undefined;
46
+ c8?: string | boolean | string[] | {
47
+ config?: string | string[] | undefined;
48
+ entry?: string | string[] | undefined;
49
+ project?: string | string[] | undefined;
50
+ } | undefined;
41
51
  capacitor?: string | boolean | string[] | {
42
52
  config?: string | string[] | undefined;
43
53
  entry?: string | string[] | undefined;
@@ -73,6 +83,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
73
83
  entry?: string | string[] | undefined;
74
84
  project?: string | string[] | undefined;
75
85
  } | undefined;
86
+ dotenv?: string | boolean | string[] | {
87
+ config?: string | string[] | undefined;
88
+ entry?: string | string[] | undefined;
89
+ project?: string | string[] | undefined;
90
+ } | undefined;
76
91
  eleventy?: string | boolean | string[] | {
77
92
  config?: string | string[] | undefined;
78
93
  entry?: string | string[] | undefined;
@@ -173,6 +188,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
173
188
  entry?: string | string[] | undefined;
174
189
  project?: string | string[] | undefined;
175
190
  } | undefined;
191
+ nodemon?: string | boolean | string[] | {
192
+ config?: string | string[] | undefined;
193
+ entry?: string | string[] | undefined;
194
+ project?: string | string[] | undefined;
195
+ } | undefined;
176
196
  'node-test-runner'?: string | boolean | string[] | {
177
197
  config?: string | string[] | undefined;
178
198
  entry?: string | string[] | undefined;
@@ -213,6 +233,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
213
233
  entry?: string | string[] | undefined;
214
234
  project?: string | string[] | undefined;
215
235
  } | undefined;
236
+ 'playwright-test'?: string | boolean | string[] | {
237
+ config?: string | string[] | undefined;
238
+ entry?: string | string[] | undefined;
239
+ project?: string | string[] | undefined;
240
+ } | undefined;
216
241
  postcss?: string | boolean | string[] | {
217
242
  config?: string | string[] | undefined;
218
243
  entry?: string | string[] | undefined;
@@ -318,11 +343,21 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
318
343
  entry?: string | string[] | undefined;
319
344
  project?: string | string[] | undefined;
320
345
  } | undefined;
346
+ 'ts-node'?: string | boolean | string[] | {
347
+ config?: string | string[] | undefined;
348
+ entry?: string | string[] | undefined;
349
+ project?: string | string[] | undefined;
350
+ } | undefined;
321
351
  tsup?: string | boolean | string[] | {
322
352
  config?: string | string[] | undefined;
323
353
  entry?: string | string[] | undefined;
324
354
  project?: string | string[] | undefined;
325
355
  } | undefined;
356
+ tsx?: string | boolean | string[] | {
357
+ config?: string | string[] | undefined;
358
+ entry?: string | string[] | undefined;
359
+ project?: string | string[] | undefined;
360
+ } | undefined;
326
361
  typedoc?: string | boolean | string[] | {
327
362
  config?: string | string[] | undefined;
328
363
  entry?: string | string[] | undefined;
@@ -399,6 +434,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
399
434
  project?: string | string[] | undefined;
400
435
  } | undefined;
401
436
  workspaces?: Record<string, {
437
+ node?: string | boolean | string[] | {
438
+ config?: string | string[] | undefined;
439
+ entry?: string | string[] | undefined;
440
+ project?: string | string[] | undefined;
441
+ } | undefined;
402
442
  entry?: string | string[] | undefined;
403
443
  project?: string | string[] | undefined;
404
444
  paths?: Record<string, string[]> | undefined;
@@ -427,6 +467,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
427
467
  entry?: string | string[] | undefined;
428
468
  project?: string | string[] | undefined;
429
469
  } | undefined;
470
+ c8?: string | boolean | string[] | {
471
+ config?: string | string[] | undefined;
472
+ entry?: string | string[] | undefined;
473
+ project?: string | string[] | undefined;
474
+ } | undefined;
430
475
  capacitor?: string | boolean | string[] | {
431
476
  config?: string | string[] | undefined;
432
477
  entry?: string | string[] | undefined;
@@ -462,6 +507,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
462
507
  entry?: string | string[] | undefined;
463
508
  project?: string | string[] | undefined;
464
509
  } | undefined;
510
+ dotenv?: string | boolean | string[] | {
511
+ config?: string | string[] | undefined;
512
+ entry?: string | string[] | undefined;
513
+ project?: string | string[] | undefined;
514
+ } | undefined;
465
515
  eleventy?: string | boolean | string[] | {
466
516
  config?: string | string[] | undefined;
467
517
  entry?: string | string[] | undefined;
@@ -562,6 +612,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
562
612
  entry?: string | string[] | undefined;
563
613
  project?: string | string[] | undefined;
564
614
  } | undefined;
615
+ nodemon?: string | boolean | string[] | {
616
+ config?: string | string[] | undefined;
617
+ entry?: string | string[] | undefined;
618
+ project?: string | string[] | undefined;
619
+ } | undefined;
565
620
  'node-test-runner'?: string | boolean | string[] | {
566
621
  config?: string | string[] | undefined;
567
622
  entry?: string | string[] | undefined;
@@ -602,6 +657,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
602
657
  entry?: string | string[] | undefined;
603
658
  project?: string | string[] | undefined;
604
659
  } | undefined;
660
+ 'playwright-test'?: string | boolean | string[] | {
661
+ config?: string | string[] | undefined;
662
+ entry?: string | string[] | undefined;
663
+ project?: string | string[] | undefined;
664
+ } | undefined;
605
665
  postcss?: string | boolean | string[] | {
606
666
  config?: string | string[] | undefined;
607
667
  entry?: string | string[] | undefined;
@@ -707,11 +767,21 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
707
767
  entry?: string | string[] | undefined;
708
768
  project?: string | string[] | undefined;
709
769
  } | undefined;
770
+ 'ts-node'?: string | boolean | string[] | {
771
+ config?: string | string[] | undefined;
772
+ entry?: string | string[] | undefined;
773
+ project?: string | string[] | undefined;
774
+ } | undefined;
710
775
  tsup?: string | boolean | string[] | {
711
776
  config?: string | string[] | undefined;
712
777
  entry?: string | string[] | undefined;
713
778
  project?: string | string[] | undefined;
714
779
  } | undefined;
780
+ tsx?: string | boolean | string[] | {
781
+ config?: string | string[] | undefined;
782
+ entry?: string | string[] | undefined;
783
+ project?: string | string[] | undefined;
784
+ } | undefined;
715
785
  typedoc?: string | boolean | string[] | {
716
786
  config?: string | string[] | undefined;
717
787
  entry?: string | string[] | undefined;
@@ -10,6 +10,7 @@ export declare const INTERNAL_TAG = "@internal";
10
10
  export declare const BETA_TAG = "@beta";
11
11
  export declare const ALIAS_TAG = "@alias";
12
12
  export declare const DT_SCOPE = "@types";
13
+ export declare const PROTOCOL_VIRTUAL = "virtual:";
13
14
  export declare const IGNORED_GLOBAL_BINARIES: Set<string>;
14
15
  export declare const IGNORED_DEPENDENCIES: Set<string>;
15
16
  export declare const IGNORED_RUNTIME_DEPENDENCIES: Set<string>;
package/dist/constants.js CHANGED
@@ -18,6 +18,7 @@ export const INTERNAL_TAG = '@internal';
18
18
  export const BETA_TAG = '@beta';
19
19
  export const ALIAS_TAG = '@alias';
20
20
  export const DT_SCOPE = '@types';
21
+ export const PROTOCOL_VIRTUAL = 'virtual:';
21
22
  export const IGNORED_GLOBAL_BINARIES = new Set([
22
23
  'aws',
23
24
  'base64',
@@ -118,7 +119,7 @@ export const IGNORED_GLOBAL_BINARIES = new Set([
118
119
  'yes',
119
120
  ]);
120
121
  export const IGNORED_DEPENDENCIES = new Set(['knip', 'typescript']);
121
- export const IGNORED_RUNTIME_DEPENDENCIES = new Set(['bun', 'deno']);
122
+ export const IGNORED_RUNTIME_DEPENDENCIES = new Set(['node', 'bun', 'deno']);
122
123
  export const FOREIGN_FILE_EXTENSIONS = new Set([
123
124
  '.avif',
124
125
  '.css',