From 1cd226750065e6101c0a38694ff9f96a40b437d0 Mon Sep 17 00:00:00 2001 From: KrisChambers Date: Mon, 7 Sep 2020 09:59:47 -0400 Subject: 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 --- cli/tests/recursive_imports/A.ts | 7 +++++++ cli/tests/recursive_imports/B.ts | 7 +++++++ cli/tests/recursive_imports/C.ts | 8 ++++++++ cli/tests/recursive_imports/common.ts | 2 ++ 4 files changed, 24 insertions(+) create mode 100644 cli/tests/recursive_imports/A.ts create mode 100644 cli/tests/recursive_imports/B.ts create mode 100644 cli/tests/recursive_imports/C.ts create mode 100644 cli/tests/recursive_imports/common.ts (limited to 'cli/tests/recursive_imports') diff --git a/cli/tests/recursive_imports/A.ts b/cli/tests/recursive_imports/A.ts new file mode 100644 index 000000000..04ef61581 --- /dev/null +++ b/cli/tests/recursive_imports/A.ts @@ -0,0 +1,7 @@ +import { B } from "./B.ts"; +import { thing } from "./common.ts"; + +export function A(): void { + thing(); + B(); +} diff --git a/cli/tests/recursive_imports/B.ts b/cli/tests/recursive_imports/B.ts new file mode 100644 index 000000000..a6e6917fd --- /dev/null +++ b/cli/tests/recursive_imports/B.ts @@ -0,0 +1,7 @@ +import { C } from "./C.ts"; +import { thing } from "./common.ts"; + +export function B(): void { + thing(); + C(); +} diff --git a/cli/tests/recursive_imports/C.ts b/cli/tests/recursive_imports/C.ts new file mode 100644 index 000000000..be6ef9240 --- /dev/null +++ b/cli/tests/recursive_imports/C.ts @@ -0,0 +1,8 @@ +import { A } from "./A.ts"; +import { thing } from "./common.ts"; + +export function C(): void { + if (A != null) { + thing(); + } +} diff --git a/cli/tests/recursive_imports/common.ts b/cli/tests/recursive_imports/common.ts new file mode 100644 index 000000000..d0f41395d --- /dev/null +++ b/cli/tests/recursive_imports/common.ts @@ -0,0 +1,2 @@ +export function thing(): void { +} -- cgit v1.2.3