Skip to content

Commit

Permalink
feat: Upgrade deno_ast and deno_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju committed Jul 8, 2024
1 parent 39e300b commit 0e71f6b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 43 deletions.
46 changes: 22 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

[workspace.dependencies]
deno_graph = { version = "0.79.0", default-features = false, features = ["symbols"] }
deno_graph = { version = "0.79.0", default-features = false, features = ["symbols"], git = "https://github.com/bartlomieju/deno_graph", branch = "upgrade_swc_crates" }
deno_ast = { version = "0.39.2", git = "https://github.com/bartlomieju/deno_ast", branch = "bump_swc_crates" }
import_map = "0.20.0"
serde = { version = "1.0.140", features = ["derive"] }

Expand All @@ -26,7 27,7 @@ required-features = ["html"]
[dependencies]
anyhow = "1.0.58"
cfg-if = "1.0.0"
deno_ast = "0.39.0"
deno_ast.workspace = true
deno_graph.workspace = true
indexmap = "2.0.2"
futures = "0.3.26"
Expand Down
13 changes: 4 additions & 9 deletions src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 145,7 @@ pub fn get_doc_for_ts_interface_decl(
js_doc: method_js_doc,
location: get_location(parsed_source, ts_getter_sig.start()),
computed: ts_getter_sig.computed,
optional: ts_getter_sig.optional,
optional: false,
params: vec![],
return_type: maybe_return_type,
type_params: vec![],
Expand All @@ -169,7 169,7 @@ pub fn get_doc_for_ts_interface_decl(
js_doc: method_js_doc,
location: get_location(parsed_source, ts_setter_sig.start()),
computed: ts_setter_sig.computed,
optional: ts_setter_sig.optional,
optional: false,
params,
return_type: None,
type_params: vec![],
Expand All @@ -183,12 183,7 @@ pub fn get_doc_for_ts_interface_decl(
{
let name = expr_to_name(&ts_prop_sig.key);

let mut params = vec![];

for param in &ts_prop_sig.params {
let param_def = ts_fn_param_to_param_def(parsed_source, param);
params.push(param_def);
}
let params = vec![];

let ts_type = ts_prop_sig
.type_ann
Expand All @@ -197,7 192,7 @@ pub fn get_doc_for_ts_interface_decl(

let type_params = maybe_type_param_decl_to_type_param_defs(
parsed_source,
ts_prop_sig.type_params.as_deref(),
None,
);

let prop_def = PropertyDef {
Expand Down
12 changes: 4 additions & 8 deletions src/ts_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 397,7 @@ impl TsTypeDef {
location: get_location(parsed_source, ts_getter_sig.start()),
params: vec![],
computed: ts_getter_sig.computed,
optional: ts_getter_sig.optional,
optional: false,
return_type: maybe_return_type,
type_params: vec![],
};
Expand All @@ -422,7 422,7 @@ impl TsTypeDef {
location: get_location(parsed_source, ts_setter_sig.start()),
params,
computed: ts_setter_sig.computed,
optional: ts_setter_sig.optional,
optional: false,
return_type: None,
type_params: vec![],
};
Expand All @@ -435,11 435,7 @@ impl TsTypeDef {
{
let name = expr_to_name(&ts_prop_sig.key);

let params = ts_prop_sig
.params
.iter()
.map(|param| ts_fn_param_to_param_def(parsed_source, param))
.collect();
let params = vec![];

let ts_type = ts_prop_sig
.type_ann
Expand All @@ -448,7 444,7 @@ impl TsTypeDef {

let type_params = maybe_type_param_decl_to_type_param_defs(
parsed_source,
ts_prop_sig.type_params.as_deref(),
None,
);
let prop_def = PropertyDef {
name,
Expand Down

0 comments on commit 0e71f6b

Please sign in to comment.