refactor: rename type_ to ty in ESModulesPackage

I noticed that this specific evasion of the "type" keyword is already used in
utils::manifest::NpmPackage in the tests, so just match that.
master
Gunnlaugur Þór Briem 4 years ago
parent 384238d554
commit 70be9d3dde
  1. 4
      src/manifest/mod.rs
  2. 2
      src/manifest/npm/esmodules.rs

@ -699,7 +699,7 @@ impl CrateData {
NpmPackage::ESModulesPackage(ESModulesPackage {
name: data.name,
type_: "module".into(),
ty: "module".into(),
collaborators: pkg.authors.clone(),
description: self.manifest.package.description.clone(),
version: pkg.version.to_string(),
@ -730,7 +730,7 @@ impl CrateData {
NpmPackage::ESModulesPackage(ESModulesPackage {
name: data.name,
type_: "module".into(),
ty: "module".into(),
collaborators: pkg.authors.clone(),
description: self.manifest.package.description.clone(),
version: pkg.version.to_string(),

@ -4,7 +4,7 @@ use manifest::npm::repository::Repository;
pub struct ESModulesPackage {
pub name: String,
#[serde(rename = "type")]
pub type_: String,
pub ty: String,
#[serde(skip_serializing_if = "Vec::is_empty")]
pub collaborators: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]

Loading…
Cancel
Save