Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected collision log #1316

Open
TrevorRice opened this issue Aug 22, 2024 · 1 comment
Open

Unexpected collision log #1316

TrevorRice opened this issue Aug 22, 2024 · 1 comment

Comments

@TrevorRice
Copy link

As discussed in #1308, the following two files:

// colors-1.json
{
  "colors": {
    "$type": "color",
    "black": { "$value": "#000000" }
  }
}
// colors-2.json
{
  "colors": {
    "$type": "color",
    "white": { "$value": "#ffffff" }
  }
}

Result in the following console log despite the tokens being generated correctly:

Token collisions detected (1):

Collision detected at: colors! Original value: color, New value: color

This can be demonstrated in this minimally reproducible example.

Removing "$type": "color" from one or both of the files resolves the collision logging issue.

@jorenbroekema
Copy link
Collaborator

Confirmed bug: https://github.com/amzn/style-dictionary/blob/main/lib/utils/deepExtend.js#L93 here somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants