color-js / color.js

Color conversion & manipulation library by the editors of the CSS Color specifications
https://colorjs.io
MIT License
1.93k stars 81 forks source link

Circular references #200

Open benmccann opened 2 years ago

benmccann commented 2 years ago

Building a project with Rollup that has colorjs.io as a dependency results in the following warnings:

(!) Circular dependencies
node_modules/colorjs.io/src/to.js -> node_modules/colorjs.io/src/toGamut.js -> node_modules/colorjs.io/src/to.js
node_modules/colorjs.io/src/index-fn.js -> node_modules/colorjs.io/src/chromaticity.js -> node_modules/colorjs.io/src/color.js -> node_modules/colorjs.io/src/index-fn.js
node_modules/colorjs.io/src/index-fn.js -> node_modules/colorjs.io/src/interpolation.js -> node_modules/colorjs.io/src/index-fn.js

It would be nice to fix these to remove the warnings for users of the library

LeaVerou commented 2 years ago

Just pushed two fixes for the 2nd and 3rd issues, but the first one is an actual circular dependency, not just an oversight in coding like the other two. 😕