Skip to content

Commit 4958c73

Browse files
pchickeythomastaylor312
authored andcommitted
config: add alias for parsing old author field for authors
1 parent dae5b4a commit 4958c73

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/wasm-pkg-core/src/config.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ pub struct Override {
7575
#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq, Eq)]
7676
#[serde(deny_unknown_fields)]
7777
pub struct Metadata {
78-
/// The author(s) of the package.
79-
#[serde(default, skip_serializing_if = "Option::is_none")]
78+
/// The author(s) of the package. Alias supports prior definition as `author`.
79+
/// Note that unlike in a Cargo.toml, this authors is a string, not a list of string.
80+
#[serde(default, skip_serializing_if = "Option::is_none", alias = "author")]
8081
pub authors: Option<String>,
8182
/// The package description.
8283
#[serde(default, skip_serializing_if = "Option::is_none")]

0 commit comments

Comments
 (0)