diff --git a/Cargo.lock b/Cargo.lock index d5c1f5558b..eb9b7cdf32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1245,9 +1245,9 @@ dependencies = [ [[package]] name = "deno_doc" -version = "0.70.0" +version = "0.71.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd0a46bf024da1e3a1caa7fbb6309bd2abd5395c738b73efe34276a6d9b9838" +checksum = "2ce98ca0c84dd2599c1b7f5c77268f5993dc716583e9c64365a3e68198b68837" dependencies = [ "anyhow", "cfg-if 1.0.0", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index de51163507..9cc95c8060 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -49,7 +49,7 @@ deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "dep_gra deno_cache_dir = "=0.6.1" deno_config = "=0.4.0" deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] } -deno_doc = "=0.70.0" +deno_doc = "=0.71.0" deno_emit = "=0.31.1" deno_graph = "=0.59.1" deno_lint = { version = "=0.52.2", features = ["docs"] } diff --git a/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts.out b/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts.out index 2cd36931c5..28d1cb9219 100644 --- a/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts.out +++ b/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts.out @@ -1,8 +1,8 @@ -Defined in [WILDCARD]/060_deno_doc_displays_all_overloads_in_details_view.ts:3:2 +Defined in [WILDCARD]/060_deno_doc_displays_all_overloads_in_details_view.ts:3:3 function test(name: string, fn: Function): void -Defined in [WILDCARD]/060_deno_doc_displays_all_overloads_in_details_view.ts:4:2 +Defined in [WILDCARD]/060_deno_doc_displays_all_overloads_in_details_view.ts:4:3 function test(options: object): void diff --git a/cli/tests/testdata/doc/referenced_private_types.out b/cli/tests/testdata/doc/referenced_private_types.out index 507b91e3ab..3c91dbe153 100644 --- a/cli/tests/testdata/doc/referenced_private_types.out +++ b/cli/tests/testdata/doc/referenced_private_types.out @@ -1,10 +1,10 @@ -Defined in file:///[WILDCARD]/doc/referenced_private_types.ts:5:0 +Defined in file:///[WILDCARD]/doc/referenced_private_types.ts:5:1 class MyClass prop: MyInterface -Defined in file:///[WILDCARD]/doc/referenced_private_types.ts:1:0 +Defined in file:///[WILDCARD]/doc/referenced_private_types.ts:1:1 private interface MyInterface diff --git a/cli/tests/testdata/doc/types_header.out b/cli/tests/testdata/doc/types_header.out index b6ad8f0bf2..a97b35dd74 100644 --- a/cli/tests/testdata/doc/types_header.out +++ b/cli/tests/testdata/doc/types_header.out @@ -1,6 +1,6 @@ Download http://127.0.0.1:4545/xTypeScriptTypes.js Download http://127.0.0.1:4545/xTypeScriptTypes.d.ts -Defined in http://127.0.0.1:4545/xTypeScriptTypes.d.ts:1:13 +Defined in http://127.0.0.1:4545/xTypeScriptTypes.d.ts:1:14 const foo: "foo" diff --git a/cli/tests/testdata/doc/types_hint.out b/cli/tests/testdata/doc/types_hint.out index 5df4303849..bfd5191a1f 100644 --- a/cli/tests/testdata/doc/types_hint.out +++ b/cli/tests/testdata/doc/types_hint.out @@ -1,4 +1,4 @@ -Defined in [WILDCARD]/type_definitions/foo.d.ts:2:13 +Defined in [WILDCARD]/type_definitions/foo.d.ts:2:14 const foo: string An exported value. diff --git a/cli/tests/testdata/doc/types_ref.out b/cli/tests/testdata/doc/types_ref.out index 5df4303849..bfd5191a1f 100644 --- a/cli/tests/testdata/doc/types_ref.out +++ b/cli/tests/testdata/doc/types_ref.out @@ -1,4 +1,4 @@ -Defined in [WILDCARD]/type_definitions/foo.d.ts:2:13 +Defined in [WILDCARD]/type_definitions/foo.d.ts:2:14 const foo: string An exported value. diff --git a/cli/tests/testdata/doc/use_import_map.out b/cli/tests/testdata/doc/use_import_map.out index 82de4dbb00..c27a313f4f 100644 --- a/cli/tests/testdata/doc/use_import_map.out +++ b/cli/tests/testdata/doc/use_import_map.out @@ -1,4 +1,4 @@ -Defined in [WILDCARD]/doc/module/fun.js:2:0 +Defined in [WILDCARD]/doc/module/fun.js:2:1 function fun(_a, _b) This is some documentation diff --git a/cli/tools/doc.rs b/cli/tools/doc.rs index 5e87e79174..193362267a 100644 --- a/cli/tools/doc.rs +++ b/cli/tools/doc.rs @@ -60,8 +60,14 @@ pub async fn print_docs( }, ) .await; - let doc_parser = - doc::DocParser::new(&graph, doc_flags.private, capturing_parser)?; + let doc_parser = doc::DocParser::new( + &graph, + capturing_parser, + doc::DocParserOptions { + private: doc_flags.private, + diagnostics: false, + }, + )?; doc_parser.parse_module(&source_file_specifier)?.definitions } DocSourceFileFlag::Paths(source_files) => { @@ -90,8 +96,14 @@ pub async fn print_docs( graph_lock_or_exit(&graph, &mut lockfile.lock()); } - let doc_parser = - doc::DocParser::new(&graph, doc_flags.private, capturing_parser)?; + let doc_parser = doc::DocParser::new( + &graph, + capturing_parser, + doc::DocParserOptions { + private: doc_flags.private, + diagnostics: false, + }, + )?; let mut doc_nodes = vec![];