executable-stories-formatters 1.16.1 → 1.17.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
@@ -162,6 +162,8 @@ You can limit which test cases appear in reports using **include** and **exclude
162
162
 
163
163
  Patterns use the same glob semantics as output rules (`*` and `**`). Paths are normalized to forward slashes. This works with any framework that sets `sourceFile` on raw test cases (Jest, Vitest, Playwright, xUnit, etc.).
164
164
 
165
+ A selector that matches nothing is named in a warning. A filter whose path moved otherwise filters nothing, silently, and the report looks filtered when it is the whole suite. The same holds for `--include-tags` and `--exclude-tags`.
166
+
165
167
  Programmatic API:
166
168
 
167
169
  ```ts
@@ -173,6 +175,40 @@ const generator = new ReportGenerator({
173
175
  });
174
176
  ```
175
177
 
178
+ ### Evidence in a pull request (`--attach-images`)
179
+
180
+ A screenshot or clip captured by a run lives on the machine that ran it, so Markdown posted to a pull request carries an "unavailable" line rather than a dead image. `--attach-images` keeps the local paths as real references and prints the command that makes them resolve:
181
+
182
+ ```bash
183
+ executable-stories format reports/raw-run.json --format markdown \
184
+ --output-dir reports --output-name index --attach-images
185
+
186
+ # printed by the command above
187
+ gh pr comment 42 --body-file reports/index.md \
188
+ --attach 'reports/assets/checkout-receipt.png'
189
+ ```
190
+
191
+ GitHub CLI 2.99 and later uploads each attached file and rewrites the reference to it in the body it posts, so nothing needs an image host, an orphan branch, or a `contents: write` token. `gh pr create --attach` puts the same thing in the description. Without `--attach-images` the behaviour is unchanged: a local path is never written as a reference that would arrive broken.
192
+
193
+ ### Architecture the run exercised (`--format span-graph`)
194
+
195
+ Every other way to draw a system's shape infers it, from the folder tree, the import graph, or a model reading a diff, and produces a picture nobody can check. This one is derived from the OTel spans a run emitted:
196
+
197
+ ```bash
198
+ executable-stories format reports/raw-run.json --format span-graph \
199
+ --output-dir reports --output-name index
200
+
201
+ # colour the components the change is really about
202
+ executable-stories format reports/raw-run.json --format span-graph \
203
+ --output-dir reports --output-name index --baseline last-release/raw-run.json
204
+ ```
205
+
206
+ A component appears because a span named it while a scenario ran; an arrow is there because one span was the parent of another across a component boundary. Both carry the scenario ids that put them there, so "what does this change touch" is answered from the run rather than guessed. Components are laned by the OTel convention that named them (`http.route` → edge, `peer.service` → service, `messaging.destination.name` → queue, `db.system` → data), and the output is Mermaid, which every report format and GitHub already render.
207
+
208
+ `--baseline` marks a component every touching scenario is new to as added, and the two components the diff moved most of as changed. The cap is the point: without it a hub that sits on most scenarios is coloured on every run.
209
+
210
+ It draws instrumented, exercised paths only. A component no scenario reaches does not appear, which is the same shape as coverage and worth reading as such. **A run with no spans writes no file**, so adding the format to a preset costs nothing until something is instrumented.
211
+
176
212
  ## Living docs site (Confluence replacement)
177
213
 
178
214
  Scaffold an Astro/Starlight site whose pages stay honest because the tests keep