1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -05:00

refactor: update to deno_doc 0.71 (#21023)

This commit is contained in:
David Sherret 2023-10-30 23:49:43 -04:00 committed by GitHub
parent 1713df1352
commit 092555c611
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 27 additions and 15 deletions

4
Cargo.lock generated
View file

@ -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",

View file

@ -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"] }

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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.

View file

@ -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.

View file

@ -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

View file

@ -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![];