Skip to content

Commit 075cdf9

Browse files
authored
refactor: deno_graph 0.78 (#598)
1 parent 1c1a414 commit 075cdf9

File tree

128 files changed

+70
-167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+70
-167
lines changed

Cargo.lock

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/denoland/deno_doc"
1111
members = ["lib"]
1212

1313
[workspace.dependencies]
14-
deno_graph = { version = "0.77.0", default-features = false, features = ["symbols"] }
14+
deno_graph = { version = "0.78.0", default-features = false, features = ["symbols"] }
1515
import_map = "0.19.0"
1616
serde = { version = "1.0.140", features = ["derive"] }
1717

@@ -26,7 +26,7 @@ required-features = ["html"]
2626
[dependencies]
2727
anyhow = "1.0.58"
2828
cfg-if = "1.0.0"
29-
deno_ast = "0.38.0"
29+
deno_ast = "0.39.0"
3030
deno_graph.workspace = true
3131
indexmap = "2.0.2"
3232
futures = "0.3.26"

src/decorators.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl DecoratorDef {
5151
let args = call_expr
5252
.args
5353
.iter()
54-
.map(|a| a.text_fast(parsed_source.text_info()).to_string())
54+
.map(|a| a.text_fast(parsed_source.text_info_lazy()).to_string())
5555
.collect();
5656
return Self {
5757
name: ident.sym.to_string(),

src/diagnostics.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ impl Diagnostic for DocDiagnostic {
112112
fn snippet(&self) -> Option<DiagnosticSnippet<'_>> {
113113
Some(DiagnosticSnippet {
114114
source: Cow::Borrowed(&self.text_info),
115-
highlight: DiagnosticSnippetHighlight {
115+
highlights: vec![DiagnosticSnippetHighlight {
116116
style: DiagnosticSnippetHighlightStyle::Error,
117117
range: DiagnosticSourceRange {
118118
start: DiagnosticSourcePos::ByteIndex(self.location.byte_index),
119119
end: DiagnosticSourcePos::ByteIndex(self.location.byte_index + 1),
120120
},
121121
description: None,
122-
},
122+
}],
123123
})
124124
}
125125

@@ -136,7 +136,7 @@ impl Diagnostic for DocDiagnostic {
136136
DocDiagnosticKind::PrivateTypeRef(diagnostic) => {
137137
Some(DiagnosticSnippet {
138138
source: Cow::Borrowed(&diagnostic.reference_text_info),
139-
highlight: DiagnosticSnippetHighlight {
139+
highlights: vec![DiagnosticSnippetHighlight {
140140
style: DiagnosticSnippetHighlightStyle::Hint,
141141
range: DiagnosticSourceRange {
142142
start: DiagnosticSourcePos::ByteIndex(
@@ -147,7 +147,7 @@ impl Diagnostic for DocDiagnostic {
147147
),
148148
},
149149
description: Some(Cow::Borrowed("this is the referenced type")),
150-
},
150+
}],
151151
})
152152
}
153153
_ => None,

src/params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ pub fn prop_name_to_string(
324324
PropName::Num(num) => num.value.to_string(),
325325
PropName::BigInt(num) => num.value.to_string(),
326326
PropName::Computed(comp_prop_name) => comp_prop_name
327-
.text_fast(parsed_source.text_info())
327+
.text_fast(parsed_source.text_info_lazy())
328328
.to_string(),
329329
}
330330
}

src/util/swc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub(crate) fn module_js_doc_for_source(
9090
pub fn get_location(parsed_source: &ParsedSource, pos: SourcePos) -> Location {
9191
get_text_info_location(
9292
parsed_source.specifier().as_str(),
93-
parsed_source.text_info(),
93+
parsed_source.text_info_lazy(),
9494
pos,
9595
)
9696
}

tests/specs/Overloads.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ error[missing-jsdoc]: exported symbol is missing JSDoc documentation
1919
2 | export function a(b: number): number;
2020
| ^
2121

22-
2322
# output.txt
2423
Defined in file:///mod.ts:1:1
2524

tests/specs/abstract_class.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ error[missing-jsdoc]: exported symbol is missing JSDoc documentation
88
1 | export abstract class Class {}
99
| ^
1010

11-
1211
# output.txt
1312
Defined in file:///mod.ts:1:1
1413

tests/specs/abstract_class_abstract_method.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ error[missing-jsdoc]: exported symbol is missing JSDoc documentation
1717
2 | abstract method() {}
1818
| ^
1919

20-
2120
# output.txt
2221
Defined in file:///mod.ts:1:1
2322

tests/specs/class_async_method.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ error[missing-jsdoc]: exported symbol is missing JSDoc documentation
1717
2 | async amethod(v) {}
1818
| ^
1919

20-
2120
# output.txt
2221
Defined in file:///mod.ts:1:1
2322

tests/specs/class_constructor.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ error[missing-jsdoc]: exported symbol is missing JSDoc documentation
3333
2 | constructor(public a, readonly b) {
3434
| ^
3535

36-
3736
# output.txt
3837
Defined in file:///mod.ts:1:1
3938

tests/specs/class_declaration.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ error[missing-jsdoc]: exported symbol is missing JSDoc documentation
88
1 | export class Class {}
99
| ^
1010

11-
1211
# output.txt
1312
Defined in file:///mod.ts:1:1
1413

tests/specs/class_decorators.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ error[missing-return-type]: exported function is missing an explicit return type
5959
13 | @enumerable(false)
6060
| ^
6161

62-
6362
# output.txt
6463
Defined in file:///mod.ts:2:1
6564

tests/specs/class_details.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ error[missing-jsdoc]: exported symbol is missing JSDoc documentation
1919
4 | f: number;
2020
| ^
2121

22-
2322
# output.txt
2423
Defined in file:///mod.ts:1:1
2524

tests/specs/class_details_all_with_private.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ error[missing-jsdoc]: exported symbol is missing JSDoc documentation
3434
4 | public pub() {}
3535
| ^
3636

37-
3837
# output.txt
3938
Defined in file:///mod.ts:1:1
4039

tests/specs/class_details_only_non_private_without_private.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ error[missing-jsdoc]: exported symbol is missing JSDoc documentation
3333
4 | public pub() {}
3434
| ^
3535

36-
3736
# output.txt
3837
Defined in file:///mod.ts:1:1
3938

tests/specs/class_extends.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ error[missing-jsdoc]: exported symbol is missing JSDoc documentation
88
1 | export class Class extends Object {}
99
| ^
1010

11-
1211
# output.txt
1312
Defined in file:///mod.ts:1:1
1413

tests/specs/class_extends_implements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ error[missing-jsdoc]: exported symbol is missing JSDoc documentation
88
1 | export class Class extends Object implements Iterator, Iterable {}
99
| ^
1010

11-
1211
# output.txt
1312
Defined in file:///mod.ts:1:1
1413

tests/specs/class_generic_extends_implements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ error[missing-jsdoc]: exported symbol is missing JSDoc documentation
88
1 | export class Class<A, B> extends Map<A, B> implements Iterator<A>, Iterable<B> {}
99
| ^
1010

11-
1211
# output.txt
1312
Defined in file:///mod.ts:1:1
1413

0 commit comments

Comments
 (0)