@adobe/design-data-spec 0.13.0 → 0.14.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.
@@ -0,0 +1,26 @@
1
+ {
2
+ "tokens": [
3
+ {
4
+ "name": {
5
+ "component": "old-widget",
6
+ "property": "color"
7
+ },
8
+ "value": "#000000"
9
+ }
10
+ ],
11
+ "components": [
12
+ {
13
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/old-widget.json",
14
+ "name": "old-widget",
15
+ "displayName": "Old Widget",
16
+ "meta": {
17
+ "category": "actions",
18
+ "documentationUrl": "https://spectrum.adobe.com/page/old-widget/"
19
+ },
20
+ "lifecycle": {
21
+ "deprecated": "1.0.0-draft",
22
+ "deprecatedComment": "Superseded by new-widget."
23
+ }
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-036",
6
+ "severity": "warning",
7
+ "message_pattern": ".*deprecated component.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "tokens": [
3
+ {
4
+ "name": {
5
+ "component": "new-widget",
6
+ "property": "background-color"
7
+ },
8
+ "value": "#0265dc"
9
+ },
10
+ {
11
+ "name": {
12
+ "component": "old-widget",
13
+ "property": "color"
14
+ },
15
+ "value": "#000000",
16
+ "deprecated": "1.0.0-draft"
17
+ }
18
+ ],
19
+ "components": [
20
+ {
21
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/new-widget.json",
22
+ "name": "new-widget",
23
+ "displayName": "New Widget",
24
+ "meta": {
25
+ "category": "actions",
26
+ "documentationUrl": "https://spectrum.adobe.com/page/new-widget/"
27
+ }
28
+ },
29
+ {
30
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/old-widget.json",
31
+ "name": "old-widget",
32
+ "displayName": "Old Widget",
33
+ "meta": {
34
+ "category": "actions",
35
+ "documentationUrl": "https://spectrum.adobe.com/page/old-widget/"
36
+ },
37
+ "lifecycle": {
38
+ "deprecated": "1.0.0-draft",
39
+ "deprecatedComment": "Superseded by new-widget."
40
+ }
41
+ }
42
+ ]
43
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/design-data-spec",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Design Data Specification — prose, JSON Schemas, rule catalog, and conformance fixtures for Spectrum design data",
5
5
  "type": "module",
6
6
  "repository": {
package/rules/rules.yaml CHANGED
@@ -343,3 +343,15 @@ rules:
343
343
  message: "Component '{entity}' anatomy part name '{value}' is not in the design-system-registry anatomy-terms vocabulary"
344
344
  spec_ref: spec/anatomy-format.md#canonical-anatomy-vocabulary
345
345
  introduced_in: "1.0.0-draft"
346
+
347
+ - id: SPEC-036
348
+ name: component-deprecation-cascade
349
+ severity: warning
350
+ category: reference-integrity
351
+ assert: >
352
+ Tokens SHOULD NOT reference a deprecated component via `name.component` unless the token
353
+ is itself deprecated. Non-deprecated tokens referencing a deprecated component are surfaced
354
+ as warnings to prompt authors to update the reference or mark the token deprecated.
355
+ message: "Token '{token}' references deprecated component '{component}' (deprecated since {version}); update the reference or mark the token deprecated"
356
+ spec_ref: spec/component-format.md#lifecycle
357
+ introduced_in: "1.0.0-draft"