Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move react types to a dev dependency and peer dependency #25307

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

aramissennyeydd
Copy link
Contributor

@aramissennyeydd aramissennyeydd commented Jun 19, 2024

Hey, I just made a Pull Request!

Fixes #25278. There's been prior work in this space, (#8361, #22539, 482bb5c and #17116), but I think we've flip-flopped a bit between the types being a peer dependency and a full dependency.

Ideally, they should be both a dev dependency and a peer dependency, so they can be installed and used locally for development, but adopters can provide a custom version - possibly a different major version. For package managers using peerDependenciesMeta, I also listed the types as an optional dependency as they are not required to consume the package. This is generally standard, example from MUI.

I also added this as a required CI check. As part of that, I required all peer dependencies that are defined to be installed in dev dependencies. IMO that's how they should be setup unless the peer dependency isn't actually needed.

✔️ 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)

@github-actions github-actions bot added area:catalog Related to the Catalog Project Area auth area:techdocs Related to the TechDocs Project Area area:kubernetes Related to the Kubernetes Project Area - not deploying Backstage with k8s. search Things related to Search homepage Features for the composable homepage area:scaffolder Everything and all things related to the scaffolder project area area:permission Related to the Permission Project Area area:discoverability Related to the Discoverability Project Area labels Jun 19, 2024
@backstage-goalie
Copy link
Contributor

backstage-goalie bot commented Jun 19, 2024

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/app-defaults packages/app-defaults patch v1.5.6
app-next-example-plugin packages/app-next-example-plugin none v0.0.12
@backstage/core-app-api packages/core-app-api patch v1.12.6
@backstage/core-compat-api packages/core-compat-api patch v0.2.6
@backstage/core-components packages/core-components patch v0.14.8
@backstage/core-plugin-api packages/core-plugin-api patch v1.9.3
@backstage/dev-utils packages/dev-utils patch v1.0.33
@backstage/frontend-app-api packages/frontend-app-api patch v0.7.1
@backstage/frontend-plugin-api packages/frontend-plugin-api patch v0.6.6
@backstage/frontend-test-utils packages/frontend-test-utils patch v0.1.8
@backstage/integration-react packages/integration-react patch v1.1.28
@backstage/repo-tools packages/repo-tools minor v0.9.1
techdocs-cli-embedded-app packages/techdocs-cli-embedded-app none v0.2.97
@backstage/test-utils packages/test-utils patch v1.5.6
@backstage/theme packages/theme patch v0.5.6
@backstage/version-bridge packages/version-bridge patch v1.0.8
@backstage/plugin-api-docs-module-protoc-gen-doc plugins/api-docs-module-protoc-gen-doc patch v0.1.7
@backstage/plugin-api-docs plugins/api-docs patch v0.11.6
@backstage/plugin-app-visualizer plugins/app-visualizer patch v0.1.7
@backstage/plugin-auth-react plugins/auth-react patch v0.1.3
@backstage/plugin-catalog-graph plugins/catalog-graph patch v0.4.6
@backstage/plugin-catalog-import plugins/catalog-import patch v0.12.0
@backstage/plugin-catalog-react plugins/catalog-react patch v1.12.1
@backstage/plugin-catalog-unprocessed-entities plugins/catalog-unprocessed-entities patch v0.2.5
@backstage/plugin-catalog plugins/catalog patch v1.21.0
@backstage/plugin-config-schema plugins/config-schema patch v0.1.56
@backstage/plugin-devtools plugins/devtools patch v0.1.15
@internal/plugin-todo-list plugins/example-todo-list none v1.0.28
@backstage/plugin-home-react plugins/home-react patch v0.1.14
@backstage/plugin-home plugins/home patch v0.7.5
@backstage/plugin-kubernetes-cluster plugins/kubernetes-cluster patch v0.0.12
@backstage/plugin-kubernetes-react plugins/kubernetes-react patch v0.4.0
@backstage/plugin-kubernetes plugins/kubernetes patch v0.11.11
@backstage/plugin-notifications plugins/notifications patch v0.2.2
@backstage/plugin-org-react plugins/org-react patch v0.1.25
@backstage/plugin-org plugins/org patch v0.6.26
@backstage/plugin-permission-react plugins/permission-react patch v0.4.23
@backstage/plugin-scaffolder-node-test-utils plugins/scaffolder-node-test-utils patch v0.1.5
@backstage/plugin-scaffolder-react plugins/scaffolder-react patch v1.9.0
@backstage/plugin-scaffolder plugins/scaffolder patch v1.21.0
@backstage/plugin-search-react plugins/search-react patch v1.7.12
@backstage/plugin-search plugins/search patch v1.4.12
@backstage/plugin-signals-react plugins/signals-react patch v0.0.4
@backstage/plugin-signals plugins/signals patch v0.0.7
@backstage/plugin-techdocs-addons-test-utils plugins/techdocs-addons-test-utils patch v1.0.33
@backstage/plugin-techdocs-module-addons-contrib plugins/techdocs-module-addons-contrib patch v1.1.11
@backstage/plugin-techdocs-react plugins/techdocs-react patch v1.2.5
@backstage/plugin-techdocs plugins/techdocs patch v1.10.6
@backstage/plugin-user-settings plugins/user-settings patch v0.8.7

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
@github-actions github-actions bot added the microsite Changes to backstage.io label Jun 19, 2024
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
@aramissennyeydd aramissennyeydd removed the microsite Changes to backstage.io label Jun 19, 2024
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
@aramissennyeydd aramissennyeydd marked this pull request as ready for review June 19, 2024 17:29
Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
@benjdlambert
Copy link
Member

Wanna bring in @Rugvip here too, although he's out on vacation at the minute for a few weeks. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:catalog Related to the Catalog Project Area area:discoverability Related to the Discoverability Project Area area:kubernetes Related to the Kubernetes Project Area - not deploying Backstage with k8s. area:permission Related to the Permission Project Area area:scaffolder Everything and all things related to the scaffolder project area area:techdocs Related to the TechDocs Project Area auth homepage Features for the composable homepage search Things related to Search
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 Feature: Peer Dependencies for Core Packages
3 participants