Skip to content

feat: add deprecated marking to package timeline page - #3133

Open
btea wants to merge 2 commits into
npmx-dev:mainfrom
btea:feat/timeline-deprecated
Open

feat: add deprecated marking to package timeline page#3133
btea wants to merge 2 commits into
npmx-dev:mainfrom
btea:feat/timeline-deprecated

Conversation

@btea

@btea btea commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked issue

/

🧭 Context

related to #3121 (comment)

📚 Description

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview Aug 4, 2026 1:30pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Aug 4, 2026 1:30pm
npmx-lunaria Ignored Ignored Aug 4, 2026 1:30pm

Request Review

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
i18n/locales/en.json Source changed, localizations will be marked as outdated.
i18n/locales/zh-CN.json Localization changed, will be marked as complete.
i18n/locales/zh-TW.json Localization changed, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@gameroman

Copy link
Copy Markdown
Member

Also related to #2630

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...p/pages/package-timeline/[[org]]/[packageName].vue 40.00% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@gameroman gameroman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it only show the latest version that is deprecated on timeline?

It seems to differ from the versions view

Screenshots

https://npmx-m0g6t0w58-npmx.vercel.app/package-timeline/websim/v/0.1.0

Image

https://npmx-m0g6t0w58-npmx.vercel.app/package/websim/versions

Image

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 02bc260f-211c-4cc7-ac90-5377a7ed6583

📥 Commits

Reviewing files that changed from the base of the PR and between 27f7dc2 and 5a24cec.

📒 Files selected for processing (6)
  • app/pages/package-timeline/[[org]]/[packageName].vue
  • i18n/locales/en.json
  • i18n/locales/zh-CN.json
  • i18n/locales/zh-TW.json
  • i18n/schema.json
  • server/api/registry/timeline/[...pkg].get.ts

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Package timeline entries now clearly indicate when a version is deprecated.
    • Deprecated versions display a red warning badge and message alongside related timeline events.
    • Timeline details are shown consistently for entries with sub-events or deprecation information.
  • Documentation

    • Added translations for the deprecated status in English, Simplified Chinese and Traditional Chinese.

Walkthrough

The timeline API now returns package version deprecation messages. The package timeline displays deprecated badges and sub-events. English, Simplified Chinese, and Traditional Chinese translations and the i18n schema now include the deprecated label.

Changes

Package timeline deprecation

Layer / File(s) Summary
Expose deprecation metadata
server/api/registry/timeline/[...pkg].get.ts
TimelineVersion now includes an optional deprecated field. Timeline mapping copies the package version deprecation message when present.
Render deprecated timeline entries
app/pages/package-timeline/[[org]]/[packageName].vue, i18n/schema.json, i18n/locales/en.json, i18n/locales/zh-CN.json, i18n/locales/zh-TW.json
The timeline aligns entry headers centrally, displays a deprecated badge, and adds a deprecated sub-event. Translation files and the i18n schema define the new label.

Sequence Diagram(s)

sequenceDiagram
  participant PackageVersionMetadata
  participant TimelineAPI
  participant PackageTimelinePage
  participant I18nTranslations
  PackageVersionMetadata->>TimelineAPI: Provide deprecation message
  TimelineAPI->>PackageTimelinePage: Return TimelineVersion with deprecated field
  PackageTimelinePage->>I18nTranslations: Request deprecated label
  I18nTranslations-->>PackageTimelinePage: Return translated label
  PackageTimelinePage-->>PackageTimelinePage: Render badge and deprecated sub-event
Loading

Possibly related PRs

Suggested reviewers: graphieros

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description references related work but provides no meaningful explanation of the implementation, rationale, or acceptance criteria. Add a concise summary of the deprecated marking changes, the reason for the change, and the relevant issue or acceptance criteria.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarises the main change: adding deprecated marking to the package timeline page.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@btea

btea commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@gameroman Thank you for providing the example; I hadn't considered this scenario before.

@gameroman gameroman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@gameroman
gameroman requested a review from a team August 4, 2026 13:35
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