diff options
author | Valentin Anger <syrupthinker@gryphno.de> | 2020-09-27 21:50:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-27 21:50:18 +0200 |
commit | e3adeea7698a178b6ab1ebd2a026e40ad2468d61 (patch) | |
tree | b735a694461bd2443a6713cda4a01c9a05cc5fd3 | |
parent | 8cbf0e75b2a7cf0e86608da0cf780b871b582deb (diff) |
feat(unstable): add module specifier to deno info --json output (#7725)
-rw-r--r-- | cli/info.rs | 2 | ||||
-rw-r--r-- | cli/tests/055_info_file_json.out | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/cli/info.rs b/cli/info.rs index 45d6127fc..6701aafbe 100644 --- a/cli/info.rs +++ b/cli/info.rs @@ -16,6 +16,7 @@ use std::sync::Arc; #[derive(Serialize)] #[serde(rename_all = "camelCase")] pub struct ModuleDepInfo { + module: String, local: String, file_type: String, compiled: Option<String>, @@ -70,6 +71,7 @@ impl ModuleDepInfo { let files = FileInfoDepFlatGraph::new(&module_graph); let info = Self { + module: module_specifier.to_string(), local: local_filename, file_type, compiled: compiled_filename, diff --git a/cli/tests/055_info_file_json.out b/cli/tests/055_info_file_json.out index c3f5f1c36..7c7bfabb9 100644 --- a/cli/tests/055_info_file_json.out +++ b/cli/tests/055_info_file_json.out @@ -1,4 +1,5 @@ { + "module": "file://[WILDCARD]005_more_imports.ts", "local": "[WILDCARD]005_more_imports.ts", "fileType": "TypeScript", "compiled": null, |