tokens-studio / sd-transforms

Custom transforms for Style-Dictionary, to work with Design Tokens that are exported from Tokens Studio
MIT License
194 stars 28 forks source link

fix for checkAndEvaluateMath as it currently crashed on boolean expressions #183

Closed thomasmattheussen closed 1 year ago

thomasmattheussen commented 1 year ago

This seems like a slightly better way to handle it?

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 63a96a2dddae6b121ab67138b2a1b2acebcf3116

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------------------- | ----- | | @tokens-studio/sd-transforms | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

thomasmattheussen commented 1 year ago

The test brought something to light I think. The test fails, because it would return the booleans as strings I think? (it succeeds when .to.equal('false') instead of .to.equal(false))

So maybe another approach is needed?

jorenbroekema commented 1 year ago

I pushed a new commit as a proposal on how we could tackle this, but I have changed the changeset to be a minor, as this could technically be a breaking change for users. What do you think?

thomasmattheussen commented 1 year ago

Looks good to me!