styleproof 1.9.1 → 1.9.3

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +26 -1
  3. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -7,6 +7,23 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.9.3]
11
+
12
+ ### Changed
13
+
14
+ - Maintainer contact moved off a personal email address: security issues now go
15
+ through GitHub's private vulnerability reporting and conduct reports through the
16
+ maintainer's GitHub profile, and the `package.json` `author` no longer carries an
17
+ email. The published package and its metadata are now contact-clean.
18
+ - Canonical `StyleProof`-cased GitHub URLs in `package.json` (`homepage`,
19
+ `repository`, `bugs`).
20
+
21
+ ### Fixed
22
+
23
+ - The README demo image now uses an absolute `raw.githubusercontent.com` URL so it
24
+ renders on the npm package page — relative paths don't resolve there, so the image
25
+ showed broken on npmjs.com.
26
+
10
27
  ## [1.9.1]
11
28
 
12
29
  ### Fixed
package/README.md CHANGED
@@ -23,7 +23,7 @@ On every PR, StyleProof captures a `StyleMap` from the HEAD and from the base br
23
23
 
24
24
  One change — the hero CTA recoloured cyan → amber — posts as a single section: a side-by-side before/after cropped screenshot, a one-line summary, then the exact property change folded under a toggle.
25
25
 
26
- ![A StyleProof report: the CTA button before (cyan) and after (amber), side by side](docs/demo-composite.png)
26
+ ![A StyleProof report: the CTA button before (cyan) and after (amber), side by side](https://raw.githubusercontent.com/BenSheridanEdwards/StyleProof/main/docs/demo-composite.png)
27
27
 
28
28
  As it renders in the PR comment (a plain-English bullet first — naming the theme token and showing the hex with a live colour swatch — then the exact table inside the toggle):
29
29
 
@@ -147,6 +147,31 @@ jobs:
147
147
 
148
148
  Outputs: `changed` (`"true"` when anything changed), `report-url`. Other inputs (`report-branch`, `inline-images`, `github-token`) have sensible defaults — see [`action.yml`](https://github.com/BenSheridanEdwards/styleproof/blob/main/action.yml).
149
149
 
150
+ **Capture spec `defineStyleMapCapture({ surfaces, … })`** — determinism is on by default; you rarely set more than `surfaces` and `dir`:
151
+
152
+ | Option | Default | Purpose |
153
+ | ------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------- |
154
+ | `surfaces` | _required_ | Page states to certify — each `{ key, go, widths, ignore?, height? }`. `go(page)` drives to a settled state. |
155
+ | `dir` | `STYLEMAP_DIR` | Output label (`base`/`head`); the spec is **inert until set**, so it sits safely beside your other specs. |
156
+ | `replayFrom` | `STYLEPROOF_REPLAY_FROM` | Baseline dir whose recorded responses to replay. Unset → this run **records** its HAR for the comparison to use. |
157
+ | `replayUrl` | `**/api/**` (`…REPLAY_URL`) | URL glob for the data boundary to record/replay; everything else (JS/CSS/fonts) loads live so the code runs. |
158
+ | `freezeClock` | `true` | Pin `Date.now()`/`new Date()` so time-derived styling can't drift; timers keep running so settling still works. |
159
+ | `clockTime` | `2025-01-01T00:00:00Z` | The frozen instant. |
160
+ | `selfCheck` | `STYLEPROOF_SELFCHECK=1` | Capture each surface twice and fail on any difference — proves the capture is deterministic. |
161
+ | `screenshots` | `true` | Save full-page screenshots for the report's before/after crops. |
162
+ | `baseDir` | `__stylemaps__` | Output root directory. |
163
+
164
+ Non-visual and framework-injected elements (`<meta>`/`<title>`/`<script>`/`<style>`/… and `next-route-announcer`) are skipped automatically; a surface's `ignore` adds to that default, it doesn't replace it.
165
+
166
+ **Capture env vars** (wire CI without editing the spec):
167
+
168
+ | Env | Purpose |
169
+ | ------------------------ | ----------------------------------------------------------------------------- |
170
+ | `STYLEMAP_DIR` | Output label; the capture is skipped entirely when unset. |
171
+ | `STYLEPROOF_REPLAY_FROM` | Baseline dir to replay recorded data from — set this on the **head** capture. |
172
+ | `STYLEPROOF_REPLAY_URL` | Override the `**/api/**` data-boundary glob. |
173
+ | `STYLEPROOF_SELFCHECK` | `1` to capture each surface twice and fail if the two differ. |
174
+
150
175
  **CLIs** (every flag accepts `--flag value` and `--flag=value`; `--help` lists all):
151
176
 
152
177
  - `styleproof-init` — scaffold the capture spec (and a starter `playwright.config.ts` if none exists).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styleproof",
3
- "version": "1.9.1",
3
+ "version": "1.9.3",
4
4
  "description": "Catch every CSS change before it ships — review PRs and certify refactors by the browser's computed styles, not pixels. Works with any styling system.",
5
5
  "keywords": [
6
6
  "playwright",
@@ -16,14 +16,14 @@
16
16
  "ci"
17
17
  ],
18
18
  "license": "MIT",
19
- "author": "Ben Sheridan-Edwards <ben@codewalnut.com>",
20
- "homepage": "https://github.com/BenSheridanEdwards/styleproof#readme",
19
+ "author": "Ben Sheridan-Edwards",
20
+ "homepage": "https://github.com/BenSheridanEdwards/StyleProof#readme",
21
21
  "repository": {
22
22
  "type": "git",
23
- "url": "git+https://github.com/BenSheridanEdwards/styleproof.git"
23
+ "url": "git+https://github.com/BenSheridanEdwards/StyleProof.git"
24
24
  },
25
25
  "bugs": {
26
- "url": "https://github.com/BenSheridanEdwards/styleproof/issues"
26
+ "url": "https://github.com/BenSheridanEdwards/StyleProof/issues"
27
27
  },
28
28
  "type": "module",
29
29
  "main": "./dist/index.js",