feat(devto): derive live dates from article timestamps - #26
Merged
Conversation
devto projects previously had no fetched dates, unlike youtube/github. Capture published_at/edited_at from the articles already being fetched: updatedAt = max(edited_at || published_at), createdAt = min(published_at). Fixes #22
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ManningWorks
force-pushed
the
feat/devto-article-dates
branch
from
August 18, 2026 20:58
79fd39f to
78b91ed
Compare
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.
Fixes #22
Problem
A
devtoproject with no manualcreatedAt/updatedAtended up fully dateless —normalisefell through to the catch-all branch andfetchDevToUserreturned only counts. dev.to was the only fetchable source contributing no date (youtube getslatestVideoPublishedAt, github getsupdated_at), so a dateless devto project sorts unpredictably.Change
Capture dates from the articles already being fetched (no extra API calls):
devto.ts—fetchDevToUsernow also returns:latestArticleUpdatedAt:max(edited_at || published_at)across articles (last activity; unedited articles fall back to their publish date)earliestArticlePublishedAt:min(published_at)(first post)normalise.ts— dedicateddevtodate branch mirroring the youtube pattern: fetched dates win, falling back to input config dates, thennullUnparseable timestamp strings are ignored rather than winning the max/min by accident.
Notes
updatedAt= last activity (edit preferred over publish),createdAt= first postdevto-article-data.md,fetch-devto-user.mdVerification
pnpm build && pnpm typecheck && pnpm lint && pnpm test— all green (995 tests)devto.test.ts(latest edit wins, unedited fallback, earliest publish, null/no timestamps, unparseable strings) and date resolution innormalise.test.ts(fetched dates, config fallback, null when fetch fails)