cornhsu-parity 0.12.0 → 0.13.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.
Files changed (2) hide show
  1. package/README.md +5 -3
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  ## GitHub Action
12
12
 
13
13
  ```yaml
14
- - uses: HSU-YU-MING/cornhsu-parity@v0.12.0 # pin exact versions while 0.x; a floating @v1 arrives with 1.0
14
+ - uses: HSU-YU-MING/cornhsu-parity@v0.13.0 # pin exact versions while 0.x; a floating @v1 arrives with 1.0
15
15
  with:
16
16
  config: parity.config.json # optional, defaults to parity.config.json
17
17
  target: /pricing # optional, check only this route (omit for all)
@@ -99,6 +99,8 @@ parity report # Re-render the Markdown report from an existing repo
99
99
  # (no re-scan; --md writes a file, otherwise it prints to stdout)
100
100
  parity snapshot # Freeze the currently rendered UI as the design baseline —
101
101
  # a refactor/redesign guard that needs no Figma at all
102
+ # (--stabilize captures 3× and suggests "ignore" entries for
103
+ # regions that move: rotating ads, animations, lazy media)
102
104
  parity lint # Design lint: are the design file's values inside the allowed
103
105
  # design-token set? (design only, no implementation)
104
106
  parity check --reverse # Reverse view, for a designer redrawing an existing page:
@@ -171,7 +173,7 @@ electron . --remote-debugging-port=9222 # your app, with this one extra fla
171
173
  | Design source | config | Who it is for |
172
174
  |---|---|---|
173
175
  | **Figma** (primary) | `figmaFileKey` + `FIGMA_TOKEN` | The normal workflow, when you have a Figma file |
174
- | **Snapshot** (`parity snapshot`) | `designFile` pointing at the generated snapshot JSON | **Refactor/redesign guard**: today's rendering is correct, so freeze it as the baseline and later checks prove nothing drifted (the numeric version of visual regression). Matching goes through selector identity, so it is 100% deterministic |
176
+ | **Snapshot** (`parity snapshot`) | `designFile` pointing at the generated snapshot JSON | **Refactor/redesign guard**: today's rendering is correct, so freeze it as the baseline and later checks prove nothing drifted (the numeric version of visual regression). Matching goes through selector identity, so it is 100% deterministic — randomized ids (React `useId`, CSS-in-JS) are detected at capture time and replaced with structural paths, so they survive regeneration. Baselines taken by older versions may list such nodes as unmatched (reason `randomized-id`); re-run `parity snapshot` once to migrate |
175
177
  | **An image + annotations** | `designImage` (PNG/JPG) + `designFile` (annotations) | When all you have is a picture: an outsourced PNG, or a legacy project down to screenshots. **This is also the path for XD / Sketch / Photoshop and anything else that can export an image** — a universal adapter. The annotations are DesignNode JSON, and `fill` may be omitted: the engine samples the color from the corresponding region of the image. (Text color is deliberately not sampled — anti-aliasing blends it and the reading is unreliable — but you can fill it in by hand.) |
176
178
  | Hand-written JSON | `designFile` | Offline demos and tests |
177
179
 
@@ -316,7 +318,7 @@ jobs:
316
318
  - run: |
317
319
  npm ci && npm run build
318
320
  npm run preview & # e.g. serving on localhost:8080
319
- - uses: HSU-YU-MING/cornhsu-parity@v0.12.0 # pin exact versions while 0.x
321
+ - uses: HSU-YU-MING/cornhsu-parity@v0.13.0 # pin exact versions while 0.x
320
322
  with:
321
323
  config: parity.config.json
322
324
  figma-token: ${{ secrets.FIGMA_TOKEN }} # omit when the design source is a local JSON file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cornhsu-parity",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Property-Level Design QA that can gate your CI. Compares real numeric values from your Figma file against the rendered UI and fails the PR when the implementation drifts from the design.",
5
5
  "keywords": [
6
6
  "figma",
@@ -34,11 +34,11 @@
34
34
  "node": ">=18"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@cornhsu/parity-win32-x64": "0.12.0",
38
- "@cornhsu/parity-win32-arm64": "0.12.0",
39
- "@cornhsu/parity-linux-x64": "0.12.0",
40
- "@cornhsu/parity-linux-arm64": "0.12.0",
41
- "@cornhsu/parity-darwin-x64": "0.12.0",
42
- "@cornhsu/parity-darwin-arm64": "0.12.0"
37
+ "@cornhsu/parity-win32-x64": "0.13.0",
38
+ "@cornhsu/parity-win32-arm64": "0.13.0",
39
+ "@cornhsu/parity-linux-x64": "0.13.0",
40
+ "@cornhsu/parity-linux-arm64": "0.13.0",
41
+ "@cornhsu/parity-darwin-x64": "0.13.0",
42
+ "@cornhsu/parity-darwin-arm64": "0.13.0"
43
43
  }
44
44
  }