@terrazzo/parser 2.0.0-alpha.1 → 2.0.0-alpha.2
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 +9 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/parse/token.ts +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terrazzo/parser",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.2",
|
|
4
4
|
"description": "Parser/validator for the Design Tokens Community Group (DTCG) standard.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"scule": "^1.3.0",
|
|
44
44
|
"wildcard-match": "^5.1.4",
|
|
45
45
|
"@terrazzo/json-schema-tools": "^0.0.1",
|
|
46
|
-
"@terrazzo/token-tools": "^2.0.0-alpha.
|
|
46
|
+
"@terrazzo/token-tools": "^2.0.0-alpha.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"yaml-to-momoa": "0.0.6"
|
package/src/parse/token.ts
CHANGED
|
@@ -284,7 +284,10 @@ export function graphAliases(refMap: RefMap, { tokens, logger, sources }: GraphA
|
|
|
284
284
|
}
|
|
285
285
|
// last node: apply partial alias
|
|
286
286
|
if (i === partial.length - 1) {
|
|
287
|
-
|
|
287
|
+
// important: we want to get only the immediate alias [0], not the final one [.length - 1].
|
|
288
|
+
// if we resolve this too far, we could get incorrect values especially in plugin-css if a
|
|
289
|
+
// user is applying cascades to the intermediate aliases but not the final one
|
|
290
|
+
const aliasedID = getTokenRef(refChain[0]!);
|
|
288
291
|
if (!(aliasedID in tokens)) {
|
|
289
292
|
logger.error({
|
|
290
293
|
group: 'parser',
|