developit / developit/preact-transition-group

peer dependency on a particular preact version

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
54
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Hi, this package and preact-css-transition-group both list `"preact": "*"` as a peer dependency. This can be a problem for widget-style use cases, where the surrounding app may use a different preact version than the widget. If the widget uses Preact 8, for example, but the application (or some other widget) uses Preact X, the package manager will be allowed to hoist up the preact-css-transition-group dependency. It will then resolve `preact` to Preact X, even if it is being used by Preact 8.

For example, a dependency tree like this:
```
app
- preact@10
- widget
- preact@8
- preact-transition-group
```
may be laid out on disk like this:
```
app
- preact@10
- preact-transition-group
- widget
- preact@8
```
causing preact-transition-group to use a different version of preact than expected.

What do you think about specifying `"preact": "^10.0.0"` in the peerDependency field to prevent this in the future?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.