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

"filtered out token references were found" warning is reported while values are beign resolved in the output file. #1379

Open
mkeyy0 opened this issue Oct 31, 2024 · 1 comment

Comments

@mkeyy0
Copy link

mkeyy0 commented Oct 31, 2024

I'm not sure why this bug is, but the "filtered out token references were found" warning is wrongly reported even when I use outputReferencesFilter combined with filter. While actual output has no references to any CSS variables and actual values are resolved.

Reproduction URL

P.S. I'm not sure the reason for this warning, but if you go to the third-level/colors.json file and leave only one token there - the warning is gone.

To reproduce run build command

@jorenbroekema
Copy link
Collaborator

jorenbroekema commented Nov 1, 2024

Thanks for the reproduction, definitely a bug.

In case someone wants to further debug this:
https://github.com/amzn/style-dictionary/blob/main/lib/utils/references/getReferences.js#L69 is where the warnings are created / added to the log collector
https://github.com/amzn/style-dictionary/blob/main/lib/utils/references/outputReferencesFilter.js#L27 is where the warning is supposed to get removed if the outputReferencesFilter function is used. Probably something wrong in here where it doesn't delete that warning when it should?

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