Skip to content

Commit

Permalink
chore: Merge support into master
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasBoll committed Nov 6, 2024
2 parents 0021c2c + 5c9ceb5 commit 7d31aef
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"packages": [
"modules/**"
],
"packages": ["modules/**"],
"version": "12.0.9",
"npmClient": "yarn",
"useWorkspaces": true,
Expand Down
6 changes: 3 additions & 3 deletions modules/styling-transform/lib/utils/handleCreateStencil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ function parseStyleBlock(
if (ts.isObjectLiteralExpression(property.initializer)) {
styleObj = parseObjectToStaticValue(property.initializer, {
...context,
nameScope: `${stencilName}.`,
nameScope: `${stencilName}.vars.`,
});
}

Expand All @@ -350,7 +350,7 @@ function parseStyleBlock(
if (returnNode) {
styleObj = parseObjectToStaticValue(returnNode, {
...context,
nameScope: `${stencilName}.`,
nameScope: `${stencilName}.vars.`,
});
}
}
Expand All @@ -361,7 +361,7 @@ function parseStyleBlock(
if (returnNode) {
styleObj = parseObjectToStaticValue(returnNode, {
...context,
nameScope: `${stencilName}.`,
nameScope: `${stencilName}.vars.`,
});
}
}
Expand Down
8 changes: 4 additions & 4 deletions modules/styling-transform/lib/utils/parseNodeToStaticValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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} {
Expand Down

0 comments on commit 7d31aef

Please sign in to comment.