cornhsu-parity 0.9.7 → 0.10.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 +16 -4
  2. package/package.json +7 -5
package/README.md CHANGED
@@ -1,11 +1,23 @@
1
1
  # Parity
2
2
 
3
3
  [![NuGet](https://img.shields.io/nuget/v/Cornhsu.Parity.svg?label=Cornhsu.Parity)](https://www.nuget.org/packages/Cornhsu.Parity)
4
- [![Downloads](https://img.shields.io/nuget/dt/Cornhsu.Parity.svg)](https://www.nuget.org/packages/Cornhsu.Parity)
4
+ [![npm](https://img.shields.io/npm/v/cornhsu-parity.svg?label=cornhsu-parity)](https://www.npmjs.com/package/cornhsu-parity)
5
+ [![Marketplace](https://img.shields.io/badge/GitHub_Marketplace-Action-2ea44f?logo=github)](https://github.com/marketplace/actions/parity-design-fidelity-check)
5
6
  [![CI](https://github.com/HSU-YU-MING/cornhsu-parity/actions/workflows/ci.yml/badge.svg)](https://github.com/HSU-YU-MING/cornhsu-parity/actions/workflows/ci.yml)
6
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
8
 
8
- **[作品介紹與開發故事](https://cornhsu.com/parity) · [NuGet](https://www.nuget.org/packages/Cornhsu.Parity) · MIT**
9
+ **[作品介紹與開發故事](https://cornhsu.com/parity) · [GitHub Marketplace](https://github.com/marketplace/actions/parity-design-fidelity-check) · [npm](https://www.npmjs.com/package/cornhsu-parity) · [NuGet](https://www.nuget.org/packages/Cornhsu.Parity) · MIT**
10
+
11
+ ## GitHub Action
12
+
13
+ ```yaml
14
+ - uses: HSU-YU-MING/cornhsu-parity@v0.9.7 # 0.x 期間 pin 版本;發 1.0 後可改用移動式 @v1
15
+ with:
16
+ config: parity.config.json # 選填,預設 parity.config.json
17
+ target: /pricing # 選填,只檢查這個 route(省略 = 全部)
18
+ ```
19
+
20
+ 落差超過 gate 門檻就讓 CI 失敗,並把還原度報告貼成 PR 留言(原地更新不洗版)。
9
21
 
10
22
  > **能進 CI 的設計還原度檢查(Property-Level Design QA)。**
11
23
  > 抓 Figma 設計稿與實際渲染畫面**兩邊的真實數值**做程式比對——「內距 8px,設計是 12px」,
@@ -251,7 +263,7 @@ jobs:
251
263
  - run: |
252
264
  npm ci && npm run build
253
265
  npm run preview & # 例:serve 在 localhost:8080
254
- - uses: HSU-YU-MING/cornhsu-parity@v1
266
+ - uses: HSU-YU-MING/cornhsu-parity@v0.9.7 # 0.x 期間 pin 版本;發 1.0 後可改用移動式 @v1
255
267
  with:
256
268
  config: parity.config.json
257
269
  figma-token: ${{ secrets.FIGMA_TOKEN }} # 設計來源用本機 JSON 時可省略
@@ -264,7 +276,7 @@ jobs:
264
276
 
265
277
  action 輸入:`config` / `target` / `working-directory` / `version` / `figma-token` / `baseline`(回歸模式) / `comment`(關掉 PR 留言) / `upload-report`。
266
278
 
267
- > action 透過 `dotnet tool install -g Cornhsu.Parity` 安裝,需先把套件發佈到 nuget.org(發佈是 release 步驟,尚未做)。本 repo 的 `.github/workflows/ci.yml` 則是**直接從原始碼建置**並跑離線示範自我把關,不依賴發佈。
279
+ > action 透過 `dotnet tool install -g Cornhsu.Parity` 安裝(已發佈於 nuget.org)。本 repo 的 `.github/workflows/ci.yml` 則是**直接從原始碼建置**並跑離線示範自我把關,不依賴發佈。
268
280
 
269
281
  ## 回歸把關:baseline(M5)
270
282
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cornhsu-parity",
3
- "version": "0.9.7",
3
+ "version": "0.10.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,9 +34,11 @@
34
34
  "node": ">=18"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@cornhsu/parity-win32-x64": "0.9.7",
38
- "@cornhsu/parity-linux-x64": "0.9.7",
39
- "@cornhsu/parity-darwin-x64": "0.9.7",
40
- "@cornhsu/parity-darwin-arm64": "0.9.7"
37
+ "@cornhsu/parity-win32-x64": "0.10.0",
38
+ "@cornhsu/parity-win32-arm64": "0.10.0",
39
+ "@cornhsu/parity-linux-x64": "0.10.0",
40
+ "@cornhsu/parity-linux-arm64": "0.10.0",
41
+ "@cornhsu/parity-darwin-x64": "0.10.0",
42
+ "@cornhsu/parity-darwin-arm64": "0.10.0"
41
43
  }
42
44
  }