v0.2.0
What's new
Features
- Local CLI (
snapdrift capture/snapdrift diff) — run visual captures and diffs locally against a running app without GitHub Actions. Outputs land in.snapdrift/by default; all paths are overridable via flags. Exits non-zero whendiff.modeenforces failure. - Self-contained HTML diff report — the drift artifact now includes a single
report.htmlwith baseline/current screenshots and diff images embedded as base64, viewable without any server. - Custom viewport support — route
viewportnow accepts an object{ "width": number, "height": number }in addition to the"desktop"and"mobile"presets. - Parallel capture by viewport — routes are now captured concurrently per viewport group, roughly halving capture time on multi-route configurations.
- Route ID sanitization — route IDs are sanitised before use as filenames, preventing path-traversal sequences from escaping the screenshots directory.
- Capture retry logic — failed route captures are retried once before being recorded as errors.
- Progress logging — capture and comparison steps now emit per-route progress to stdout.
Fixes
- HTML report image embedding now falls back correctly when a resolved image path is missing.
- Custom viewport values are formatted correctly in PR comment reports and dimension-shift entries.
- Viewport width/height are cast to numbers before comparison to prevent type-mismatch false positives.
- Dimension shifts section in PR comment reports is auto-expanded by default.
Dependencies
playwright1.58.2 → 1.59.1eslint9.x → 10.x,@eslint/js9.x → 10.xtypescript5.x → 6.xjest30.2.0 → 30.3.0actions/upload-artifactv4 → v7
See the full Changelog for details.