atlassian / pragmatic-drag-and-drop

Fast drag and drop for any experience on any tech stack
https://atlassian.design/components/pragmatic-drag-and-drop
Other
9.19k stars 205 forks source link

Through `@atlaskit/tokens` and `@atlaskit/ds-lib@`, `@atlaskit/pragmatic-drag-and-drop-react-drop-indicator` has a peer dependency on React `18.2.0` #102

Open tylerlaprade opened 1 month ago

tylerlaprade commented 1 month ago

This is causing warnings every time I install anything with NPM since I'm on React 18.3.0.

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @atlaskit/tokens@1.57.0
npm WARN Found: react@18.3.1
npm WARN node_modules/react
npm WARN   peer react@"^16.3.0 || ^17.0.0 || ^18.0.0" from @ag-grid-community/react@32.0.2
npm WARN   node_modules/@ag-grid-community/react
npm WARN     @ag-grid-community/react@"32.0.2" from the root project
npm WARN   54 more (...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0 || ~18.2.0" from @atlaskit/tokens@1.57.0
npm WARN node_modules/@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/node_modules/@atlaskit/tokens
npm WARN   @atlaskit/tokens@"^1.56.0" from @atlaskit/pragmatic-drag-and-drop-react-drop-indicator@1.1.2
npm WARN   node_modules/@atlaskit/pragmatic-drag-and-drop-react-drop-indicator
npm WARN 
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0 || ~18.2.0" from @atlaskit/tokens@1.57.0
npm WARN   node_modules/@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/node_modules/@atlaskit/tokens
npm WARN     @atlaskit/tokens@"^1.56.0" from @atlaskit/pragmatic-drag-and-drop-react-drop-indicator@1.1.2
npm WARN     node_modules/@atlaskit/pragmatic-drag-and-drop-react-drop-indicator
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @atlaskit/ds-lib@2.3.1
npm WARN Found: react@18.3.1
npm WARN node_modules/react
npm WARN   peer react@"^16.3.0 || ^17.0.0 || ^18.0.0" from @ag-grid-community/react@32.0.2
npm WARN   node_modules/@ag-grid-community/react
npm WARN     @ag-grid-community/react@"32.0.2" from the root project
npm WARN   54 more (...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0 || ~18.2.0" from @atlaskit/ds-lib@2.3.1
npm WARN node_modules/@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/node_modules/@atlaskit/tokens/node_modules/@atlaskit/ds-lib
npm WARN   @atlaskit/ds-lib@"^2.3.0" from @atlaskit/tokens@1.57.0
npm WARN   node_modules/@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/node_modules/@atlaskit/tokens
npm WARN 
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0 || ~18.2.0" from @atlaskit/ds-lib@2.3.1
npm WARN   node_modules/@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/node_modules/@atlaskit/tokens/node_modules/@atlaskit/ds-lib
npm WARN     @atlaskit/ds-lib@"^2.3.0" from @atlaskit/tokens@1.57.0
npm WARN     node_modules/@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/node_modules/@atlaskit/tokens

added 3 packages, removed 1 package, changed 34 packages, and audited 1406 packages in 10s
alexreardon commented 1 month ago

Just to confirm, this is for the @atlaskit/pragmatic-drag-and-drop-react-drop-indicator package?

tylerlaprade commented 1 month ago

Yes, that's right, version 1.1.2. We're also using pragmatic-drag-and-drop-hitbox and pragmatic-drag-and-drop, but neither of them have this problem.

alexreardon commented 1 month ago

I'm working on widening the peer dependency ranges react and react-dom in dependencies to be consistent and to include 18.3.0

alexreardon commented 1 month ago

Can you please check again?

All dependent packages should now have the increased react and react-dom peer dependency range of "^16.8.0 || ^17.0.0 || ^18.0.0".

Example: @atlaskit/tokens@1.58.0

tylerlaprade commented 1 month ago

Thanks @alexreardon. Will I need to to manually download and replace the code in my node_modules/? I'm not seeing a new release version yet.

alexreardon commented 3 weeks ago

Which package manager are you using? Big goal is to update the transitive dependencies of pdnd to latest

alexreardon commented 3 weeks ago

We can cut a new patch version of pdnd if that would be helpful. Could you try removing the dependency and adding it again (hopefully that will ensure that the latest version of transitive dependencies are on latest)

tylerlaprade commented 3 weeks ago

I'm using NPM. I keep all version numbers pinned in package.json. When there's a new version, I update the version number and run npm i.

tylerlaprade commented 3 weeks ago

After deleting them and re-installing, I no longer see the warnings! Ideally that would have corresponded to a version number change, though, so I (and other users) can just bump the number rather than deleting and reinstalling.