Skip to content

fix(copilot): declare dependencies that were only available through hoisting - #12465

Draft
sebdanielsson wants to merge 2 commits into
backstage:mainfrom
sebdanielsson:fix/copilot-declare-deps
Draft

sebdanielsson wants to merge 2 commits into
backstage:mainfrom
sebdanielsson:fix/copilot-declare-deps

Conversation

@sebdanielsson

@sebdanielsson sebdanielsson commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Hey, I just made a Pull Request!

Strict installs (pnpm, Yarn PnP) only resolve declared dependencies, and plugin-copilot uses some it doesn't declare.

  • Add @types/react as an optional peer, since the published types import react.
  • Add @mui/system, a peer of @mui/x-charts. Same range as @mui/material.
  • Move @backstage/theme to dev dependencies. Only the dev app uses it, and as a dependency it needs @material-ui/core as a peer.
  • Add the dev dependencies the source and tests use: react, react-dom, react-router-dom, @material-ui/core, @types/luxon and @react-types/shared.

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

🤖 Generated with Claude Code

https://claude.ai/code/session_01NZ5217H8AkdKkDBNzEiTik

sebdanielsson and others added 2 commits November 27, 2026 20:01
…oisting

The published types of plugin-copilot import react, but @types/react was
only a dev dependency. The plugin also didn't provide the
@material-ui/core peer of @backstage/theme or the @mui/system peer of
@mui/x-charts. Strict installs (pnpm, Yarn's pnpm linker, PnP) can't
resolve undeclared packages.

Forward @material-ui/core as a peer. Add @mui/system as a dependency,
next to the existing @mui/material dependency that already brings it.
Also declare the dev dependencies the source and tests need: the react,
react-dom and react-router-dom peers, @types/luxon and
@react-types/shared.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NZ521AzxwB3vLPS9t6fABT
Signed-off-by: Sebastian Danielsson <[email protected]>
Only the local dev app imports @backstage/theme, so it doesn't need to
be a published dependency. Having it there forced every app that
installs plugin-copilot to provide @material-ui/core as a peer.

Move @backstage/theme to dev dependencies and drop the @material-ui/core
peer. The dev app keeps @material-ui/core as a dev dependency.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NZ521AzxwB3vLPS9t6fABT
Signed-off-by: Sebastian Danielsson <[email protected]>
@backstage-goalie

Copy link
Copy Markdown
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-copilot workspaces/copilot/plugins/copilot patch v1.10.0

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants