From e3adeea7698a178b6ab1ebd2a026e40ad2468d61 Mon Sep 17 00:00:00 2001 From: Valentin Anger Date: Sun, 27 Sep 2020 21:50:18 +0200 Subject: feat(unstable): add module specifier to deno info --json output (#7725) --- cli/info.rs | 2 ++ cli/tests/055_info_file_json.out | 1 + 2 files changed, 3 insertions(+) (limited to 'cli') 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, @@ -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, -- cgit v1.2.3