Skip to content

fix(electron-info): replace date-fns with native Date API#1269

Merged
ffflorian merged 2 commits into
mainfrom
claude/date-fns-temporal-api-DpShA
Jun 5, 2026
Merged

fix(electron-info): replace date-fns with native Date API#1269
ffflorian merged 2 commits into
mainfrom
claude/date-fns-temporal-api-DpShA

Conversation

@ffflorian

Copy link
Copy Markdown
Owner

Summary

  • Removes the date-fns dependency from electron-info
  • Replaces two functions (sub, isAfter) used for a 24-hour cache freshness check with equivalent native Date methods
  • No behaviour change

Test plan

  • yarn workspace electron-info build passes
  • yarn workspace electron-info test passes (7 tests, 5 skipped)

Generated by Claude Code

claude added 2 commits June 5, 2026 16:12
Remove the date-fns dependency from electron-info. The only usage was
two functions (sub, isAfter) for a simple 24-hour cache freshness check,
which is trivially expressible with built-in Date methods.
Move the 24-hour freshness check into an exported function with an
injectable `now` parameter, and add unit tests for it.
@ffflorian ffflorian changed the title refactor(electron-info): replace date-fns with native Date API fix(electron-info): replace date-fns with native Date API Jun 5, 2026
@ffflorian ffflorian merged commit 6ae3d39 into main Jun 5, 2026
5 checks passed
@ffflorian ffflorian deleted the claude/date-fns-temporal-api-DpShA branch June 5, 2026 16:30
github-actions Bot pushed a commit that referenced this pull request Jun 5, 2026
## electron-info [1.32.4](https://github.com/ffflorian/node-packages/compare/electron-info@1.32.3...electron-info@1.32.4) (2026-06-05)

### Bug Fixes

* **electron-info:** replace date-fns with native Date API ([#1269](#1269)) ([6ae3d39](6ae3d39))
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.

2 participants