Closed tackley closed 6 months ago
[puLL-Merge] - brave/ads-ui@1134
This Pull Request (PR) introduces several significant changes, primarily focusing on replacing the moment
, date-fns
, and date-fns-tz
libraries with dayjs
for handling dates and times across the project. This transition involves adjustments in the usage of date and time functions, formatting, and parsing throughout various components and utilities. Additionally, the PR includes updates to package dependencies and enhancements in data grid display configurations such as customizable page size options. Another notable change is the removal of the version logging from the App.tsx
component to the index.tsx
setup, applying a structured approach to log the application's version information upon initialization.
Dependency Updates and Removals: The replacement and removal of libraries (moment
, date-fns
, date-fns-tz
) with dayjs
should be closely examined for compatibility and potential security implications. While dayjs
is a well-regarded library, ensuring that all date-related functionalities transition smoothly without introducing regressions is crucial. Dependency updates also necessitate validation to prevent potential issues from newer package versions.
Global Day.js Configuration (init_dayjs.ts
): With the project-wide configuration of dayjs
through the init_dayjs.ts
file, ensure that the extension plugins and configurations do not inadvertently affect date handling in an undesired manner. This setup implies that all date operations across the project will follow the configurations defined here, making it a sensitive part of the codebase in terms of functionality and security.
pageIndex
and pageSizeOptions
Enhancements: While not directly a security concern, the introduction of adjustable page sizes in data grids should be carefully tested to ensure that the application's performance remains optimal across various page size selections. Ensuring that these enhancements do not negatively impact client-side rendering or lead to potential denial-of-service scenarios due to excessively large data fetches is important.
Remove date-fns and moment, replacing with dayjs.
A couple of annoyances resolved at the same time:
Both cluttered the console log which made proving this was working more annoying than it should be.
Resolves #1126