Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,364 changes: 661 additions & 703 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ repository = "https://github.com/denoland/deno_doc"
members = ["lib"]

[workspace.dependencies]
deno_graph = { version = "0.108.0", default-features = false, features = [
deno_graph = { git = "https://github.com/nathanwhit/deno_graph", branch = "oxc-port", default-features = false, features = [
"swc",
"symbols",
] }
deno_ast = { version = "0.53.2" }
deno_ast = { git = "https://github.com/nathanwhit/deno_ast", branch = "oxc-port" }
import_map = "0.25.0"
serde = { version = "1.0.204", features = ["derive"] }
serde_json = { version = "1.0.122", features = ["preserve_order"] }
Expand Down
15 changes: 11 additions & 4 deletions benches/doc_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,17 @@ async fn parse() -> ParseOutput {
},
)
.await;
DocParser::new(&graph, &analyzer, &[root], DocParserOptions::default())
.unwrap()
.parse()
.unwrap()
let allocator = deno_ast::oxc::allocator::Allocator::default();
DocParser::new(
&graph,
&analyzer,
&allocator,
&[root],
DocParserOptions::default(),
)
.unwrap()
.parse()
.unwrap()
}

fn doc_parser(c: &mut Criterion) {
Expand Down
6 changes: 4 additions & 2 deletions examples/ddoc/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,11 @@ async fn parse_sources(
let mut source_files = source_files;
source_files.sort();

let allocator = deno_ast::oxc::allocator::Allocator::default();
let parser = DocParser::new(
&graph,
&analyzer,
&allocator,
&source_files,
DocParserOptions {
diagnostics: false,
Expand Down Expand Up @@ -257,13 +259,13 @@ async fn run() -> anyhow::Result<()> {
// This allows comparing renamed modules.
let old_by_original = old_specifiers
.iter()
.zip(old_docs.into_iter())
.zip(old_docs)
.map(|(orig, (_, nodes))| (orig.clone(), nodes))
.collect::<IndexMap<_, _>>();

let new_by_original = new_specifiers
.iter()
.zip(new_docs.into_iter())
.zip(new_docs)
.map(|(orig, (_, nodes))| (orig.clone(), nodes))
.collect::<IndexMap<_, _>>();

Expand Down
2 changes: 2 additions & 0 deletions lib/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,11 @@ async fn inner_doc(
},
)
.await;
let allocator = deno_doc::OxcAllocator::default();
let entries = DocParser::new(
&graph,
&analyzer,
&allocator,
&root_specifiers,
deno_doc::DocParserOptions {
diagnostics: false,
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.89.0"
channel = "1.96.0"
components = ["rustfmt", "clippy"]
Loading
Loading