Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: Move sanity to peer deps #104

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Jamiewarb
Copy link
Contributor

As sanity is a dependency, we get warnings whenever it's slightly behind on version.

As a peer dependency, we're able to specify a range in which the package will work, but prevent version mismatches with end users if the sanity-web is not kept up to date with all Sanity releases.

This equals less maintenance burden for this package and its maintainers

$ pnpm i

 WARN  Issues with peer dependencies found
apps/sanity
└─┬ @tinloof/sanity-studio 1.4.0
  └─┬ @tinloof/sanity-web 0.6.0
    └─┬ sanity 3.62.0
      └─┬ @portabletext/editor 1.5.5
        ├── ✕ unmet peer @sanity/block-tools@^3.63.0: found 3.62.0 in sanity
        ├── ✕ unmet peer @sanity/schema@^3.63.0: found 3.62.0 in sanity
        ├── ✕ unmet peer @sanity/types@^3.63.0: found 3.62.0 in sanity
        └── ✕ unmet peer @sanity/util@^3.63.0: found 3.62.0 in sanity

packages/sanity-toolkit
└─┬ @tinloof/sanity-studio 1.4.0
  └─┬ @tinloof/sanity-web 0.6.0
    └─┬ sanity 3.62.0
      └─┬ @portabletext/editor 1.5.5
        ├── ✕ unmet peer @sanity/block-tools@^3.63.0: found 3.62.0 in sanity
        ├── ✕ unmet peer @sanity/schema@^3.63.0: found 3.62.0 in sanity
        ├── ✕ unmet peer @sanity/types@^3.63.0: found 3.62.0 in sanity
        └── ✕ unmet peer @sanity/util@^3.63.0: found 3.62.0 in sanity

Jamiewarb and others added 2 commits November 7, 2024 12:44
As `sanity` is a dependency, we get warnings whenever it's slightly behind on version.

As a peer dependency, we're able to specify a range in which the package will work, but prevent version mismatches with end users if the `sanity-web` is not kept up to date with all Sanity releases.

This equals less maintenance burden for this package and its maintainers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant