1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

chore: update deno_doc to 0.119.0 (#23103)

This commit is contained in:
Leo Kettmeir 2024-03-27 16:25:39 -07:00 committed by GitHub
parent 08d5d32dfc
commit dc985954e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 31 additions and 9 deletions

4
Cargo.lock generated
View file

@ -1346,9 +1346,9 @@ dependencies = [
[[package]]
name = "deno_doc"
version = "0.113.1"
version = "0.119.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "394381b3a23173f7bcb309e49ee29f33b8815495ca61fbdc8cb030439dc9d6ed"
checksum = "cbaec0d12c5f161bc96cf077874b586e860538663791d3e5d7df867af2d5f3ec"
dependencies = [
"ammonia",
"anyhow",

View file

@ -66,7 +66,7 @@ deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "proposa
deno_cache_dir = { workspace = true }
deno_config = "=0.15.0"
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
deno_doc = { version = "=0.113.1", features = ["html"] }
deno_doc = { version = "=0.119.0", features = ["html"] }
deno_emit = "=0.38.2"
deno_graph = { version = "=0.69.9", features = ["tokio_executor"] }
deno_lint = { version = "=0.58.0", features = ["docs"] }

View file

@ -148,14 +148,26 @@ pub async fn doc(flags: Flags, doc_flags: DocFlags) -> Result<(), AnyError> {
&analyzer,
)
.await?;
let (_, deno_ns) = deno_ns.first().unwrap();
let (_, deno_ns) = deno_ns.into_iter().next().unwrap();
deno_doc::html::compute_namespaced_symbols(deno_ns, &[])
deno_doc::html::compute_namespaced_symbols(
deno_ns
.into_iter()
.map(|node| deno_doc::html::DocNodeWithContext {
origin: Rc::new(ShortPath::from("deno".to_string())),
ns_qualifiers: Rc::new(vec![]),
kind_with_drilldown:
deno_doc::html::DocNodeKindWithDrilldown::Other(node.kind),
inner: std::sync::Arc::new(node),
})
.collect(),
&[],
)
} else {
Default::default()
};
generate_docs_directory(&doc_nodes_by_url, html_options, deno_ns)
generate_docs_directory(doc_nodes_by_url, html_options, deno_ns)
} else {
let modules_len = doc_nodes_by_url.len();
let doc_nodes =
@ -223,7 +235,7 @@ impl deno_doc::html::HrefResolver for DocResolver {
}
fn generate_docs_directory(
doc_nodes_by_url: &IndexMap<ModuleSpecifier, Vec<doc::DocNode>>,
doc_nodes_by_url: IndexMap<ModuleSpecifier, Vec<doc::DocNode>>,
html_options: &DocHtmlFlag,
deno_ns: std::collections::HashSet<Vec<String>>,
) -> Result<(), AnyError> {

View file

@ -139,15 +139,25 @@ fn deno_doc_html() {
.run();
output.assert_exit_code(0);
assert_contains!(output.stderr(), "Written 10 files to");
assert_contains!(output.stderr(), "Written 14 files to");
assert!(temp_dir.path().join("all_symbols.html").exists());
assert!(temp_dir.path().join("index.html").exists());
assert!(temp_dir.path().join("fuse.js").exists());
assert!(temp_dir.path().join("page.css").exists());
assert!(temp_dir.path().join("script.js").exists());
assert!(temp_dir.path().join("search.js").exists());
assert!(temp_dir.path().join("search_index.js").exists());
assert!(temp_dir.path().join("styles.css").exists());
assert!(temp_dir.path().join("~/MyInterface.html").exists());
assert!(temp_dir
.path()
.join("~/MyInterface.prototype.prop.html")
.exists());
assert!(temp_dir.path().join("~/MyClass.html").exists());
assert!(temp_dir.path().join("~/MyClass.prototype.html").exists());
assert!(temp_dir
.path()
.join("~/MyClass.prototype.prop.html")
.exists());
assert!(temp_dir.path().join("~/index.html").exists());
}

View file

@ -1 +1 @@
Written 9 files to "./docs/"
Written 12 files to "./docs/"