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

Removed exports (scale, limits, brewer) in chroma.js >2.4.2 #367

Open
ploth opened this issue Jan 3, 2025 · 3 comments
Open

Removed exports (scale, limits, brewer) in chroma.js >2.4.2 #367

ploth opened this issue Jan 3, 2025 · 3 comments

Comments

@ploth
Copy link

ploth commented Jan 3, 2025

It looks like chroma-js is not exporting scale, limits or brewer anymore. If I'm not wrong those were still available in 2.4.2. Removing these exports is a breaking change. Unfortunately this wasn't respected in the naming of the chroma-js releases. With a breaking change the major version should increase.

@gka
Copy link
Owner

gka commented Jan 6, 2025

Hi, I think the exports are still working fine, see this demo.

Can you explain how you're trying to import?

@ploth
Copy link
Author

ploth commented Jan 6, 2025

Interesting, I'm working with https://github.com/geostyler/geostyler which has a dependency on chroma-js ^2.4.2 and where I encountered the problem.

Thanks for your demo. For me it looks like that its fixed with a newer version of chroma-js. Try changing the import to: import { brewer } from 'chroma-js@2.5.0';

@gka
Copy link
Owner

gka commented Jan 6, 2025

Ah, yes I remember. Unfortunately I don't know that it's possible to "retract" a version from npm. Have you tried updating to v3? The only breaking changes involved the exporting of modern CSS colors, which shouldn't really break anything.

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

No branches or pull requests

2 participants