@ucm-kit/cli 0.1.17 → 0.1.19

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 +22 -14
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -10,8 +10,8 @@ Figma plugin and committed next to the component's code. This command reads
10
10
  those files and says whether they still hold together.
11
11
 
12
12
  ```sh
13
- npx --yes @ucm-kit/cli@0.1.17 init
14
- npx --yes @ucm-kit/cli@0.1.17 check --report ci-report.md
13
+ npx --yes @ucm-kit/cli@0.1.19 init
14
+ npx --yes @ucm-kit/cli@0.1.19 check --report ci-report.md
15
15
  ```
16
16
 
17
17
  Pin an exact version, without `^`. A range would let npx pick a build nobody
@@ -56,7 +56,7 @@ not write React states its own extension here, rather than carrying a `.tsx`
56
56
  that was wrong the day it was installed:
57
57
 
58
58
  ```sh
59
- npx --yes @ucm-kit/cli@0.1.17 init --components Sources/DesignSystem --implementation '{dir}/{id}.swift'
59
+ npx --yes @ucm-kit/cli@0.1.19 init --components Sources/DesignSystem --implementation '{dir}/{id}.swift'
60
60
  ```
61
61
 
62
62
  All three act only on a first install: `ucm init` never overwrites an existing
@@ -115,8 +115,8 @@ file that exists but is malformed is refused on both sides.
115
115
  ```
116
116
 
117
117
  `implementation` is a pattern with two tokens, `{dir}` for the contract's folder
118
- and `{id}` for its identifier. The default shown here is a default, not an
119
- assumption: replace it with your own.
118
+ and `{id}` for its identifier. Replace it with the pattern your repository
119
+ uses.
120
120
 
121
121
  No version number goes in this file. Which contract versions can be read belongs
122
122
  to the installed package, and repeating it here would create a second authority
@@ -128,9 +128,15 @@ The report is written for the **designer** who validates the export, not for the
128
128
  developer who reads CI logs. Every reason a pull request is refused appears in
129
129
  it.
130
130
 
131
- Six checks run on each contract. Four of them block a merge, two only warn, and
132
- the split follows one rule: **a check blocks only if re-exporting from Figma can
133
- fix it.**
131
+ Six checks run on each contract. Four block a merge, two only warn: **a check
132
+ blocks when the file on disk cannot be read as it stands**, and warns when the
133
+ read succeeds and the gap points at the code or at the token file.
134
+
135
+ Who fixes it depends on the direction of the gap, never on who opened the pull
136
+ request, which the CI does not know. A contract that is too old is re-exported;
137
+ a contract that is too new needs this package upgraded, and no re-export helps.
138
+ [`@ucm-kit/core`](https://www.npmjs.com/package/@ucm-kit/core) names both
139
+ directions.
134
140
 
135
141
  | Check | Verdict |
136
142
  |---|---|
@@ -138,19 +144,21 @@ fix it.**
138
144
  | This repository can read that contract version | Blocks |
139
145
  | Composition: every nested component has its own contract, the lists agree, no cycles | Blocks |
140
146
  | Typography tokens have the expected type | Blocks |
141
- | Every `{token.path}` cited exists in the token file | Warns |
142
- | The code exposes the props the contract declares | Warns |
147
+ | Every `{token.path}` cited exists in the token file | Warns, but a missing or unreadable token file blocks |
148
+ | The code exposes the props the contract declares, with a stack adapter installed | Warns |
143
149
 
144
150
  A gap with the code needs a developer, so it warns and lets the merge through. A
145
151
  token removed from the design system does too: tokens are the source of truth,
146
- and an older contract does not hold back their evolution.
152
+ and an older contract does not hold back their evolution. A token file that is
153
+ absent or unreadable is another matter: no reference can be resolved at all, so
154
+ the check gives up rather than reporting every path as missing.
147
155
 
148
156
  A contract may land before the code that implements it. A missing implementation
149
157
  is an allowed state, not an error.
150
158
 
151
159
  **So is a repository with no contract at all.** Right after `ucm init` nothing
152
160
  has been exported: there is no token file, and usually no contract folder. From
153
- `0.1.9` on, `ucm check` returns 0 there and reports what to do next. The number
161
+ `0.1.10` on, `ucm check` returns 0 there and reports what to do next. The number
154
162
  of contracts decides: with one or more, a missing token file blocks the merge
155
163
  again, because those contracts cite tokens nobody can resolve.
156
164
 
@@ -160,8 +168,8 @@ when an orchestrator passes it in through `UCM_ECHECS_DE_TESTS`.
160
168
 
161
169
  ## Optional stack adapters
162
170
 
163
- The six checks above read contracts and tokens only, so they work whatever the
164
- repository is written in. Comparing a contract to real code needs to read that
171
+ The first five checks above read contracts and tokens only, so they work
172
+ whatever the repository is written in. Comparing a contract to real code needs to read that
165
173
  code, which is a stack adapter's job.
166
174
 
167
175
  `ucm check` discovers an adapter installed **by the repository**, resolving from
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ucm-kit/cli",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "description": "La ligne de commande UCM : initialiser un repository, lister ce qu'il doit couvrir.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -27,6 +27,6 @@
27
27
  "test": "node scripts/run-tests.cjs"
28
28
  },
29
29
  "dependencies": {
30
- "@ucm-kit/core": "0.1.18"
30
+ "@ucm-kit/core": "0.1.20"
31
31
  }
32
32
  }