@terrazzo/parser 0.1.0 → 0.1.1

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,14 @@
1
1
  # @terrazzo/parser
2
2
 
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#339](https://github.com/terrazzoapp/terrazzo/pull/339) [`9197405`](https://github.com/terrazzoapp/terrazzo/commit/9197405209d560f406494b6bd7aa1634608999c6) Thanks [@tomasfrancisco](https://github.com/tomasfrancisco)! - Fix missing letter spacing transformation as a dimension token
8
+
9
+ - Updated dependencies [[`9197405`](https://github.com/terrazzoapp/terrazzo/commit/9197405209d560f406494b6bd7aa1634608999c6), [`a637f67`](https://github.com/terrazzoapp/terrazzo/commit/a637f67e20009ce5eef1d5bc5b115cfa00b002d4)]:
10
+ - @terrazzo/token-tools@0.1.1
11
+
3
12
  ## 0.1.0
4
13
 
5
14
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terrazzo/parser",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Parser/validator for the Design Tokens Community Group (DTCG) standard.",
5
5
  "type": "module",
6
6
  "author": {
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
- "@humanwhocodes/momoa": "^3.3.0",
33
+ "@humanwhocodes/momoa": "^3.3.3",
34
34
  "@types/babel__code-frame": "^7.0.6",
35
35
  "@types/culori": "^2.1.1",
36
36
  "culori": "^4.0.1",
@@ -39,7 +39,7 @@
39
39
  "picocolors": "^1.1.1",
40
40
  "wildcard-match": "^5.1.3",
41
41
  "yaml": "^2.6.0",
42
- "@terrazzo/token-tools": "^0.1.0"
42
+ "@terrazzo/token-tools": "^0.1.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "esbuild": "^0.23.1",
package/parse/index.d.ts CHANGED
@@ -33,7 +33,7 @@ export interface ParseResult {
33
33
  /**
34
34
  * Parse and validate Tokens JSON, and lint it
35
35
  */
36
- export default function parse(input: ParseInput[], options?: ParseOptions): Promise<ParseResult>;
36
+ export default function parse(input: ParseInput[], options: ParseOptions): Promise<ParseResult>;
37
37
 
38
38
  /** Determine if an input is likely a JSON string */
39
39
  export function maybeJSONString(input: unknown): boolean;
@@ -120,10 +120,13 @@ export default function normalizeValue(token) {
120
120
  case 'typography': {
121
121
  const output = {};
122
122
  for (const k in token.$value) {
123
- if (k === 'fontSize') {
124
- output[k] = normalizeValue({ $type: 'dimension', $value: token.$value[k] });
125
- } else {
126
- output[k] = token.$value[k];
123
+ switch (k) {
124
+ case 'letterSpacing':
125
+ case 'fontSize':
126
+ output[k] = normalizeValue({ $type: 'dimension', $value: token.$value[k] });
127
+ break;
128
+ default:
129
+ output[k] = token.$value[k];
127
130
  }
128
131
  }
129
132
  return output;