Understand why `astro` is a dependency with a wildcard version
CurrentIn @playform/inline (and related PlayForm packages), astro is listed in dependencies using a wildcard version ("astro": "*") instead of being listed in peerDependencies.
This approach is used to ensure:
- Type availability: TypeScript can resolve
astrotypes during integration builds and for consumers. - No version pinning: It prevents the integration from forcing a specific version of Astro onto the host project, which avoids breaking builds when the host project upgrades Astro (e.g., moving from v5 to v6).
- No installation friction: It avoids triggering peer dependency validation logic in package managers like npm, which can cause errors or require users to use the
legacy-peer-depsflag. - Automatic deduplication: Package managers like npm and yarn will reuse the host project's existing
astroinstallation because the wildcard*satisfies any version requirement.