Moving the discussion from my previous post to keep things in one place.
Here are a few thoughts on how we could solve the versioning issue:
- npm distribution: This is the most professional route. It allows for proper bundling and ships types directly, which would eliminate the need for the separate
@shopify/polaris-typespackage. - Versioned CDN URLs: We should at least have the option to pin a version in the URL (e.g.,
/v1.2.3/polaris.js) if we choose to. - Incentives, not force: I understand Shopify wants apps to stay in sync with the Admin UI, but automatic updates aren’t the answer. This could be managed like Admin API versions. The library could simply write its version to the
windowobject, allowing Shopify to monitor which version an app is using via their existing app health/web vitals tracking. They could then notify developers in the Partner Dashboard when an update is required or a version is nearing deprecation.
Ideally, Shopify should provide both. An npm package for production-grade apps and a versioned CDN for quick prototypes or simpler implementations.