knip 6.46.1 → 6.47.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 (59) hide show
  1. package/dist/ConfigurationChief.d.ts +2 -0
  2. package/dist/IssueFixer.js +2 -6
  3. package/dist/WorkspaceWorker.d.ts +1 -0
  4. package/dist/WorkspaceWorker.js +10 -6
  5. package/dist/compilers/mdx.js +7 -1
  6. package/dist/plugins/angular/helpers.d.ts +7 -0
  7. package/dist/plugins/angular/helpers.js +58 -0
  8. package/dist/plugins/angular/index.js +5 -50
  9. package/dist/plugins/angular/types.d.ts +2 -2
  10. package/dist/plugins/astro/index.js +6 -1
  11. package/dist/plugins/cucumber/index.js +19 -7
  12. package/dist/plugins/cucumber/types.d.ts +1 -0
  13. package/dist/plugins/cypress/index.js +5 -0
  14. package/dist/plugins/drizzle/index.js +5 -0
  15. package/dist/plugins/github-action/index.js +13 -3
  16. package/dist/plugins/github-actions/index.d.ts +2 -1
  17. package/dist/plugins/github-actions/index.js +4 -2
  18. package/dist/plugins/github-actions/types.d.ts +5 -0
  19. package/dist/plugins/index.d.ts +2 -0
  20. package/dist/plugins/index.js +4 -0
  21. package/dist/plugins/mocha/index.js +6 -0
  22. package/dist/plugins/mocha/types.d.ts +3 -0
  23. package/dist/plugins/node/index.d.ts +2 -2
  24. package/dist/plugins/node/index.js +14 -3
  25. package/dist/plugins/nx/index.js +14 -1
  26. package/dist/plugins/plop/index.js +4 -0
  27. package/dist/plugins/prisma/index.js +2 -0
  28. package/dist/plugins/rollup/index.js +1 -1
  29. package/dist/plugins/sst/resolveFromAST.js +24 -15
  30. package/dist/plugins/start-server-and-test/index.d.ts +3 -0
  31. package/dist/plugins/start-server-and-test/index.js +10 -0
  32. package/dist/plugins/trigger-dev/index.d.ts +3 -0
  33. package/dist/plugins/trigger-dev/index.js +28 -0
  34. package/dist/plugins/tsx/index.js +1 -1
  35. package/dist/plugins/typedoc/index.js +5 -2
  36. package/dist/plugins/typescript/index.d.ts +12 -1
  37. package/dist/plugins/typescript/index.js +6 -3
  38. package/dist/plugins/vite-plus/index.d.ts +4 -1
  39. package/dist/plugins/vite-plus/index.js +19 -4
  40. package/dist/plugins/vite-plus/types.d.ts +12 -0
  41. package/dist/plugins/vite-plus/types.js +1 -0
  42. package/dist/plugins/vitepress/index.js +14 -0
  43. package/dist/plugins/vitest/index.js +5 -0
  44. package/dist/plugins/vitest/types.d.ts +2 -1
  45. package/dist/plugins/web-test-runner/index.js +8 -2
  46. package/dist/plugins/wrangler/index.js +4 -0
  47. package/dist/session/index.d.ts +1 -0
  48. package/dist/session/index.js +1 -0
  49. package/dist/types/PluginNames.d.ts +2 -2
  50. package/dist/types/PluginNames.js +2 -0
  51. package/dist/util/create-input-handler.js +3 -1
  52. package/dist/util/remove-export.d.ts +1 -0
  53. package/dist/util/remove-export.js +2 -0
  54. package/dist/version.d.ts +1 -1
  55. package/dist/version.js +1 -1
  56. package/package.json +1 -1
  57. package/schema.json +8 -0
  58. package/dist/plugins/vite-plus/resolveFromAST.d.ts +0 -2
  59. package/dist/plugins/vite-plus/resolveFromAST.js +0 -37
@@ -1,37 +0,0 @@
1
- import { Visitor } from 'oxc-parser';
2
- import { findProperty, getPropertyValues } from '../../typescript/ast-helpers.js';
3
- import { getStringValue } from '../../typescript/ast-nodes.js';
4
- export const resolveFromAST = (program, options) => {
5
- const commands = [];
6
- const visitor = new Visitor({
7
- ObjectExpression(node) {
8
- const run = findProperty(node, 'run');
9
- const tasks = run?.type === 'ObjectExpression' ? findProperty(run, 'tasks') : undefined;
10
- if (tasks?.type === 'ObjectExpression') {
11
- for (const task of tasks.properties ?? []) {
12
- if (task.type === 'Property' && task.value?.type === 'ObjectExpression') {
13
- for (const command of getPropertyValues(task.value, 'command'))
14
- commands.push(command);
15
- }
16
- }
17
- }
18
- const staged = findProperty(node, 'staged');
19
- if (staged?.type === 'ObjectExpression') {
20
- for (const prop of staged.properties ?? []) {
21
- if (prop.type === 'Property') {
22
- const command = getStringValue(prop.value);
23
- if (command)
24
- commands.push(command);
25
- }
26
- }
27
- }
28
- },
29
- });
30
- visitor.visit(program);
31
- const inputs = [];
32
- for (const command of commands) {
33
- for (const input of options.getInputsFromScripts(command, { optionalBinaries: true }))
34
- inputs.push(input);
35
- }
36
- return inputs;
37
- };