From f50eb6ddbbfa51b5a9df4280b7bfabfc31b9c99e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Poizat?= Date: Tue, 5 Nov 2024 17:59:27 +0100 Subject: [PATCH] feat: Add nohoist for cozy-ui 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/ --- package.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index cc39722a48..181631038f 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,10 @@ "./packages/commitlint-config-cozy" ] }, - "workspaces": [ - "packages/*" - ] + "workspaces": { + "packages": [ + "packages/*" + ], + "nohoist": ["**/cozy-ui"] + } }