From ab2d2401d6faa82fa2e5a39dc989e05433313ba9 Mon Sep 17 00:00:00 2001 From: Julian Skinner Date: Wed, 4 Sep 2024 11:53:02 -0500 Subject: [PATCH] ci: update token-studio/sd-tranforms to latest version --- libs/core/package.json | 2 +- libs/core/scripts/sd-transforms.mjs | 5 +- .../src/global/styles/tokens/core/_core.scss | 6 +-- package-lock.json | 46 ++++++++++--------- 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/libs/core/package.json b/libs/core/package.json index e580f6fff..b9f9622e8 100644 --- a/libs/core/package.json +++ b/libs/core/package.json @@ -75,7 +75,7 @@ "@storybook/addon-links": "^7.3.2", "@storybook/web-components": "^7.3.2", "@storybook/web-components-vite": "^7.3.2", - "@tokens-studio/sd-transforms": "^0.15.2", + "@tokens-studio/sd-transforms": "^1.2.3", "@types/jest": "^29.5.11", "@types/sortablejs": "^1.15.1", "@typescript-eslint/eslint-plugin": "^6.6.0", diff --git a/libs/core/scripts/sd-transforms.mjs b/libs/core/scripts/sd-transforms.mjs index bcf208618..00f6bfbfb 100644 --- a/libs/core/scripts/sd-transforms.mjs +++ b/libs/core/scripts/sd-transforms.mjs @@ -1,8 +1,8 @@ -import { registerTransforms } from '@tokens-studio/sd-transforms'; +import { register } from '@tokens-studio/sd-transforms'; import fs from 'fs-extra'; import StyleDictionary from 'style-dictionary'; -registerTransforms(StyleDictionary); +register(StyleDictionary); const basePath = `src/global/styles/tokens`; @@ -20,6 +20,7 @@ const getTokenSetNamesFromFolders = (path) => { const getConfig = (sets) => { return { source: sets.map(tokenSet => `${basePath}/${tokenSet}/${tokenSet}.json`), + preprocessors: ['tokens-studio'], platforms: { css: { transformGroup: 'tokens-studio', diff --git a/libs/core/src/global/styles/tokens/core/_core.scss b/libs/core/src/global/styles/tokens/core/_core.scss index adbf142db..fec5504ea 100644 --- a/libs/core/src/global/styles/tokens/core/_core.scss +++ b/libs/core/src/global/styles/tokens/core/_core.scss @@ -1,5 +1,5 @@ :root { - --pine-border-radius-0: 0; + --pine-border-radius-0: 0rem; --pine-border-radius-100: 8px; --pine-border-radius-125: 10px; --pine-border-radius-150: 12px; @@ -12,7 +12,7 @@ --pine-border-radius-050: 4px; --pine-border-radius-075: 6px; --pine-border-radius-round: 9999px; - --pine-border-width-none: 0; + --pine-border-width-none: 0rem; --pine-border-width-thin: 1px; --pine-border-width-thick: 2px; --pine-box-shadow-xs: 0 1px 2px 0 rgba(0,0,0,0.06), 0 1px 3px 0 rgba(0,0,0,0.1); @@ -103,7 +103,7 @@ --pine-line-height-025: 0.625; --pine-line-height-050: 0.78125; --pine-line-height-075: 0.9375; - --pine-spacing-0: 0; + --pine-spacing-0: 0rem; --pine-spacing-100: 8px; --pine-spacing-150: 12px; --pine-spacing-200: 16px; diff --git a/package-lock.json b/package-lock.json index f9b9a6729..ece4780c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52,7 +52,7 @@ "@storybook/addon-links": "^7.3.2", "@storybook/web-components": "^7.3.2", "@storybook/web-components-vite": "^7.3.2", - "@tokens-studio/sd-transforms": "^0.15.2", + "@tokens-studio/sd-transforms": "^1.2.3", "@types/jest": "^29.5.11", "@types/sortablejs": "^1.15.1", "@typescript-eslint/eslint-plugin": "^6.6.0", @@ -2647,6 +2647,16 @@ "ieee754": "^1.2.1" } }, + "node_modules/@bundled-es-modules/postcss-calc-ast-parser": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@bundled-es-modules/postcss-calc-ast-parser/-/postcss-calc-ast-parser-0.1.6.tgz", + "integrity": "sha512-y65TM5zF+uaxo9OeekJ3rxwTINlQvrkbZLogYvQYVoLtxm4xEiHfZ7e/MyiWbStYyWZVZkVqsaVU6F4SUK5XUA==", + "dev": true, + "license": "ISC", + "dependencies": { + "postcss-calc-ast-parser": "^0.1.4" + } + }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", @@ -10076,29 +10086,30 @@ } }, "node_modules/@tokens-studio/sd-transforms": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@tokens-studio/sd-transforms/-/sd-transforms-0.15.2.tgz", - "integrity": "sha512-0ryA1xdZ75cmneUZ/0UQIpzMFUyKPsfQgeu/jZguGFF7vB3/Yr+JsjGU/HFFvWtZfy0c4EQToCSHYwI0g13cBg==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@tokens-studio/sd-transforms/-/sd-transforms-1.2.4.tgz", + "integrity": "sha512-Blf7Y5D7uieRBTcmyrFxZ/oEB7OYAa/Ns7DJU4/fyV69pvm7DC3K3zHxrFwHSRcoa7C/dFoF3p3AgohkdXzjfA==", "dev": true, "license": "MIT", "dependencies": { - "@tokens-studio/types": "^0.4.0", - "color2k": "^2.0.1", + "@bundled-es-modules/deepmerge": "^4.3.1", + "@bundled-es-modules/postcss-calc-ast-parser": "^0.1.6", + "@tokens-studio/types": "^0.5.1", "colorjs.io": "^0.4.3", - "deepmerge": "^4.3.1", "expr-eval-fork": "^2.0.2", - "is-mergeable-object": "^1.1.1", - "postcss-calc-ast-parser": "^0.1.4", - "style-dictionary": "^4.0.0-prerelease.22" + "is-mergeable-object": "^1.1.1" }, "engines": { - "node": ">=17.0.0" + "node": ">=18.0.0" + }, + "peerDependencies": { + "style-dictionary": "^4.0.1" } }, "node_modules/@tokens-studio/types": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@tokens-studio/types/-/types-0.4.0.tgz", - "integrity": "sha512-rp5t0NP3Kai+Z+euGfHRUMn3AvPQ0bd9Dd2qbtfgnTvujxM5QYVr4psx/mwrVwA3NS9829mE6cD3ln+PIaptBA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@tokens-studio/types/-/types-0.5.1.tgz", + "integrity": "sha512-LdCF9ZH5ej4Gb6n58x5fTkhstxjXDZc1SWteMWY6EiddLQJVONMIgYOrWrf1extlkSLjagX8WS0B63bAqeltnA==", "dev": true, "license": "MIT" }, @@ -13353,13 +13364,6 @@ "color-support": "bin.js" } }, - "node_modules/color2k": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/color2k/-/color2k-2.0.3.tgz", - "integrity": "sha512-zW190nQTIoXcGCaU08DvVNFTmQhUpnJfVuAKfWqUQkflXKpaDdpaYoM0iluLS9lgJNHyBF58KKA2FBEwkD7wog==", - "dev": true, - "license": "MIT" - }, "node_modules/colord": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz",