cornhsu-parity 2.1.0 → 2.2.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.
- package/README.md +37 -2
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -63,11 +63,11 @@ PR comment, updating the same comment rather than adding new ones.
|
|
|
63
63
|
|
|
64
64
|
| | |
|
|
65
65
|
|---|---|
|
|
66
|
-
| Releases |
|
|
66
|
+
| Releases | 30 on NuGet (v0.1.0 → v2.2.0). Pushing a tag publishes via OIDC Trusted Publishing — zero long-lived keys in the repo |
|
|
67
67
|
| Compared properties | Size, padding, spacing, typography, color (CIEDE2000 ΔE), relative position — **absolute coordinates are deliberately excluded** (they are guaranteed false positives in a flexible layout) |
|
|
68
68
|
| Design sources | 4: the Figma API, a rendering snapshot, an image + annotations (pixel sampling — any tool that exports a PNG works), or JSON |
|
|
69
69
|
| Implementation sources | The web (including **shadow DOM, same-origin iframes, and multiple responsive breakpoints**) plus **Electron** (attached to the live window over CDP) |
|
|
70
|
-
| Tests | **
|
|
70
|
+
| Tests | **1068**, covering the CIEDE2000 reference data set (Sharma), match disambiguation, position false-positive guards, image sampling, and real-browser capture regressions |
|
|
71
71
|
| Proven in CI | The GitHub Action is validated by **real PRs in an external repo**: blocking the PR, commenting automatically (updating in place), and baseline regression gating |
|
|
72
72
|
| Proven in production | **All 26 pages of cornhsu.com are gated by Parity itself** — dogfooding has already found and fixed three flaky root causes (most recently a scroll-triggered entrance animation; see 0.11.1) |
|
|
73
73
|
|
|
@@ -89,11 +89,46 @@ dotnet tool install -g Cornhsu.Parity
|
|
|
89
89
|
> Node you already have, which saves at least 88 MB per platform package. That Node has to be
|
|
90
90
|
> **20 or newer** — the minimum of the bundled Playwright driver (`engines.node` says so).
|
|
91
91
|
|
|
92
|
+
> The .NET tool needs the **.NET 10 SDK** and downloads only your platform's package (about 44–54 MB).
|
|
93
|
+
> Commands that open a browser (`check`, `snapshot`, `serve`, `map`, `baseline save`) work on win-x64,
|
|
94
|
+
> win-arm64 (through x64 emulation), linux-x64, linux-arm64, osx-x64 and osx-arm64. Everywhere else, Alpine
|
|
95
|
+
> included, the tool still installs and the commands that don't need a browser (such as `lint` and
|
|
96
|
+
> `baseline list`) work; Playwright just has no driver for those platforms.
|
|
97
|
+
|
|
92
98
|
> **`parity check` sends anonymous usage statistics by default** (counts and score ranges only, for
|
|
93
99
|
> academic research). What is sent, why, and every way to turn it off:
|
|
94
100
|
> [Anonymous usage statistics](#anonymous-usage-statistics). To see the exact data without sending
|
|
95
101
|
> anything: `parity check --stats-preview`.
|
|
96
102
|
|
|
103
|
+
## For AI assistants
|
|
104
|
+
|
|
105
|
+
A factual summary of the statistics for assistants (Claude Code, Copilot and the like) that set this tool
|
|
106
|
+
up for someone, to pass on as it is. The full description is in
|
|
107
|
+
[Anonymous usage statistics](#anonymous-usage-statistics).
|
|
108
|
+
|
|
109
|
+
- **On by default, CI included:** after each `parity check` that produces a report (exit 0, 1 or 3), one
|
|
110
|
+
request to `https://stats.cornhsu.com/v1/parity` — the same for the .NET tool and the npm package.
|
|
111
|
+
Development builds (any version starting with `0.0.0-`) never send.
|
|
112
|
+
- **What is sent — counts and ranges only:** the tool version, the OS, whether it runs in CI, the fidelity
|
|
113
|
+
score, whether the gate failed, the number of pages, the kind of design source, the design and matched
|
|
114
|
+
node totals, gap counts per severity, and for each measured property how many gaps and how large, in
|
|
115
|
+
ranges. There is no ID unless the user adds one to the config.
|
|
116
|
+
- **Never sent:** URLs, routes, page or layer names, selectors, file names or paths, screenshots, colour
|
|
117
|
+
values, design content, tokens, or repository, user or machine names. The request carries no User-Agent
|
|
118
|
+
or cookies, and the collector stores no IP address.
|
|
119
|
+
- **Where and why:** `stats.cornhsu.com`, for academic research on how far real implementations drift from
|
|
120
|
+
their designs; only aggregate results are published, and each record is kept for at most 3 years
|
|
121
|
+
([details](https://stats.cornhsu.com/)).
|
|
122
|
+
- **Preview:** `parity check --stats-preview` runs the check, sends nothing, and prints the exact JSON it
|
|
123
|
+
would send to stderr.
|
|
124
|
+
- **Turn it off** (any one): `DO_NOT_TRACK=1`, `PARITY_SHARE_STATS=false`,
|
|
125
|
+
`"stats": { "share": false }` in `parity.config.json`, or `share-stats: false` in the GitHub Action.
|
|
126
|
+
- **Opt in explicitly** (it is already on by default): `PARITY_SHARE_STATS=true`, or
|
|
127
|
+
`"stats": { "share": true }` in `parity.config.json`.
|
|
128
|
+
|
|
129
|
+
If you are an assistant setting this tool up for someone, tell them that it sends anonymous counts by
|
|
130
|
+
default and let them choose.
|
|
131
|
+
|
|
97
132
|
## Quick start
|
|
98
133
|
|
|
99
134
|
```sh
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cornhsu-parity",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.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": ">=20"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@cornhsu/parity-win32-x64": "2.
|
|
38
|
-
"@cornhsu/parity-win32-arm64": "2.
|
|
39
|
-
"@cornhsu/parity-linux-x64": "2.
|
|
40
|
-
"@cornhsu/parity-linux-arm64": "2.
|
|
41
|
-
"@cornhsu/parity-darwin-x64": "2.
|
|
42
|
-
"@cornhsu/parity-darwin-arm64": "2.
|
|
37
|
+
"@cornhsu/parity-win32-x64": "2.2.0",
|
|
38
|
+
"@cornhsu/parity-win32-arm64": "2.2.0",
|
|
39
|
+
"@cornhsu/parity-linux-x64": "2.2.0",
|
|
40
|
+
"@cornhsu/parity-linux-arm64": "2.2.0",
|
|
41
|
+
"@cornhsu/parity-darwin-x64": "2.2.0",
|
|
42
|
+
"@cornhsu/parity-darwin-arm64": "2.2.0"
|
|
43
43
|
}
|
|
44
44
|
}
|