system-ui / theme-ui

Build consistent, themeable React apps based on constraint-based design principles

Home Page:https://theme-ui.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ensure all transitive peerDependencies are listed correctly and test Yarn 2/3 installs

hasparus opened this issue · comments

We're currently causing peerDependency warnings in Yarn 2.
Whenever we depend on something, this dependencies peerDependencies must be listed either in our peerDependencies or in our dependencies.

Discussed in #2196

Originally posted by jw-miaem April 7, 2022
Reason I ask (before raising) is because I'm unable to get rid of 'doesn't provide ...' warning with yarn berry package.json install. I looked at the peerDependencies for @theme-ui/css for example and its "@emotion/react": "^11" and I have "@emotion/react": "^11.9.0" installed which I thought would satisfy but could be wrong

This might be already fixed after we migrated to PNPM. We gotta test it with Yarn 3 and make sure it installs flawlessly.

cc @lachlanjc

Quoting from my post in the discussion:

Note for myself: Peer deps are now transitive and need to be explicitly listed in all libraries. We need a CI check for Yarn 2 and Yarn 3 installs.

To close this issue, we would need to continuously ensure that Theme UI can properly install in Yarn 3 projects.
The work needed is not the modification of some package.json file, it's a TypeScript or Bash script, a GitHub action step that would verify we're installing without errors.