summaryrefslogtreecommitdiff
path: root/cli/tsc.rs
diff options
context:
space:
mode:
authorKrisChambers <Kris.chambers@outlook.com>2020-09-07 09:59:47 -0400
committerGitHub <noreply@github.com>2020-09-07 15:59:47 +0200
commit1cd226750065e6101c0a38694ff9f96a40b437d0 (patch)
tree846632d932c7a7584f3e00d4fed8cd358be75aa8 /cli/tsc.rs
parent7a8b27aa25b419a9daef976793c59bd22d35551a (diff)
feat(info): Dependency count and sizes (#6786)
This commit changes "deno info" subcommand logic. - Modules are no longer loaded into V8 isolate - analysis is done using ModuleGraph. - Removed deno_core::Deps structure. - Modules are no longer type-checked and transpiled - "compiled" file is shown only if it is already available. - Added number of unique dependencies for root module. - Changed tree output: - file size is shown next to the dependency - repeated dependencies are marked with "*" - used less spaces in prefix to save terminal width
Diffstat (limited to 'cli/tsc.rs')
-rw-r--r--cli/tsc.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tsc.rs b/cli/tsc.rs
index ec2a5c43e..0e2e19a9c 100644
--- a/cli/tsc.rs
+++ b/cli/tsc.rs
@@ -570,7 +570,7 @@ impl TsCompiler {
source_file: &SourceFile,
target: TargetLib,
permissions: Permissions,
- module_graph: ModuleGraph,
+ module_graph: &ModuleGraph,
allow_js: bool,
) -> Result<(), ErrBox> {
let module_url = source_file.url.clone();
@@ -790,7 +790,7 @@ impl TsCompiler {
pub async fn transpile(
&self,
- module_graph: ModuleGraph,
+ module_graph: &ModuleGraph,
) -> Result<(), ErrBox> {
let mut source_files: Vec<TranspileSourceFile> = Vec::new();
for (_, value) in module_graph.iter() {
@@ -1700,7 +1700,7 @@ mod tests {
&out,
TargetLib::Main,
Permissions::allow_all(),
- module_graph,
+ &module_graph,
false,
)
.await;
@@ -1770,7 +1770,7 @@ mod tests {
)
.unwrap();
- let result = ts_compiler.transpile(module_graph).await;
+ let result = ts_compiler.transpile(&module_graph).await;
assert!(result.is_ok());
let compiled_file = ts_compiler.get_compiled_module(&out.url).unwrap();
let source_code = compiled_file.code;