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

momentjs/date-fns to dayjs #2693

Merged
merged 19 commits into from
Jan 13, 2024
Merged

momentjs/date-fns to dayjs #2693

merged 19 commits into from
Jan 13, 2024

Conversation

akanshaaa19
Copy link
Member

Summary

Migrated to dayjs from date-fns / momentjs as now it's a recommended option by MUI.
Check https://mui.com/x/react-date-pickers/#date-library
Datejs: https://day.js.org/

Test Plan

Copy link

github-actions bot commented Jan 4, 2024

@github-actions github-actions bot temporarily deployed to pull request January 4, 2024 18:50 Inactive
Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (cf6526b) 72.85% compared to head (f05366d) 72.73%.
Report is 37 commits behind head on master.

❗ Current head f05366d differs from pull request most recent head 4c48cda. Consider uploading reports for the commit 4c48cda to get more accurate results

Files Patch % Lines
src/containers/Trigger/Trigger.tsx 52.17% 7 Missing and 4 partials ⚠️
...ettingList/OrganizationFlows/OrganisationFlows.tsx 66.66% 2 Missing ⚠️
src/components/UI/Form/TimePicker/TimePicker.tsx 66.66% 0 Missing and 1 partial ⚠️
src/components/UI/Timer/Timer.tsx 80.00% 1 Missing ⚠️
src/containers/Consulting/Consulting.tsx 66.66% 1 Missing ⚠️
...nsultingList/ExportConsulting/ExportConsulting.tsx 50.00% 0 Missing and 1 partial ⚠️
src/containers/Flow/FlowList/FlowList.tsx 0.00% 0 Missing and 1 partial ⚠️
src/containers/Profile/Contact/ContactProfile.tsx 50.00% 1 Missing ⚠️
...tion/SheetIntegrationList/SheetIntegrationList.tsx 0.00% 0 Missing and 1 partial ⚠️
...rs/Ticket/TicketList/ExportTicket/ExportTicket.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2693      +/-   ##
==========================================
- Coverage   72.85%   72.73%   -0.13%     
==========================================
  Files         249      250       +1     
  Lines        8520     8592      +72     
  Branches     1808     1819      +11     
==========================================
+ Hits         6207     6249      +42     
- Misses       1705     1727      +22     
- Partials      608      616       +8     

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

Copy link

cypress bot commented Jan 4, 2024

3 failed and 3 flaky tests on run #3883 ↗︎

3 172 0 0 Flakiness 3

Details:

Merge e1192ef into 448a663...
Project: Glific Commit: 78788f1c66 ℹ️
Status: Failed Duration: 25:28 💡
Started: Jan 5, 2024 6:51 PM Ended: Jan 5, 2024 7:17 PM
Failed  search/Search.spec.ts • 1 failed test

View Output

Test Artifacts
Searches > should edit search Screenshots
Failed  setting/FlowSetting.spec.ts • 1 failed test

View Output

Test Artifacts
Organization Settings > should add default flow Screenshots
Failed  trigger/Trigger.spec.ts • 1 failed test

View Output

Test Artifacts
Triggers (daily) > should create new trigger Screenshots
Flakiness  flow/Flow.spec.ts • 1 flaky test

View Output

Test Artifacts
Flow > should create duplicate Flow Screenshots
Flakiness  roles/staff/chat/Chat.spec.ts • 1 flaky test

View Output

Test Artifacts
Role - Staff - Chats > should go to top Screenshots
Flakiness  staffmanagement/StaffManagement.spec.ts • 1 flaky test

View Output

Test Artifacts
Staff Management > should delete collection Screenshots

Review all test suite changes for PR #2693 ↗︎

@github-actions github-actions bot temporarily deployed to pull request January 4, 2024 19:34 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 4, 2024 20:01 Inactive
@akanshaaa19 akanshaaa19 requested a review from mdshamoon January 5, 2024 03:55
Copy link
Member

@mdshamoon mdshamoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good.

Two things:

  • We should remove date-fns also with dayjs as mentioned in the issue. There is still a date-fns adapter that is being used
  • Remove moment and date-fns packages from package.json

@github-actions github-actions bot temporarily deployed to pull request January 5, 2024 18:25 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 5, 2024 18:34 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 5, 2024 18:43 Inactive
@@ -112,8 +112,8 @@ export const setVariables = (
},
});

export const is24HourWindowOver = (time: any) =>
moment.duration(moment(new Date()).diff(moment(time))).asHours() > 24;
export const is24HourWindowOver = (time: any) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space here too.

@github-actions github-actions bot temporarily deployed to pull request January 9, 2024 06:59 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 9, 2024 07:21 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 9, 2024 07:24 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 9, 2024 07:26 Inactive
@akanshaaa19 akanshaaa19 requested a review from mdshamoon January 9, 2024 08:39
@github-actions github-actions bot temporarily deployed to pull request January 11, 2024 06:03 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 11, 2024 06:06 Inactive
@akanshaaa19 akanshaaa19 requested a review from mdshamoon January 11, 2024 11:31
akanshaaa19 and others added 3 commits January 12, 2024 08:34
Co-authored-by: Mohd Shamoon <32592458+mdshamoon@users.noreply.github.com>
Co-authored-by: Mohd Shamoon <32592458+mdshamoon@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to pull request January 12, 2024 03:45 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 12, 2024 04:41 Inactive
@akanshaaa19 akanshaaa19 requested a review from mdshamoon January 12, 2024 05:21
@mdshamoon mdshamoon merged commit b403eeb into master Jan 13, 2024
5 checks passed
@mdshamoon mdshamoon deleted the dayjs_migration branch January 13, 2024 14:13
@github-actions github-actions bot temporarily deployed to pull request January 13, 2024 14:13 Inactive
@mdshamoon mdshamoon linked an issue Jan 13, 2024 that may be closed by this pull request
2 tasks
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.

migrate to dayjs instead date-fns
4 participants