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

Specify date-fns 2.x #267

Merged
merged 2 commits into from
Mar 6, 2024
Merged

Specify date-fns 2.x #267

merged 2 commits into from
Mar 6, 2024

Conversation

drewbrend
Copy link
Contributor

@drewbrend drewbrend commented Jan 31, 2024

Same as #262 but has the lockfile updated for CI to pass.

This should fix #260 for date-fns-tz v2 which will still be an issue even when date-fns-v3 is released.

Example where this will still be an issue after v3 is supported (real scenario from my company):

  • shared-library-1 uses date-fns v2 and date-fns-tz v2 (sure they could upgrade, but haven't yet)
  • shared-library-2 uses date-fns v3 but does not use date-fns-tz or shared-library-1 so they have no issue
  • some-app uses shared-library-1 and shared-library-2
  • date-fns-tz v2 (as a dependency of shared-library-1) will attempt to use v3 because it is available and satisfies >=2.0.0
  • some app will throw an error despite not even using date-fns directly

@drewbrend drewbrend mentioned this pull request Feb 1, 2024
@Antonio-Laguna
Copy link

Came to say we've been bitten by this :) Thanks for the PR @drewbrend !

@drewbrend
Copy link
Contributor Author

Thanks for the approval! Do I need to do anything to have this merged and released?

@abimaelmartell
Copy link

Just came here to say that i was experiencing issues because of this

@chrisspiegl
Copy link

chrisspiegl commented Feb 14, 2024

I am adding my support for this to be merged and released. It would be massively helpful to mark this package v2 to only install the proper date-fns v2 versions.

@marnusw marnusw merged commit cc91ba3 into marnusw:master Mar 6, 2024
4 checks passed
@simPod
Copy link
Contributor

simPod commented Mar 8, 2024

@marnusw please reopen #260

@marnusw
Copy link
Owner

marnusw commented Mar 9, 2024

v2.0.1 published.

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.

Support for date-fns v3
8 participants