summaryrefslogtreecommitdiff
path: root/cli/module_graph.rs
diff options
context:
space:
mode:
authorWilliam Perron <hey@wperron.io>2020-11-27 16:51:47 -0500
committerGitHub <noreply@github.com>2020-11-27 16:51:47 -0500
commit57f163510aafd5c045dda0fa5e505d0cc7042a5a (patch)
tree7308fdb909fedb5e78bef83bb50d653333c76be6 /cli/module_graph.rs
parentb8d3caa5d586c6957866261bd5f51c85ad3a2c91 (diff)
fix(cli): make output of deno info --json deterministic (#8483)
Fixes #8458
Diffstat (limited to 'cli/module_graph.rs')
-rw-r--r--cli/module_graph.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/module_graph.rs b/cli/module_graph.rs
index b6759a9d2..8c6f69552 100644
--- a/cli/module_graph.rs
+++ b/cli/module_graph.rs
@@ -41,8 +41,8 @@ use regex::Regex;
use serde::Deserialize;
use serde::Deserializer;
use std::cell::RefCell;
-use std::collections::HashMap;
use std::collections::HashSet;
+use std::collections::{BTreeSet, HashMap};
use std::error::Error;
use std::fmt;
use std::path::PathBuf;
@@ -1098,7 +1098,7 @@ impl Graph {
.modules
.iter()
.map(|(specifier, module)| {
- let mut deps = HashSet::new();
+ let mut deps = BTreeSet::new();
for (_, dep) in module.dependencies.iter() {
if let Some(code_dep) = &dep.maybe_code {
deps.insert(code_dep.clone());