amzn / style-dictionary

A build system for creating cross-platform styles.
https://styledictionary.com
Apache License 2.0
3.94k stars 559 forks source link

allTokens is an empty array but tokens is set #1283

Closed lukasoppermann closed 4 months ago

lukasoppermann commented 4 months ago

Hey,

I am trying to upgrade to v4. However I am running into an issue where .allTokens is [] but .tokens is set.

I used allTokens in formats and other custom code. Is this not supposed to be used anymore? Am I doing something wrong here?

Please let me know how I can provide more info to help solve this.

Just FYI, this is happening in two different repos.

jorenbroekema commented 4 months ago

It's still supposed to work

Can you find a way to reproduce this?

lukasoppermann commented 4 months ago

Okay, I think the issue has to do with my parser. It outputs value instead of $value (I wanted to deal with this later, as it means I have to adjust all transformers) and I think because of this, there is nothing in the allTokens, but somehow stuff is in tokens.