From 4ee6754a547063c98d1b0cb76db10cf768b02987 Mon Sep 17 00:00:00 2001 From: taysea Date: Wed, 20 Nov 2024 12:13:17 -0800 Subject: [PATCH] Fix update-paddingY and verify-paddingY scripts after component -> element rename --- design-tokens/src/scripts/update-paddingY.ts | 7 +++++++ design-tokens/src/scripts/verify-paddingY.ts | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/design-tokens/src/scripts/update-paddingY.ts b/design-tokens/src/scripts/update-paddingY.ts index 2e85143bc..62415597c 100644 --- a/design-tokens/src/scripts/update-paddingY.ts +++ b/design-tokens/src/scripts/update-paddingY.ts @@ -120,6 +120,13 @@ nonComponentTokens.forEach(category => { delete updated[category]; }); +writeFileSync( + './tokens/component/element.default.json', + JSON.stringify({ element: updated.element }, null, 2), +); + +delete updated.element; + writeFileSync( './tokens/component/component.default.json', JSON.stringify(updated, null, 2), diff --git a/design-tokens/src/scripts/verify-paddingY.ts b/design-tokens/src/scripts/verify-paddingY.ts index 55269d5a7..9c7bdb237 100644 --- a/design-tokens/src/scripts/verify-paddingY.ts +++ b/design-tokens/src/scripts/verify-paddingY.ts @@ -63,7 +63,9 @@ export const descend = ( const paddingY = (minHeight - lineHeight - 2 * borderWidth) / 2; if (paddingY !== value.paddingY.$value) console.error( - `🛑 ${keyPath.join('.')}: ${paddingY} does not match ${ + `🛑 ${keyPath.join( + '.', + )}: Expected value ${paddingY} does not match existing value ${ value.paddingY.$value }. Run paddingY:update if this change is expected.`, );