Skip to content

Conversation

@abdhalees
Copy link
Member

@abdhalees abdhalees commented Dec 12, 2024

format function from date-fns added 5kb to our bundle, since this is the only usage of it in our codebase, removing it and formatting month manually saves the 5kb.

Description

Related links, issue #, if available: n/a

How has this been tested?

there is already a unit test for it

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@abdhalees abdhalees changed the title refactor: Use custom function to format month instead of date-fns fun… refactor: Use custom function to format month instead of date-fns function Dec 12, 2024
@abdhalees abdhalees marked this pull request as ready for review December 12, 2024 13:56
@abdhalees abdhalees requested a review from a team as a code owner December 12, 2024 13:56
@abdhalees abdhalees requested review from a team, at-susie and georgylobko and removed request for a team and at-susie December 12, 2024 13:56
@codecov
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.39%. Comparing base (85cb377) to head (43ff055).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3131   +/-   ##
=======================================
  Coverage   96.39%   96.39%           
=======================================
  Files         784      784           
  Lines       22062    22065    +3     
  Branches     7564     7505   -59     
=======================================
+ Hits        21266    21269    +3     
  Misses        744      744           
  Partials       52       52           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abdhalees abdhalees closed this Dec 12, 2024
@TrevorBurnham
Copy link
Contributor

@abdhalees You may be interested in this PR, which replaces date-fns with a more lightweight library, dayjs: #3786

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