Release notes

happo for npm release notes

The happo npm package: the CLI and its Storybook, Cypress, Playwright, and Vitest integrations.

7.2.0Fix for animated snapshots stopping after one stage

Fixed

  • Fix multi-stage animation capture stopping after the first stage when a stage's first new frame only repeats an already-captured animation, such as a completion fade that re-runs before the next stage's change lands; capture now keeps looking until a genuinely new animation appears or the wait time runs out [by @trotzig in #876]

7.1.0Vitest Browser Mode integration

This release adds support for taking snapshots from Testing Library tests run under Vitest Browser Mode, along with smaller fixes.

Added

  • Add a Vitest Browser Mode integration: use happoVitestPlugin() and happoScreenshot() from happo/vitest and happo/vitest/browser to send snapshots from Testing Library tests, with support for targets, dynamic targets, snapshotStrategy, --skip, and autoApplyPseudoStateAttributes [by @trotzig in #308]

Changed

  • Default autoApplyPseudoStateAttributes to true in the Vitest integration, matching the Cypress and Playwright integrations, so hover and focus attributes apply by default [by @lencioni in #763]

Fixed

  • Stop reporting write EPIPE errors to the error tracker and failing the exit code when whatever reads the CLI's stdout disconnects mid-run [by @lencioni in #748]
  • Update the "Missing apiKey and apiSecret" error message to link directly to the API tokens page at <endpoint>/api-tokens instead of /settings [by @trotzig in #768]

Breaking

7.0.0happo v7: stricter defaults, removed options

This release turns on by default the checks that used to be opt-in, removes config options and CLI flags Happo no longer needs, fails on config options it doesn't recognize, and raises the minimum Node and Storybook versions. Expect the first run after upgrading to report diffs for examples with outlines or box shadows at their edges, and expect the projects that run for the same commit to post a single Happo status check. See the upgrade guide at https://docs.happo.io/docs/upgrading-to-v7 and the announcement at https://happo.io/blog/happo-v7.

Breaking changes

  • Block approval by default on render errors, new accessibility violations and pages that start to scroll sideways: a config without blockApproval now turns on every condition, and a condition left out of a blockApproval object is on too; set one to false to allow approval despite it. A page that already scrolled sideways before the upgrade doesn't block [by @trotzig in #178]
  • Default group to true, so the projects that run for the same commit combine into one job with a single Happo status check instead of a Happo (<project>) check each; require Happo in branch protection, or set group: false to keep a project's own job and check [by @trotzig in #178]
  • Default includeOutlinesAndShadows to true, so screenshots grow to hold the outlines and outer box shadows at the edge of an example; expect a diff for each such example on the first run, or set it to false on a target to crop to the elements' boxes [by @trotzig in #178]
  • Default detectHorizontalOverflow to true, so a page that starts to scroll sideways is a diff even when its pixels are the same; a page that already overflowed is flagged but doesn't become a diff, and false on a target turns the check off [by @trotzig in #178]
  • Enable deep compare by default: a config without deepCompare now compares with { compareThreshold: 0.002, diffAlgorithm: 'color-delta' }, which takes the place of a threshold set for the project on happo.io; set deepCompare: false to keep using the project's settings [by @trotzig in #178]
  • Default allowedHostnames to an empty list, so a target blocks every external request unless the config names the hostnames it needs; ios-safari and ipad-safari targets are unaffected [by @trotzig in #178]
  • Default integration.autoApplyPseudoStateAttributes to true for Cypress and Playwright; set it to false to manage the data-happo-* attributes yourself [by @trotzig in #178]
  • Reject unknown config options with an error, with a "did you mean" suggestion for likely typos, so a config with a removed or misspelled option now fails instead of being ignored; every problem in the config is reported at once [by @trotzig in #178]
  • Remove the target.chunks, useFullPageFallbackForTallScreenshots and githubApiUrl config options, and the --githubToken and --skippedExamples CLI flags; use --skip instead of --skippedExamples, and drop the rest [by @trotzig in #178]
  • Stop posting Happo statuses as pull request comments from the CLI: happo.io posts statuses itself, for github.com and GitHub Enterprise [by @trotzig in #178]
  • Chunk every run automatically at about 100 snapshots per chunk, capped at 20 chunks, now including the pages integration and Cypress and Playwright runs, which used to run as a single chunk [by @trotzig in #178]
  • Require a custom integration's build() to return estimatedSnapsCount; it doesn't have to be exact [by @trotzig in #178]
  • Raise the minimum Node version to ^22.18.0 || >=24.0.0, dropping Node 23, and the minimum Storybook version to v9, dropping the v8 addon [by @trotzig in #178]
  • Require a Happo server with the bulk snap-request endpoint: the fallback to one request per chunk for servers without it is gone [by @trotzig in #178]

Added

  • Add a blockApproval.horizontalOverflow option, on by default, that blocks approval when a page starts to scroll sideways, whether an existing snapshot now overflows or a new one does; a page that already overflowed, or whose baseline was never measured, doesn't block [by @lencioni in #675]

6.25.3Fix flake listing crash for flakes without a project

Fixed

  • Fix the happo flake command failing with an error when a flake has no associated project [by @lencioni in #681]

6.25.2Fewer noisy CLI error reports

Fixed

  • Stop reporting CLI argument typos, like unknown or missing option values, to our error tracking; the CLI still shows you the error and exits with 1 [by @trotzig in #650].

6.25.1Fix GitLab fallback SHA history fetch depth

Fixed

  • Fix GitLab merge requests fetching too little base history to compute fallback SHAs, and avoid fetching history unnecessarily when --fallbackShas is given [by @lencioni in #639]

6.25.0GitHub Actions OIDC auth, browser sign-in without a terminal, GitLab/Bitbucket link support

This release adds new ways to authenticate and link comparisons on GitLab CI, Bitbucket Pipelines, and GitHub Actions, and fixes screenshots being filed under temporary merge commits.

Added

  • Authenticate GitHub Actions workflows with OIDC tokens instead of storing HAPPO_API_KEY and HAPPO_API_SECRET as repository secrets, when id-token: write permission is granted [by @trotzig in #612]
  • Set HAPPO_BROWSER_AUTH to sign in through the browser from a shell without a terminal, such as a coding agent, printing a sign-in link and waiting up to five minutes for sign-in [by @lencioni in #607]
  • Send a pull or merge request link automatically from GitLab CI and Bitbucket Pipelines, enabling per-diff review scope, chained auto-approve, dashboard labels, and email threading for those providers [by @lencioni in #631]

Fixed

  • File screenshots and commit statuses under the branch head instead of the temporary merge commit that GitLab's merged results and merge train pipelines and Bitbucket's pull request pipelines check out [by @lencioni in #634]

6.24.0New screenshotScale target option for iOS and iPad

Added

  • Add a screenshotScale target option for ios-safari and ipad-safari targets, to take screenshots at 1x instead of the default 2x [by @lencioni in #399, #405]

6.23.0Viewport overflow flags, outline/shadow cropping, scroll-driven animations, and grouped statuses

This release adds several opt-in capabilities for rendering and organizing Happo runs, including new config options and a CLI command.

Added

  • Show each snapshot's viewport and flag horizontal overflow on the new compare page [by @trotzig in #338]
  • Add an includeOutlinesAndShadows target option that grows screenshot crops to include outlines and box shadows at the edge of an example [by @trotzig in #310]
  • Add an animate.scrollTimelines: 'seek' option to render scroll-driven animations instead of leaving them as stills
  • Add an --onlyBaseSha CLI flag so --only runs borrow unrendered stories from the exact commit the list was computed from, instead of the newest available report
  • Add a group config option and a happo skip command to combine several Happo projects into one job and status check, and to post a passing status when a project's run is skipped

6.22.0

  • Fix a race where a report using --only/--skip could be compared against a stale baseline, causing spurious diffs and false deletions [by @trotzig in #176]
  • Add support for the interfaceOrientation target option so devices rotate correctly for ios-safari and ipad-safari targets [by @trotzig in #179]
  • Warn when a pull request's checkout doesn't match its head commit, which can cause spurious diffs from merged base-branch changes [by @trotzig in #159]

Need help?