Tree-shakeable bundle for components — allowing reduction in bundle sizes
Breaking changes for Crayons v2 users
Important changes to CDN URLs for Crayons
Important: The default CDN URL serving Crayons now serves v3. As a result, existing apps using Crayons v2 must either migrate to v3, or change the CDN URL of Crayons to continue on v2.
To stay on v2, change the CDN URL to the following (notice the @2 in the URL):
Warning: If you intend to stay on v2, then publishing a new version of an app without changing the CDN URL to point to @2 will break your app!
Update (April 6, 2022): The default URL, the one without a version tag, now points to Crayons v2. So, apps that use Crayons v2 today with the default URL will receive Crayons v2, and not break. For v3, use the @v3 URL as mentioned in the Crayons installation documentation.
It can break, unfortunately, since the CDN content has changed. So, all apps using the default URL will now get v3.
That said, we had identified existing apps that use Crayons v2 and made a patch to all those apps to point them to the @2 URL for now. Please check and confirm if your app is breaking.
I don’t believe this was the best approach. I have delivered a lot of custom apps to customers using crayons that I can’t even remember. Imagine if all of them start reaching out me with trouble…
I don’t recall the v2 docs from before this new release saying anything about version on the getting started section, there was just one link.
I would appreciate if you guys could review this approach.
Thanks for the update @samuelpares. My sincere apologies on behalf of the team for the botched DX here.
Pointing the default URL to v2 may not be possible right away from the same package because unpkg automatically serves the latest published version of the npm package in the default URL. We also don’t want to fork the package.
We plan to get our teams together to see how we can address this, very soon. I’ll keep you posted.
I’m curious to know if all of these apps are Freshworks apps, or do you use Crayons in non-Freshworks apps as well.
We have changed the Crayons CDN URLs to serve v2 from the default URL. So, existing apps on v2 should no longer break. @msenhaji this should fix your issue. If not, please let me know.
@samuelpares Thank you again for suggesting the changes. The current setup is as you had suggested:
The default URL now points to version 2.x
The URL with @2 or @v2 now points to version 2.x
The URL with @3 or @v3 now points to version 3.x
Once again, on behalf of the team, our sincere apologies for breaking your apps.