Skip to content

components peerDependencies require reflect-metadata and tsyringe for every consumer #248

Description

@cratis-direct

What we saw

While fixing an unrelated CI failure in Cratis/Ante (Cratis/Ante#24), yarn install --immutable reported unmet peer dependencies for @cratis/components@4.1.1:

➤ YN0002: │ ante@workspace:Source/Ante doesn't provide reflect-metadata (p96650c), requested by @cratis/components.
➤ YN0002: │ ante@workspace:Source/Ante doesn't provide tsyringe (pd763ff), requested by @cratis/components.

package.json for @cratis/components@4.1.1 lists both as required (non-optional) peerDependencies:

"peerDependencies": {
  "reflect-metadata": "0.2.2",
  "tsyringe": "4.10.0"
}

We couldn't find any direct reference to tsyringe or reflect-metadata inside the published dist/ of @cratis/components itself, which suggests this might be needed transitively (e.g. via @cratis/arc.react.mvvm or similar) rather than by components directly.

Why it matters

This is not currently blocking — yarn install --immutable still succeeds ("Done with warnings"), and lint/build/test all pass. But every application that consumes @cratis/components gets this warning noise in every CI run and local install unless it happens to already depend on tsyringe/reflect-metadata for unrelated reasons.

Ask

Could you clarify:

  • Is tsyringe/reflect-metadata actually required by every consumer of @cratis/components, or only by a subset of components/hooks?
  • If only a subset, would it make sense to mark them as peerDependenciesMeta optional (like pixi.js already is), or move the requirement down to whichever package genuinely uses them?

Happy to help verify a fix if useful.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

dependenciesPull requests that update a dependency file

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions