fix(electron-info): replace date-fns with native Date API#1269
Merged
Conversation
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.
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))
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.
Summary
date-fnsdependency fromelectron-infosub,isAfter) used for a 24-hour cache freshness check with equivalent nativeDatemethodsTest plan
yarn workspace electron-info buildpassesyarn workspace electron-info testpasses (7 tests, 5 skipped)Generated by Claude Code