@alimaandev/ripple 0.7.0 → 0.7.1

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.
package/README.md CHANGED
@@ -100,7 +100,7 @@ Everything below is real output against a shipped example project in `tests/fixt
100
100
  ```bash
101
101
  npm install -g @alimaandev/ripple
102
102
 
103
- ripple version # → 0.7.0
103
+ ripple version # → 0.7.1
104
104
  ```
105
105
 
106
106
  Or install from source:
@@ -132,7 +132,7 @@ ripple analyze src/authentication/login.ts
132
132
  Expected output:
133
133
 
134
134
  ```text
135
- ripple · impact analysis · v0.7.0
135
+ ripple · impact analysis · v0.7.1
136
136
 
137
137
  File src/authentication/login.ts
138
138
  Risk MEDIUM · 34.7/100 ███░░░░░░░
@@ -165,7 +165,7 @@ ripple graph
165
165
  ```
166
166
 
167
167
  ```text
168
- ripple · dependency graph · v0.7.0
168
+ ripple · dependency graph · v0.7.1
169
169
 
170
170
  Files 25
171
171
  Edges 28
@@ -216,30 +216,30 @@ ripple <command> [options]
216
216
 
217
217
  ### Options
218
218
 
219
- | Command | Flag | Description |
220
- | --------- | --------------------- | ---------------------------------------------------------------------------------------------- |
221
- | `analyze` | `-j, --json` | Emit the JSON report instead of the terminal report |
222
- | `analyze` | `--sarif` | Emit a SARIF 2.1.0 report for code scanning |
223
- | `analyze` | `-v, --verbose` | Include the risk-factor point breakdown |
224
- | `analyze` | `-d, --depth <n>` | Cap the reverse traversal at `n` levels |
225
- | `analyze` | `-c, --config <path>` | Use a specific config file |
226
- | `analyze` | `--no-color` | Disable ANSI colors |
227
- | `graph` | `-j, --json` | Emit the JSON report |
228
- | `graph` | `-r, --reverse` | Show dependents (what imports this file) instead of dependencies |
229
- | `graph` | `-d, --depth <n>` | Cap tree depth |
230
- | `graph` | `-c, --config <path>` | Use a specific config file |
231
- | `graph` | `--no-color` | Disable ANSI colors |
232
- | `doctor` | `-c, --config <path>` | Use a specific config file |
233
- | `doctor` | `-v, --verbose` | Verbose output |
234
- | `doctor` | `--no-color` | Disable ANSI colors |
235
- | `init` | `-f, --force` | Overwrite an existing config |
236
- | `diff` | `-j, --json` | Emit the JSON report instead of the terminal report |
237
- | `diff` | `-b, --base <ref>` | Git ref to diff against (default: `origin/main`, `main`, `HEAD~1`, or `diff.base` from config) |
238
- | `diff` | `-g, --gate <level>` | Blocking level: `medium`, `high`, or `critical` (default: `high`, or `diff.gate` from config) |
239
- | `diff` | `-f, --format <fmt>` | Output: `terminal`, `json`, `github` (workflow annotations), or `sarif` |
240
- | `diff` | `-d, --depth <n>` | Cap reverse traversal per file |
241
- | `diff` | `-c, --config <path>` | Use a specific config file |
242
- | `diff` | `--no-color` | Disable ANSI colors |
219
+ | Command | Flag | Description |
220
+ | --------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
221
+ | `analyze` | `-j, --json` | Emit the JSON report instead of the terminal report |
222
+ | `analyze` | `--sarif` | Emit a SARIF 2.1.0 report for code scanning |
223
+ | `analyze` | `-v, --verbose` | Include the risk-factor point breakdown |
224
+ | `analyze` | `-d, --depth <n>` | Cap the reverse traversal at `n` levels |
225
+ | `analyze` | `-c, --config <path>` | Use a specific config file |
226
+ | `analyze` | `--no-color` | Disable ANSI colors |
227
+ | `graph` | `-j, --json` | Emit the JSON report |
228
+ | `graph` | `-r, --reverse` | Show dependents (what imports this file) instead of dependencies |
229
+ | `graph` | `-d, --depth <n>` | Cap tree depth |
230
+ | `graph` | `-c, --config <path>` | Use a specific config file |
231
+ | `graph` | `--no-color` | Disable ANSI colors |
232
+ | `doctor` | `-c, --config <path>` | Use a specific config file |
233
+ | `doctor` | `-v, --verbose` | Verbose output |
234
+ | `doctor` | `--no-color` | Disable ANSI colors |
235
+ | `init` | `-f, --force` | Overwrite an existing config |
236
+ | `diff` | `-j, --json` | Emit the JSON report instead of the terminal report |
237
+ | `diff` | `-b, --base <ref>` | Git ref to diff against (default: GitHub PR base, `origin/HEAD`, `origin/main`, `origin/master`, `main`, `master`, or `diff.base`) |
238
+ | `diff` | `-g, --gate <level>` | Blocking level: `medium`, `high`, or `critical` (default: `high`, or `diff.gate` from config) |
239
+ | `diff` | `-f, --format <fmt>` | Output: `terminal`, `json`, `github` (workflow annotations), or `sarif` |
240
+ | `diff` | `-d, --depth <n>` | Cap reverse traversal per file |
241
+ | `diff` | `-c, --config <path>` | Use a specific config file |
242
+ | `diff` | `--no-color` | Disable ANSI colors |
243
243
 
244
244
  ### `ripple mcp`
245
245
 
@@ -292,7 +292,7 @@ files are included; deleted files and non-source changes are skipped.
292
292
 
293
293
  ```bash
294
294
  cd my-project
295
- ripple diff # vs origin/main (then main, then HEAD~1)
295
+ ripple diff # vs the PR base or origin/main
296
296
  ripple diff --base HEAD~1 --json # machine-readable gate report
297
297
  ripple diff --gate critical # only CRITICAL blocks the merge
298
298
  ripple diff --allow "src/legacy/**" # legacy files never block the gate
@@ -398,8 +398,8 @@ defaults — every field is optional.
398
398
 
399
399
  ```json
400
400
  {
401
- "$schema": "./node_modules/@alimaandev/ripple/ripple.schema.json",
402
- "include": ["**/*.{ts,tsx,js,jsx}"],
401
+ "$schema": "https://raw.githubusercontent.com/alimaandev/ripple/main/ripple.schema.json",
402
+ "include": ["**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs}"],
403
403
  "ignore": ["node_modules", "dist", "build", "coverage", ".next", "out"],
404
404
  "aliases": { "@": "./src" },
405
405
  "tsconfigPath": "tsconfig.json",
@@ -425,19 +425,20 @@ defaults — every field is optional.
425
425
 
426
426
  > [!TIP]
427
427
  > The `$schema` line powers editor autocomplete and validation for
428
- > `ripple.config.json` — the package ships `ripple.schema.json` for it.
429
-
430
- | Field | Default | Purpose |
431
- | ----------------- | ----------------------------------------------------------- | ------------------------------------------------------ |
432
- | `include` | `**/*.{ts,tsx,js,jsx}` | Source globs to analyze |
433
- | `ignore` | `node_modules`, `dist`, `build`, `coverage`, `.next`, `out` | Exclusions |
434
- | `aliases` | `{}` | Path aliases, merged with tsconfig `paths` (user wins) |
435
- | `tsconfigPath` | `tsconfig.json` | tsconfig to read for `paths` |
436
- | `risk.weights` | see example | Risk signal weights |
437
- | `risk.thresholds` | 30 / 55 / 80 | Score thresholds for MEDIUM / HIGH / CRITICAL |
438
- | `diff.base` | `origin/main` → `main` → `HEAD~1` | Git ref to diff against when `--base` is not given |
439
- | `diff.allow` | `[]` | Globs of files that never block the gate |
440
- | `diff.gate` | `high` | Blocking level when `--gate` is not given |
428
+ > `ripple.config.json`. `ripple init` writes the hosted schema URL; the
429
+ > package also ships `ripple.schema.json` if you prefer a local path.
430
+
431
+ | Field | Default | Purpose |
432
+ | ----------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------- |
433
+ | `include` | `**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs}` | Source globs to analyze |
434
+ | `ignore` | `node_modules`, `dist`, `build`, `coverage`, `.next`, `out` | Exclusions |
435
+ | `aliases` | `{}` | Path aliases, merged with tsconfig `paths` (user wins) |
436
+ | `tsconfigPath` | `tsconfig.json` | tsconfig to read for `paths` |
437
+ | `risk.weights` | see example | Risk signal weights |
438
+ | `risk.thresholds` | 30 / 55 / 80 | Score thresholds for MEDIUM / HIGH / CRITICAL |
439
+ | `diff.base` | GitHub PR base → `origin/HEAD` → `origin/main` → `origin/master` → `main` → `master` | Git ref to diff against when `--base` is not given |
440
+ | `diff.allow` | `[]` | Project-relative globs of files that never block the gate |
441
+ | `diff.gate` | `high` | Blocking level when `--gate` is not given |
441
442
 
442
443
  `node_modules` is always excluded, regardless of config.
443
444
 
@@ -550,7 +551,7 @@ verdict:
550
551
  ```json
551
552
  {
552
553
  "tool": "ripple",
553
- "version": "0.5.0",
554
+ "version": "0.7.1",
554
555
  "command": "diff",
555
556
  "base": "origin/main",
556
557
  "changedFiles": 2,
@@ -560,20 +561,25 @@ verdict:
560
561
  "analyzed": true,
561
562
  "risk": { "score": 88.2, "level": "CRITICAL", "factors": [] },
562
563
  "affectedFiles": 14,
563
- "targetInCycle": false
564
+ "targetInCycle": false,
565
+ "allowed": false
564
566
  },
565
567
  { "file": "src/api/legacy.js", "analyzed": false }
566
568
  ],
567
569
  "gate": {
568
570
  "level": "high",
569
571
  "blocked": true,
570
- "counts": { "low": 0, "medium": 0, "high": 0, "critical": 1 }
572
+ "counts": { "low": 0, "medium": 0, "high": 0, "critical": 1 },
573
+ "allowed": 0
571
574
  },
572
575
  "durationMs": 118
573
576
  }
574
577
  ```
575
578
 
576
579
  `blocked` tells CI everything: exit code `1` if `true`, `0` otherwise.
580
+ `files[].file` is project-relative (relative to the directory containing your
581
+ Ripple config); SARIF and GitHub annotations use repository-relative paths so
582
+ Code Scanning and PR annotations land on the right file in a monorepo.
577
583
 
578
584
  ### Use it in CI
579
585
 
package/dist/bin.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- export { }
2
+ export { };