terrazzoapp / terrazzo

Use DTCG tokens JSON to generate code for web, mobile, native apps, and more
https://terrazzo.app
MIT License
147 stars 25 forks source link

Error With Custom Token Types #246

Closed velin-deity closed 4 months ago

velin-deity commented 4 months ago

Hello, I noticed that since version 1.11.0 our pipeline throws an error when running the co build command.

From my investigation, the problem is with the new logic introduced in packages/core/src/lint-core/rules/duplicate-values.ts.

Coming to line 55 with a type that has not been defined in the initial values object throws Cannot read properties of undefined. In reality, any token whose type returns an empty or undefined set is automatically not a duplicate.

drwpow commented 4 months ago

Good investigation! That’s a quick fix; will patch that right up