Migrates date handling from date-fns to day.js
Replaces date-fns library with day.js to reduce bundle size and improve tree-shaking - Centralizes all date logic in DateService - Reduces library footprint from 576 KB to 29 KB - Maintains 99.4% test coverage during migration - Adds timezone and formatting plugins for day.js Improves overall library performance and reduces dependency complexity
This commit is contained in:
parent
2d8577d539
commit
b5dfd57d9e
14 changed files with 1103 additions and 157 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import { describe, it, expect } from 'vitest';
|
||||
import { DateService } from '../../src/utils/DateService';
|
||||
import { CalendarConfig } from '../../src/core/CalendarConfig';
|
||||
import { createTestConfig } from '../helpers/config-helpers';
|
||||
|
||||
describe('DateService - Edge Cases', () => {
|
||||
const config = new CalendarConfig();
|
||||
const config = createTestConfig();
|
||||
const dateService = new DateService(config);
|
||||
|
||||
describe('Leap Year Handling', () => {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { describe, it, expect, beforeEach } from 'vitest';
|
||||
import { DateService } from '../../src/utils/DateService';
|
||||
import { CalendarConfig } from '../../src/core/CalendarConfig';
|
||||
import { createTestConfig } from '../helpers/config-helpers';
|
||||
|
||||
describe('DateService', () => {
|
||||
let dateService: DateService;
|
||||
|
||||
beforeEach(() => {
|
||||
const config = new CalendarConfig();
|
||||
const config = createTestConfig();
|
||||
dateService = new DateService(config);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { describe, it, expect } from 'vitest';
|
||||
import { DateService } from '../../src/utils/DateService';
|
||||
import { CalendarConfig } from '../../src/core/CalendarConfig';
|
||||
import { createTestConfig } from '../helpers/config-helpers';
|
||||
|
||||
describe('DateService - Validation', () => {
|
||||
const config = new CalendarConfig();
|
||||
const config = createTestConfig();
|
||||
const dateService = new DateService(config);
|
||||
|
||||
describe('isValid() - Basic Date Validation', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue