← All happo for npm releases

happo for npm release notes

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

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]

Need help?