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

Remove dayjs dependency #270

Merged
merged 4 commits into from
Mar 29, 2024
Merged

Remove dayjs dependency #270

merged 4 commits into from
Mar 29, 2024

Conversation

patinthehat
Copy link
Member

This PR removes the dayjs dependency, and uses either native javascript Date formatting or a new formatDateExtended() utility function that formats dates using the dayjs format strings.

Copy link

what-the-diff bot commented Mar 29, 2024

PR Summary

  • Improvement in Date Formatting and Handling
    The DatePayload.ts file has had several adjustments for better date handling. We've started using formatDateExtended for everything from formatting dates to working with time zones. This makes our code more centered around this function for all date related operations, simplifying our approach.

  • Optimization in Cache Data Processing
    In the CacheStore.ts, there's been an update to the countLastSecond method. It now uses the subSeconds method for subtractive calculations, which allows for a more precise and accurate way to process the cached data.

  • Enhancements in Immutable Date Handling
    The DateImmutable.ts file has been refined for efficient date management. The _date property type has been switched to undefined, aided by a new getter and setter set up for the date property. This enhances our control over this property. Plus, the modify method has been replaced with the addSeconds method, introducing the new subSeconds method. This gives us more specific control over date manipulation.

  • Expansion of Utility Functions and Tests
    The newly added formatDateExtended function in utils.ts expands our utility function library. To validate these changes, a series of tests have been added for the countLastSecond method, addSeconds and subSeconds methods, and the formatDateExtended function. This ensures the newly introduced functionalities are working as desired.

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 86.84211% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 87.06%. Comparing base (19e0453) to head (ff8585c).

❗ Current head ff8585c differs from pull request most recent head 8143ba0. Consider uploading reports for the commit 8143ba0 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #270      +/-   ##
==========================================
- Coverage   87.22%   87.06%   -0.15%     
==========================================
  Files          67       67              
  Lines        3418     3492      +74     
  Branches      528      547      +19     
==========================================
+ Hits         2981     3040      +59     
- Misses        437      452      +15     
Files Coverage Δ
src/Payloads/DatePayload.ts 100.00% <100.00%> (ø)
src/Support/CacheStore.ts 100.00% <100.00%> (ø)
src/Support/DateImmutable.ts 100.00% <100.00%> (ø)
src/lib/utils.ts 91.87% <84.05%> (-2.93%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 19e0453...8143ba0. Read the comment docs.

@patinthehat patinthehat merged commit 66a1a16 into main Mar 29, 2024
3 checks passed
@patinthehat patinthehat deleted the remove-dayjs-dep branch March 29, 2024 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant