Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions api/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ use std::collections::HashMap;
/// "name": "foo",
/// "versions": {
/// "0.1.2": {
/// "main": "./mod.ts"
/// "yanked": true,
/// "datetime": "2025-09-17T15:37:51.191487057Z"
/// },
/// "0.1.3": {
/// "main": "./mod.ts"
/// "datetime": "2025-09-17T15:37:51.191487057Z"
/// },
/// }
/// }
Expand Down Expand Up @@ -57,6 +58,7 @@ impl PackageMetadata {
version.version,
PackageMetadataVersion {
yanked: version.is_yanked,
datetime: version.created_at,
},
);
}
Expand All @@ -68,6 +70,7 @@ impl PackageMetadata {
pub struct PackageMetadataVersion {
#[serde(skip_serializing_if = "is_false", default)]
pub yanked: bool,
pub datetime: chrono::DateTime<chrono::Utc>,
}

/// This struct stores information specific to a particular published version.
Expand Down
Loading