Skip to content

[p5.js 2.0] Update dependencies and fix package.json 'exports' field #7762

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

Open
wants to merge 2 commits into
base: dev-2.0
Choose a base branch
from

Conversation

error-four-o-four
Copy link
Contributor

adresses #7761

@error-four-o-four error-four-o-four changed the title Update dependencies and fix package.json 'exports' field [p5.js 2.0] Update dependencies and fix package.json 'exports' field Apr 20, 2025
@ksen0
Copy link
Member

ksen0 commented Apr 23, 2025

Closing this one for now based on the discussion in #7761!

@ksen0 ksen0 closed this Apr 23, 2025
@davepagurek
Copy link
Contributor

Although we haven't talked specifically about dayjs in #7761, I think the dayjs change is potentially OK. As a dev-only dependency it'd mainly be to make npm installs for contributors a little faster I think?

@ksen0 ksen0 reopened this Apr 23, 2025
@ksen0
Copy link
Member

ksen0 commented Apr 23, 2025

@davepagurek dayjs is tiny not that small*, but it has tests and locale features and so on. I think it's potentially needlessly brittle to introduce a hardcoded array of months (it would be easily possible for a contributor to cause accidental and very hard to spot regression). If we get rid of this dependency, why not use new Intl.DateTimeFormat('en-US', { month: 'long', day: 'numeric', year: 'numeric' }).format(new Date()) or something else built in for the banner?

*you're right, I apologize, it's noticeably sized, I misread original issue text!

@error-four-o-four
Copy link
Contributor Author

Indeed, Intl.DateTimeFormat would be the better choice. It's widely supported and was introduced in es6 (regarding polyfills)

I'll update the PR

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.

3 participants