✨ feat(dates): update modules to use custom dayjs module#1029
Merged
victor-enogwe merged 2 commits intomainfrom Sep 30, 2025
Merged
✨ feat(dates): update modules to use custom dayjs module#1029victor-enogwe merged 2 commits intomainfrom
victor-enogwe merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates direct imports of "dayjs" throughout the codebase to use a custom dayjs module instead, centralizing dayjs configuration and plugin extensions.
- Replaces all direct "dayjs" imports with "@core/util/date/dayjs" imports
- Removes manual dayjs plugin extensions since they're now handled in the custom module
- Updates test files to use the centralized dayjs configuration
Reviewed Changes
Copilot reviewed 62 out of 62 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/web/src/views/Onboarding/steps/events/SomedaySandbox/sandbox.util.ts | Updates dayjs import and adds ObjectId for event creation |
| packages/web/src/views/Onboarding/steps/events/SomedaySandbox/sandbox.util.test.ts | Updates dayjs import and converts require() to import() |
| packages/web/src/views/Onboarding/steps/events/MigrationSandbox/useMigrationLogic.ts | Removes manual plugin extension and updates dayjs import |
| packages/web/src/views/Onboarding/steps/events/MigrationSandbox/useMigrationLogic.test.ts | Updates test mocking to use custom dayjs module |
| packages/web/src/views/Forms/SomedayEventForm/SomedayEventForm.test.tsx | Updates dayjs import position |
| packages/web/src/views/Forms/EventForm/EventForm.tsx | Updates dayjs import position |
| packages/web/src/views/Forms/EventForm/DateControlsSection/DateTimeSection/form.datetime.util.ts | Updates dayjs import position |
| packages/web/src/views/Forms/EventForm/DateControlsSection/DateTimeSection/DateTimeSection.tsx | Removes manual plugin extension and reorganizes imports |
| packages/web/src/views/Forms/EventForm/DateControlsSection/DateTimeSection/DatePickers/DatePickers.tsx | Updates dayjs import position |
| packages/web/src/views/Calendar/hooks/useWeek.ts | Updates Dayjs type import |
| packages/web/src/views/Calendar/hooks/useToday.ts | Updates dayjs import position |
| packages/web/src/views/Calendar/hooks/useRefresh.ts | Updates dayjs import and removes unused parameter |
| packages/web/src/views/Calendar/hooks/shortcuts/useShortcuts.ts | Updates Dayjs type import and consolidates imports |
| packages/web/src/views/Calendar/hooks/grid/useDateCalcs.ts | Removes manual plugin extensions and updates imports |
| packages/web/src/views/Calendar/components/Sidebar/MonthTab/MonthPicker/SidebarMonthPicker.tsx | Removes manual plugin extension and updates dayjs import |
| packages/web/src/views/Calendar/components/Header/Header.tsx | Updates dayjs and Dayjs type import |
| packages/web/src/views/Calendar/components/Header/DayLabels.tsx | Updates Dayjs type import |
| packages/web/src/views/Calendar/components/Grid/MainGrid/MainGrid.tsx | Updates Dayjs type import and reorganizes imports |
| packages/web/src/views/Calendar/components/Grid/Grid.tsx | Updates Dayjs type import and consolidates imports |
| packages/web/src/views/Calendar/components/Grid/Columns/TimesColumn/TimesColumn.tsx | Updates dayjs import position |
| packages/web/src/views/Calendar/components/Grid/Columns/MainGridColumns.tsx | Updates Dayjs type import and adds non-null assertion |
| packages/web/src/views/Calendar/components/Grid/AllDayRow/AllDayEvent.tsx | Updates dayjs import position |
| packages/web/src/views/Calendar/components/Event/Grid/GridEvent/GridEvent.tsx | Updates dayjs import position |
| packages/web/src/views/Calendar/components/Draft/sidebar/hooks/useSidebarActions.ts | Updates dayjs import and reorganizes imports |
| packages/web/src/views/Calendar/components/Draft/hooks/effects/useDraftEffects.ts | Updates dayjs import and adds missing dependencies |
| packages/web/src/views/Calendar/calendarView.types.ts | Updates Dayjs type import |
| packages/web/src/views/Calendar/calendar.render.test.utils.ts | Updates dayjs import position |
| packages/web/src/ducks/events/slices/week.slice.ts | Updates generic type parameter |
| packages/web/src/ducks/events/slices/view.slice.ts | Updates dayjs import position |
| packages/web/src/ducks/events/slices/someday.slice.ts | Updates generic type parameter |
| packages/web/src/ducks/events/slices/event.slice.ts | Updates dayjs import and fixes relative import |
| packages/web/src/ducks/events/selectors/someday.selectors.ts | Updates dayjs import, reorganizes imports, and adds return type |
| packages/web/src/ducks/events/sagas/saga.util.ts | Updates dayjs import and adds non-null assertion |
| packages/web/src/ducks/events/sagas/event.sagas.ts | Updates dayjs import position |
| packages/web/src/components/DatePicker/DatePicker.tsx | Updates dayjs import and reorganizes imports |
| packages/web/src/common/utils/position/position.util.ts | Removes manual plugin extensions and reorganizes imports |
| packages/web/src/common/utils/position/position.util.test.ts | Updates dayjs import and fixes spelling |
| packages/web/src/common/utils/overlap/overlap.ts | Updates dayjs import and adds non-null assertions |
| packages/web/src/common/utils/grid/grid.util.ts | Removes manual plugin extensions and adds definite assignment |
| packages/web/src/common/utils/grid/grid.util.test.ts | Updates dayjs import |
| packages/web/src/common/utils/event/someday.event.util.ts | Updates dayjs import, consolidates imports, and adds non-null assertions |
| packages/web/src/common/utils/draft/someday.draft.util.ts | Updates Dayjs type import |
| packages/web/src/common/utils/draft/someday.draft.util.test.ts | Updates dayjs import and replaces unused parameter |
| packages/web/src/common/utils/draft/draft.util.ts | Updates dayjs and Dayjs type import |
| packages/web/src/common/utils/datetime/web.datetime.util.ts | Updates dayjs import and adds definite assignment assertions |
| packages/web/src/common/utils/datetime/web.date.util.ts | Removes unused parameter and reorganizes imports |
| packages/web/src/common/utils/datetime/web.date.util.test.ts | Updates dayjs import and reorganizes imports |
| packages/web/src/common/types/util.types.ts | Updates Dayjs type import |
| packages/web/src/common/parsers/view.parser.ts | Updates dayjs import and fixes relative import |
| packages/web/src/common/parsers/view.parser.test.ts | Removes manual plugin extension and updates imports |
| packages/web/src/tests/utils/web.test.util.test.js | Updates dayjs import and fixes spelling |
| packages/web/src/tests/utils/dates/date.parse.test.ts | Updates dayjs import position |
| packages/scripts/src/commands/seed.ts | Updates dayjs import position |
| packages/core/src/util/date/date.util.ts | Removes manual plugin extensions and updates dayjs import |
| packages/core/src/mocks/v1/events/events.someday.recur.ts | Updates dayjs import and uses ObjectId for test data |
| packages/backend/src/sync/services/sync/tests/gcal.sync.processor.test.util.ts | Removes manual plugin extension and updates dayjs import |
| packages/backend/src/sync/services/maintain/sync.maintenance.ts | Updates dayjs import and fixes relative import |
| packages/backend/src/sync/services/log/sync.logger.ts | Updates dayjs import position |
| packages/backend/src/sync/services/import/sync.import.util.test.ts | Updates dayjs import and fixes relative imports |
| packages/backend/src/event/services/recur/recur.week.test.ts | Updates dayjs import and fixes relative import |
| packages/backend/src/event/services/event.service.util.ts | Updates imports and type annotations |
| packages/backend/src/event/services/event.delete.test.ts | Updates dayjs import and refactors test setup |
packages/web/src/views/Onboarding/steps/events/SomedaySandbox/sandbox.util.ts
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This updates modules with direct imports of "dayjs" replacing them with imports from the custom dayjs module.
Use Case
closes #610