Depend on @cratis/fundamentals as a peer - #2445
Conversation
Declared as a range in dependencies, which tells a package manager a copy each is acceptable. It is not: the two copies get separate converter registries and separate class objects, so a converter registered on one reaches only that one, an instanceof against the other is false, and a version pinned at the top level never reaches the nested copy - an adopted fix can land nowhere while every build stays green. A peer dependency is the mechanism for "exactly one of these in the tree", which is what this actually is. The range is deliberately wide so a patch or minor release does not force lockstep releases across repositories, and an exact devDependency keeps this repository's own build and specs pinned.
|
Split out of #2442, where it was wrongly bundled with an additive generator feature. Why major. Why do it. Two copies in one realm is a broken outcome, not a wasteful one — each gets its own converter registry and class objects, so a converter registered on one reaches only that one, The |
There was a problem hiding this comment.
Pull request overview
Updates the @cratis/arc JavaScript package to treat @cratis/fundamentals as a peer dependency, reducing the risk of multiple physical copies being installed in consumer setups and making the dependency relationship explicit for package managers that don’t auto-install peers.
Changes:
- Removed
@cratis/fundamentalsfromdependencies. - Added
@cratis/fundamentalstopeerDependencies(major range). - Added
@cratis/fundamentalsas a pinneddevDependencyfor local development/build/test.
| "peerDependencies": { | ||
| "@cratis/fundamentals": "^7" | ||
| }, | ||
| "devDependencies": { | ||
| "@cratis/fundamentals": "7.16.0" | ||
| } |
|
Closing as redundant — recombined into #2442. Splitting this out gave each change an accurate label, but |
|
Superseded by #2446, which carries this unchanged so the whole set lands as one release rather than four. Closing so it cannot be merged twice — the branch is untouched. |
Changed
@cratis/arcdeclares@cratis/fundamentalsas a peer dependency instead of a versioned dependency. Consumers whose package manager does not install peers automatically must now declare it themselves.