From 9bb5e2caff6a1135aee5bea79a6e1a555f5edba0 Mon Sep 17 00:00:00 2001 From: hiroshi Date: Thu, 26 Oct 2023 12:54:38 -0400 Subject: [PATCH 01/10] logs to figure out root cause --- src/app/components/Tokens.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/components/Tokens.tsx b/src/app/components/Tokens.tsx index da097853d..7696e0b0f 100644 --- a/src/app/components/Tokens.tsx +++ b/src/app/components/Tokens.tsx @@ -164,6 +164,7 @@ function Tokens({ isActive }: { isActive: boolean }) { }, [dispatch.uiState]); const handleSetTokensTabToJSON = React.useCallback(() => { + console.log('show tokens in json'); dispatch.uiState.setActiveTokensTab('json'); }, [dispatch.uiState]); From 6d059623bd1ed19ae597e23cf65a9d1ab40251b4 Mon Sep 17 00:00:00 2001 From: hiroshi Date: Fri, 27 Oct 2023 15:10:57 -0400 Subject: [PATCH 02/10] refactor to un block reference of transition token --- src/app/components/Tokens.tsx | 2 +- src/utils/TokenResolver.ts | 5 +++-- src/utils/tokenHelpers.ts | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/components/Tokens.tsx b/src/app/components/Tokens.tsx index 7696e0b0f..6172b3fe9 100644 --- a/src/app/components/Tokens.tsx +++ b/src/app/components/Tokens.tsx @@ -119,6 +119,7 @@ function Tokens({ isActive }: { isActive: boolean }) { })), [tokens, usedTokenSet, activeTokenSet], ); + const tokenType = useSelector(tokenTypeSelector); const [error, setError] = React.useState(null); @@ -164,7 +165,6 @@ function Tokens({ isActive }: { isActive: boolean }) { }, [dispatch.uiState]); const handleSetTokensTabToJSON = React.useCallback(() => { - console.log('show tokens in json'); dispatch.uiState.setActiveTokensTab('json'); }, [dispatch.uiState]); diff --git a/src/utils/TokenResolver.ts b/src/utils/TokenResolver.ts index 033764316..2f36e89eb 100644 --- a/src/utils/TokenResolver.ts +++ b/src/utils/TokenResolver.ts @@ -37,6 +37,7 @@ class TokenResolver { this.tokenMap = new Map(); this.memo = new Map(); this.populateTokenMap(); + return this.resolveTokenValues(); } @@ -187,10 +188,10 @@ class TokenResolver { } } else { // If it's not, we mark it as failed to resolve - const hasFailingReferences = !AliasRegex.test(JSON.stringify(finalValue)); + // const hasFailingReferences = !AliasRegex.test(JSON.stringify(finalValue)); resolvedToken = { - ...token, value: finalValue, rawValue: token.value, ...(hasFailingReferences ? { failedToResolve: true } : {}), + ...token, value: finalValue, rawValue: token.value, ...{}, } as ResolveTokenValuesResult; } diff --git a/src/utils/tokenHelpers.ts b/src/utils/tokenHelpers.ts index 22b5d0f7d..e1725d0d6 100644 --- a/src/utils/tokenHelpers.ts +++ b/src/utils/tokenHelpers.ts @@ -49,5 +49,6 @@ export function mergeTokenGroups(tokens: Record, usedSets }); } }); + return mergedTokens; } From 8f9f3d507cb8797472b71b1a81a21a390e68a24b Mon Sep 17 00:00:00 2001 From: robinhoodie0823 Date: Mon, 20 Nov 2023 17:51:48 +0100 Subject: [PATCH 03/10] fix comment --- src/utils/TokenResolver.test.ts | 2 -- src/utils/TokenResolver.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils/TokenResolver.test.ts b/src/utils/TokenResolver.test.ts index ceb609599..634f2eb50 100644 --- a/src/utils/TokenResolver.test.ts +++ b/src/utils/TokenResolver.test.ts @@ -241,7 +241,6 @@ const output = [ value: 6, }, { - failedToResolve: true, name: 'mathWrong', rawValue: '{foo} * {boo}', value: '3 * {baz}', @@ -277,7 +276,6 @@ const output = [ value: '#ff0000', }, { - failedToResolve: true, name: 'spacing.xs', rawValue: '{spacing.xs}', value: '{spacing.xs}', diff --git a/src/utils/TokenResolver.ts b/src/utils/TokenResolver.ts index 2f36e89eb..5b50de04b 100644 --- a/src/utils/TokenResolver.ts +++ b/src/utils/TokenResolver.ts @@ -191,7 +191,7 @@ class TokenResolver { // const hasFailingReferences = !AliasRegex.test(JSON.stringify(finalValue)); resolvedToken = { - ...token, value: finalValue, rawValue: token.value, ...{}, + ...token, value: finalValue, rawValue: token.value, } as ResolveTokenValuesResult; } From 3b6f4fda84f938d91e7f61ca60f56f3f1e4e8b23 Mon Sep 17 00:00:00 2001 From: robinhoodie0823 Date: Thu, 23 Nov 2023 20:57:59 +0100 Subject: [PATCH 04/10] refactor to check token break --- src/utils/TokenResolver.test.ts | 2 ++ src/utils/TokenResolver.ts | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/utils/TokenResolver.test.ts b/src/utils/TokenResolver.test.ts index 634f2eb50..ceb609599 100644 --- a/src/utils/TokenResolver.test.ts +++ b/src/utils/TokenResolver.test.ts @@ -241,6 +241,7 @@ const output = [ value: 6, }, { + failedToResolve: true, name: 'mathWrong', rawValue: '{foo} * {boo}', value: '3 * {baz}', @@ -276,6 +277,7 @@ const output = [ value: '#ff0000', }, { + failedToResolve: true, name: 'spacing.xs', rawValue: '{spacing.xs}', value: '{spacing.xs}', diff --git a/src/utils/TokenResolver.ts b/src/utils/TokenResolver.ts index 5b50de04b..0bf90203c 100644 --- a/src/utils/TokenResolver.ts +++ b/src/utils/TokenResolver.ts @@ -47,7 +47,9 @@ class TokenResolver { for (const token of this.tokens) { const resolvedValue = this.resolveReferences(token); - + if (typeof resolvedValue.value === 'string' && AliasRegex.test(resolvedValue.value)) { + resolvedValue.failedToResolve = true; + } resolvedTokens.push({ ...resolvedValue, rawValue: token.value, @@ -188,10 +190,14 @@ class TokenResolver { } } else { // If it's not, we mark it as failed to resolve - // const hasFailingReferences = !AliasRegex.test(JSON.stringify(finalValue)); + + const stringifiedValue = JSON.stringify(finalValue); + const convertedValue = stringifiedValue.substring(1, stringifiedValue.length - 1); + + const hasFailingReferences = typeof finalValue === 'object' ? AliasRegex.test(convertedValue) : AliasRegex.test(stringifiedValue); resolvedToken = { - ...token, value: finalValue, rawValue: token.value, + ...token, value: finalValue, rawValue: token.value, ...(hasFailingReferences ? { failedToResolve: true } : {}), } as ResolveTokenValuesResult; } From 68d79e6e79f3675fb1d27731c72b961012b48840 Mon Sep 17 00:00:00 2001 From: robinhoodie0823 Date: Mon, 27 Nov 2023 02:52:39 +0100 Subject: [PATCH 05/10] fix comment --- package.json | 2 ++ src/utils/TokenResolver.ts | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index bbfff7e52..4482b21b7 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "glob": "^10.3.1", "i18next": "^23.2.3", "ignore-styles": "^5.0.1", + "js-yaml": "^4.1.0", "jszip": "^3.10.0", "just-compact": "^3.0.1", "just-extend": "^6.0.1", @@ -151,6 +152,7 @@ "@testing-library/react-hooks": "^8.0.1", "@testing-library/user-event": "^14.4.3", "@types/jest": "^26.0.20", + "@types/js-yaml": "^4.0.9", "@types/lodash.debounce": "^4.0.7", "@types/object-hash": "^2.2.1", "@types/react": "^17.0.0", diff --git a/src/utils/TokenResolver.ts b/src/utils/TokenResolver.ts index 0bf90203c..264370ea2 100644 --- a/src/utils/TokenResolver.ts +++ b/src/utils/TokenResolver.ts @@ -1,3 +1,4 @@ +import { dump } from 'js-yaml'; import { SingleToken } from '@/types/tokens'; import { TokenMap } from '../types/TokenMap'; @@ -191,10 +192,9 @@ class TokenResolver { } else { // If it's not, we mark it as failed to resolve - const stringifiedValue = JSON.stringify(finalValue); - const convertedValue = stringifiedValue.substring(1, stringifiedValue.length - 1); + const yamlString = dump(finalValue); - const hasFailingReferences = typeof finalValue === 'object' ? AliasRegex.test(convertedValue) : AliasRegex.test(stringifiedValue); + const hasFailingReferences = AliasRegex.test(yamlString); resolvedToken = { ...token, value: finalValue, rawValue: token.value, ...(hasFailingReferences ? { failedToResolve: true } : {}), From d8e1f9a50dcf22f806d34fd5d7a230dd590e8d56 Mon Sep 17 00:00:00 2001 From: robinhoodie0823 Date: Mon, 27 Nov 2023 08:20:22 +0100 Subject: [PATCH 06/10] change js-yaml version --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 4482b21b7..0caf8c0a1 100644 --- a/package.json +++ b/package.json @@ -152,7 +152,6 @@ "@testing-library/react-hooks": "^8.0.1", "@testing-library/user-event": "^14.4.3", "@types/jest": "^26.0.20", - "@types/js-yaml": "^4.0.9", "@types/lodash.debounce": "^4.0.7", "@types/object-hash": "^2.2.1", "@types/react": "^17.0.0", From 35ed5d3f18ac77c44436de53ccdacd00f16d3a5c Mon Sep 17 00:00:00 2001 From: robinhoodie0823 Date: Mon, 27 Nov 2023 09:57:47 +0100 Subject: [PATCH 07/10] change lockfile --- package-lock.json | 449 +++++++++++++++++++++++++++++++++++----------- package.json | 1 - 2 files changed, 349 insertions(+), 101 deletions(-) diff --git a/package-lock.json b/package-lock.json index f494825a6..892e940ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3640,6 +3640,28 @@ "js-yaml": "^3.13.1" } }, + "node_modules/@changesets/parse/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@changesets/parse/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@changesets/pre": { "version": "1.0.14", "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-1.0.14.tgz", @@ -4293,13 +4315,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "13.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", @@ -4316,19 +4331,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@figma-plugin/helpers": { "version": "0.15.2", "resolved": "https://registry.npmjs.org/@figma-plugin/helpers/-/helpers-0.15.2.tgz", @@ -4566,6 +4568,15 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -4580,6 +4591,19 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -25774,14 +25798,10 @@ "license": "MIT" }, "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/aria-hidden": { "version": "1.1.3", @@ -32902,13 +32922,6 @@ "node": ">=4" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, "node_modules/eslint/node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -33001,19 +33014,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/eslint/node_modules/semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -36049,6 +36049,15 @@ "node": ">=4" } }, + "node_modules/husky/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/husky/node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -36121,6 +36130,19 @@ "node": ">=4" } }, + "node_modules/husky/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/husky/node_modules/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -40319,14 +40341,12 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" @@ -40931,6 +40951,15 @@ "node": ">=4" } }, + "node_modules/lint-staged/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/lint-staged/node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -41050,6 +41079,19 @@ "node": ">=8" } }, + "node_modules/lint-staged/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/lint-staged/node_modules/npm-run-path": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", @@ -41395,6 +41437,28 @@ "node": ">=6" } }, + "node_modules/load-yaml-file/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/load-yaml-file/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/load-yaml-file/node_modules/pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -46759,6 +46823,28 @@ "node": ">=6" } }, + "node_modules/read-yaml-file/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/read-yaml-file/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/read-yaml-file/node_modules/pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -49180,9 +49266,8 @@ "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true, - "license": "BSD-3-Clause" + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true }, "node_modules/sshpk": { "version": "1.17.0", @@ -49855,6 +49940,15 @@ "node": ">=4" } }, + "node_modules/svgo/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/svgo/node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -49897,6 +49991,19 @@ "node": ">=4" } }, + "node_modules/svgo/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/svgo/node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -50998,6 +51105,15 @@ "node": ">=4" } }, + "node_modules/tslint/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/tslint/node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -51060,6 +51176,19 @@ "node": ">=4" } }, + "node_modules/tslint/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/tslint/node_modules/semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -56539,6 +56668,27 @@ "requires": { "@changesets/types": "^5.2.1", "js-yaml": "^3.13.1" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } } }, "@changesets/pre": { @@ -57080,12 +57230,6 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "globals": { "version": "13.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", @@ -57094,15 +57238,6 @@ "requires": { "type-fest": "^0.20.2" } - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } } } }, @@ -57278,6 +57413,15 @@ "resolve-from": "^5.0.0" }, "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -57288,6 +57432,16 @@ "path-exists": "^4.0.0" } }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -72417,13 +72571,10 @@ "dev": true }, "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "aria-hidden": { "version": "1.1.3", @@ -77260,12 +77411,6 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -77326,15 +77471,6 @@ "type-fest": "^0.20.2" } }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -80062,6 +80198,15 @@ "color-convert": "^1.9.0" } }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -80116,6 +80261,16 @@ "resolve-from": "^3.0.0" } }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -83188,13 +83343,12 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" } }, "jsbn": { @@ -83656,6 +83810,15 @@ "color-convert": "^1.9.0" } }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -83742,6 +83905,16 @@ "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "dev": true }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "npm-run-path": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", @@ -83995,6 +84168,25 @@ "strip-bom": "^3.0.0" }, "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -87878,6 +88070,25 @@ "strip-bom": "^3.0.0" }, "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -89697,7 +89908,7 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, "sshpk": { @@ -90198,6 +90409,15 @@ "color-convert": "^1.9.0" } }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -90230,6 +90450,16 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -90998,6 +91228,15 @@ "color-convert": "^1.9.0" } }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -91044,6 +91283,16 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", diff --git a/package.json b/package.json index 0caf8c0a1..bbfff7e52 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,6 @@ "glob": "^10.3.1", "i18next": "^23.2.3", "ignore-styles": "^5.0.1", - "js-yaml": "^4.1.0", "jszip": "^3.10.0", "just-compact": "^3.0.1", "just-extend": "^6.0.1", From 817ca55694c8bdc840dd657e5e120041909867e9 Mon Sep 17 00:00:00 2001 From: robinhoodie0823 Date: Mon, 27 Nov 2023 10:30:44 +0100 Subject: [PATCH 08/10] add declaration --- package-lock.json | 17 +++++++++++++++-- package.json | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 892e940ab..56789238d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tokens-studio/figma-plugin", - "version": "1.37.11", + "version": "1.37.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@tokens-studio/figma-plugin", - "version": "1.37.11", + "version": "1.37.1", "license": "MIT", "dependencies": { "@figma-plugin/helpers": "^0.15.2", @@ -130,6 +130,7 @@ "@testing-library/react-hooks": "^8.0.1", "@testing-library/user-event": "^14.4.3", "@types/jest": "^26.0.20", + "@types/js-yaml": "^4.0.9", "@types/lodash.debounce": "^4.0.7", "@types/object-hash": "^2.2.1", "@types/react": "^17.0.0", @@ -23845,6 +23846,12 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/js-yaml": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", + "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", + "dev": true + }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -71084,6 +71091,12 @@ "integrity": "sha512-qC4bCqYGy1y/NP7dDVr7KJarn+PbX1nSpwA7JXdu0HxT3QYjO8MJ+cntENtHFVy2dRAyBV23OZ6MxsW1AM1L8g==", "dev": true }, + "@types/js-yaml": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", + "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", + "dev": true + }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", diff --git a/package.json b/package.json index bbfff7e52..cbe86dcf2 100644 --- a/package.json +++ b/package.json @@ -151,6 +151,7 @@ "@testing-library/react-hooks": "^8.0.1", "@testing-library/user-event": "^14.4.3", "@types/jest": "^26.0.20", + "@types/js-yaml": "^4.0.9", "@types/lodash.debounce": "^4.0.7", "@types/object-hash": "^2.2.1", "@types/react": "^17.0.0", From 01e30ab1283f78e96773a5d1e78e66e13132dbd6 Mon Sep 17 00:00:00 2001 From: robinhoodie0823 Date: Wed, 29 Nov 2023 04:12:16 +0100 Subject: [PATCH 09/10] add test case --- src/utils/TokenResolver.test.ts | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/utils/TokenResolver.test.ts b/src/utils/TokenResolver.test.ts index fdbc4bf67..f3ffa0ff3 100644 --- a/src/utils/TokenResolver.test.ts +++ b/src/utils/TokenResolver.test.ts @@ -167,6 +167,18 @@ const tokens = [ description: 'the one with a nested shadow alias', type: TokenTypes.BOX_SHADOW, }, + { + name: 'shadow.shadowAlias1', + value: '{shadow.unResolvedSingle}', + description: 'the one with a nested shadow alias', + type: TokenTypes.BOX_SHADOW, + }, + { + name: 'shadow.shadowAlias2', + value: '{shadow.multiple}', + description: 'the one with multiple nested shadow alias', + type: TokenTypes.BOX_SHADOW, + }, { name: 'colors.modify', value: '#00a2ba', @@ -436,6 +448,37 @@ const output = [ color: '#ff0000', }, }, + { + ...unResolvedSingleShadowToken, + failedToResolve: true, + description: 'the one with a nested shadow alias', + name: 'shadow.shadowAlias1', + rawValue: '{shadow.unResolvedSingle}', + value: { + ...unResolvedSingleShadowToken.value, + color: '{colors.blue.500}', + }, + }, + { + ...multipleShadowToken, + description: 'the one with multiple nested shadow alias', + name: 'shadow.shadowAlias2', + rawValue: '{shadow.multiple}', + value: [ + { + ...multipleShadowToken.value[0], + color: '#ff000080', + }, + { + ...multipleShadowToken.value[1], + color: '#ff000066', + }, + { + ...multipleShadowToken.value[2], + color: '#000000', + }, + ], + }, { $extensions: { 'studio.tokens': { From 77769d6071554bc31c0bb59f7f94776b0d58dd2b Mon Sep 17 00:00:00 2001 From: Jan Six Date: Wed, 29 Nov 2023 07:38:07 +0000 Subject: [PATCH 10/10] Create real-hairs-beg.md --- .changeset/real-hairs-beg.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/real-hairs-beg.md diff --git a/.changeset/real-hairs-beg.md b/.changeset/real-hairs-beg.md new file mode 100644 index 000000000..29a986385 --- /dev/null +++ b/.changeset/real-hairs-beg.md @@ -0,0 +1,5 @@ +--- +"@tokens-studio/figma-plugin": patch +--- + +Fixed an issue that caused some tokens to falsely appear as broken