diff options
Diffstat (limited to 'ext/node/package_json.rs')
-rw-r--r-- | ext/node/package_json.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/node/package_json.rs b/ext/node/package_json.rs index b24bfdef3..104c87390 100644 --- a/ext/node/package_json.rs +++ b/ext/node/package_json.rs @@ -36,8 +36,8 @@ pub struct PackageJson { pub path: PathBuf, pub typ: String, pub types: Option<String>, - pub dependencies: Option<HashMap<String, String>>, - pub dev_dependencies: Option<HashMap<String, String>>, + pub dependencies: Option<IndexMap<String, String>>, + pub dev_dependencies: Option<IndexMap<String, String>>, pub scripts: Option<IndexMap<String, String>>, } @@ -146,7 +146,7 @@ impl PackageJson { let dependencies = package_json.get("dependencies").and_then(|d| { if d.is_object() { - let deps: HashMap<String, String> = + let deps: IndexMap<String, String> = serde_json::from_value(d.to_owned()).unwrap(); Some(deps) } else { @@ -155,7 +155,7 @@ impl PackageJson { }); let dev_dependencies = package_json.get("devDependencies").and_then(|d| { if d.is_object() { - let deps: HashMap<String, String> = + let deps: IndexMap<String, String> = serde_json::from_value(d.to_owned()).unwrap(); Some(deps) } else { |