@adobe/spectrum-tokens 13.0.0-beta.27 → 13.0.0-beta.29

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/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @adobe/spectrum-tokens
2
2
 
3
+ ## 13.0.0-beta.29
4
+
5
+ ### Minor Changes
6
+
7
+ - [#319](https://github.com/adobe/spectrum-tokens/pull/319) [`5f962fc`](https://github.com/adobe/spectrum-tokens/commit/5f962fc864c516213db58bece2c47a74c68cc985) Thanks [@mrcjhicks](https://github.com/mrcjhicks)! - Updated values for component pill edge to visual only tokens for both desktop and mobile.
8
+
9
+ These values are updated based on the new workflow icon size.
10
+
11
+ ## Token Diff
12
+
13
+ _Token values updated (4):_
14
+
15
+ - `component-pill-edge-to-visual-only-100`
16
+ - `component-pill-edge-to-visual-only-200`
17
+ - `component-pill-edge-to-visual-only-300`
18
+ - `component-pill-edge-to-visual-only-75`
19
+
20
+ - [#316](https://github.com/adobe/spectrum-tokens/pull/316) [`664ab0b`](https://github.com/adobe/spectrum-tokens/commit/664ab0bba68b9f4752599ed73c98b5d339414478) Thanks [@mrcjhicks](https://github.com/mrcjhicks)! - S2 Color loupe tokens update (color-only)
21
+
22
+ ## Token Diff
23
+
24
+ _Newly deprecated tokens (2):_
25
+
26
+ - `color-loupe-drop-shadow-color`
27
+ - `drop-shadow-color`
28
+
29
+ ## 13.0.0-beta.28
30
+
31
+ ### Patch Changes
32
+
33
+ - 1150331: Removed duplicate tokens from src files.
34
+
3
35
  ## 13.0.0-beta.27
4
36
 
5
37
  ### Minor Changes
package/README.md CHANGED
@@ -70,3 +70,7 @@ npm install --save @adobe/spectrum-tokens
70
70
  ```
71
71
 
72
72
  If you need to use the older and more complete set of tokens side by side with the v12.x.x release while the development of this migration is ongoing, you can use the [`@adobe/spectrum-tokens-depreacated`](https://www.npmjs.com/package/@adobe/spectrum-tokens-deprecated) package, which is an archived release of `@adobe/spectrum-tokens@11.8.0`.
73
+
74
+ ## Token Types and `$schema`
75
+
76
+ Tokens now have a `$schema` property that relates to a type defined in the `schemas/token-types/` directory. Even those these are being released as part of the regular releases, they shouldn't be considered formal API yet. There are planned adjustments with further data integration in design tools and workflows. Ideally, designers would be able to author new tokens and manage type across all the data.
@@ -142,7 +142,7 @@
142
142
  "color-handle-drop-shadow-color": "rgba(0, 0, 0, 0.12)",
143
143
  "color-handle-inner-border-color": "rgb(0, 0, 0)",
144
144
  "color-handle-outer-border-color": "rgb(0, 0, 0)",
145
- "color-loupe-drop-shadow-color": "rgba(0, 0, 0, 0.15)",
145
+ "color-loupe-drop-shadow-color": "rgba(0, 0, 0, 0.16)",
146
146
  "color-loupe-inner-border": "rgba(0, 0, 0, 0.12)",
147
147
  "color-loupe-outer-border": "rgb(255, 255, 255)",
148
148
  "color-slider-border-color": "rgb(0, 0, 0)",
@@ -713,7 +713,7 @@
713
713
  "color-handle-drop-shadow-color": "rgba(0, 0, 0, 0.36)",
714
714
  "color-handle-inner-border-color": "rgb(0, 0, 0)",
715
715
  "color-handle-outer-border-color": "rgb(0, 0, 0)",
716
- "color-loupe-drop-shadow-color": "rgba(0, 0, 0, 0.15)",
716
+ "color-loupe-drop-shadow-color": "rgba(0, 0, 0, 0.48)",
717
717
  "color-loupe-inner-border": "rgba(0, 0, 0, 0.12)",
718
718
  "color-loupe-outer-border": "rgb(255, 255, 255)",
719
719
  "color-slider-border-color": "rgb(255, 255, 255)",
@@ -1157,7 +1157,6 @@
1157
1157
  "black": "rgb(0, 0, 0)",
1158
1158
  "color-handle-inner-border-color": "rgb(0, 0, 0)",
1159
1159
  "color-handle-outer-border-color": "rgb(0, 0, 0)",
1160
- "color-loupe-drop-shadow-color": "rgba(0, 0, 0, 0.15)",
1161
1160
  "color-loupe-inner-border": "rgba(0, 0, 0, 0.12)",
1162
1161
  "color-loupe-outer-border": "rgb(255, 255, 255)",
1163
1162
  "disabled-static-black-background-color": "rgba(0, 0, 0, 0.09)",
@@ -1445,9 +1444,9 @@
1445
1444
  "component-pill-edge-to-visual-200": "18px",
1446
1445
  "component-pill-edge-to-visual-300": "21px",
1447
1446
  "component-pill-edge-to-visual-75": "10px",
1448
- "component-pill-edge-to-visual-only-100": "7px",
1449
- "component-pill-edge-to-visual-only-200": "10px",
1450
- "component-pill-edge-to-visual-only-300": "13px",
1447
+ "component-pill-edge-to-visual-only-100": "6px",
1448
+ "component-pill-edge-to-visual-only-200": "9px",
1449
+ "component-pill-edge-to-visual-only-300": "11px",
1451
1450
  "component-pill-edge-to-visual-only-75": "4px",
1452
1451
  "component-size-difference-down": "-2px",
1453
1452
  "component-size-minimum-perspective-down": "24px",
@@ -5037,8 +5037,21 @@
5037
5037
  "uuid": "8271b69e-6542-4b17-b0f0-72567e16c41b"
5038
5038
  },
5039
5039
  "color-loupe-drop-shadow-color": {
5040
- "ref": "{transparent-black-300}",
5041
- "value": "rgba(0, 0, 0, 0.15)",
5040
+ "ref": "{drop-shadow-elevated-color}",
5041
+ "sets": {
5042
+ "light": {
5043
+ "value": "rgba(0, 0, 0, 0.16)",
5044
+ "uuid": "5945eb42-744c-41df-a4ab-a3d61f8782ee"
5045
+ },
5046
+ "dark": {
5047
+ "value": "rgba(0, 0, 0, 0.48)",
5048
+ "uuid": "c88f7b8e-e5f5-4d0e-a8dd-025f8d274948"
5049
+ },
5050
+ "wireframe": {
5051
+ "value": "rgba(0, 0, 0, 0.16)",
5052
+ "uuid": "aa54be1b-bf30-42b7-91ec-09259bea0bd3"
5053
+ }
5054
+ },
5042
5055
  "uuid": "918b8089-d89f-45d2-8c9c-f3f13f81b0b9"
5043
5056
  },
5044
5057
  "color-loupe-drop-shadow-y": {
@@ -17670,7 +17683,7 @@
17670
17683
  "uuid": "47f5ab02-22db-4d82-be1d-804669d7fbd4"
17671
17684
  },
17672
17685
  "mobile": {
17673
- "value": "5px",
17686
+ "value": "6px",
17674
17687
  "uuid": "7332a4d3-3775-4247-a4c0-fb01f0604d63"
17675
17688
  }
17676
17689
  }
@@ -17678,11 +17691,11 @@
17678
17691
  "component-pill-edge-to-visual-only-100": {
17679
17692
  "sets": {
17680
17693
  "desktop": {
17681
- "value": "7px",
17694
+ "value": "6px",
17682
17695
  "uuid": "dd9e6e28-a382-46a1-a6e0-f73c8cc0ed70"
17683
17696
  },
17684
17697
  "mobile": {
17685
- "value": "9px",
17698
+ "value": "8px",
17686
17699
  "uuid": "cf58ae75-8f3f-4b9e-809b-ee78abbb2f2f"
17687
17700
  }
17688
17701
  }
@@ -17690,11 +17703,11 @@
17690
17703
  "component-pill-edge-to-visual-only-200": {
17691
17704
  "sets": {
17692
17705
  "desktop": {
17693
- "value": "10px",
17706
+ "value": "9px",
17694
17707
  "uuid": "64cdd254-d3fe-40e6-97a8-76dd8156afa8"
17695
17708
  },
17696
17709
  "mobile": {
17697
- "value": "13px",
17710
+ "value": "11px",
17698
17711
  "uuid": "989aee4c-5c90-454a-b68d-a7564669c2bd"
17699
17712
  }
17700
17713
  }
@@ -17702,11 +17715,11 @@
17702
17715
  "component-pill-edge-to-visual-only-300": {
17703
17716
  "sets": {
17704
17717
  "desktop": {
17705
- "value": "13px",
17718
+ "value": "11px",
17706
17719
  "uuid": "9654369a-5bf8-4436-a331-aeac1fd25a70"
17707
17720
  },
17708
17721
  "mobile": {
17709
- "value": "16px",
17722
+ "value": "15px",
17710
17723
  "uuid": "cb4f356c-2dcd-4043-8f5c-3da904716b48"
17711
17724
  }
17712
17725
  }
package/index.js ADDED
@@ -0,0 +1,52 @@
1
+ /*
2
+ Copyright 2024 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { glob } from "glob";
14
+
15
+ import { resolve } from "path";
16
+ import { readFile } from "fs/promises";
17
+ import * as url from "url";
18
+ import { writeFile } from "fs/promises";
19
+ import { format } from "prettier";
20
+
21
+ export const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
22
+
23
+ export const tokenFileNames = await glob(
24
+ `${resolve(__dirname, "./src")}/**/*.json`,
25
+ );
26
+
27
+ export const readJson = async (fileName) =>
28
+ JSON.parse(await readFile(fileName, "utf8"));
29
+
30
+ export const writeJson = async (fileName, jsonData) => {
31
+ await writeFile(
32
+ fileName,
33
+ await format(JSON.stringify(jsonData), { parser: "json-stringify" }),
34
+ );
35
+ };
36
+
37
+ export const getFileTokens = async (tokenFileName) =>
38
+ await readJson(resolve(__dirname, "src", tokenFileName));
39
+
40
+ export const getAllTokens = async () => {
41
+ return await Promise.all(tokenFileNames.map(getFileTokens)).then(
42
+ (tokenFileDataAr) => {
43
+ return tokenFileDataAr.reduce(
44
+ (tokenDataAcc, tokenFileData) => ({
45
+ ...tokenDataAcc,
46
+ ...tokenFileData,
47
+ }),
48
+ {},
49
+ );
50
+ },
51
+ );
52
+ };
package/moon.yml CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright 2023 Adobe. All rights reserved.
1
+ # Copyright 2024 Adobe. All rights reserved.
2
2
  # This file is licensed to you under the Apache License, Version 2.0 (the "License");
3
3
  # you may not use this file except in compliance with the License. You may obtain a copy
4
4
  # of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -7,6 +7,7 @@
7
7
  # the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
8
8
  # OF ANY KIND, either express or implied. See the License for the specific language
9
9
  # governing permissions and limitations under the License.
10
+ $schema: "https://moonrepo.dev/schemas/project.json"
10
11
  type: library
11
12
  fileGroups:
12
13
  sources:
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@adobe/spectrum-tokens",
3
- "version": "13.0.0-beta.27",
3
+ "version": "13.0.0-beta.29",
4
4
  "description": "Design tokens for Spectrum, Adobe's design system",
5
5
  "type": "module",
6
- "main": "tasks/buildSpectrumTokens.js",
6
+ "main": "index.js",
7
7
  "tokens": "dist/json/variables.json",
8
8
  "repository": {
9
9
  "type": "git",
@@ -23,12 +23,12 @@
23
23
  "homepage": "https://github.com/adobe/spectrum-tokens/tree/main/packages/tokens#readme",
24
24
  "devDependencies": {
25
25
  "ajv": "^8.12.0",
26
- "ajv-formats": "^2.1.1",
26
+ "ajv-formats": "^3.0.1",
27
27
  "deep-object-diff": "^1.1.9",
28
- "glob": "^10.3.10",
28
+ "find-duplicated-property-keys": "^1.2.9",
29
29
  "style-dictionary": "^3.9.2",
30
30
  "style-dictionary-sets": "^2.3.0",
31
- "tar": "^6.2.0",
31
+ "tar": "^7.0.1",
32
32
  "tmp-promise": "^3.0.3"
33
33
  },
34
34
  "scripts": {}
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/system-set.json",
4
+ "title": "System set",
5
+ "description": "A set that contains tokens that change based on system.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/set.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/system-set.json"
15
+ },
16
+ "sets": {
17
+ "type": "object",
18
+ "anyOf": [
19
+ {
20
+ "properties": {
21
+ "spectrum": {
22
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.json"
23
+ },
24
+ "express": {
25
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.json"
26
+ }
27
+ },
28
+ "required": ["spectrum", "express"]
29
+ },
30
+ {
31
+ "properties": {
32
+ "spectrum": {
33
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/alias.json"
34
+ },
35
+ "express": {
36
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/alias.json"
37
+ }
38
+ },
39
+ "required": ["spectrum", "express"]
40
+ },
41
+ {
42
+ "properties": {
43
+ "spectrum": {
44
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/color-set.json"
45
+ },
46
+ "express": {
47
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/color-set.json"
48
+ }
49
+ },
50
+ "required": ["spectrum", "express"]
51
+ },
52
+ {
53
+ "properties": {
54
+ "spectrum": {
55
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/scale-set.json"
56
+ },
57
+ "express": {
58
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/scale-set.json"
59
+ }
60
+ },
61
+ "required": ["spectrum", "express"]
62
+ },
63
+ {
64
+ "properties": {
65
+ "spectrum": {
66
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json"
67
+ },
68
+ "express": {
69
+ "$ref": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/scale-set.json"
70
+ }
71
+ },
72
+ "required": ["spectrum", "express"]
73
+ }
74
+ ]
75
+ },
76
+ "component": {},
77
+ "deprecated": {},
78
+ "deprecated_comment": {},
79
+ "uuid": {}
80
+ },
81
+ "required": ["sets"]
82
+ }
@@ -42,7 +42,9 @@
42
42
  "drop-shadow-color": {
43
43
  "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/alias.json",
44
44
  "value": "{drop-shadow-color-100}",
45
- "uuid": "be45ace6-9227-41d1-80be-0c58c3f8b3cb"
45
+ "uuid": "be45ace6-9227-41d1-80be-0c58c3f8b3cb",
46
+ "deprecated": true,
47
+ "deprecated_comment": "Replaced with drop-shadow-color-100"
46
48
  },
47
49
  "opacity-disabled": {
48
50
  "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/opacity.json",
@@ -101,8 +101,10 @@
101
101
  "color-loupe-drop-shadow-color": {
102
102
  "component": "color-loupe",
103
103
  "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/alias.json",
104
- "value": "{transparent-black-300}",
105
- "uuid": "918b8089-d89f-45d2-8c9c-f3f13f81b0b9"
104
+ "value": "{drop-shadow-elevated-color}",
105
+ "uuid": "918b8089-d89f-45d2-8c9c-f3f13f81b0b9",
106
+ "deprecated": true,
107
+ "deprecated_comment": "Use `drop-shadow-elevated-color` instead"
106
108
  },
107
109
  "color-loupe-drop-shadow-y": {
108
110
  "component": "color-loupe",
@@ -266,4 +268,4 @@
266
268
  "value": "0.15",
267
269
  "uuid": "6a093ea1-f07e-4673-b52f-5b28a2e080d0"
268
270
  }
269
- }
271
+ }
@@ -7603,21 +7603,6 @@
7603
7603
  }
7604
7604
  }
7605
7605
  },
7606
- "combo-box-visual-to-field-button": {
7607
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json",
7608
- "value": "0px",
7609
- "uuid": "6c3c7201-2f5b-455a-bcbf-5e3d783887bf"
7610
- },
7611
- "in-field-button-edge-to-fill-medium": {
7612
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json",
7613
- "value": "6px",
7614
- "uuid": "86f41898-b794-4f7e-ae41-9eb84c2c7a5b"
7615
- },
7616
- "in-field-button-edge-to-fill-large": {
7617
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json",
7618
- "value": "8px",
7619
- "uuid": "44e97486-53ce-4bb0-a778-0f9262dfe27e"
7620
- },
7621
7606
  "alert-dialog-description-font-size": {
7622
7607
  "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/scale-set.json",
7623
7608
  "sets": {
package/src/layout.json CHANGED
@@ -547,7 +547,7 @@
547
547
  },
548
548
  "mobile": {
549
549
  "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json",
550
- "value": "5px",
550
+ "value": "6px",
551
551
  "uuid": "7332a4d3-3775-4247-a4c0-fb01f0604d63"
552
552
  }
553
553
  }
@@ -557,12 +557,12 @@
557
557
  "sets": {
558
558
  "desktop": {
559
559
  "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json",
560
- "value": "7px",
560
+ "value": "6px",
561
561
  "uuid": "dd9e6e28-a382-46a1-a6e0-f73c8cc0ed70"
562
562
  },
563
563
  "mobile": {
564
564
  "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json",
565
- "value": "9px",
565
+ "value": "8px",
566
566
  "uuid": "cf58ae75-8f3f-4b9e-809b-ee78abbb2f2f"
567
567
  }
568
568
  }
@@ -572,12 +572,12 @@
572
572
  "sets": {
573
573
  "desktop": {
574
574
  "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json",
575
- "value": "10px",
575
+ "value": "9px",
576
576
  "uuid": "64cdd254-d3fe-40e6-97a8-76dd8156afa8"
577
577
  },
578
578
  "mobile": {
579
579
  "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json",
580
- "value": "13px",
580
+ "value": "11px",
581
581
  "uuid": "989aee4c-5c90-454a-b68d-a7564669c2bd"
582
582
  }
583
583
  }
@@ -587,12 +587,12 @@
587
587
  "sets": {
588
588
  "desktop": {
589
589
  "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json",
590
- "value": "13px",
590
+ "value": "11px",
591
591
  "uuid": "9654369a-5bf8-4436-a331-aeac1fd25a70"
592
592
  },
593
593
  "mobile": {
594
594
  "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/dimension.json",
595
- "value": "16px",
595
+ "value": "15px",
596
596
  "uuid": "cb4f356c-2dcd-4043-8f5c-3da904716b48"
597
597
  }
598
598
  }
@@ -419,4 +419,4 @@
419
419
  "value": "{negative-color-300}",
420
420
  "uuid": "4b6aaf76-e0ab-4be0-81c0-d5f64cacee88"
421
421
  }
422
- }
422
+ }
package/tasks/addIds.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
package/tasks/diff.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -16,7 +16,7 @@ import { fileURLToPath } from "url";
16
16
  import { detailedDiff, diff } from "deep-object-diff";
17
17
  import { exec } from "node:child_process";
18
18
  import { promisify } from "util";
19
- import tar from "tar";
19
+ import { x } from "tar";
20
20
  import tmp from "tmp-promise";
21
21
 
22
22
  const execP = promisify(exec);
@@ -65,7 +65,7 @@ async function getOldTokens() {
65
65
  const { stdout, stderr } = await execP(
66
66
  `npm pack @adobe/spectrum-tokens@${tag} --pack-destination ${tmpDir.path}`,
67
67
  );
68
- await tar.x({
68
+ await x({
69
69
  cwd: tmpDir.path,
70
70
  file: join(tmpDir.path, stdout.trim()),
71
71
  });
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -20,42 +20,6 @@ const files = await Promise.all(
20
20
  ),
21
21
  );
22
22
 
23
- // const uuids = [];
24
- // const missingUUIDs = [];
25
- // const VALUE = "value";
26
- // const UUID = "uuid";
27
-
28
- // function isObject(a) {
29
- // return (
30
- // !!a &&
31
- // a.constructor &&
32
- // (a.constructor === Object || a.constructor.name === "Object")
33
- // );
34
- // }
35
-
36
- // // check for uuids
37
- // function checkUUID(json, name) {
38
- // if (json[VALUE] && !json[UUID]) {
39
- // if (!json[UUID]) {
40
- // if (name) {
41
- // missingUUIDs.push(name);
42
- // } else {
43
- // missingUUIDs.push(json[VALUE]);
44
- // }
45
- // }
46
- // else if (uuids.includes(json[UUID])) {
47
-
48
- // }
49
- // uuids.push(json[UUID]);
50
- // }
51
-
52
- // // handle the json's children
53
- // Object.keys(json).forEach((key) => {
54
- // if (isObject(json[key])) {
55
- // checkUUID(json[key], key);
56
- // }
57
- // });
58
- // }
59
23
  const findDuplicateUUIDs = (json) => {
60
24
  const uuids = [];
61
25
  const duplicateUUIDs = [];
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -0,0 +1,32 @@
1
+ /*
2
+ Copyright 2024 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
13
+ import test from "ava";
14
+ import { readFile } from "fs/promises";
15
+ import { tokenFileNames } from "../index.js";
16
+ import findDuplicatedPropertyKeys from "find-duplicated-property-keys";
17
+
18
+ test("check for duplicate token names across all token files", async (t) => {
19
+ const result = await Promise.all(
20
+ tokenFileNames.map(async (tokenFileName) => {
21
+ const tokenDataString = await readFile(tokenFileName, "utf8");
22
+ return tokenDataString.substring(
23
+ tokenDataString.indexOf("{") + 1,
24
+ tokenDataString.lastIndexOf("}"),
25
+ );
26
+ }),
27
+ ).then((tokenDataArray) => {
28
+ return findDuplicatedPropertyKeys(`{${tokenDataArray.join(",")}}`);
29
+ });
30
+ // t.pass();
31
+ t.deepEqual(result, []);
32
+ });
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2023 Adobe. All rights reserved.
2
+ Copyright 2024 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0