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(@clayui/date-picker): update date-fns to v4 #5910

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bryceosterhaus
Copy link
Member

We are going to update date-fns to v4 in liferay-portal and realized we should also update it in clay

Let me know if you see any issues with this.

@bryceosterhaus bryceosterhaus force-pushed the dateFns branch 2 times, most recently from 0a01ac1 to cdb7533 Compare January 3, 2025 11:32
@bryceosterhaus bryceosterhaus changed the title fix(clay-date-picker): update date-fns to v4) fix(@clayui/date-picker): update date-fns to v4) Jan 3, 2025
@bryceosterhaus bryceosterhaus changed the title fix(@clayui/date-picker): update date-fns to v4) fix(@clayui/date-picker): update date-fns to v4 Jan 3, 2025
@bryceosterhaus
Copy link
Member Author

bryceosterhaus commented Jan 3, 2025

hmm, there seems to be issues with Jest and ESM, which is the default way date-fns is shipped.

Does it make sense to update clay to be pure ESM?

@matuzalemsteles
Copy link
Member

Thanks Bryce!

hmm, there seems to be issues with Jest and ESM, which is the default way date-fns is shipped.
Does it make sense to update clay to be pure ESM?

@bryceosterhaus I don't see any problem in doing that.

@bryceosterhaus
Copy link
Member Author

@matuzalemsteles I updated this PR to also include a "dual build" for esm and cjs.

I didn't actually test with npm publishing, but just wanted to send it for you to take a look and see.

With this change you can probably remove a whole host of babel dependencies

@matuzalemsteles
Copy link
Member

Thanks @bryceosterhaus. Can I put this on hold for a bit? I'm thinking about putting this on hold for a bit before the PR #5780, it's already in the final stages and I've made a lot of changes... I think this could cause some problems there so I wanted to wait until merged it and work on it. Does that make sense to you?

@bryceosterhaus
Copy link
Member Author

Yep! Feel free to put this on hold, I just at least wanted to get something over to you to see and be able to test out. The date-fns update will be merged relatively soon on the portal side, but I believe that should be be fine.

@bryceosterhaus
Copy link
Member Author

FYI. I think we are actually just going to remove date-fns in favor of Intl.DateTimeFormat

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