@rainy-updates/cli 0.6.0 → 0.6.2

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 (63) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/README.md +12 -0
  3. package/dist/bin/cli.js +12 -127
  4. package/dist/bin/dispatch.js +6 -0
  5. package/dist/bin/help.js +48 -0
  6. package/dist/bin/main.d.ts +1 -0
  7. package/dist/bin/main.js +126 -0
  8. package/dist/commands/audit/parser.js +36 -0
  9. package/dist/commands/audit/runner.js +17 -18
  10. package/dist/commands/bisect/oracle.js +21 -17
  11. package/dist/commands/bisect/runner.js +4 -3
  12. package/dist/commands/dashboard/parser.js +41 -0
  13. package/dist/commands/dashboard/runner.js +3 -0
  14. package/dist/commands/doctor/parser.js +44 -0
  15. package/dist/commands/ga/parser.js +39 -0
  16. package/dist/commands/ga/runner.js +73 -9
  17. package/dist/commands/health/parser.js +36 -0
  18. package/dist/commands/health/runner.js +5 -1
  19. package/dist/commands/hook/parser.d.ts +2 -0
  20. package/dist/commands/hook/parser.js +40 -0
  21. package/dist/commands/hook/runner.d.ts +2 -0
  22. package/dist/commands/hook/runner.js +174 -0
  23. package/dist/commands/licenses/parser.js +39 -0
  24. package/dist/commands/licenses/runner.js +5 -1
  25. package/dist/commands/resolve/graph/builder.js +5 -1
  26. package/dist/commands/resolve/parser.js +39 -0
  27. package/dist/commands/resolve/runner.js +5 -0
  28. package/dist/commands/review/parser.js +44 -0
  29. package/dist/commands/snapshot/parser.js +39 -0
  30. package/dist/commands/snapshot/runner.js +4 -1
  31. package/dist/commands/unused/parser.js +39 -0
  32. package/dist/commands/unused/runner.js +4 -1
  33. package/dist/commands/unused/scanner.d.ts +2 -1
  34. package/dist/commands/unused/scanner.js +60 -44
  35. package/dist/core/check.js +5 -1
  36. package/dist/core/doctor/findings.js +4 -4
  37. package/dist/core/init-ci.js +28 -26
  38. package/dist/core/options.d.ts +4 -1
  39. package/dist/core/options.js +57 -0
  40. package/dist/core/verification.js +11 -9
  41. package/dist/core/warm-cache.js +5 -1
  42. package/dist/generated/version.d.ts +1 -0
  43. package/dist/generated/version.js +2 -0
  44. package/dist/git/scope.d.ts +19 -0
  45. package/dist/git/scope.js +167 -0
  46. package/dist/index.d.ts +2 -1
  47. package/dist/index.js +1 -0
  48. package/dist/output/sarif.js +2 -8
  49. package/dist/pm/detect.d.ts +37 -0
  50. package/dist/pm/detect.js +133 -2
  51. package/dist/pm/install.d.ts +2 -1
  52. package/dist/pm/install.js +7 -5
  53. package/dist/rup +0 -0
  54. package/dist/types/index.d.ts +59 -1
  55. package/dist/ui/dashboard-state.d.ts +7 -0
  56. package/dist/ui/dashboard-state.js +44 -0
  57. package/dist/ui/tui.d.ts +3 -0
  58. package/dist/ui/tui.js +311 -111
  59. package/dist/utils/shell.d.ts +6 -0
  60. package/dist/utils/shell.js +18 -0
  61. package/dist/workspace/discover.d.ts +7 -1
  62. package/dist/workspace/discover.js +12 -3
  63. package/package.json +16 -8
@@ -1,4 +1,5 @@
1
1
  import path from "node:path";
2
+ import { scopePackageDirsByGit } from "../git/scope.js";
2
3
  const HARD_IGNORE_DIRS = new Set([
3
4
  "node_modules",
4
5
  ".git",
@@ -8,9 +9,13 @@ const HARD_IGNORE_DIRS = new Set([
8
9
  "coverage",
9
10
  ]);
10
11
  const MAX_DISCOVERED_DIRS = 20000;
11
- export async function discoverPackageDirs(cwd, workspaceMode) {
12
+ export async function discoverPackageDirs(cwd, workspaceMode, options = {}) {
12
13
  if (!workspaceMode) {
13
- return [cwd];
14
+ const scoped = await scopePackageDirsByGit(cwd, [cwd], options.git ?? {}, {
15
+ includeKinds: options.includeKinds,
16
+ includeDependents: options.includeDependents,
17
+ });
18
+ return scoped.packageDirs;
14
19
  }
15
20
  const roots = new Set([cwd]);
16
21
  const patterns = [
@@ -40,7 +45,11 @@ export async function discoverPackageDirs(cwd, workspaceMode) {
40
45
  existing.push(dir);
41
46
  }
42
47
  }
43
- return existing.sort();
48
+ const scoped = await scopePackageDirsByGit(cwd, existing.sort(), options.git ?? {}, {
49
+ includeKinds: options.includeKinds,
50
+ includeDependents: options.includeDependents,
51
+ });
52
+ return scoped.packageDirs;
44
53
  }
45
54
  async function packageFileExists(packageJsonPath) {
46
55
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rainy-updates/cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "The fastest DevOps-first dependency CLI. Checks, audits, upgrades, bisects, and automates npm/pnpm dependencies in CI.",
5
5
  "type": "module",
6
6
  "private": false,
@@ -30,6 +30,7 @@
30
30
  "renovate"
31
31
  ],
32
32
  "bin": {
33
+ "cli": "./dist/bin/cli.js",
33
34
  "rainy-updates": "./dist/bin/cli.js",
34
35
  "rainy-up": "./dist/bin/cli.js",
35
36
  "rup": "./dist/bin/cli.js"
@@ -50,13 +51,19 @@
50
51
  "CODE_OF_CONDUCT.md"
51
52
  ],
52
53
  "scripts": {
53
- "clean": "rm -rf dist",
54
- "build": "tsc -p tsconfig.build.json",
55
- "build:exe": "bun build ./src/bin/cli.ts --compile --outfile dist/rup",
56
- "typecheck": "tsc --noEmit",
57
- "test": "bun test",
54
+ "clean": "bun scripts/clean.mjs",
55
+ "version:sync": "bun scripts/sync-version.mjs",
56
+ "version:check": "bun scripts/sync-version.mjs --check",
57
+ "version": "bun run version:sync",
58
+ "build": "bun run version:sync && tsc -p tsconfig.build.json",
59
+ "build:exe": "bun run version:sync && bun build ./src/bin/cli.ts --compile --outfile dist/rup",
60
+ "build:release-binary": "bun scripts/build-release-binary.mjs",
61
+ "generate:distribution-manifests": "bun scripts/generate-distribution-manifests.mjs",
62
+ "typecheck": "bun run version:check && tsc --noEmit",
63
+ "test": "bun run version:check && bun test",
58
64
  "lint": "bunx biome check src tests",
59
65
  "check": "bun run typecheck && bun test",
66
+ "ga": "bun ./src/bin/cli.ts ga",
60
67
  "bench:fixtures": "bun run scripts/generate-benchmark-fixtures.mjs",
61
68
  "bench:check": "bun run build && bun run bench:fixtures && bun run scripts/benchmark.mjs single-100 check cold 3 && bun run scripts/benchmark.mjs single-100 check warm 3",
62
69
  "bench:review": "bun run build && bun run bench:fixtures && bun run scripts/benchmark.mjs single-100 review cold 3 && bun run scripts/benchmark.mjs single-100 review warm 3",
@@ -66,7 +73,7 @@
66
73
  "perf:check": "bun run scripts/perf-smoke.mjs",
67
74
  "perf:resolve": "RAINY_UPDATES_PERF_SCENARIO=resolve bun run scripts/perf-smoke.mjs",
68
75
  "perf:ci": "RAINY_UPDATES_PERF_SCENARIO=ci bun run scripts/perf-smoke.mjs",
69
- "test:prod": "bun ./dist/bin/cli.js --help && bun ./dist/bin/cli.js --version && (test -x ./dist/rup || bun run build:exe) && ./dist/rup --help && ./dist/rup --version",
76
+ "test:prod": "bun scripts/test-prod.mjs",
70
77
  "prepublishOnly": "bun run check && bun run build && bun run build:exe && bun run test:prod"
71
78
  },
72
79
  "engines": {
@@ -78,7 +85,7 @@
78
85
  "provenance": true
79
86
  },
80
87
  "devDependencies": {
81
- "@types/bun": "1.3.9",
88
+ "@types/bun": "1.3.10",
82
89
  "@types/react": "^19.2.14",
83
90
  "ink-testing-library": "^4.0.0",
84
91
  "react-devtools-core": "^7.0.1",
@@ -86,6 +93,7 @@
86
93
  },
87
94
  "dependencies": {
88
95
  "ink": "^6.8.0",
96
+ "oxc-parser": "^0.116.0",
89
97
  "react": "^19.2.4",
90
98
  "zod": "^4.3.6"
91
99
  }