diff --git a/CHANGELOG.md b/CHANGELOG.md index 7094bcf279..ed59e9c669 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [v11.1.23](https://github.com/Workday/canvas-kit/releases/tag/v11.1.23) (2024-11-06) + +### Infrastructure + +- fix: Fix Style transform stencil variable lookup ([#3038](https://github.com/Workday/canvas-kit/pull/3038)) ([@NicholasBoll](https://github.com/NicholasBoll)) + + ## [v11.1.22](https://github.com/Workday/canvas-kit/releases/tag/v11.1.22) (2024-11-05) ### Components diff --git a/lerna.json b/lerna.json index cfb483318b..32eca4c0b4 100644 --- a/lerna.json +++ b/lerna.json @@ -1,7 +1,5 @@ { - "packages": [ - "modules/**" - ], + "packages": ["modules/**"], "version": "12.0.9", "npmClient": "yarn", "useWorkspaces": true, diff --git a/modules/styling-transform/lib/utils/handleCreateStencil.ts b/modules/styling-transform/lib/utils/handleCreateStencil.ts index efe11343a8..f9e6eaab77 100644 --- a/modules/styling-transform/lib/utils/handleCreateStencil.ts +++ b/modules/styling-transform/lib/utils/handleCreateStencil.ts @@ -341,7 +341,7 @@ function parseStyleBlock( if (ts.isObjectLiteralExpression(property.initializer)) { styleObj = parseObjectToStaticValue(property.initializer, { ...context, - nameScope: `${stencilName}.`, + nameScope: `${stencilName}.vars.`, }); } @@ -350,7 +350,7 @@ function parseStyleBlock( if (returnNode) { styleObj = parseObjectToStaticValue(returnNode, { ...context, - nameScope: `${stencilName}.`, + nameScope: `${stencilName}.vars.`, }); } } @@ -361,7 +361,7 @@ function parseStyleBlock( if (returnNode) { styleObj = parseObjectToStaticValue(returnNode, { ...context, - nameScope: `${stencilName}.`, + nameScope: `${stencilName}.vars.`, }); } } diff --git a/modules/styling-transform/lib/utils/parseNodeToStaticValue.ts b/modules/styling-transform/lib/utils/parseNodeToStaticValue.ts index 8790dec46f..7747de5a7e 100644 --- a/modules/styling-transform/lib/utils/parseNodeToStaticValue.ts +++ b/modules/styling-transform/lib/utils/parseNodeToStaticValue.ts @@ -258,13 +258,13 @@ export function getValueFromAliasedSymbol( function getValueFromProcessedNodes(varName: string, context: TransformerContext): string | void { const {names} = context; - if (names[varName]) { - return names[varName]; - } - if (context.nameScope && names[`${context.nameScope}${varName}`]) { return names[`${context.nameScope}${varName}`]; } + + if (names[varName]) { + return names[varName]; + } } function hasExpression(node: ts.Node): node is ts.Node & {initializer: ts.Expression} {