renderdiff 0.3.2 → 0.4.0

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.
@@ -6,11 +6,11 @@
6
6
  import type { RenderdiffConfig } from "renderdiff";
7
7
 
8
8
  export default {
9
- // left: the build you changed (usually localhost). right: the reference you must match
10
- // (usually production). The +/- signs in the output and text.added/removed in
11
- // results.json are written from left's point of view.
12
- left: "http://localhost:3000",
13
- right: "https://example.com",
9
+ // left: the build you changed. right: the reference you must match, best a local build
10
+ // of the base commit (production adds deploy drift). The +/- signs in the output and
11
+ // text.added/removed in results.json are written from left's point of view.
12
+ left: "http://localhost:3001",
13
+ right: "http://localhost:3002",
14
14
 
15
15
  // Diffed when you run bare `renderdiff` with no positional routes. `/a::/b` (or
16
16
  // `{ left: "/a", right: "/b" }`) loads /a on the left and /b on the right — for a page
@@ -53,7 +53,8 @@ export default {
53
53
  // Replaces the default set (1440, 1152, 896, 704, 375).
54
54
  widths: [1440, 896, 375],
55
55
 
56
- // Non-zero exit if any comparison scores below this.
56
+ // Exit 1 only when a comparison scores below this, instead of on any difference.
57
+ // 0 never fails on one.
57
58
  threshold: 0.97,
58
59
 
59
60
  // Relative to the directory you run in. Wiped at the start of each run.
@@ -77,7 +78,18 @@ export default {
77
78
 
78
79
  // Raw CSS injected after the built-in rules. An escape hatch for the odd case that
79
80
  // a selector list cannot express.
80
- extraCss: `.hero video { visibility: hidden !important }`,
81
+ extraCss: `.chat-launcher { visibility: hidden !important }`,
82
+
83
+ // Videos are kept from playing (each shows its poster) and video.js captions and
84
+ // control bars are hidden. false, or --no-freeze-video, lets them play.
85
+ freezeVideo: true,
86
+
87
+ // Mask every iframe on every route (embeds that differ per load). Same as --mask-media.
88
+ maskMedia: false,
89
+
90
+ // Also diff every element's computed style, and say whether the markup is identical
91
+ // apart from asset hashes. Same as --computed. Pixels still decide the score.
92
+ computed: false,
81
93
 
82
94
  // Content that renders on both sides but whose value drifts. Painted over on both,
83
95
  // so the noise cancels out instead of scoring against you.
@@ -92,6 +104,7 @@ export default {
92
104
  //
93
105
  // Each needs exactly one of `selector` (a Playwright selector) or `locate`. Without
94
106
  // `urlPath` it applies to every route; on a pair it matches either side's path.
107
+ // `--mask <sel>` adds one for every route.
95
108
  masks: [
96
109
  {
97
110
  // Baked in at build time from a nightly job, so a local tree and a production