跳到主要內容

Cypress 外掛發行版本

Cypress 外掛更新日誌

1.0.0 (2026-10-07)

No changes. This release is identical to the last version (4.3.0) of @frsource/cypress-plugin-visual-regression-diff.

The 4.x entries below are the release history of the former @frsource/cypress-plugin-visual-regression-diff package, kept for reference. @pixsame/cypress-plugin-visual-regression-diff continues from 4.3.0 as 1.0.0.

4.3.0 (2026-10-07)

Features

4.2.1 (2026-10-02)

Bug Fixes

  • Remove stale .diff files once the comparison no longer fails (#426) (0ea0356)
  • restore screenshot counters correctly on test retry (#426) (0ea0356)
  • declare the Node engine as >=20.9 - sharp dependency has required that since 4.0.2 (#426) (0ea0356)

4.2.0 (2026-09-20)

Features

  • add Batch Review Mode (pluginVisualRegressionBatchReviewMode) with batch image review UI (#374) (7d8e975)

Bug Fixes

  • add plugin metadata to .actual.png so approved or renamed baselines are not rewritten (#404) (5ed7ebe)
  • deps: update all non-major dependency bump (#401) (f442275)
  • deps: update dependency @frsource/base64 to v1.0.221 (#386) (3aa16e6)
  • deps: update dependency @frsource/base64 to v1.0.223 (#389) (0ed6003)
  • deps: update dependency @frsource/base64 to v1.0.226 (#394) (caa95ff)
  • deps: update dependency @frsource/base64 to v1.0.228 (#395) (df44a6f)
  • deps: update dependency @frsource/base64 to v1.0.237 (#406) (d1029c1)
  • deps: update dependency sharp to v0.35.4 security (#399) (6ef06d1)

4.1.1 (2026-07-05)

Bug Fixes

  • deps: update dependency sharp to v0.35.3 (#379) (42a6d12)

4.1.0 (2026-07-02)

Features

4.0.2 (2026-06-28)

Bug Fixes

  • deps: update all minor dependency bump (#256) (a30132c)
  • deps: update all non-major dependency bump (#356) (a6c31f2)
  • deps: update dependency glob to v13 (#368) (1a40d42)
  • deps: update dependency move-file to v4 (#369) (6fdfbb8)
  • deps: update dependency pixelmatch to v7 (#370) (19f0d77)

4.0.1 (2026-06-26)

Bug Fixes

4.0.0 (2026-06-26)

⚠ BREAKING CHANGES

  • Cypress minimum version raised to 13
  • Node.js minimum version raised to 14
  • Attempt separator changed: space → underscore (resolves #196) The number appended to snapshot filenames on retried attempts is now separated by an underscore instead of a space.
BeforeAfter
test name #0.pngtest name_#0.png

Migration: regenerate your baseline snapshots, or batch-rename existing files:

# Example rename (macOS/Linux)
find . -name "* #*.png" | while read f; do
  mv "$f" "${f/ #/_#}"
done

imagesDir option removed

The imagesDir option was deprecated in v3 and has been fully removed. Use imagesPath instead.

- pluginVisualRegressionImagesDir: 'cypress/__image_snapshots__'
+ pluginVisualRegressionImagesPath: 'cypress/__image_snapshots__'

For migration, look to the end of release note.

Features

A new value for the existing updateImages option. When set, baselines are only overwritten when the diff exceeds the configured threshold — unchanged screenshots are left as-is. This is particularly useful for CI jobs that capture screenshots on a reference platform: images that haven't changed are skipped, speeding up the run.

cy.matchImage({ updateImages: 'failures-only' });
// or as a global default in cypress.config.js:
pluginVisualRegressionUpdateImages: 'failures-only'
  • processImgPath task hook (closes #179, resolves #106)

A new cypressPluginVisualRegressionDiff:processImgPath Cypress task is called after every screenshot, giving you full control over where the file ends up. By default it is a no-op, but you can override it in setupNodeEvents to integrate with reporters such as cypress-mochawesome-reporter:

// cypress.config.js
on('task', {
  'cypressPluginVisualRegressionDiff:processImgPath'({ imgPath }) {
    // return a modified path, or return imgPath unchanged
    return imgPath;
  },
});

Bug Fixes

  • "Update screenshot" button now respects matchAgainstPath (resolves #259, #282)
  • Auto-cleanup no longer deletes snapshots from the other testing type (fixes #178)

Dependency Upgrades

DependencyOldNewNotes
Cypress (peer)≥ 10≥ 13
sharp0.32.x0.33.5Resolves CVE-2023-4863 (libwebp vulnerability)
Node.js (engine)≥ 12≥ 14Aligned with Cypress 13
Vitest1.x2.xInternal — does not affect plugin consumers
  • deps: update all non-major dependency bump (#260) (da9f52c)
  • deps: update all non-major dependency bump (#268) (4bc8247)
  • deps: update all non-major dependency bump (#274) (3ff8d88)
  • deps: update all non-major dependency bump (#283) (a2d7379)
  • deps: update all non-major dependency bump (#285) (aea122c)
  • deps: update all non-major dependency bump (#297) (6ac55f0)
  • deps: update all non-major dependency bump (#298) (2181dcf)
  • deps: update all non-major dependency bump (#312) (e265d7b)
  • deps: update dependency @frsource/base64 to v1.0.26 (#288) (36aafcd)

Documentation

New FAQ entries have been added covering:

  • Screenshot size differences between cypress run and cypress open (#294) — use forceDeviceScaleFactor: true to normalise the device pixel ratio.
  • Composing with other plugins that also register setupNodeEvents (#302) — use cypress-on-fix to avoid handlers overwriting each other.
  • Integrating diff images with mochawesome (#106) — use the new processImgPath hook to point the reporter at the correct path.
  • Answers to several long-standing community discussions: #96, #189, #214, #226, #309.

3.3.10 (2023-06-17)

Bug Fixes

  • deps: update dependency @frsource/base64 to v1.0.17 (#244) (d55c677)