loblaw-sre / backstage-plugin-gitlab

Backstage plugin for Gitlab
52 stars 31 forks source link

React router migration #213

Open ltdonner opened 1 year ago

ltdonner commented 1 year ago

This plugin was one that is showing react-router@6.0.0-beta.0

Requesting this plugin be migrated so that it will work with the 1.6 version of Backstage with the React Router 6.0 migration

https://backstage.io/docs/tutorials/react-router-stable-migration#step-3---ensure-that-your-external-plugins-are-updated

antoniomuso commented 1 year ago

Yes, this plugin uses an old version of @backstage/core-components. In this old version, we still have as dependency react-router@6.0.0-beta.0. We have also to switch react-plugin in deps into peerDeps

jm-ra commented 1 year ago

Any tips on a workaround?

ivangonzalezacuna commented 1 year ago

In our case, we just deactivated the plugin temporarily until this PR is merged: https://github.com/loblaw-sre/backstage-plugin-gitlab/pull/190.

It was blocking us to fully upgrade to the latest version of backstage, so maybe this is the best workaround for now. Or just create a fork from the code in the linked PR, which works with the latest version of react-router.

testn commented 1 year ago

Can we get this sort out?

yarn why react-router
yarn why v1.22.17
[1/4] 🤔  Why do we have the module "react-router"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "react-router@6.0.0-beta.0"
info Has been hoisted to "react-router"
info Reasons this module exists
   - "workspace-aggregator-ac513b39-01a9-4f25-aec6-eaa92288ee78" depends on it
   - Hoisted from "_project_#app#react-router"
   - Hoisted from "_project_#app#react-router-dom#react-router"
info Disk size without dependencies: "180KB"
info Disk size with unique dependencies: "316KB"
info Disk size with transitive dependencies: "444KB"
info Number of shared dependencies: 5
=> Found "@loblaw/backstage-plugin-gitlab#react-router@6.3.0"
info This module exists because "_project_#app#@loblaw#backstage-plugin-gitlab" depends on it.
info Disk size without dependencies: "500KB"
info Disk size with unique dependencies: "684KB"
info Disk size with transitive dependencies: "1.57MB"
info Number of shared dependencies: 3
=> Found "@loblaw/backstage-plugin-gitlab#@backstage/core-components#react-router@6.0.0-beta.0"
info This module exists because "_project_#app#@loblaw#backstage-plugin-gitlab#@backstage#core-components" depends on it.
info Disk size without dependencies: "180KB"
info Disk size with unique dependencies: "316KB"
info Disk size with transitive dependencies: "444KB"
info Number of shared dependencies: 5
✨  Done in 0.64s.
JellyBellyDev commented 1 year ago

Hi guys! not having received replies and feedback, as promised, we forked with the commitment to maintain the plugin more actively. We hope that the plugin user community will follow and support us. You can find us at the following links: https://github.com/immobiliare/backstage-plugin-gitlab https://www.npmjs.com/package/@immobiliarelabs/backstage-plugin-gitlab Thanks! 🚀