diff --git a/app/pages/package-timeline/[[org]]/[packageName].vue b/app/pages/package-timeline/[[org]]/[packageName].vue index a86c3f2af3..5dac1ec9a0 100644 --- a/app/pages/package-timeline/[[org]]/[packageName].vue +++ b/app/pages/package-timeline/[[org]]/[packageName].vue @@ -375,7 +375,7 @@ useSeoMeta({ :class="entry.version === version ? 'bg-accent border-accent' : 'bg-bg-subtle'" /> -
+
{{ tag }} + +
    + +
  1. -
diff --git a/i18n/locales/en.json b/i18n/locales/en.json index a09e22b59f..1a40d75f8a 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -646,6 +646,7 @@ "trusted_publisher_removed": "Trusted publishing removed", "provenance_added": "Provenance enabled", "provenance_removed": "Provenance removed", + "deprecated": "Deprecated", "chart": { "tab_aria_label": "Metric selection", "dependency_size": "Dependency Size", diff --git a/i18n/locales/zh-CN.json b/i18n/locales/zh-CN.json index 99d9019d6a..e779211a4a 100644 --- a/i18n/locales/zh-CN.json +++ b/i18n/locales/zh-CN.json @@ -601,7 +601,8 @@ "version_events": "版本 {version}:{events}", "general_description": "折线图展示了 {package} 包从版本 {first} 到 {last} 的 {metric} 变化情况。版本 {first} 的 {metric} 为 {first_value},版本 {last} 为 {last_value}(整体变化 {overall_progress_percentage}%)。{key_changes} {watermark}。" } - } + }, + "deprecated": "已弃用" }, "dependencies": { "title": "依赖({count} 个)", diff --git a/i18n/locales/zh-TW.json b/i18n/locales/zh-TW.json index e2b15eefb7..7fd55b3975 100644 --- a/i18n/locales/zh-TW.json +++ b/i18n/locales/zh-TW.json @@ -555,7 +555,8 @@ "timeline": { "chart": { "copy_alt": {} - } + }, + "deprecated": "已棄用" }, "dependencies": { "title": "相依({count} 個)", diff --git a/i18n/schema.json b/i18n/schema.json index b7793e498c..3dc9c82476 100644 --- a/i18n/schema.json +++ b/i18n/schema.json @@ -1942,6 +1942,9 @@ "provenance_removed": { "type": "string" }, + "deprecated": { + "type": "string" + }, "chart": { "type": "object", "properties": { diff --git a/server/api/registry/timeline/[...pkg].get.ts b/server/api/registry/timeline/[...pkg].get.ts index cd399ef3c8..b12594465c 100644 --- a/server/api/registry/timeline/[...pkg].get.ts +++ b/server/api/registry/timeline/[...pkg].get.ts @@ -11,6 +11,7 @@ export interface TimelineVersion { hasTypes?: boolean hasTrustedPublisher?: boolean hasProvenance?: boolean + deprecated?: string tags: string[] } @@ -79,6 +80,7 @@ export default defineCachedEventHandler( // oxlint-disable-next-line eslint/no-underscore-dangle hasTrustedPublisher: version._npmUser?.trustedPublisher ? true : undefined, hasProvenance: version.dist?.attestations ? true : undefined, + deprecated: version.deprecated || undefined, tags: tagsByVersion.get(v) ?? [], } })