Skip to content

feat(devto): derive live dates from article timestamps - #26

Merged
ManningWorks merged 4 commits into
mainfrom
feat/devto-article-dates
Aug 18, 2026
Merged

feat(devto): derive live dates from article timestamps#26
ManningWorks merged 4 commits into
mainfrom
feat/devto-article-dates

Conversation

@ManningWorks

Copy link
Copy Markdown
Owner

Fixes #22

Problem

A devto project with no manual createdAt/updatedAt ended up fully dateless — normalise fell through to the catch-all branch and fetchDevToUser returned only counts. dev.to was the only fetchable source contributing no date (youtube gets latestVideoPublishedAt, github gets updated_at), so a dateless devto project sorts unpredictably.

Change

Capture dates from the articles already being fetched (no extra API calls):

  • devto.tsfetchDevToUser now 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 — dedicated devto date branch mirroring the youtube pattern: fetched dates win, falling back to input config dates, then null

Unparseable timestamp strings are ignored rather than winning the max/min by accident.

Notes

  • updatedAt = last activity (edit preferred over publish), createdAt = first post
  • Docs updated: devto-article-data.md, fetch-devto-user.md

Verification

  • pnpm build && pnpm typecheck && pnpm lint && pnpm test — all green (995 tests)
  • New tests: date derivation in devto.test.ts (latest edit wins, unedited fallback, earliest publish, null/no timestamps, unparseable strings) and date resolution in normalise.test.ts (fetched dates, config fallback, null when fetch fails)

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
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
projex-docs Ready Ready Preview Aug 18, 2026 8:59pm

@ManningWorks
ManningWorks force-pushed the feat/devto-article-dates branch from 79fd39f to 78b91ed Compare August 18, 2026 20:58
@ManningWorks
ManningWorks merged commit 6620a70 into main Aug 18, 2026
6 checks passed
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.

dev.to projects get no live date (unlike youtube/github) — fetch latest article date

1 participant