saffron-ai 0.8.0 → 0.8.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/CHANGELOG.md +76 -8
- package/README.md +1 -1
- package/dist-pkg/cli.js +113 -110
- package/package.json +1 -1
- package/skills/saffron/SKILL.md +1 -0
- package/skills/saffron/references/config.md +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,69 @@ All notable changes to Saffron, in one place: the `saffron-ai` runner (npm),
|
|
|
4
4
|
the VS Code extension (`ChathurangaJayasinghe.saffron-vscode`) and the
|
|
5
5
|
JetBrains plugin (`ai.saffron.jetbrains`). Dates are publish dates.
|
|
6
6
|
|
|
7
|
+
## 0.8.1
|
|
8
|
+
|
|
9
|
+
Released 2026-09-21.
|
|
10
|
+
|
|
11
|
+
Runner
|
|
12
|
+
|
|
13
|
+
- **Google Chrome and Microsoft Edge: `--browser chrome` and
|
|
14
|
+
`--browser msedge`.** Run on the branded browser your users actually
|
|
15
|
+
have, not only the open-source Chromium build. Both speak CDP, so
|
|
16
|
+
everything works there: replay, recording and healing. Recordings are the
|
|
17
|
+
same files, so a scenario recorded on `chromium` replays on `chrome` and
|
|
18
|
+
`msedge` and the other way round. Saffron uses the copy installed on the
|
|
19
|
+
machine; when it is missing the run stops before the first scenario, exit
|
|
20
|
+
code 2, and names the browser (`npx playwright install chrome` adds it on
|
|
21
|
+
a CI image). Also accepted as `browser` in the config.
|
|
22
|
+
- **Setup and teardown: `"setup"` and `"teardown"` in the config.** Shell
|
|
23
|
+
commands, one or a list, that Saffron runs once around a run, in the
|
|
24
|
+
project root: seed the data your scenarios read before any browser
|
|
25
|
+
opens, and clean up after the last scenario. A failed setup stops the
|
|
26
|
+
run with exit code 2 and no scenario runs. Teardown always runs: after
|
|
27
|
+
failures, after a failed setup, after Ctrl-C (which first stops a running
|
|
28
|
+
setup and waits for it, so nothing writes behind the cleanup). A failed teardown leaves
|
|
29
|
+
the verdicts alone and turns an otherwise green exit into 2, because what
|
|
30
|
+
it left behind is the next run's false red. The commands receive
|
|
31
|
+
`SAFFRON_BASE_URL` and `SAFFRON_ENV`. `--no-hooks` skips them,
|
|
32
|
+
`hookTimeoutMs` (default five minutes) bounds each one, and the report
|
|
33
|
+
lists every command with how it ended. With `{unique:name}` from 0.8.0
|
|
34
|
+
this makes a suite re-runnable and parallel-safe.
|
|
35
|
+
|
|
36
|
+
Fixes
|
|
37
|
+
|
|
38
|
+
- **Step reuse could bring back a stale data value.** When a `{data:...}`
|
|
39
|
+
value changed, the scenario's recording correctly went stale, but a new
|
|
40
|
+
recording could be seeded from that same recording's steps, putting the
|
|
41
|
+
old literal back under a fresh data snapshot, verified, at zero AI calls.
|
|
42
|
+
A step whose source recording still spells out a value that has since
|
|
43
|
+
changed is no longer reused.
|
|
44
|
+
- **`every {data:list}` counted hidden content as shown.** A value sitting
|
|
45
|
+
in a `hidden` or `display: none` element satisfied the check. The target
|
|
46
|
+
must now be visible, and only text the page actually shows counts. A
|
|
47
|
+
native `<select>` keeps its exception, since its options are never
|
|
48
|
+
visible while it is closed, but only when the select itself is visible.
|
|
49
|
+
Text is still compared as written, so CSS `text-transform` does not
|
|
50
|
+
change the result.
|
|
51
|
+
- **`{unique:name}` inside an Examples cell, a table cell or a doc string
|
|
52
|
+
reached the browser as the literal token.** Unique values were resolved
|
|
53
|
+
before parameters were substituted. They are now resolved in parameter
|
|
54
|
+
values too, with the same per-run seed, for values and locators alike.
|
|
55
|
+
- **`saffron prune` could list the screenshots of a live scenario as
|
|
56
|
+
orphaned** when its feature file is outside the configured directory and
|
|
57
|
+
the scenario has only ever failed, so no cache or proposal named the
|
|
58
|
+
file. Each screenshot folder now records which feature and scenario it
|
|
59
|
+
belongs to, prune reads it before judging, and the listing names what
|
|
60
|
+
the pictures were of.
|
|
61
|
+
|
|
62
|
+
Editors (VS Code extension 0.2.8)
|
|
63
|
+
|
|
64
|
+
- **VS Code ignored environment-specific CSV files.** With environment
|
|
65
|
+
`staging` and `roles.staging.csv`, `Examples: {data:roles}` was reported
|
|
66
|
+
as not resolving, or described from the base `roles.csv`. Diagnostics,
|
|
67
|
+
hover and go-to-definition now follow the runner: the environment's CSV
|
|
68
|
+
replaces the base one, and the hover names the file it read.
|
|
69
|
+
|
|
7
70
|
## 0.8.0
|
|
8
71
|
|
|
9
72
|
Released 2026-09-21.
|
|
@@ -56,7 +119,19 @@ Runner
|
|
|
56
119
|
lists those folders with the caches and proposals and removes them with
|
|
57
120
|
`--yes`; a live scenario's folder is kept, per Examples row. `saffron
|
|
58
121
|
status --json` reports them as orphans of kind `artifact`, and both IDE
|
|
59
|
-
panels (VS Code 0.2.
|
|
122
|
+
panels (VS Code 0.2.7, JetBrains 0.2.4) show them.
|
|
123
|
+
|
|
124
|
+
Editors (VS Code extension 0.2.7, JetBrains plugin 0.2.4)
|
|
125
|
+
|
|
126
|
+
- **`{data:...}` in the editor.** VS Code completes data files and keys with
|
|
127
|
+
their values, shows the current value (or a list's values, or an Examples
|
|
128
|
+
file's columns) on hover, jumps to the key, and underlines a reference
|
|
129
|
+
that does not resolve, reading the same files and environment overlay the
|
|
130
|
+
runner does. JetBrains gets the same through `saffron lsp`. Both highlight
|
|
131
|
+
`{data:...}` and `{unique:...}` like `{env:VAR}`, including on an
|
|
132
|
+
`Examples:` line.
|
|
133
|
+
- Both Orphans lists show the screenshot folders of scenarios that no longer
|
|
134
|
+
exist, so "Remove All" never deletes something it did not show.
|
|
60
135
|
|
|
61
136
|
## 0.7.2
|
|
62
137
|
|
|
@@ -88,13 +163,6 @@ Runner
|
|
|
88
163
|
|
|
89
164
|
Editors (VS Code extension 0.2.6, JetBrains plugin 0.2.3)
|
|
90
165
|
|
|
91
|
-
- **`{data:...}` in the editor.** VS Code completes data files and keys with
|
|
92
|
-
their values, shows the current value (or a list's values, or an Examples
|
|
93
|
-
file's columns) on hover, jumps to the key, and underlines a reference
|
|
94
|
-
that does not resolve, reading the same files and environment overlay the
|
|
95
|
-
runner does. JetBrains gets the same through `saffron lsp`. Both highlight
|
|
96
|
-
`{data:...}` and `{unique:...}` like `{env:VAR}`, including on an
|
|
97
|
-
`Examples:` line.
|
|
98
166
|
- **Last run, with the screenshot one click away.** Both IDEs list what the
|
|
99
167
|
last run left to look at: failed scenarios, then healed ones, with the
|
|
100
168
|
step that failed. VS Code opens the screenshot in its image preview on
|
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ node dist/cli/index.js -p examples accept --all
|
|
|
72
72
|
|
|
73
73
|
| Command | What it does |
|
|
74
74
|
|---|---|
|
|
75
|
-
| `saffron run [paths] [--headed] [--filter @tags] [--rerecord] [--no-agent] [--strict] [--browser b] [--workers n] [--heal-model m] [--no-verify] [--no-reuse] [--model m] [--storage-state f]` | Run features. Cached replays are deterministic; misses/failures escalate to the agent (unless `--no-agent`). Replay cross-browser with `--browser firefox\|webkit`, parallelize with `--workers N`, heal on a cheaper model with `--heal-model`. Exit 1 on red (and on yellow with `--strict`). |
|
|
75
|
+
| `saffron run [paths] [--headed] [--filter @tags] [--rerecord] [--no-agent] [--strict] [--browser b] [--no-hooks] [--workers n] [--heal-model m] [--no-verify] [--no-reuse] [--model m] [--storage-state f]` | Run features. Cached replays are deterministic; misses/failures escalate to the agent (unless `--no-agent`). Replay cross-browser with `--browser firefox\|webkit`, parallelize with `--workers N`, heal on a cheaper model with `--heal-model`. Exit 1 on red (and on yellow with `--strict`). |
|
|
76
76
|
| `saffron accept [files... \| --all] [--include-unverified] [--with-feature-edit] [--propagate]` | Promote cache proposals to committed caches (`--all` skips UNVERIFIED ones unless `--include-unverified`); `--with-feature-edit` also rewrites the adapted steps in the `.feature` file (and keeps the cache in sync); `--propagate` applies the heal's locator fixes to every other cache using the same locator. One heal repairs N scenarios before they ever fail. No args: list pending proposals. |
|
|
77
77
|
| `saffron reject [files... \| --all]` | Discard proposals; the agent will try again next run. |
|
|
78
78
|
| `saffron status [--json]` | Project overview for people, IDE panels and dashboards: feature files and scenarios with cache state, tags, pending proposals, last run, history, vocabulary health (divergent steps, duplicate wordings proven by identical recordings), effective config. |
|