mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
perf: update deno_doc (#24700)
Ref https://github.com/denoland/deno_doc/pull/616
This commit is contained in:
parent
fcd9bbe8ee
commit
b305ba3e1c
4 changed files with 11 additions and 10 deletions
5
Cargo.lock
generated
5
Cargo.lock
generated
|
@ -1424,9 +1424,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "deno_doc"
|
||||
version = "0.142.0"
|
||||
version = "0.144.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "16293d4ab42fdb4b499bf0bdc30def02048525c59cf268f65a66c4ab1d4520dc"
|
||||
checksum = "12e151a1f29dcea4fe698123fa9693bc77574abf51a6add54d5d39cda99dd7f5"
|
||||
dependencies = [
|
||||
"ammonia",
|
||||
"anyhow",
|
||||
|
@ -1439,6 +1439,7 @@ dependencies = [
|
|||
"html-escape",
|
||||
"import_map",
|
||||
"indexmap",
|
||||
"itoa",
|
||||
"lazy_static",
|
||||
"regex",
|
||||
"serde",
|
||||
|
|
|
@ -67,7 +67,7 @@ deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "proposa
|
|||
deno_cache_dir = { workspace = true }
|
||||
deno_config = { version = "=0.26.1", features = ["workspace", "sync"] }
|
||||
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
|
||||
deno_doc = { version = "=0.142.0", features = ["html", "syntect"] }
|
||||
deno_doc = { version = "0.144.0", features = ["html", "syntect"] }
|
||||
deno_emit = "=0.43.1"
|
||||
deno_graph = { version = "=0.80.1", features = ["tokio_executor"] }
|
||||
deno_lint = { version = "=0.60.1", features = ["docs"] }
|
||||
|
|
|
@ -178,10 +178,10 @@ pub async fn doc(
|
|||
.into_iter()
|
||||
.map(|node| deno_doc::html::DocNodeWithContext {
|
||||
origin: short_path.clone(),
|
||||
ns_qualifiers: Rc::new(vec![]),
|
||||
ns_qualifiers: Rc::new([]),
|
||||
kind_with_drilldown:
|
||||
deno_doc::html::DocNodeKindWithDrilldown::Other(node.kind),
|
||||
inner: std::sync::Arc::new(node),
|
||||
deno_doc::html::DocNodeKindWithDrilldown::Other(node.kind()),
|
||||
inner: Rc::new(node),
|
||||
drilldown_parent_kind: None,
|
||||
parent: None,
|
||||
})
|
||||
|
@ -300,7 +300,7 @@ impl deno_doc::html::HrefResolver for DocResolver {
|
|||
}
|
||||
|
||||
fn resolve_source(&self, location: &deno_doc::Location) -> Option<String> {
|
||||
Some(location.filename.clone())
|
||||
Some(location.filename.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -492,9 +492,9 @@ fn print_docs_to_stdout(
|
|||
doc_flags: DocFlags,
|
||||
mut doc_nodes: Vec<deno_doc::DocNode>,
|
||||
) -> Result<(), AnyError> {
|
||||
doc_nodes.retain(|doc_node| doc_node.kind != doc::DocNodeKind::Import);
|
||||
doc_nodes.retain(|doc_node| doc_node.kind() != doc::DocNodeKind::Import);
|
||||
let details = if let Some(filter) = doc_flags.filter {
|
||||
let nodes = doc::find_nodes_by_name_recursively(doc_nodes, filter.clone());
|
||||
let nodes = doc::find_nodes_by_name_recursively(doc_nodes, &filter);
|
||||
if nodes.is_empty() {
|
||||
bail!("Node {} was not found!", filter);
|
||||
}
|
||||
|
|
2
tests/testdata/doc/lint_success_json.out
vendored
2
tests/testdata/doc/lint_success_json.out
vendored
|
@ -1,6 +1,5 @@
|
|||
[
|
||||
{
|
||||
"kind": "class",
|
||||
"name": "Test",
|
||||
"isDefault": false,
|
||||
"location": {
|
||||
|
@ -13,6 +12,7 @@
|
|||
"jsDoc": {
|
||||
"doc": "My test class."
|
||||
},
|
||||
"kind": "class",
|
||||
"classDef": {
|
||||
"isAbstract": false,
|
||||
"constructors": [],
|
||||
|
|
Loading…
Reference in a new issue