Skip to content

Commit

Permalink
feat: Add nohoist for cozy-ui
Browse files Browse the repository at this point in the history
We got issues during a test from cozy-viewer using cozy-client
useClient because :
- PdfMobileViewer from cozy-viewer calls useClient/withClient from
cozy-libs/packages/cozy-viewer/node-modules/cozy-client
- FileImageLoader from cozy-ui calls  useClient/withClient from
cozy-libs/node-modules/cozy-ui/node_modules/cozy-client

So the client was not accessible from FileImageLoader leading to an
error during tests.

We fix this by using the nohoist feature  for cozy-ui.

See https://classic.yarnpkg.com/blog/2018/02/15/nohoist/
  • Loading branch information
zatteo committed Nov 7, 2024
1 parent b1f1969 commit f50eb6d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
"./packages/commitlint-config-cozy"
]
},
"workspaces": [
"packages/*"
]
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": ["**/cozy-ui"]
}
}

0 comments on commit f50eb6d

Please sign in to comment.