Skip to content

Incorrect peerDependencies: requires React 18+, but declares React 16+ support #2557

@melikhov-dev

Description

@melikhov-dev

Problem Description

The package.json declares incorrect peerDependencies:

"peerDependencies": {
  "react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
  "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
}

However, the actual requirements of the library's dependencies are more strict.

Root Cause

In commit eec8953b (PR #2380), a dependency replacement was made:

  • Removed: react-beautiful-dnd@^13.1.1 (requires react ^16.8.5 || ^17.0.0 || ^18.0.0)
  • Added: @hello-pangea/dnd@^18.0.1 (requires react ^18.0.0 || ^19.0.0)

The main package's peerDependencies were not updated during this replacement.

Impact

Users with React 16 or React 17 will encounter dependency conflicts when installing @hello-pangea/dnd, despite @gravity-ui/uikit formally declaring support for these versions.

Proposed Solution

Update peerDependencies to match actual requirements:

"peerDependencies": {
  "react": "^18.0.0 || ^19.0.0",
  "react-dom": "^18.0.0 || ^19.0.0"
}

Additional Information

This is a breaking change that requires a major version bump according to semver.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions