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

fix: Dedup of date-fns #2826

Merged

Conversation

Crash--
Copy link
Contributor

@Crash-- Crash-- commented Jan 11, 2023

Since the cozy-client upgrade to 34.7.1 date-fns is a needed dep for a few of its models. But we don't need them in Drive for now and we have a few issues with the tree shaking of cozy-client.

(see cozy/cozy-client#1274)

So the workaround is to force the resolution to date-fns 1 which is required by drive, in order to not duplicate the package.

We should not have issue with that. When we'll upgrade date-fns to v2 in drive & ui, then, we'll be able to remove this line.

Since the cozy-client upgrade to 34.7.1 date-fns is a needed
dep for a few of its models. But we don't need them in Drive
for now and we have a few issues with the tree shaking of
cozy-client.

(see cozy/cozy-client#1274)

So the workaround is to force the resolution to date-fns 1
which is required by drive, in order to not duplicate the
package.

We should not have issue with that. When we'll upgrade
date-fns to v2 in drive & ui, then, we'll be able to
remove this line.
@Crash-- Crash-- requested a review from JF-Cozy as a code owner January 11, 2023 06:55
The commit c76ca54 seek to reduce cozy-drive bundle size but resolve search for date-fns into drive alias so I made mock to the function call waiting cozy-client to improve their tree-shaking.
@cballevre cballevre merged commit eec7c17 into feat/update-cozy-client-from-34.1.5-to-34.7.1 Jan 11, 2023
@cballevre cballevre deleted the fix/OnlyOneDateFNS branch January 11, 2023 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants