When we import variables from Figma we take variables and then store that as tokens. Sometimes we override existing values, if a token already existed. To do that, we use some token keys internally that let us understand what was the old value, and the new. However, it seems we expose these to the user and save back to the JSON.
If I create a Figma variable of type number with a value of 16 and then go to Import variables, the result in JSON looks like this:
This is a problem, because we expose 2 keys that should be only internal: parent and oldValue. We need to make sure that we strip away those tokens when we import.
When we import variables from Figma we take variables and then store that as tokens. Sometimes we override existing values, if a token already existed. To do that, we use some token keys internally that let us understand what was the old value, and the new. However, it seems we expose these to the user and save back to the JSON.
If I create a Figma variable of type number with a value of
16
and then go to Import variables, the result in JSON looks like this:If I then change the variable's value in Figma to
32
and do an Import again, it will look like this:This is a problem, because we expose 2 keys that should be only internal:
parent
andoldValue
. We need to make sure that we strip away those tokens when we import.Note that this also happens on production.