@alimaandev/ripple 0.7.1 → 0.7.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.
package/README.md CHANGED
@@ -4,21 +4,34 @@
4
4
 
5
5
  # Ripple
6
6
 
7
- **Dependency impact analysis for TypeScript and JavaScript.**
7
+ **The CI gate that knows the blast radius.**
8
8
 
9
- Change less. Break less. Know the blast radius of any file before you touch it.
9
+ Your AI agent's PR passed tests and still broke 37 routes. Ripple scores every
10
+ changed file by what depends on it, then blocks the merge before that blast
11
+ radius ships.
10
12
 
11
13
  <p align="center">
12
14
  &nbsp;<a href="https://www.npmjs.com/package/@alimaandev/ripple"><img alt="npm version" src="https://img.shields.io/npm/v/@alimaandev/ripple?logo=npm&logoColor=white&label=npm&style=for-the-badge"/></a>&nbsp;
13
15
  &nbsp;<a href="https://www.npmjs.com/package/@alimaandev/ripple"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@alimaandev/ripple?label=downloads&style=for-the-badge"/></a>&nbsp;
16
+ &nbsp;<a href="https://github.com/marketplace?query=ripple"><img alt="GitHub Action" src="https://img.shields.io/badge/GitHub%20Actions-ripple--action-2088FF?logo=githubactions&logoColor=white&style=for-the-badge"/></a>&nbsp;
14
17
  &nbsp;<a href="https://github.com/alimaandev/ripple/actions/workflows/ci.yml"><img alt="CI build" src="https://img.shields.io/github/actions/workflow/status/alimaandev/ripple/ci.yml?branch=main&logo=githubactions&logoColor=white&label=CI%20build&style=for-the-badge"/></a>&nbsp;
15
18
  &nbsp;<a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/github/license/alimaandev/ripple?label=License&style=for-the-badge"/></a>&nbsp;
16
19
  &nbsp;<a href="package.json"><img alt="Node.js >= 22" src="https://img.shields.io/badge/Node.js-%3E%3D22-339933?logo=nodedotjs&logoColor=white&style=for-the-badge"/></a>&nbsp;
17
20
  </p>
18
21
 
19
- <pre><code>npm install -g @alimaandev/ripple
22
+ <p align="center">
23
+ <a href="https://github.com/alimaandev/ripple-action"><strong>Add the gate to your pull requests →</strong></a>
24
+ </p>
25
+
26
+ <pre><code># .github/workflows/ripple.yml
27
+ - uses: actions/checkout@v5
28
+ with:
29
+ fetch-depth: 0
30
+ - uses: alimaandev/ripple-action@v1</code></pre>
31
+
32
+ <p align="center"><sub>No token. No config. Fails the job when a changed file crosses your gate.</sub></p>
20
33
 
21
- # or try it without installing anything:
34
+ <pre><code># or run it locally
22
35
  npx @alimaandev/ripple analyze src/your-file.ts</code></pre>
23
36
 
24
37
  <img src="https://raw.githubusercontent.com/alimaandev/ripple/main/assets/hero-animated.svg" alt="Animated terminal demo of `ripple analyze` — command types in, then the report builds up: risk score with gauge, affected files, routes, components, tests, and confidence" title="ripple analyze" width="100%" />
@@ -27,6 +40,13 @@ npx @alimaandev/ripple analyze src/your-file.ts</code></pre>
27
40
 
28
41
  ## Why Ripple
29
42
 
43
+ ### AI writes PRs faster than you can review them
44
+
45
+ AI agents produce plausible code at machine speed. Tests can still pass while a
46
+ change quietly reaches dozens of routes, shared utilities and tests. Ripple
47
+ makes that blast radius explicit before the merge, so you review the risk — not
48
+ just the diff.
49
+
30
50
  ### The question your tooling doesn't answer
31
51
 
32
52
  In any non-trivial codebase, there is a deceptively simple question:
@@ -100,7 +120,7 @@ Everything below is real output against a shipped example project in `tests/fixt
100
120
  ```bash
101
121
  npm install -g @alimaandev/ripple
102
122
 
103
- ripple version # → 0.7.1
123
+ ripple version # → 0.7.2
104
124
  ```
105
125
 
106
126
  Or install from source:
@@ -132,7 +152,7 @@ ripple analyze src/authentication/login.ts
132
152
  Expected output:
133
153
 
134
154
  ```text
135
- ripple · impact analysis · v0.7.1
155
+ ripple · impact analysis · v0.7.2
136
156
 
137
157
  File src/authentication/login.ts
138
158
  Risk MEDIUM · 34.7/100 ███░░░░░░░
@@ -165,7 +185,7 @@ ripple graph
165
185
  ```
166
186
 
167
187
  ```text
168
- ripple · dependency graph · v0.7.1
188
+ ripple · dependency graph · v0.7.2
169
189
 
170
190
  Files 25
171
191
  Edges 28
@@ -551,7 +571,7 @@ verdict:
551
571
  ```json
552
572
  {
553
573
  "tool": "ripple",
554
- "version": "0.7.1",
574
+ "version": "0.7.2",
555
575
  "command": "diff",
556
576
  "base": "origin/main",
557
577
  "changedFiles": 2,
@@ -581,7 +601,33 @@ verdict:
581
601
  Ripple config); SARIF and GitHub annotations use repository-relative paths so
582
602
  Code Scanning and PR annotations land on the right file in a monorepo.
583
603
 
584
- ### Use it in CI
604
+ ### GitHub Action
605
+
606
+ The one-line gate for pull requests:
607
+
608
+ ```yaml
609
+ name: Ripple
610
+ on: pull_request
611
+
612
+ jobs:
613
+ ripple:
614
+ runs-on: ubuntu-latest
615
+ permissions:
616
+ contents: read
617
+ steps:
618
+ - uses: actions/checkout@v5
619
+ with:
620
+ fetch-depth: 0
621
+ - uses: alimaandev/ripple-action@v1
622
+ ```
623
+
624
+ It fails the job when a changed file crosses the gate, annotates the PR Files
625
+ tab, writes a job summary, and emits `ripple.sarif` for Code Scanning. Use
626
+ `working-directory: packages/app` in a monorepo, and `gate: critical` to tune
627
+ the threshold. See the [action docs](https://github.com/alimaandev/ripple-action)
628
+ for inputs, outputs and the SARIF upload step.
629
+
630
+ ### Raw JSON in any CI
585
631
 
586
632
  ```bash
587
633
  ripple analyze src/authentication/login.ts --json | jq -r .risk.level
@@ -673,6 +719,17 @@ and Windows, and a dogfood job — Ripple gates its own PRs with
673
719
 
674
720
  ## Get started
675
721
 
722
+ Gate your next pull request:
723
+
724
+ ```yaml
725
+ - uses: actions/checkout@v5
726
+ with:
727
+ fetch-depth: 0
728
+ - uses: alimaandev/ripple-action@v1
729
+ ```
730
+
731
+ Or run it locally:
732
+
676
733
  ```bash
677
734
  npm install -g @alimaandev/ripple
678
735
  ripple analyze src/your-file.ts --json | jq -r .risk.level # MEDIUM, HIGH, ...
package/dist/bin.js CHANGED
@@ -1685,7 +1685,7 @@ function buildGraphFromParsed(parsedFiles, context) {
1685
1685
 
1686
1686
  // package.json
1687
1687
  var package_default = {
1688
- version: "0.7.1"};
1688
+ version: "0.7.2"};
1689
1689
 
1690
1690
  // src/cache/parsed.ts
1691
1691
  var CACHE_SCHEMA = 3;