theme-ui icon indicating copy to clipboard operation
theme-ui copied to clipboard

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

Open hasparus opened this issue 2 years ago • 2 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 https://github.com/system-ui/theme-ui/discussions/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

hasparus avatar Apr 07 '22 18:04 hasparus

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

hasparus avatar Nov 23 '22 02:11 hasparus

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.

hasparus avatar Nov 23 '22 02:11 hasparus