Skip to content

Chore/moose 382/package updates#348

Merged
dpellenwood merged 12 commits intomainfrom
chore/MOOSE-382/package-updates
Apr 13, 2026
Merged

Chore/moose 382/package updates#348
dpellenwood merged 12 commits intomainfrom
chore/MOOSE-382/package-updates

Conversation

@dpellenwood
Copy link
Copy Markdown
Collaborator

@dpellenwood dpellenwood commented Apr 9, 2026

What does this do/fix?

  • Update all plugins, composer & npm packages to latest
  • Pin React to v18 as a peer dependency to resolve conflicts between @dnd-kit/core and @wordpress/icons

@LayaTaal this is an alternative approach to #323 . I'm not sure which one is better, tbh. I was really hoping that WP Core would support React 19 by now, but it looks like that won't happen until v7.1 at the earliest [sigh].

QA

Links to relevant issues

Pull request checklist

  • I've added a changelog entry for these changes.
  • I've linked to a relevant Jira issue.

Comment thread composer.json Outdated
"wp-cli/wp-cli-bundle": "^2.12",
"wpackagist-plugin/disable-emojis": "^1.7",
"wpackagist-plugin/duplicate-post": "^4.5",
"wpackagist-plugin/limit-login-attempts-reloaded": "^2.26",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be removed in #342 / MOOSE-187 as well. So, rather than updating, I removed here.

@@ -1,18 +1,19 @@
import * as React from 'react';
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rant the icon-picker npm script to confirm the icons are being generated after the respective package update. You can safely ignore the changed JS files in this directory.

Comment thread package.json Outdated
Comment on lines +57 to +60
"peerDependencies": {
"react": "^18.3",
"react-dom": "^18.3"
},
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinning React to v18 to resolve a conflict between @dnd-kit/core wanting v19 and and @wordpress/icons wanting v18.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen this pattern used more for React/React Native repos in open source libs than the overrides key in #323 @LayaTaal @dpellenwood but I don't know which would technically be better either.

Copy link
Copy Markdown
Contributor

@LayaTaal LayaTaal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @dpellenwood I was looking into this some and it looks like @dnd-kit has a new major release that I think will solve our problems altogether with the React version mismatch. The new version supports React 18 and 19. We will need to update our imports some to use it, though.

@dpellenwood
Copy link
Copy Markdown
Collaborator Author

Hey @dpellenwood I was looking into this some and it looks like @dnd-kit has a new major release that I think will solve our problems altogether with the React version mismatch. The new version supports React 18 and 19. We will need to update our imports some to use it, though.

@LayaTaal Hmm... As I understand it, dbd-kit already supported both versions of React, but since it installed first and required v19 or v18, v19 got installed since we didn't specify, which then caused conflicts with the icons package.

Ans actually, after playing with this some more, I reverted to using overrides and added a couple more packages to resole some security warnings on install. This gives us a 100% clean npm install. Happy to chat about it more though.

@LayaTaal
Copy link
Copy Markdown
Contributor

Hey @dpellenwood I was looking into this some and it looks like @dnd-kit has a new major release that I think will solve our problems altogether with the React version mismatch. The new version supports React 18 and 19. We will need to update our imports some to use it, though.

@LayaTaal Hmm... As I understand it, dbd-kit already supported both versions of React, but since it installed first and required v19 or v18, v19 got installed since we didn't specify, which then caused conflicts with the icons package.

Ans actually, after playing with this some more, I reverted to using overrides and added a couple more packages to resole some security warnings on install. This gives us a 100% clean npm install. Happy to chat about it more though.

That works for me and I do think overrides makes more sense here than peer dependencies. For dnd-kit, that issue I recall is that the version we are installing had a loose React requirement of the latest version above 16, which would default to 19. But the newest version of dnd-kit specifically requires 18 or 19. The new version of dnd-kit is namespaced different than what we are importing, for example @dnd-kit/core has been replaced completely. My only question is, do you want to upgrade those as part of this PR or treat that as something separate?

@dpellenwood
Copy link
Copy Markdown
Collaborator Author

The new version of dnd-kit is namespaced different than what we are importing, for example @dnd-kit/core has been replaced completely. My only question is, do you want to upgrade those as part of this PR or treat that as something separate?

Gotcha! It's weird b/c the new version has complete changed the version numbering, too. It doesn't show as an available update when running npm outdated. I'll ticket that separately from this and note to come back and check the override versions as part of that ticket. Thank you!

@dpellenwood dpellenwood requested a review from LayaTaal April 10, 2026 19:05
Copy link
Copy Markdown
Contributor

@jamiepaul jamiepaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 👍🏻

@dpellenwood dpellenwood merged commit f380c6c into main Apr 13, 2026
7 checks passed
@dpellenwood dpellenwood deleted the chore/MOOSE-382/package-updates branch April 13, 2026 19:00
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.

5 participants