Skip to content
Merged
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
785 changes: 434 additions & 351 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ harness = false
async-trait = "0.1.68"
capacity_builder = "0.5.0"
data-url = "0.3.0"
deno_ast = { version = "0.45.0", features = ["dep_analysis", "emit"] }
deno_ast = { version = "0.46.0", features = ["dep_analysis", "emit"] }
deno_media_type = { version = "0.2.4", features = ["decoding", "data_url", "module_specifier"] }
deno_unsync.workspace = true
deno_path_util = "0.3.0"
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.82.0"
channel = "1.85.0"
components = [ "clippy", "rustfmt" ]
6 changes: 3 additions & 3 deletions src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ impl<'a> CapturingEsParser<'a> {
}
}

impl<'a> EsParser for CapturingEsParser<'a> {
impl EsParser for CapturingEsParser<'_> {
fn parse_program(
&self,
options: ParseOptions,
Expand Down Expand Up @@ -333,7 +333,7 @@ impl<'a> ParserModuleAnalyzer<'a> {
}
}

impl<'a> Default for ParserModuleAnalyzer<'a> {
impl Default for ParserModuleAnalyzer<'_> {
fn default() -> Self {
Self {
parser: &DefaultEsParser,
Expand All @@ -342,7 +342,7 @@ impl<'a> Default for ParserModuleAnalyzer<'a> {
}

#[async_trait::async_trait(?Send)]
impl<'a> ModuleAnalyzer for ParserModuleAnalyzer<'a> {
impl ModuleAnalyzer for ParserModuleAnalyzer<'_> {
async fn analyze(
&self,
specifier: &deno_ast::ModuleSpecifier,
Expand Down
2 changes: 1 addition & 1 deletion src/fast_check/range_finder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ struct RegistryUrlConverter<'a> {
workspace_members: &'a [WorkspaceMember],
}

impl<'a> RegistryUrlConverter<'a> {
impl RegistryUrlConverter<'_> {
fn registry_package_url(&self, nv: &PackageNv) -> Url {
if let Some(member) = self.workspace_members.iter().find(|m| {
m.name == nv.name
Expand Down
5 changes: 3 additions & 2 deletions src/fast_check/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use deno_ast::swc::common::comments::SingleThreadedCommentsMapInner;
use deno_ast::swc::common::Spanned;
use deno_ast::swc::common::SyntaxContext;
use deno_ast::swc::common::DUMMY_SP;
use deno_ast::swc::visit::VisitWith;
use deno_ast::swc::ecma_visit::VisitWith;
use deno_ast::EmitOptions;
use deno_ast::ModuleSpecifier;
use deno_ast::MultiThreadedComments;
Expand Down Expand Up @@ -312,6 +312,7 @@ impl<'a> FastCheckTransformer<'a> {
span: DUMMY_SP,
declare: false,
global: false,
namespace: true,
id: TsModuleName::Ident(Ident::new(
swc_id.0,
DUMMY_SP,
Expand Down Expand Up @@ -360,7 +361,7 @@ impl<'a> FastCheckTransformer<'a> {
diagnostics: IndexMap<String, SourceRange>,
}

impl deno_ast::swc::visit::Visit for VisitExpandoPropInits<'_> {
impl deno_ast::swc::ecma_visit::Visit for VisitExpandoPropInits<'_> {
fn visit_ident(&mut self, ident: &Ident) {
let (name, context) = ident.to_id();
if context == self.parent_context && self.symbol.export(&name).is_some()
Expand Down
12 changes: 6 additions & 6 deletions src/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ pub struct JsonModule {
impl JsonModule {
/// Return the size in bytes of the content of the JSON module.
pub fn size(&self) -> usize {
self.source.as_bytes().len()
self.source.len()
}
}

Expand Down Expand Up @@ -1274,7 +1274,7 @@ pub struct BuildOptions<'a> {
pub resolver: Option<&'a dyn Resolver>,
}

impl<'a> Default for BuildOptions<'a> {
impl Default for BuildOptions<'_> {
fn default() -> Self {
Self {
is_dynamic: false,
Expand Down Expand Up @@ -1310,7 +1310,7 @@ pub enum CheckJsOption<'a> {
Custom(&'a dyn CheckJsResolver),
}

impl<'a> CheckJsOption<'a> {
impl CheckJsOption<'_> {
pub fn resolve(&self, specifier: &ModuleSpecifier) -> bool {
match self {
CheckJsOption::True => true,
Expand Down Expand Up @@ -1476,7 +1476,7 @@ impl<'a, 'options> ModuleEntryIterator<'a, 'options> {
}
}

impl<'a, 'options> Iterator for ModuleEntryIterator<'a, 'options> {
impl<'a> Iterator for ModuleEntryIterator<'a, '_> {
type Item = (&'a ModuleSpecifier, ModuleEntryRef<'a>);

fn next(&mut self) -> Option<Self::Item> {
Expand Down Expand Up @@ -1642,7 +1642,7 @@ impl<'a, 'options> ModuleGraphErrorIterator<'a, 'options> {
}
}

impl<'a, 'options> Iterator for ModuleGraphErrorIterator<'a, 'options> {
impl Iterator for ModuleGraphErrorIterator<'_, '_> {
type Item = ModuleGraphError;

fn next(&mut self) -> Option<Self::Item> {
Expand Down Expand Up @@ -1973,7 +1973,7 @@ impl ModuleGraph {
self
.module_slots
.get(specifier)
.map_or(false, |ms| matches!(ms, ModuleSlot::Module(_)))
.is_some_and(|ms| matches!(ms, ModuleSlot::Module(_)))
}

/// Returns any module errors found in the graph.
Expand Down
2 changes: 1 addition & 1 deletion src/symbols/analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,7 @@ struct SymbolFiller<'a> {
builder: &'a ModuleBuilder,
}

impl<'a> SymbolFiller<'a> {
impl SymbolFiller<'_> {
fn fill(&self, program: &Program) {
let module_symbol = self.builder.create_new_symbol_for_root();
module_symbol.add_decl(SymbolDecl::new(
Expand Down
4 changes: 2 additions & 2 deletions src/symbols/cross_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub struct Definition<'a> {
pub symbol_decl: &'a SymbolDecl,
}

impl<'a> Definition<'a> {
impl Definition<'_> {
pub fn range(&self) -> &SourceRange {
&self.symbol_decl.range
}
Expand Down Expand Up @@ -754,7 +754,7 @@ pub struct ResolvedReExportAllPath<'a> {
pub next: Box<ResolvedExportOrReExportAllPath<'a>>,
}

impl<'a> ResolvedReExportAllPath<'a> {
impl ResolvedReExportAllPath<'_> {
pub fn resolved_module(&self) -> ModuleInfoRef {
match &*self.next {
ResolvedExportOrReExportAllPath::Export(e) => e.module,
Expand Down
4 changes: 2 additions & 2 deletions src/symbols/dep_analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ use deno_ast::swc::ast::TsTypeParam;
use deno_ast::swc::ast::TsTypeParamDecl;
use deno_ast::swc::ast::TsTypeParamInstantiation;
use deno_ast::swc::ast::VarDeclarator;
use deno_ast::swc::visit::Visit;
use deno_ast::swc::visit::VisitWith;
use deno_ast::swc::ecma_visit::Visit;
use deno_ast::swc::ecma_visit::VisitWith;

use super::swc_helpers::ts_entity_name_to_parts;
use super::swc_helpers::ts_qualified_name_parts;
Expand Down
212 changes: 1 addition & 211 deletions tests/specs/ecosystem/bureaudouble/bureau/0_0_70.test
Original file line number Diff line number Diff line change
Expand Up @@ -783,214 +783,4 @@ bureaudouble/bureau/0.0.70

== FAST CHECK EMIT PASSED ==

== TYPE CHECK FAILED ==
-- stdout --

-- stderr --
TS2503 [ERROR]: Cannot find namespace 'JSX'.
export const CustomInput = ({}: CustomInputProps): JSX.Element =>({} as never);
~~~
at file://<tmpdir>/src/components/CustomInput.tsx:16:52

TS2503 [ERROR]: Cannot find namespace 'JSX'.
export default <TData = Record<string, unknown>>({}: DataTableProps<TData>): JSX.Element =>({} as never);
~~~
at file://<tmpdir>/src/components/DataTable.tsx:20:78

TS2503 [ERROR]: Cannot find namespace 'JSX'.
}): JSX.Element =>({} as never);
~~~
at file://<tmpdir>/src/components/Media.tsx:18:5

TS2503 [ERROR]: Cannot find namespace 'JSX'.
}): JSX.Element =>({} as never);
~~~
at file://<tmpdir>/src/components/SqlInput.tsx:10:5

TS2503 [ERROR]: Cannot find namespace 'JSX'.
}): JSX.Element {
~~~
at file://<tmpdir>/src/components/bureau-ui/combobox.tsx:16:5

TS2304 [ERROR]: Cannot find name 'HTMLButtonElement'.
at file://<tmpdir>/src/components/bureau-ui/integer-switch.tsx:6:117

TS2304 [ERROR]: Cannot find name 'HTMLButtonElement'.
at file://<tmpdir>/src/components/bureau-ui/integer-switch.tsx:6:166

TS2503 [ERROR]: Cannot find namespace 'JSX'.
export function Editor({}: EditorProps): JSX.Element {
~~~
at file://<tmpdir>/src/components/editor/Editor.tsx:8:42

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:15:131

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:15:177

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:16:131

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:16:177

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) : JSX.Element;
~~~~~~~~~~~~~~
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:18:50

TS2503 [ERROR]: Cannot find namespace 'JSX'.
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) : JSX.Element;
~~~
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:18:69

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) : JSX.Element;
~~~~~~~~~~~~~~
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:22:50

TS2503 [ERROR]: Cannot find namespace 'JSX'.
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) : JSX.Element;
~~~
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:22:69

TS2304 [ERROR]: Cannot find name 'HTMLHeadingElement'.
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:25:127

TS2304 [ERROR]: Cannot find name 'HTMLHeadingElement'.
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:25:177

TS2304 [ERROR]: Cannot find name 'HTMLParagraphElement'.
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:26:139

TS2304 [ERROR]: Cannot find name 'HTMLParagraphElement'.
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:26:191

TS2304 [ERROR]: Cannot find name 'HTMLButtonElement'.
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:27:129

TS2304 [ERROR]: Cannot find name 'HTMLButtonElement'.
}> & ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>> = {} as never;
~~~~~~~~~~~~~~~~~
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:42:63

TS2304 [ERROR]: Cannot find name 'HTMLButtonElement'.
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:43:129

TS2304 [ERROR]: Cannot find name 'HTMLButtonElement'.
at file://<tmpdir>/src/components/ui/alert-dialog.tsx:43:178

TS2304 [ERROR]: Cannot find name 'HTMLButtonElement'.
at file://<tmpdir>/src/components/ui/checkbox.tsx:6:108

TS2304 [ERROR]: Cannot find name 'HTMLButtonElement'.
at file://<tmpdir>/src/components/ui/checkbox.tsx:6:157

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:12:140

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
} & React.RefAttributes<HTMLDivElement>> = {} as never;
~~~~~~~~~~~~~~
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:14:25

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:15:140

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:15:186

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:16:134

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:16:180

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:17:128

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
} & React.RefAttributes<HTMLDivElement>> = {} as never;
~~~~~~~~~~~~~~
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:19:25

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:20:144

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:20:190

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:21:138

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:21:184

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:22:130

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
} & React.RefAttributes<HTMLDivElement>> = {} as never;
~~~~~~~~~~~~~~
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:24:25

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:25:138

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:25:184

TS2304 [ERROR]: Cannot find name 'HTMLSpanElement'.
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) : JSX.Element;
~~~~~~~~~~~~~~~
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:27:50

TS2503 [ERROR]: Cannot find namespace 'JSX'.
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) : JSX.Element;
~~~
at file://<tmpdir>/src/components/ui/dropdown-menu.tsx:27:70

TS2503 [ERROR]: Cannot find namespace 'React'.
type ToasterProps = React.ComponentProps<typeof Sonner>;
~~~~~
at file://<tmpdir>/src/components/ui/sonner.tsx:5:21

TS2503 [ERROR]: Cannot find namespace 'JSX'.
const Toaster = ({}: ToasterProps): JSX.Element =>({} as never);
~~~
at file://<tmpdir>/src/components/ui/sonner.tsx:6:37

TS2503 [ERROR]: Cannot find namespace 'JSX'.
}): JSX.Element =>({} as never);
~~~
at file://<tmpdir>/src/components/ui/sonner.tsx:9:5

TS2304 [ERROR]: Cannot find name 'HTMLButtonElement'.
at file://<tmpdir>/src/components/ui/switch.tsx:3:103

TS2304 [ERROR]: Cannot find name 'HTMLButtonElement'.
at file://<tmpdir>/src/components/ui/switch.tsx:3:152

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/tabs.tsx:7:104

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/tabs.tsx:7:150

TS2304 [ERROR]: Cannot find name 'HTMLButtonElement'.
at file://<tmpdir>/src/components/ui/tabs.tsx:8:110

TS2304 [ERROR]: Cannot find name 'HTMLButtonElement'.
at file://<tmpdir>/src/components/ui/tabs.tsx:8:159

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/tabs.tsx:9:110

TS2304 [ERROR]: Cannot find name 'HTMLDivElement'.
at file://<tmpdir>/src/components/ui/tabs.tsx:9:156

Found 55 errors.

error: Type checking failed.

== TYPE CHECK PASSED ==
Loading
Loading