fix(cli): make output of deno info --json deterministic (#8483)

Fixes #8458
This commit is contained in:
William Perron 2020-11-27 16:51:47 -05:00 committed by GitHub
parent b8d3caa5d5
commit 57f163510a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 3 deletions

View file

@ -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());