Skip to content

[opencode] chore: drop unused material-ui v4 deps from plausible plugin - #104

Merged
johnnyhuy merged 1 commit into
mainfrom
opencode/plausible-drop-material-ui
Oct 3, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
opencode/plausible-drop-material-ui

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

What

Removes @material-ui/core, @material-ui/icons, @material-ui/lab, @backstage/theme, @backstage/core-components and react-use from plugins/plausible's declared dependencies.

Why

AGENTS.md mandates MUI v5 (@mui/material) over @material-ui v4, and this was the last direct v4 declaration in the repo. While auditing for the migration, the plugin source turned out to import none of these packages at all - PlausibleAnalytics.tsx is a react-helmet wrapper over @backstage/core-plugin-api and the test uses @backstage/test-utils / @backstage/core-app-api. Migrating to @mui/* would have replaced unused v4 packages with unused v5 packages. Dropping the dead declarations is the smaller, honest fix and removes drift rather than adding it.

Note: @material-ui v4 still appears in yarn.lock transitively via Backstage core packages (app-defaults, core-components, plugin-catalog, community github-actions, ...). That is an upstream requirement of Backstage 1.55 and out of scope here.

Validation

  • mise run lint passes (all workspaces)
  • mise run test passes: 9 passed, 1 skipped
  • yarn why @material-ui/core shows only upstream Backstage consumers remain
  • CI build verifies the full install and bundle path

The plugin source never imports @material-ui/core, icons, lab,
@backstage/theme, @backstage/core-components or react-use - it only
uses @backstage/core-plugin-api and react-helmet. Removes the dead
declared deps instead of migrating them to @mui, which would just
carry unused packages. Any remaining @material-ui v4 in the lockfile
is Backstage core's own transitive requirement.

Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
@johnnyhuy
johnnyhuy merged commit 27f4c81 into main Oct 3, 2026
5 checks passed
@johnnyhuy
johnnyhuy deleted the opencode/plausible-drop-material-ui branch October 3, 2026 05:48
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.

1 participant