From 0d33ba31c4c914bb79064e626a2a4fbc684e1a5f Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Mon, 17 Mar 2025 08:19:24 +0000 Subject: [PATCH 01/22] refactor(ast_tools): pass `Codegen` to `prepare` methods (#9818) Pure refactor. In `oxc_ast_tools`, pass `&Codegen` to `prepare` method of `Derive`s and `Generator`s. This is preparation for changes to come to `ESTree` generator. --- tasks/ast_tools/src/codegen.rs | 6 +++--- tasks/ast_tools/src/derives/mod.rs | 2 +- tasks/ast_tools/src/generators/assert_layouts.rs | 2 +- tasks/ast_tools/src/generators/ast_kind.rs | 2 +- tasks/ast_tools/src/generators/mod.rs | 2 +- tasks/ast_tools/src/generators/visit.rs | 2 +- tasks/ast_tools/src/main.rs | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tasks/ast_tools/src/codegen.rs b/tasks/ast_tools/src/codegen.rs index bc7ac43285dd8..dee8a20f058c2 100644 --- a/tasks/ast_tools/src/codegen.rs +++ b/tasks/ast_tools/src/codegen.rs @@ -112,10 +112,10 @@ pub enum GeneratorOrDerive { impl GeneratorOrDerive { /// Execute `prepare` method on the [`Generator`] or [`Derive`]. - pub fn prepare(self, schema: &mut Schema) { + pub fn prepare(self, schema: &mut Schema, codegen: &Codegen) { match self { - Self::Generator(generator) => generator.prepare(schema), - Self::Derive(derive) => derive.prepare(schema), + Self::Generator(generator) => generator.prepare(schema, codegen), + Self::Derive(derive) => derive.prepare(schema, codegen), } } diff --git a/tasks/ast_tools/src/derives/mod.rs b/tasks/ast_tools/src/derives/mod.rs index 3730d6467eb13..dd190941ed6e4 100644 --- a/tasks/ast_tools/src/derives/mod.rs +++ b/tasks/ast_tools/src/derives/mod.rs @@ -132,7 +132,7 @@ pub trait Derive: Runner { /// /// Runs before any `generate` or `derive` method runs. #[expect(unused_variables)] - fn prepare(&self, schema: &mut Schema) {} + fn prepare(&self, schema: &mut Schema, codegen: &Codegen) {} /// Generate trait implementation for a type. fn derive(&self, type_def: StructOrEnum<'_>, schema: &Schema) -> TokenStream; diff --git a/tasks/ast_tools/src/generators/assert_layouts.rs b/tasks/ast_tools/src/generators/assert_layouts.rs index 0824e7b41448a..492c2bdba0c65 100644 --- a/tasks/ast_tools/src/generators/assert_layouts.rs +++ b/tasks/ast_tools/src/generators/assert_layouts.rs @@ -34,7 +34,7 @@ define_generator!(AssertLayouts); impl Generator for AssertLayouts { /// Calculate layouts of all types. - fn prepare(&self, schema: &mut Schema) { + fn prepare(&self, schema: &mut Schema, _codegen: &Codegen) { for type_id in schema.types.indices() { calculate_layout(type_id, schema); } diff --git a/tasks/ast_tools/src/generators/ast_kind.rs b/tasks/ast_tools/src/generators/ast_kind.rs index bc66cee53c2fe..4ca6d58b09176 100644 --- a/tasks/ast_tools/src/generators/ast_kind.rs +++ b/tasks/ast_tools/src/generators/ast_kind.rs @@ -96,7 +96,7 @@ define_generator!(AstKindGenerator); impl Generator for AstKindGenerator { /// Set `has_kind` for structs and enums which are visited, and not on blacklist. - fn prepare(&self, schema: &mut Schema) { + fn prepare(&self, schema: &mut Schema, _codegen: &Codegen) { // Set `has_kind` to `true` for all visited types for type_def in &mut schema.types { match type_def { diff --git a/tasks/ast_tools/src/generators/mod.rs b/tasks/ast_tools/src/generators/mod.rs index 83bd7bd818382..6bb1af03544b9 100644 --- a/tasks/ast_tools/src/generators/mod.rs +++ b/tasks/ast_tools/src/generators/mod.rs @@ -99,7 +99,7 @@ pub trait Generator: Runner { /// /// Runs before any `generate` or `derive` method runs. #[expect(unused_variables)] - fn prepare(&self, schema: &mut Schema) {} + fn prepare(&self, schema: &mut Schema, codegen: &Codegen) {} /// Generate single output. #[expect(unused_variables, clippy::unimplemented)] diff --git a/tasks/ast_tools/src/generators/visit.rs b/tasks/ast_tools/src/generators/visit.rs index 98c772c847ff1..3fcfb61ecf739 100644 --- a/tasks/ast_tools/src/generators/visit.rs +++ b/tasks/ast_tools/src/generators/visit.rs @@ -45,7 +45,7 @@ impl Generator for VisitGenerator { /// Create names for `visit_*` methods and `walk_*` functions for all `Vec`s /// whose inner type has a visitor. - fn prepare(&self, schema: &mut Schema) { + fn prepare(&self, schema: &mut Schema, _codegen: &Codegen) { for type_id in schema.types.indices() { let Some(vec_def) = schema.types[type_id].as_vec() else { continue }; diff --git a/tasks/ast_tools/src/main.rs b/tasks/ast_tools/src/main.rs index 64796fb320361..e354fee28229c 100644 --- a/tasks/ast_tools/src/main.rs +++ b/tasks/ast_tools/src/main.rs @@ -300,7 +300,7 @@ fn main() { // Run `prepare` actions let runners = get_runners(); for runner in &runners { - runner.prepare(&mut schema); + runner.prepare(&mut schema, &codegen); } // Run generators From 158cdb9da958f89d75ac97b14ecff64bc60df915 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Mon, 17 Mar 2025 08:26:26 +0000 Subject: [PATCH 02/22] feat(ast_tools/estree): check no repeated field names in `#[estree(field_order)]` attrs (#9819) `ESTree` generator error if same field name is repeated twice in an `#[estree(field_order(...))]` attribute. --- tasks/ast_tools/src/derives/estree.rs | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/tasks/ast_tools/src/derives/estree.rs b/tasks/ast_tools/src/derives/estree.rs index b03544c7e1af1..3cd4e3ebcd8a6 100644 --- a/tasks/ast_tools/src/derives/estree.rs +++ b/tasks/ast_tools/src/derives/estree.rs @@ -100,18 +100,21 @@ fn parse_estree_attr(location: AttrLocation, part: AttrPart) -> Result<()> { // Convert field names to indexes. // Added fields (`#[estree(add_fields(...))]`) get indexes after the real fields. - let field_indices = list - .into_iter() - .map(|list_element| { - let field_name = list_element.try_into_tag()?; - let field_name = field_name.trim_start_matches("r#"); - all_field_names - .clone() - .position(|this_field_name| this_field_name == field_name) - .map(|index| u8::try_from(index).map_err(|_| ())) - .ok_or(())? - }) - .collect::>>()?; + // Error if same field name included more than once. + let mut field_indices = vec![]; + for list_element in list { + let field_name = list_element.try_into_tag()?; + let field_name = field_name.trim_start_matches("r#"); + let field_index = all_field_names + .clone() + .position(|this_field_name| this_field_name == field_name) + .ok_or(())?; + let field_index = u8::try_from(field_index).map_err(|_| ())?; + if field_indices.contains(&field_index) { + return Err(()); + } + field_indices.push(field_index); + } struct_def.estree.field_indices = Some(field_indices); } AttrPart::String("ts_alias", value) => struct_def.estree.ts_alias = Some(value), From db946e6dc9aadf0c5ffb57d8c24bf855a7b0c2e9 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Mon, 17 Mar 2025 08:26:26 +0000 Subject: [PATCH 03/22] feat(ast/estree): order TS fields last by default (#9820) `ESTree` generator order fields marked `#[ts]` last by default. This behavior can be overridden if required with `#[estree(field_order)]`. --- crates/oxc_ast/src/ast/js.rs | 2 +- crates/oxc_ast/src/generated/derive_estree.rs | 4 +- napi/parser/deserialize-ts.js | 4 +- npm/oxc-types/types.d.ts | 4 +- tasks/ast_tools/src/derives/estree.rs | 108 +++++++++++++++--- .../ast_tools/src/generators/raw_transfer.rs | 29 +---- tasks/ast_tools/src/generators/typescript.rs | 36 +----- .../ast_tools/src/schema/extensions/estree.rs | 2 +- 8 files changed, 109 insertions(+), 80 deletions(-) diff --git a/crates/oxc_ast/src/ast/js.rs b/crates/oxc_ast/src/ast/js.rs index ea86610efb7da..d2c73eae3d148 100644 --- a/crates/oxc_ast/src/ast/js.rs +++ b/crates/oxc_ast/src/ast/js.rs @@ -1755,7 +1755,7 @@ pub struct FormalParameters<'a> { #[generate_derive(CloneIn, GetSpan, GetSpanMut, ContentEq, ESTree)] // Pluralize as `FormalParameterList` to avoid naming clash with `FormalParameters`. #[plural(FormalParameterList)] -#[estree(no_type, field_order(pattern, decorators, accessibility, readonly, r#override))] +#[estree(no_type)] pub struct FormalParameter<'a> { #[estree(skip)] pub span: Span, diff --git a/crates/oxc_ast/src/generated/derive_estree.rs b/crates/oxc_ast/src/generated/derive_estree.rs index 576497bdd5851..19e436419c7ed 100644 --- a/crates/oxc_ast/src/generated/derive_estree.rs +++ b/crates/oxc_ast/src/generated/derive_estree.rs @@ -406,9 +406,9 @@ impl ESTree for CallExpression<'_> { state.serialize_field("start", &self.span.start); state.serialize_field("end", &self.span.end); state.serialize_field("callee", &self.callee); - state.serialize_ts_field("typeParameters", &self.type_parameters); state.serialize_field("arguments", &self.arguments); state.serialize_field("optional", &self.optional); + state.serialize_ts_field("typeParameters", &self.type_parameters); state.end(); } } @@ -1749,11 +1749,11 @@ impl ESTree for ExportNamedDeclaration<'_> { state.serialize_field("declaration", &self.declaration); state.serialize_field("specifiers", &self.specifiers); state.serialize_field("source", &self.source); - state.serialize_ts_field("exportKind", &self.export_kind); state.serialize_field( "attributes", &crate::serialize::ExportNamedDeclarationWithClause(self), ); + state.serialize_ts_field("exportKind", &self.export_kind); state.end(); } } diff --git a/napi/parser/deserialize-ts.js b/napi/parser/deserialize-ts.js index 2932bfd02771c..03b0e38987bf3 100644 --- a/napi/parser/deserialize-ts.js +++ b/napi/parser/deserialize-ts.js @@ -207,9 +207,9 @@ function deserializeCallExpression(pos) { start: deserializeU32(pos), end: deserializeU32(pos + 4), callee: deserializeExpression(pos + 8), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), arguments: deserializeVecArgument(pos + 32), optional: deserializeBool(pos + 64), + typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), }; } @@ -1024,8 +1024,8 @@ function deserializeExportNamedDeclaration(pos) { declaration: deserializeOptionDeclaration(pos + 8), specifiers: deserializeVecExportSpecifier(pos + 24), source: deserializeOptionStringLiteral(pos + 56), - exportKind: deserializeImportOrExportKind(pos + 96), attributes: withClause === null ? [] : withClause.withEntries, + exportKind: deserializeImportOrExportKind(pos + 96), }; } diff --git a/npm/oxc-types/types.d.ts b/npm/oxc-types/types.d.ts index fdb4631a2ec66..327c05d83b76b 100644 --- a/npm/oxc-types/types.d.ts +++ b/npm/oxc-types/types.d.ts @@ -156,9 +156,9 @@ export interface PrivateFieldExpression extends Span { export interface CallExpression extends Span { type: 'CallExpression'; callee: Expression; - typeParameters: TSTypeParameterInstantiation | null; arguments: Array; optional: boolean; + typeParameters: TSTypeParameterInstantiation | null; } export interface NewExpression extends Span { @@ -731,8 +731,8 @@ export interface ExportNamedDeclaration extends Span { declaration: Declaration | null; specifiers: Array; source: StringLiteral | null; - exportKind: ImportOrExportKind; attributes: Array; + exportKind: ImportOrExportKind; } export interface ExportDefaultDeclaration extends Span { diff --git a/tasks/ast_tools/src/derives/estree.rs b/tasks/ast_tools/src/derives/estree.rs index 3cd4e3ebcd8a6..1682fb30bd9e6 100644 --- a/tasks/ast_tools/src/derives/estree.rs +++ b/tasks/ast_tools/src/derives/estree.rs @@ -7,6 +7,7 @@ use quote::quote; use crate::{ Result, + codegen::{Codegen, DeriveId}, schema::{Def, EnumDef, FieldDef, File, Schema, StructDef, TypeDef, VariantDef, Visibility}, utils::create_safe_ident, }; @@ -58,6 +59,12 @@ impl Derive for DeriveESTree { } } + /// Initialize `estree.field_order` on structs. + fn prepare(&self, schema: &mut Schema, codegen: &Codegen) { + let derive_id = codegen.get_derive_id_by_name(self.trait_name()); + prepare_field_orders(schema, derive_id); + } + fn prelude(&self) -> TokenStream { quote! { #![allow(unused_imports, clippy::match_same_arms, clippy::semicolon_if_nothing_returned)] @@ -115,7 +122,7 @@ fn parse_estree_attr(location: AttrLocation, part: AttrPart) -> Result<()> { } field_indices.push(field_index); } - struct_def.estree.field_indices = Some(field_indices); + struct_def.estree.field_indices = field_indices; } AttrPart::String("ts_alias", value) => struct_def.estree.ts_alias = Some(value), AttrPart::String("add_ts_def", value) => struct_def.estree.add_ts_def = Some(value), @@ -215,6 +222,81 @@ fn parse_ts_attr(location: AttrLocation, part: &AttrPart) -> Result<()> { Ok(()) } +/// Initialize `estree.field_order` on all structs. +fn prepare_field_orders(schema: &mut Schema, estree_derive_id: DeriveId) { + // Note: Outside the loop to avoid allocating temporary `Vec`s on each turn of the loop. + // Instead, reuse this `Vec` over and over. + let mut field_indices_temp = vec![]; + + for type_id in schema.types.indices() { + let Some(struct_def) = schema.types[type_id].as_struct() else { continue }; + if !struct_def.generates_derive(estree_derive_id) { + continue; + } + + if struct_def.estree.field_indices.is_empty() { + // No field order specified with `#[estree(field_order(...))]`. + // Set default order: + // 1. Fields without `#[ts]` attr, in definition order. + // 2. Fields with `#[ts]` attr, in definition order. + // 3. Added fields `#[estree(add_fields(...)]`, in definition order. + let mut field_indices = vec![]; + let ts_field_indices = &mut field_indices_temp; + for (field_index, field) in struct_def.fields.iter().enumerate() { + if !should_skip_field(field, schema) { + let field_index = u8::try_from(field_index).unwrap(); + if field.estree.is_ts { + ts_field_indices.push(field_index); + } else { + field_indices.push(field_index); + } + } + } + field_indices.append(ts_field_indices); + + let fields_len = struct_def.fields.len(); + for (index, _) in struct_def.estree.add_fields.iter().enumerate() { + let field_index = u8::try_from(fields_len + index).unwrap(); + field_indices.push(field_index); + } + + let struct_def = schema.struct_def_mut(type_id); + struct_def.estree.field_indices = field_indices; + } else { + // Custom field order specified with `#[estree(field_order(...))]`. + // Verify does not miss any fields, no fields marked `#[estree(skip)]` are included. + let unskipped_field_indices = &mut field_indices_temp; + for (field_index, field) in struct_def.fields.iter().enumerate() { + if !should_skip_field(field, schema) { + let field_index = u8::try_from(field_index).unwrap(); + unskipped_field_indices.push(field_index); + } + } + + let fields_len = struct_def.fields.len(); + for &field_index in &struct_def.estree.field_indices { + if (field_index as usize) < fields_len { + assert!( + unskipped_field_indices.contains(&field_index), + "Skipped field `{}` included in `#[estree(field_order)]`: `{}`", + struct_def.fields[field_index as usize].name(), + struct_def.name() + ); + } + } + + assert!( + struct_def.estree.field_indices.len() + == unskipped_field_indices.len() + struct_def.estree.add_fields.len(), + "`#[estree(field_order)]` misses fields: `{}`", + struct_def.name() + ); + + unskipped_field_indices.clear(); + } + } +} + /// Generate implementation of `ESTree` for a struct or enum. fn generate_impl_for_type(type_def: StructOrEnum, schema: &Schema) -> TokenStream { let body = match type_def { @@ -294,25 +376,13 @@ impl<'s> StructSerializerGenerator<'s> { /// Generate code to serialize all fields in a struct. fn generate_stmts_for_struct(&mut self, struct_def: &StructDef, self_path: &TokenStream) { - if let Some(field_indices) = &struct_def.estree.field_indices { - // Specified field order - serialize in this order - for &field_index in field_indices { - let field_index = field_index as usize; - if let Some(field) = struct_def.fields.get(field_index) { - self.generate_stmts_for_field(field, struct_def, self_path); - } else { - let (field_name, converter_name) = - &struct_def.estree.add_fields[field_index - struct_def.fields.len()]; - self.generate_stmt_for_added_field(field_name, converter_name, self_path); - } - } - } else { - // No specified field order - serialize in original order - for field in &struct_def.fields { + for &field_index in &struct_def.estree.field_indices { + let field_index = field_index as usize; + if let Some(field) = struct_def.fields.get(field_index) { self.generate_stmts_for_field(field, struct_def, self_path); - } - - for (field_name, converter_name) in &struct_def.estree.add_fields { + } else { + let (field_name, converter_name) = + &struct_def.estree.add_fields[field_index - struct_def.fields.len()]; self.generate_stmt_for_added_field(field_name, converter_name, self_path); } } diff --git a/tasks/ast_tools/src/generators/raw_transfer.rs b/tasks/ast_tools/src/generators/raw_transfer.rs index 0cdde1d864919..5d39332089d2c 100644 --- a/tasks/ast_tools/src/generators/raw_transfer.rs +++ b/tasks/ast_tools/src/generators/raw_transfer.rs @@ -236,30 +236,13 @@ impl<'s> StructDeserializerGenerator<'s> { } fn generate_struct_fields(&mut self, struct_def: &StructDef, struct_offset: u32) { - if let Some(field_indices) = &struct_def.estree.field_indices { - // Specified field order - serialize in this order - for &field_index in field_indices { - let field_index = field_index as usize; - if let Some(field) = struct_def.fields.get(field_index) { - self.generate_struct_field_owned(field, struct_def, struct_offset); - } else { - let (field_name, converter_name) = - &struct_def.estree.add_fields[field_index - struct_def.fields.len()]; - self.generate_struct_field_added( - struct_def, - field_name, - converter_name, - struct_offset, - ); - } - } - } else { - // No specified field order - serialize in original order - for field in &struct_def.fields { + for &field_index in &struct_def.estree.field_indices { + let field_index = field_index as usize; + if let Some(field) = struct_def.fields.get(field_index) { self.generate_struct_field_owned(field, struct_def, struct_offset); - } - - for (field_name, converter_name) in &struct_def.estree.add_fields { + } else { + let (field_name, converter_name) = + &struct_def.estree.add_fields[field_index - struct_def.fields.len()]; self.generate_struct_field_added( struct_def, field_name, diff --git a/tasks/ast_tools/src/generators/typescript.rs b/tasks/ast_tools/src/generators/typescript.rs index cccb010b0e2e2..32a52030902f2 100644 --- a/tasks/ast_tools/src/generators/typescript.rs +++ b/tasks/ast_tools/src/generators/typescript.rs @@ -125,33 +125,9 @@ fn generate_ts_type_def_for_struct( let mut output_as_type = false; - if let Some(field_indices) = &struct_def.estree.field_indices { - // Specified field order - output in this order - for &field_index in field_indices { - let field_index = field_index as usize; - if let Some(field) = struct_def.fields.get(field_index) { - generate_ts_type_def_for_struct_field( - struct_def, - field, - &mut fields_str, - &mut extends, - &mut output_as_type, - schema, - ); - } else { - let (field_name, converter_name) = - &struct_def.estree.add_fields[field_index - struct_def.fields.len()]; - generate_ts_type_def_for_added_struct_field( - field_name, - converter_name, - &mut fields_str, - schema, - ); - } - } - } else { - // No specified field order - output in original order - for field in &struct_def.fields { + for &field_index in &struct_def.estree.field_indices { + let field_index = field_index as usize; + if let Some(field) = struct_def.fields.get(field_index) { generate_ts_type_def_for_struct_field( struct_def, field, @@ -160,9 +136,9 @@ fn generate_ts_type_def_for_struct( &mut output_as_type, schema, ); - } - - for (field_name, converter_name) in &struct_def.estree.add_fields { + } else { + let (field_name, converter_name) = + &struct_def.estree.add_fields[field_index - struct_def.fields.len()]; generate_ts_type_def_for_added_struct_field( field_name, converter_name, diff --git a/tasks/ast_tools/src/schema/extensions/estree.rs b/tasks/ast_tools/src/schema/extensions/estree.rs index 8843ad508e262..efe6f1faaaa37 100644 --- a/tasks/ast_tools/src/schema/extensions/estree.rs +++ b/tasks/ast_tools/src/schema/extensions/estree.rs @@ -15,7 +15,7 @@ pub struct ESTreeStruct { /// * Actual struct field: index of the field. /// * Added field: `struct_def.fields.len() + added_field_index`. /// Does not include `type` field, if it's automatically added. - pub field_indices: Option>, + pub field_indices: Vec, /// TS alias. /// e.g. `#[estree(ts_alias = "null")]` means this type won't have a type def generated, /// and any struct / enum referencing it will substitute `null` as the type. From c81b29b3abd0dd80fd56babe172bb318c4d8d1df Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 16:50:37 +0800 Subject: [PATCH 04/22] chore(deps): lock file maintenance npm packages (#9812) --- editors/vscode/package.json | 2 +- package.json | 2 +- pnpm-lock.yaml | 1390 ++++++++--------- pnpm-workspace.yaml | 4 +- .../snapshots/babel_exec.snap.md | 12 +- .../snapshots/oxc_exec.snap.md | 4 +- 6 files changed, 707 insertions(+), 707 deletions(-) diff --git a/editors/vscode/package.json b/editors/vscode/package.json index 11ffaf7ff137e..81809d0fa0b40 100644 --- a/editors/vscode/package.json +++ b/editors/vscode/package.json @@ -153,7 +153,7 @@ "cross-env": "^7.0.3", "esbuild": "^0.25.0", "ovsx": "^0.10.0", - "oxlint": "^0.15.0", + "oxlint": "^0.16.0", "typescript": "^5.4.5" }, "dependencies": { diff --git a/package.json b/package.json index e2f8be30339c5..d260f1df85b42 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "oxc", "private": true, - "packageManager": "pnpm@10.5.2", + "packageManager": "pnpm@10.6.3", "volta": { "node": "22.14.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0185a78a5a1b4..e7da1b9aba8c9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,14 +7,14 @@ settings: catalogs: default: '@napi-rs/cli': - specifier: 3.0.0-alpha.73 - version: 3.0.0-alpha.73 + specifier: 3.0.0-alpha.75 + version: 3.0.0-alpha.75 typescript: specifier: 5.8.2 version: 5.8.2 vitest: - specifier: 3.0.7 - version: 3.0.7 + specifier: 3.0.8 + version: 3.0.8 importers: @@ -22,7 +22,7 @@ importers: devDependencies: '@napi-rs/cli': specifier: 'catalog:' - version: 3.0.0-alpha.73(@emnapi/runtime@1.3.1)(@types/node@22.13.8)(emnapi@1.3.1) + version: 3.0.0-alpha.75(@emnapi/runtime@1.3.1)(@types/node@22.13.10)(emnapi@1.3.1) emnapi: specifier: 1.3.1 version: 1.3.1 @@ -31,7 +31,7 @@ importers: version: 5.8.2 vitest: specifier: 'catalog:' - version: 3.0.7(@types/node@22.13.8)(terser@5.39.0) + version: 3.0.8(@types/node@22.13.10)(terser@5.39.0) editors/vscode: dependencies: @@ -44,7 +44,7 @@ importers: version: 10.0.10 '@types/node': specifier: ^22.0.0 - version: 22.13.8 + version: 22.13.10 '@types/vscode': specifier: 1.93.0 version: 1.93.0 @@ -56,19 +56,19 @@ importers: version: 2.4.1 '@vscode/vsce': specifier: ^3.0.0 - version: 3.2.2 + version: 3.3.0 cross-env: specifier: ^7.0.3 version: 7.0.3 esbuild: specifier: ^0.25.0 - version: 0.25.0 + version: 0.25.1 ovsx: specifier: ^0.10.0 version: 0.10.1 oxlint: - specifier: ^0.15.0 - version: 0.15.12 + specifier: ^0.16.0 + version: 0.16.0 typescript: specifier: ^5.4.5 version: 5.8.2 @@ -77,7 +77,7 @@ importers: devDependencies: vitest: specifier: 'catalog:' - version: 3.0.7(@types/node@22.13.8)(terser@5.39.0) + version: 3.0.8(@types/node@22.13.10)(terser@5.39.0) napi/parser: dependencies: @@ -87,16 +87,16 @@ importers: devDependencies: '@codspeed/vitest-plugin': specifier: ^4.0.0 - version: 4.0.0(vite@6.2.0(@types/node@22.13.8)(terser@5.39.0))(vitest@3.0.7(@types/node@22.13.8)(terser@5.39.0)) + version: 4.0.0(vite@6.2.2(@types/node@22.13.10)(terser@5.39.0))(vitest@3.0.8(@types/node@22.13.10)(terser@5.39.0)) vitest: specifier: 'catalog:' - version: 3.0.7(@types/node@22.13.8)(terser@5.39.0) + version: 3.0.8(@types/node@22.13.10)(terser@5.39.0) napi/transform: devDependencies: vitest: specifier: 'catalog:' - version: 3.0.7(@types/node@22.13.8)(terser@5.39.0) + version: 3.0.8(@types/node@22.13.10)(terser@5.39.0) npm/oxc-types: {} @@ -126,7 +126,7 @@ importers: devDependencies: antd: specifier: ^5.23.1 - version: 5.24.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + version: 5.24.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) fs-require: specifier: ^1.6.0 version: 1.6.0 @@ -156,47 +156,47 @@ importers: dependencies: '@babel/plugin-transform-typescript': specifier: ^7.26.3 - version: 7.26.8(@babel/core@7.26.9) + version: 7.26.8(@babel/core@7.26.10) devDependencies: '@babel/core': specifier: ^7.26.0 - version: 7.26.9 + version: 7.26.10 '@babel/plugin-external-helpers': specifier: ^7.25.9 - version: 7.25.9(@babel/core@7.26.9) + version: 7.25.9(@babel/core@7.26.10) '@babel/plugin-proposal-decorators': specifier: ^7.25.9 - version: 7.25.9(@babel/core@7.26.9) + version: 7.25.9(@babel/core@7.26.10) '@babel/plugin-proposal-explicit-resource-management': specifier: ^7.25.9 - version: 7.25.9(@babel/core@7.26.9) + version: 7.25.9(@babel/core@7.26.10) '@babel/plugin-transform-arrow-functions': specifier: ^7.25.9 - version: 7.25.9(@babel/core@7.26.9) + version: 7.25.9(@babel/core@7.26.10) '@babel/plugin-transform-async-to-generator': specifier: ^7.25.9 - version: 7.25.9(@babel/core@7.26.9) + version: 7.25.9(@babel/core@7.26.10) '@babel/plugin-transform-class-properties': specifier: ^7.25.9 - version: 7.25.9(@babel/core@7.26.9) + version: 7.25.9(@babel/core@7.26.10) '@babel/plugin-transform-class-static-block': specifier: ^7.26.0 - version: 7.26.0(@babel/core@7.26.9) + version: 7.26.0(@babel/core@7.26.10) '@babel/plugin-transform-exponentiation-operator': specifier: ^7.25.9 - version: 7.26.3(@babel/core@7.26.9) + version: 7.26.3(@babel/core@7.26.10) '@babel/plugin-transform-logical-assignment-operators': specifier: ^7.25.9 - version: 7.25.9(@babel/core@7.26.9) + version: 7.25.9(@babel/core@7.26.10) '@babel/plugin-transform-optional-chaining': specifier: ^7.25.9 - version: 7.25.9(@babel/core@7.26.9) + version: 7.25.9(@babel/core@7.26.10) '@babel/plugin-transform-private-methods': specifier: ^7.25.9 - version: 7.25.9(@babel/core@7.26.9) + version: 7.25.9(@babel/core@7.26.10) '@babel/plugin-transform-private-property-in-object': specifier: ^7.25.9 - version: 7.25.9(@babel/core@7.26.9) + version: 7.25.9(@babel/core@7.26.10) '@oxc-project/runtime': specifier: link:../../npm/runtime version: link:../../npm/runtime @@ -258,12 +258,12 @@ packages: resolution: {integrity: sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==} engines: {node: '>=18.0.0'} - '@azure/core-client@1.9.2': - resolution: {integrity: sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==} + '@azure/core-client@1.9.3': + resolution: {integrity: sha512-/wGw8fJ4mdpJ1Cum7s1S+VQyXt1ihwKLzfabS1O/RDADnmzVc01dHn44qD0BvGH6KlZNzOMW95tEpKqhkCChPA==} engines: {node: '>=18.0.0'} - '@azure/core-rest-pipeline@1.19.0': - resolution: {integrity: sha512-bM3308LRyg5g7r3Twprtqww0R/r7+GyVxj4BafcmVPo4WQoGt5JXuaqxHEFjw2o3rvFZcUPiqJMg6WuvEEeVUA==} + '@azure/core-rest-pipeline@1.19.1': + resolution: {integrity: sha512-zHeoI3NCs53lLBbWNzQycjnYKsA1CVKlnzSNuSFcUDwBp8HHVObePxrM7HaX+Ha5Ks639H7chNC9HOaIhNS03w==} engines: {node: '>=18.0.0'} '@azure/core-tracing@1.2.0': @@ -274,24 +274,24 @@ packages: resolution: {integrity: sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==} engines: {node: '>=18.0.0'} - '@azure/identity@4.7.0': - resolution: {integrity: sha512-6z/S2KorkbKaZ0DgZFVRdu7RCuATmMSTjKpuhj7YpjxkJ0vnJ7kTM3cpNgzFgk9OPYfZ31wrBEtC/iwAS4jQDA==} + '@azure/identity@4.8.0': + resolution: {integrity: sha512-l9ALUGHtFB/JfsqmA+9iYAp2a+cCwdNO/cyIr2y7nJLJsz1aae6qVP8XxT7Kbudg0IQRSIMXj0+iivFdbD1xPA==} engines: {node: '>=18.0.0'} '@azure/logger@1.1.4': resolution: {integrity: sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==} engines: {node: '>=18.0.0'} - '@azure/msal-browser@4.5.0': - resolution: {integrity: sha512-H7mWmu8yI0n0XxhJobrgncXI6IU5h8DKMiWDHL5y+Dc58cdg26GbmaMUehbUkdKAQV2OTiFa4FUa6Fdu/wIxBg==} + '@azure/msal-browser@4.7.0': + resolution: {integrity: sha512-H4AIPhIQVe1qW4+BJaitqod6UGQiXE3juj7q2ZBsOPjuZicQaqcbnBp2gCroF/icS0+TJ9rGuyCBJbjlAqVOGA==} engines: {node: '>=0.8.0'} - '@azure/msal-common@15.2.0': - resolution: {integrity: sha512-HiYfGAKthisUYqHG1nImCf/uzcyS31wng3o+CycWLIM9chnYJ9Lk6jZ30Y6YiYYpTQ9+z/FGUpiKKekd3Arc0A==} + '@azure/msal-common@15.2.1': + resolution: {integrity: sha512-eZHtYE5OHDN0o2NahCENkczQ6ffGc0MoUSAI3hpwGpZBHJXaEQMMZPWtIx86da2L9w7uT+Tr/xgJbGwIkvTZTQ==} engines: {node: '>=0.8.0'} - '@azure/msal-node@3.2.3': - resolution: {integrity: sha512-0eaPqBIWEAizeYiXdeHb09Iq0tvHJ17ztvNEaLdr/KcJJhJxbpkkEQf09DB+vKlFE0tzYi7j4rYLTXtES/InEQ==} + '@azure/msal-node@3.3.0': + resolution: {integrity: sha512-ulsT3EHF1RQ29X55cxBLgKsIKWni9JdbUqG7sipGVP4uhWcBpmm/vhKOMH340+27Acm9+kHGnN/5XmQ5LrIDgA==} engines: {node: '>=16'} '@babel/code-frame@7.26.2': @@ -302,12 +302,12 @@ packages: resolution: {integrity: sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==} engines: {node: '>=6.9.0'} - '@babel/core@7.26.9': - resolution: {integrity: sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==} + '@babel/core@7.26.10': + resolution: {integrity: sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==} engines: {node: '>=6.9.0'} - '@babel/generator@7.26.9': - resolution: {integrity: sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==} + '@babel/generator@7.26.10': + resolution: {integrity: sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang==} engines: {node: '>=6.9.0'} '@babel/helper-annotate-as-pure@7.25.9': @@ -378,12 +378,12 @@ packages: resolution: {integrity: sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.26.9': - resolution: {integrity: sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==} + '@babel/helpers@7.26.10': + resolution: {integrity: sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==} engines: {node: '>=6.9.0'} - '@babel/parser@7.26.9': - resolution: {integrity: sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==} + '@babel/parser@7.26.10': + resolution: {integrity: sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==} engines: {node: '>=6.0.0'} hasBin: true @@ -477,20 +477,20 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/runtime@7.26.9': - resolution: {integrity: sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==} + '@babel/runtime@7.26.10': + resolution: {integrity: sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==} engines: {node: '>=6.9.0'} '@babel/template@7.26.9': resolution: {integrity: sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.26.9': - resolution: {integrity: sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==} + '@babel/traverse@7.26.10': + resolution: {integrity: sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A==} engines: {node: '>=6.9.0'} - '@babel/types@7.26.9': - resolution: {integrity: sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==} + '@babel/types@7.26.10': + resolution: {integrity: sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==} engines: {node: '>=6.9.0'} '@bcoe/v8-coverage@0.2.3': @@ -520,158 +520,158 @@ packages: '@emotion/unitless@0.7.5': resolution: {integrity: sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==} - '@esbuild/aix-ppc64@0.25.0': - resolution: {integrity: sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==} + '@esbuild/aix-ppc64@0.25.1': + resolution: {integrity: sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.25.0': - resolution: {integrity: sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==} + '@esbuild/android-arm64@0.25.1': + resolution: {integrity: sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.25.0': - resolution: {integrity: sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==} + '@esbuild/android-arm@0.25.1': + resolution: {integrity: sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.25.0': - resolution: {integrity: sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==} + '@esbuild/android-x64@0.25.1': + resolution: {integrity: sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.25.0': - resolution: {integrity: sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==} + '@esbuild/darwin-arm64@0.25.1': + resolution: {integrity: sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.25.0': - resolution: {integrity: sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==} + '@esbuild/darwin-x64@0.25.1': + resolution: {integrity: sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.25.0': - resolution: {integrity: sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==} + '@esbuild/freebsd-arm64@0.25.1': + resolution: {integrity: sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.0': - resolution: {integrity: sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==} + '@esbuild/freebsd-x64@0.25.1': + resolution: {integrity: sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.25.0': - resolution: {integrity: sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==} + '@esbuild/linux-arm64@0.25.1': + resolution: {integrity: sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.25.0': - resolution: {integrity: sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==} + '@esbuild/linux-arm@0.25.1': + resolution: {integrity: sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.25.0': - resolution: {integrity: sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==} + '@esbuild/linux-ia32@0.25.1': + resolution: {integrity: sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.25.0': - resolution: {integrity: sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==} + '@esbuild/linux-loong64@0.25.1': + resolution: {integrity: sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.25.0': - resolution: {integrity: sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==} + '@esbuild/linux-mips64el@0.25.1': + resolution: {integrity: sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.25.0': - resolution: {integrity: sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==} + '@esbuild/linux-ppc64@0.25.1': + resolution: {integrity: sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.25.0': - resolution: {integrity: sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==} + '@esbuild/linux-riscv64@0.25.1': + resolution: {integrity: sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.25.0': - resolution: {integrity: sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==} + '@esbuild/linux-s390x@0.25.1': + resolution: {integrity: sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.25.0': - resolution: {integrity: sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==} + '@esbuild/linux-x64@0.25.1': + resolution: {integrity: sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.0': - resolution: {integrity: sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==} + '@esbuild/netbsd-arm64@0.25.1': + resolution: {integrity: sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.0': - resolution: {integrity: sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==} + '@esbuild/netbsd-x64@0.25.1': + resolution: {integrity: sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.0': - resolution: {integrity: sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==} + '@esbuild/openbsd-arm64@0.25.1': + resolution: {integrity: sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.0': - resolution: {integrity: sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==} + '@esbuild/openbsd-x64@0.25.1': + resolution: {integrity: sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.25.0': - resolution: {integrity: sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==} + '@esbuild/sunos-x64@0.25.1': + resolution: {integrity: sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.25.0': - resolution: {integrity: sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==} + '@esbuild/win32-arm64@0.25.1': + resolution: {integrity: sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.25.0': - resolution: {integrity: sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==} + '@esbuild/win32-ia32@0.25.1': + resolution: {integrity: sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.25.0': - resolution: {integrity: sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==} + '@esbuild/win32-x64@0.25.1': + resolution: {integrity: sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==} engines: {node: '>=18'} cpu: [x64] os: [win32] - '@inquirer/checkbox@4.1.2': - resolution: {integrity: sha512-PL9ixC5YsPXzXhAZFUPmkXGxfgjkdfZdPEPPmt4kFwQ4LBMDG9n/nHXYRGGZSKZJs+d1sGKWgS2GiPzVRKUdtQ==} + '@inquirer/checkbox@4.1.4': + resolution: {integrity: sha512-d30576EZdApjAMceijXA5jDzRQHT/MygbC+J8I7EqA6f/FRpYxlRtRJbHF8gHeWYeSdOuTEJqonn7QLB1ELezA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -679,8 +679,8 @@ packages: '@types/node': optional: true - '@inquirer/confirm@5.1.6': - resolution: {integrity: sha512-6ZXYK3M1XmaVBZX6FCfChgtponnL0R6I7k8Nu+kaoNkT828FVZTcca1MqmWQipaW2oNREQl5AaPCUOOCVNdRMw==} + '@inquirer/confirm@5.1.8': + resolution: {integrity: sha512-dNLWCYZvXDjO3rnQfk2iuJNL4Ivwz/T2+C3+WnNfJKsNGSuOs3wAo2F6e0p946gtSAk31nZMfW+MRmYaplPKsg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -688,8 +688,8 @@ packages: '@types/node': optional: true - '@inquirer/core@10.1.7': - resolution: {integrity: sha512-AA9CQhlrt6ZgiSy6qoAigiA1izOa751ugX6ioSjqgJ+/Gd+tEN/TORk5sUYNjXuHWfW0r1n/a6ak4u/NqHHrtA==} + '@inquirer/core@10.1.9': + resolution: {integrity: sha512-sXhVB8n20NYkUBfDYgizGHlpRVaCRjtuzNZA6xpALIUbkgfd2Hjz+DfEN6+h1BRnuxw0/P4jCIMjMsEOAMwAJw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -697,8 +697,8 @@ packages: '@types/node': optional: true - '@inquirer/editor@4.2.7': - resolution: {integrity: sha512-gktCSQtnSZHaBytkJKMKEuswSk2cDBuXX5rxGFv306mwHfBPjg5UAldw9zWGoEyvA9KpRDkeM4jfrx0rXn0GyA==} + '@inquirer/editor@4.2.9': + resolution: {integrity: sha512-8HjOppAxO7O4wV1ETUlJFg6NDjp/W2NP5FB9ZPAcinAlNT4ZIWOLe2pUVwmmPRSV0NMdI5r/+lflN55AwZOKSw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -706,8 +706,8 @@ packages: '@types/node': optional: true - '@inquirer/expand@4.0.9': - resolution: {integrity: sha512-Xxt6nhomWTAmuSX61kVgglLjMEFGa+7+F6UUtdEUeg7fg4r9vaFttUUKrtkViYYrQBA5Ia1tkOJj2koP9BuLig==} + '@inquirer/expand@4.0.11': + resolution: {integrity: sha512-OZSUW4hFMW2TYvX/Sv+NnOZgO8CHT2TU1roUCUIF2T+wfw60XFRRp9MRUPCT06cRnKL+aemt2YmTWwt7rOrNEA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -715,12 +715,12 @@ packages: '@types/node': optional: true - '@inquirer/figures@1.0.10': - resolution: {integrity: sha512-Ey6176gZmeqZuY/W/nZiUyvmb1/qInjcpiZjXWi6nON+nxJpD1bxtSoBxNliGISae32n6OwbY+TSXPZ1CfS4bw==} + '@inquirer/figures@1.0.11': + resolution: {integrity: sha512-eOg92lvrn/aRUqbxRyvpEWnrvRuTYRifixHkYVpJiygTgVSBIHDqLh0SrMQXkafvULg3ck11V7xvR+zcgvpHFw==} engines: {node: '>=18'} - '@inquirer/input@4.1.6': - resolution: {integrity: sha512-1f5AIsZuVjPT4ecA8AwaxDFNHny/tSershP/cTvTDxLdiIGTeILNcKozB0LaYt6mojJLUbOYhpIxicaYf7UKIQ==} + '@inquirer/input@4.1.8': + resolution: {integrity: sha512-WXJI16oOZ3/LiENCAxe8joniNp8MQxF6Wi5V+EBbVA0ZIOpFcL4I9e7f7cXse0HJeIPCWO8Lcgnk98juItCi7Q==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -728,8 +728,8 @@ packages: '@types/node': optional: true - '@inquirer/number@3.0.9': - resolution: {integrity: sha512-iN2xZvH3tyIYXLXBvlVh0npk1q/aVuKXZo5hj+K3W3D4ngAEq/DkLpofRzx6oebTUhBvOgryZ+rMV0yImKnG3w==} + '@inquirer/number@3.0.11': + resolution: {integrity: sha512-pQK68CsKOgwvU2eA53AG/4npRTH2pvs/pZ2bFvzpBhrznh8Mcwt19c+nMO7LHRr3Vreu1KPhNBF3vQAKrjIulw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -737,8 +737,8 @@ packages: '@types/node': optional: true - '@inquirer/password@4.0.9': - resolution: {integrity: sha512-xBEoOw1XKb0rIN208YU7wM7oJEHhIYkfG7LpTJAEW913GZeaoQerzf5U/LSHI45EVvjAdgNXmXgH51cUXKZcJQ==} + '@inquirer/password@4.0.11': + resolution: {integrity: sha512-dH6zLdv+HEv1nBs96Case6eppkRggMe8LoOTl30+Gq5Wf27AO/vHFgStTVz4aoevLdNXqwE23++IXGw4eiOXTg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -746,8 +746,8 @@ packages: '@types/node': optional: true - '@inquirer/prompts@7.3.2': - resolution: {integrity: sha512-G1ytyOoHh5BphmEBxSwALin3n1KGNYB6yImbICcRQdzXfOGbuJ9Jske/Of5Sebk339NSGGNfUshnzK8YWkTPsQ==} + '@inquirer/prompts@7.4.0': + resolution: {integrity: sha512-EZiJidQOT4O5PYtqnu1JbF0clv36oW2CviR66c7ma4LsupmmQlUwmdReGKRp456OWPWMz3PdrPiYg3aCk3op2w==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -755,8 +755,8 @@ packages: '@types/node': optional: true - '@inquirer/rawlist@4.0.9': - resolution: {integrity: sha512-+5t6ebehKqgoxV8fXwE49HkSF2Rc9ijNiVGEQZwvbMI61/Q5RcD+jWD6Gs1tKdz5lkI8GRBL31iO0HjGK1bv+A==} + '@inquirer/rawlist@4.0.11': + resolution: {integrity: sha512-uAYtTx0IF/PqUAvsRrF3xvnxJV516wmR6YVONOmCWJbbt87HcDHLfL9wmBQFbNJRv5kCjdYKrZcavDkH3sVJPg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -764,8 +764,8 @@ packages: '@types/node': optional: true - '@inquirer/search@3.0.9': - resolution: {integrity: sha512-DWmKztkYo9CvldGBaRMr0ETUHgR86zE6sPDVOHsqz4ISe9o1LuiWfgJk+2r75acFclA93J/lqzhT0dTjCzHuoA==} + '@inquirer/search@3.0.11': + resolution: {integrity: sha512-9CWQT0ikYcg6Ls3TOa7jljsD7PgjcsYEM0bYE+Gkz+uoW9u8eaJCRHJKkucpRE5+xKtaaDbrND+nPDoxzjYyew==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -773,8 +773,8 @@ packages: '@types/node': optional: true - '@inquirer/select@4.0.9': - resolution: {integrity: sha512-BpJyJe7Dkhv2kz7yG7bPSbJLQuu/rqyNlF1CfiiFeFwouegfH+zh13KDyt6+d9DwucKo7hqM3wKLLyJxZMO+Xg==} + '@inquirer/select@4.1.0': + resolution: {integrity: sha512-z0a2fmgTSRN+YBuiK1ROfJ2Nvrpij5lVN3gPDkQGhavdvIVGHGW29LwYZfM/j42Ai2hUghTI/uoBuTbrJk42bA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -782,8 +782,8 @@ packages: '@types/node': optional: true - '@inquirer/type@3.0.4': - resolution: {integrity: sha512-2MNFrDY8jkFYc9Il9DgLsHhMzuHnOYM1+CUYVWbzu9oT0hC7V7EcYvdCKeoll/Fcci04A+ERZ9wcc7cQ8lTkIA==} + '@inquirer/type@3.0.5': + resolution: {integrity: sha512-ZJpeIYYueOz/i/ONzrfof8g89kNdO2hjGuvULROo3O8rlB2CRtSseE5KeirnyE4t/thAn/EwvS/vuQeJCn+NZg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -826,8 +826,8 @@ packages: peerDependencies: tslib: '2' - '@jsonjoy.com/json-pack@1.1.1': - resolution: {integrity: sha512-osjeBqMJ2lb/j/M8NCPjs1ylqWIcTRTycIhVB5pt6LgzgeRSb0YRZ7j9RfA8wIUrsr/medIuhVyonXRZWLyfdw==} + '@jsonjoy.com/json-pack@1.2.0': + resolution: {integrity: sha512-io1zEbbYcElht3tdlqEOFxZ0dMTYrHz9iMf0gqn1pPjZFTCgM5R4R5IMA20Chb2UPYYsxjzs8CgZ7Nb5n2K2rA==} engines: {node: '>=10.0'} peerDependencies: tslib: '2' @@ -838,8 +838,8 @@ packages: peerDependencies: tslib: '2' - '@napi-rs/cli@3.0.0-alpha.73': - resolution: {integrity: sha512-HeZP2KnKynIoi42ooAf/0tx7nASx1Mo58BKSALv4f5j0C2L12Z687iAuzJWiwzgJ8puTzKzE7pCnB/byflIaAA==} + '@napi-rs/cli@3.0.0-alpha.75': + resolution: {integrity: sha512-KZukXEoQzFgpLDRa94s1DBAokQkPyYTHHWVOAeIv3B6/kss67EWi84xim+5HMqyplt0xIzbZqG6Twdo2e9iU+Q==} engines: {node: '>= 16'} hasBin: true peerDependencies: @@ -1081,85 +1081,85 @@ packages: '@napi-rs/wasm-runtime@0.2.7': resolution: {integrity: sha512-5yximcFK5FNompXfJFoWanu5l8v1hNGqNHh9du1xETp9HWk/B/PzvchX55WYOPaIeNglG8++68AAiauBAtbnzw==} - '@napi-rs/wasm-tools-android-arm-eabi@0.0.2': - resolution: {integrity: sha512-/b+UU3suXjW4P0DzHRNdrnebQtFKcQf/YMeZJH+xUlKgvwli5kbmWjx8Wqqz0VETVkUTuPqJMBDIVLyc+14FGw==} + '@napi-rs/wasm-tools-android-arm-eabi@0.0.3': + resolution: {integrity: sha512-T2tme8w5jZ/ZCjJurqNtKCxYtGoDjW9v2rn1bfI60ewCfkYXNpxrTURdkOib85sz+BcwmOfXn0enbg5W9KohoQ==} engines: {node: '>= 10'} cpu: [arm] os: [android] - '@napi-rs/wasm-tools-android-arm64@0.0.2': - resolution: {integrity: sha512-j57GbDflwJdZtT8pZj5fOV4JAP+LdKN+wzsUYs+QRUoBqpWbbUANudolqfw63bkS9sD4z7fbCuz8iwtJqzxTVA==} + '@napi-rs/wasm-tools-android-arm64@0.0.3': + resolution: {integrity: sha512-siHTjrxxBrvsVty5X2jI5waAyzJpr756GqGVUqxqS2eoTuqYRfgaFNvX8asp9LAagFtOojfD0fZfuvxK7dc4Rw==} engines: {node: '>= 10'} cpu: [arm64] os: [android] - '@napi-rs/wasm-tools-darwin-arm64@0.0.2': - resolution: {integrity: sha512-P2ChgWgVuv9GwmbxN89R84KzIImoTqXINteEixUvmkdnhyFiR+I8deNs89Yed+5w8QLC6MEfrtRqLP9YI+NoQA==} + '@napi-rs/wasm-tools-darwin-arm64@0.0.3': + resolution: {integrity: sha512-0MqsSOYJ4jXcLv/nAInS8nwU+/hL0rSEJo7JXKj3dhkT9UNSj4zfidcOaIb05O9VskJBPmV040+edtWPHXNt2Q==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@napi-rs/wasm-tools-darwin-x64@0.0.2': - resolution: {integrity: sha512-T/kQQ0gt8+wau1Z821PKVAD76QhmwVoLs2CT7Z9tTBs2pJvwSCP0C/kQiQAHcJIMi7A2E9Ab/Mez0BERy50EFA==} + '@napi-rs/wasm-tools-darwin-x64@0.0.3': + resolution: {integrity: sha512-yXAK2mrlBMZZYK/59JRHZu/c683HFpr5ork1cn++fy8gqUBRLbjuq47VDjA7oyLW5SmWqNDhmhjFTDGvfIvcUg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@napi-rs/wasm-tools-freebsd-x64@0.0.2': - resolution: {integrity: sha512-GnnHu+r5sfzuxC/1J5UMF/h3BOZnHb3NQZ5hmbCfZYCKzpzRxrAJhzRunlbRN+v0x8M/49dztVTYR3s7K4ooAw==} + '@napi-rs/wasm-tools-freebsd-x64@0.0.3': + resolution: {integrity: sha512-K1rne814utBd9Zo9LCggQ5h0TSnzGPzA+sG78Qr7KfFz8XQxEGDRH5wpzXyF1KaKav2RmO6wGMXlasDgIcq7GA==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@napi-rs/wasm-tools-linux-arm64-gnu@0.0.2': - resolution: {integrity: sha512-KnZdLT0OnKb1CG2kdt3/WvM43vr9i+FEwXCvSOVC/6Tsifz7ynhMg7LAVESILd03HubzQJfg9nbRsk0bQ+IOwg==} + '@napi-rs/wasm-tools-linux-arm64-gnu@0.0.3': + resolution: {integrity: sha512-Yu3gtpvGc2+hcay3SU5MK7EMrGPBq/V4i8mpw/MEYUCzOb7Vd9aL8CryElzlk0SIbktG08VYMdhFFFoJAjlYtg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@napi-rs/wasm-tools-linux-arm64-musl@0.0.2': - resolution: {integrity: sha512-HkpZOID2U8P6pWqK3mqZ8bxU5xcuT3iA2fO+jrxn78h006iYgfNmdc5JaVhHnHazMmk32xKhSV4iV0VUh8UWDg==} + '@napi-rs/wasm-tools-linux-arm64-musl@0.0.3': + resolution: {integrity: sha512-XN+sPgEwFw3P47wDvtcQyOoZNghIL8gaiRjEGzprB+kE9N21GkuMbk3kdjiBBJkjqKF25f4fbOvNAY0jQEAO3A==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@napi-rs/wasm-tools-linux-x64-gnu@0.0.2': - resolution: {integrity: sha512-YksJWBCyOalB9ogtP9+/dZKP+vR6+h7BmzMXaXMT71WW/GvIsifMVgv+DY/FRSNJQupp5Y+ugjqVAOUOc/G65g==} + '@napi-rs/wasm-tools-linux-x64-gnu@0.0.3': + resolution: {integrity: sha512-mfMvMEqn33YtEjIyLPguZ6yDsNtF5zV7mqc99620YDyj2SLa0aI35TNTc7Dm+/hlgqHRKhdudsWGfYc4dBND2Q==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@napi-rs/wasm-tools-linux-x64-musl@0.0.2': - resolution: {integrity: sha512-sPtRxPMdw05KdTcxgSPMmSXG2+PiK3vJ/l2+g9hvjnnKtvslJN2Hr7j8zgzuoKRAUFPaJVe6+D2xVh5cpdqhww==} + '@napi-rs/wasm-tools-linux-x64-musl@0.0.3': + resolution: {integrity: sha512-KXMsXWGELoN5xgPCoRHbgt5TScSx8BK2GcCHKJ9OPZ2HMfsXbLgS/SNi6vz1CbLMZMLPBY2G6HAk0gzLGyS0mQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@napi-rs/wasm-tools-wasm32-wasi@0.0.2': - resolution: {integrity: sha512-muRvZK7AIuo88G2AxYx3gA59rHMQgoN004saQkBvXnz3K/DVHKfTZ6TtUebss8zI3dURU6xExL8drxFWYxjEbQ==} + '@napi-rs/wasm-tools-wasm32-wasi@0.0.3': + resolution: {integrity: sha512-v3iMHnAfMteogpbqHTFeLXPeAzL5AhpDJLvZvLXbuRiMsMRL0dn8CbcEnYja2P/Ui6Xlyky6PcaUsepOUTNb7A==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@napi-rs/wasm-tools-win32-arm64-msvc@0.0.2': - resolution: {integrity: sha512-Cn13WQ+tpFqdVwx0DIWKbsI9auFyzVZV4F5UNOUeDt6GgOL+NndgJul0Pc9bSU6fi03AylMPfF/nTCaDWO2Wgw==} + '@napi-rs/wasm-tools-win32-arm64-msvc@0.0.3': + resolution: {integrity: sha512-HWrg9cW+u+rQKL9XCQILaGGs6mDYdwX9nwcTIvJAjrpGWu8Dp4wz6i66w6YKHqVng1suGYjjr+LH4/1e0tDaAg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@napi-rs/wasm-tools-win32-ia32-msvc@0.0.2': - resolution: {integrity: sha512-xsg5DkIQi82a8rcx6246Y3XC8TIqHamY+/C6sIlPLaZEuHctDkMECAw0AANwRf5vN//D2oo2oljOuoYtB1GOKw==} + '@napi-rs/wasm-tools-win32-ia32-msvc@0.0.3': + resolution: {integrity: sha512-h99hAWvQKhcloyPfPi0IjrvKRToTE9Z4UVXoXZhcjpCGmr3o1qW+1FAupRy/TcVdMjUJNLE/aenml3UPqzQEQw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@napi-rs/wasm-tools-win32-x64-msvc@0.0.2': - resolution: {integrity: sha512-yHigltEt33eq8bappvKsIliz4MxfMPn1M+NWbIFRWN+IS1Z57mhmc1osuk+IRXrSlq0Tom0R6MYN1jpkZKz81Q==} + '@napi-rs/wasm-tools-win32-x64-msvc@0.0.3': + resolution: {integrity: sha512-7/6IpzMi9VGYxLcc9SJyu9ZIdbDwyyb09glVF/2SFEgke9F5H46XzRrAdSoRnjfcq/tdLyHKJbnpCIB257qVYg==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@napi-rs/wasm-tools@0.0.2': - resolution: {integrity: sha512-kBvDQCP5BLw2TxTENXLp3Of7vVEx0uyIye824JHE4dduzzOHVgSoOFVhVqAT3Fx/hLV445RVWfEqQbXMg4w/Mw==} + '@napi-rs/wasm-tools@0.0.3': + resolution: {integrity: sha512-p7NT5wnOIwmP0f3KbXlMabeld5dPFsADpHMWJaBodTSmnPE8P4msguxKJLKWquqAS1FY2dsjBZ62K0/hfiqAUg==} engines: {node: '>= 10'} '@octokit/auth-token@5.1.2': @@ -1214,43 +1214,43 @@ packages: '@octokit/types@13.8.0': resolution: {integrity: sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==} - '@oxlint/darwin-arm64@0.15.12': - resolution: {integrity: sha512-q55uDzFt3QcuxVZQhumsx8HvqiwPVgjs+X+8W17IgNBLsYTRd+akkvq11lGaeVDn3JicIUo3lurFTSdlsleeeg==} + '@oxlint/darwin-arm64@0.16.0': + resolution: {integrity: sha512-t4v+WxVuU+cQNZuDDZ+I9p6FTuSrQpTs787UspcB3j3E50lw6+aDWiLx/Snvkn5C214B8hp+z8lnwYkgWoFqiw==} cpu: [arm64] os: [darwin] - '@oxlint/darwin-x64@0.15.12': - resolution: {integrity: sha512-T+w1AqY6hK09TMaAm24ifv4ptWSDmdvO8KZwGYmnOZq1zcSc2qAHT3T5/5HC9Si9DYdQ+BxyEmGpTT57PiTDhA==} + '@oxlint/darwin-x64@0.16.0': + resolution: {integrity: sha512-CbV7VHpO7OpBXgBZRaNMOgVlnZ29gocjaFbrbEv/23XqeeDLQP3++O7i1Q7SEmeaELxM6NYW1u9+OcvX3uudwQ==} cpu: [x64] os: [darwin] - '@oxlint/linux-arm64-gnu@0.15.12': - resolution: {integrity: sha512-C4kPsFdMg2572F2llt+xyteP+fY1fTI4w2MZ33vhOOpep69Im2NNTl5wgI5b8DVI3F2zUydT17iRARqMey1R5w==} + '@oxlint/linux-arm64-gnu@0.16.0': + resolution: {integrity: sha512-wwwTsSk62vFAYYsj4Et/leb9VndZwZBf1R6Nta1yWhljkSVq1GBKJ9SeU3it833QEJuFth2A2L5xdfiGkZZIYg==} cpu: [arm64] os: [linux] - '@oxlint/linux-arm64-musl@0.15.12': - resolution: {integrity: sha512-+Zhiu9s+vNrpUVAuC6ZnYi8+7DhbcITmw+BLSnAa0O954CPVR9yb8bQb9XHYQy7gn9lg9Rj0aeWbsceM/Xjvog==} + '@oxlint/linux-arm64-musl@0.16.0': + resolution: {integrity: sha512-YW7g8hG/XJ+g2RgDvhjY/GUaq/p8xIldsQD9AZkFJAaBsmN3tTi1VUS2orhxBi7feXE7FhP85LqQk+WJxarUSw==} cpu: [arm64] os: [linux] - '@oxlint/linux-x64-gnu@0.15.12': - resolution: {integrity: sha512-2YbZJF+CFcpuovsuUFpLaDtAGqW/Rfc9k2x4Z801ktwnoe19voos43EbxRqfNhLU5ecpGjfqs+eVi7OM1qglNA==} + '@oxlint/linux-x64-gnu@0.16.0': + resolution: {integrity: sha512-QY8W3724Fv9W5Mh42/EdV5j4qfwFnV1rouLzvWgUz/g51nROt/6rMbv65ssJo2yBUHHj5KGMfmC97VJZAF9TKA==} cpu: [x64] os: [linux] - '@oxlint/linux-x64-musl@0.15.12': - resolution: {integrity: sha512-UiedwMcDSBgqZOStTGC9QS2k+ycgo0oXM3kHOnDZRHV/+kRYY6dMWVB6lMisZIerRQnsZEtaYoFg88X9yrHscQ==} + '@oxlint/linux-x64-musl@0.16.0': + resolution: {integrity: sha512-adH6bJipJL/WjaMAc8JNevTgU7IpY5nh8a8tM/DAZdUyt7e/zd+vDw+o3NCBGcCWKu3VcY+XsMZK2NMqnyzeig==} cpu: [x64] os: [linux] - '@oxlint/win32-arm64@0.15.12': - resolution: {integrity: sha512-rf5FCe7E68AHFw0pFdj+YBWpFT41pQsNPSy3OZsI7jH6vPnjYQmC0rntNJgcN/XEetioe0bExcccVjWB1ZBnZw==} + '@oxlint/win32-arm64@0.16.0': + resolution: {integrity: sha512-0GPNs354IHKdbvqsdjf1YGqaKbFWcT/ngly9+oAUSsDC5/Rg4sZj4glZCVDhZUFMQ1kyClAYxX+vbKbTW/cOmQ==} cpu: [arm64] os: [win32] - '@oxlint/win32-x64@0.15.12': - resolution: {integrity: sha512-gmSjINoXtJIjvZtsKQ/KDdnYJpuksBpAivvjPokl0+OllJjbm8TW/fc83kCUEs6Zn91NIyyq/5ft1MQ4Obb/fA==} + '@oxlint/win32-x64@0.16.0': + resolution: {integrity: sha512-0Lb599lav9THJRiUYkNugueq98VliinY92yzv5u2NDiIsq5aqqHIjmpJ8L051zCEhyzcbw8KBRV3FofqnroJTA==} cpu: [x64] os: [win32] @@ -1313,98 +1313,98 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - '@rollup/rollup-android-arm-eabi@4.34.9': - resolution: {integrity: sha512-qZdlImWXur0CFakn2BJ2znJOdqYZKiedEPEVNTBrpfPjc/YuTGcaYZcdmNFTkUj3DU0ZM/AElcM8Ybww3xVLzA==} + '@rollup/rollup-android-arm-eabi@4.36.0': + resolution: {integrity: sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.34.9': - resolution: {integrity: sha512-4KW7P53h6HtJf5Y608T1ISKvNIYLWRKMvfnG0c44M6In4DQVU58HZFEVhWINDZKp7FZps98G3gxwC1sb0wXUUg==} + '@rollup/rollup-android-arm64@4.36.0': + resolution: {integrity: sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.34.9': - resolution: {integrity: sha512-0CY3/K54slrzLDjOA7TOjN1NuLKERBgk9nY5V34mhmuu673YNb+7ghaDUs6N0ujXR7fz5XaS5Aa6d2TNxZd0OQ==} + '@rollup/rollup-darwin-arm64@4.36.0': + resolution: {integrity: sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.34.9': - resolution: {integrity: sha512-eOojSEAi/acnsJVYRxnMkPFqcxSMFfrw7r2iD9Q32SGkb/Q9FpUY1UlAu1DH9T7j++gZ0lHjnm4OyH2vCI7l7Q==} + '@rollup/rollup-darwin-x64@4.36.0': + resolution: {integrity: sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.34.9': - resolution: {integrity: sha512-2lzjQPJbN5UnHm7bHIUKFMulGTQwdvOkouJDpPysJS+QFBGDJqcfh+CxxtG23Ik/9tEvnebQiylYoazFMAgrYw==} + '@rollup/rollup-freebsd-arm64@4.36.0': + resolution: {integrity: sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.34.9': - resolution: {integrity: sha512-SLl0hi2Ah2H7xQYd6Qaiu01kFPzQ+hqvdYSoOtHYg/zCIFs6t8sV95kaoqjzjFwuYQLtOI0RZre/Ke0nPaQV+g==} + '@rollup/rollup-freebsd-x64@4.36.0': + resolution: {integrity: sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.34.9': - resolution: {integrity: sha512-88I+D3TeKItrw+Y/2ud4Tw0+3CxQ2kLgu3QvrogZ0OfkmX/DEppehus7L3TS2Q4lpB+hYyxhkQiYPJ6Mf5/dPg==} + '@rollup/rollup-linux-arm-gnueabihf@4.36.0': + resolution: {integrity: sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.34.9': - resolution: {integrity: sha512-3qyfWljSFHi9zH0KgtEPG4cBXHDFhwD8kwg6xLfHQ0IWuH9crp005GfoUUh/6w9/FWGBwEHg3lxK1iHRN1MFlA==} + '@rollup/rollup-linux-arm-musleabihf@4.36.0': + resolution: {integrity: sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.34.9': - resolution: {integrity: sha512-6TZjPHjKZUQKmVKMUowF3ewHxctrRR09eYyvT5eFv8w/fXarEra83A2mHTVJLA5xU91aCNOUnM+DWFMSbQ0Nxw==} + '@rollup/rollup-linux-arm64-gnu@4.36.0': + resolution: {integrity: sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.34.9': - resolution: {integrity: sha512-LD2fytxZJZ6xzOKnMbIpgzFOuIKlxVOpiMAXawsAZ2mHBPEYOnLRK5TTEsID6z4eM23DuO88X0Tq1mErHMVq0A==} + '@rollup/rollup-linux-arm64-musl@4.36.0': + resolution: {integrity: sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.34.9': - resolution: {integrity: sha512-dRAgTfDsn0TE0HI6cmo13hemKpVHOEyeciGtvlBTkpx/F65kTvShtY/EVyZEIfxFkV5JJTuQ9tP5HGBS0hfxIg==} + '@rollup/rollup-linux-loongarch64-gnu@4.36.0': + resolution: {integrity: sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.34.9': - resolution: {integrity: sha512-PHcNOAEhkoMSQtMf+rJofwisZqaU8iQ8EaSps58f5HYll9EAY5BSErCZ8qBDMVbq88h4UxaNPlbrKqfWP8RfJA==} + '@rollup/rollup-linux-powerpc64le-gnu@4.36.0': + resolution: {integrity: sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.34.9': - resolution: {integrity: sha512-Z2i0Uy5G96KBYKjeQFKbbsB54xFOL5/y1P5wNBsbXB8yE+At3oh0DVMjQVzCJRJSfReiB2tX8T6HUFZ2k8iaKg==} + '@rollup/rollup-linux-riscv64-gnu@4.36.0': + resolution: {integrity: sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.34.9': - resolution: {integrity: sha512-U+5SwTMoeYXoDzJX5dhDTxRltSrIax8KWwfaaYcynuJw8mT33W7oOgz0a+AaXtGuvhzTr2tVKh5UO8GVANTxyQ==} + '@rollup/rollup-linux-s390x-gnu@4.36.0': + resolution: {integrity: sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.34.9': - resolution: {integrity: sha512-FwBHNSOjUTQLP4MG7y6rR6qbGw4MFeQnIBrMe161QGaQoBQLqSUEKlHIiVgF3g/mb3lxlxzJOpIBhaP+C+KP2A==} + '@rollup/rollup-linux-x64-gnu@4.36.0': + resolution: {integrity: sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.34.9': - resolution: {integrity: sha512-cYRpV4650z2I3/s6+5/LONkjIz8MBeqrk+vPXV10ORBnshpn8S32bPqQ2Utv39jCiDcO2eJTuSlPXpnvmaIgRA==} + '@rollup/rollup-linux-x64-musl@4.36.0': + resolution: {integrity: sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.34.9': - resolution: {integrity: sha512-z4mQK9dAN6byRA/vsSgQiPeuO63wdiDxZ9yg9iyX2QTzKuQM7T4xlBoeUP/J8uiFkqxkcWndWi+W7bXdPbt27Q==} + '@rollup/rollup-win32-arm64-msvc@4.36.0': + resolution: {integrity: sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.34.9': - resolution: {integrity: sha512-KB48mPtaoHy1AwDNkAJfHXvHp24H0ryZog28spEs0V48l3H1fr4i37tiyHsgKZJnCmvxsbATdZGBpbmxTE3a9w==} + '@rollup/rollup-win32-ia32-msvc@4.36.0': + resolution: {integrity: sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.34.9': - resolution: {integrity: sha512-AyleYRPU7+rgkMWbEh71fQlrzRfeP6SyMnRf9XX4fCdDPAJumdSBqYEcWPMzVQ4ScAl7E4oFfK0GUVn77xSwbw==} + '@rollup/rollup-win32-x64-msvc@4.36.0': + resolution: {integrity: sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==} cpu: [x64] os: [win32] @@ -1420,17 +1420,17 @@ packages: '@types/mocha@10.0.10': resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} - '@types/node@22.13.8': - resolution: {integrity: sha512-G3EfaZS+iOGYWLLRCEAXdWK9my08oHNZ+FHluRiggIYJPOXzhOiDgpVCUHaUvyIC5/fj7C/p637jdzC666AOKQ==} + '@types/node@22.13.10': + resolution: {integrity: sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==} '@types/vscode@1.93.0': resolution: {integrity: sha512-kUK6jAHSR5zY8ps42xuW89NLcBpw1kOabah7yv38J8MyiYuOHxLQBi0e7zeXbQgVefDy/mZZetqEFC+Fl5eIEQ==} - '@vitest/expect@3.0.7': - resolution: {integrity: sha512-QP25f+YJhzPfHrHfYHtvRn+uvkCFCqFtW9CktfBxmB+25QqWsx7VB2As6f4GmwllHLDhXNHvqedwhvMmSnNmjw==} + '@vitest/expect@3.0.8': + resolution: {integrity: sha512-Xu6TTIavTvSSS6LZaA3EebWFr6tsoXPetOWNMOlc7LO88QVVBwq2oQWBoDiLCN6YTvNYsGSjqOO8CAdjom5DCQ==} - '@vitest/mocker@3.0.7': - resolution: {integrity: sha512-qui+3BLz9Eonx4EAuR/i+QlCX6AUZ35taDQgwGkK/Tw6/WgwodSrjN1X2xf69IA/643ZX5zNKIn2svvtZDrs4w==} + '@vitest/mocker@3.0.8': + resolution: {integrity: sha512-n3LjS7fcW1BCoF+zWZxG7/5XvuYH+lsFg+BDwwAz0arIwHQJFUEsKBQ0BLU49fCxuM/2HSeBPHQD8WjgrxMfow==} peerDependencies: msw: ^2.4.9 vite: ^5.0.0 || ^6.0.0 @@ -1440,20 +1440,20 @@ packages: vite: optional: true - '@vitest/pretty-format@3.0.7': - resolution: {integrity: sha512-CiRY0BViD/V8uwuEzz9Yapyao+M9M008/9oMOSQydwbwb+CMokEq3XVaF3XK/VWaOK0Jm9z7ENhybg70Gtxsmg==} + '@vitest/pretty-format@3.0.8': + resolution: {integrity: sha512-BNqwbEyitFhzYMYHUVbIvepOyeQOSFA/NeJMIP9enMntkkxLgOcgABH6fjyXG85ipTgvero6noreavGIqfJcIg==} - '@vitest/runner@3.0.7': - resolution: {integrity: sha512-WeEl38Z0S2ZcuRTeyYqaZtm4e26tq6ZFqh5y8YD9YxfWuu0OFiGFUbnxNynwLjNRHPsXyee2M9tV7YxOTPZl2g==} + '@vitest/runner@3.0.8': + resolution: {integrity: sha512-c7UUw6gEcOzI8fih+uaAXS5DwjlBaCJUo7KJ4VvJcjL95+DSR1kova2hFuRt3w41KZEFcOEiq098KkyrjXeM5w==} - '@vitest/snapshot@3.0.7': - resolution: {integrity: sha512-eqTUryJWQN0Rtf5yqCGTQWsCFOQe4eNz5Twsu21xYEcnFJtMU5XvmG0vgebhdLlrHQTSq5p8vWHJIeJQV8ovsA==} + '@vitest/snapshot@3.0.8': + resolution: {integrity: sha512-x8IlMGSEMugakInj44nUrLSILh/zy1f2/BgH0UeHpNyOocG18M9CWVIFBaXPt8TrqVZWmcPjwfG/ht5tnpba8A==} - '@vitest/spy@3.0.7': - resolution: {integrity: sha512-4T4WcsibB0B6hrKdAZTM37ekuyFZt2cGbEGd2+L0P8ov15J1/HUsUaqkXEQPNAWr4BtPPe1gI+FYfMHhEKfR8w==} + '@vitest/spy@3.0.8': + resolution: {integrity: sha512-MR+PzJa+22vFKYb934CejhR4BeRpMSoxkvNoDit68GQxRLSf11aT6CTj3XaqUU9rxgWJFnqicN/wxw6yBRkI1Q==} - '@vitest/utils@3.0.7': - resolution: {integrity: sha512-xePVpCRfooFX3rANQjwoditoXgWb1MaFbzmGuPP59MK6i13mrnDw/yEIyJudLeW6/38mCNcwCiJIGmpDPibAIg==} + '@vitest/utils@3.0.8': + resolution: {integrity: sha512-nkBC3aEhfX2PdtQI/QwAWp8qZWwzASsU4Npbcd5RdMPBSSLCpkZp52P3xku3s3uA0HIEhGvEcF8rNkBsz9dQ4Q==} '@vscode/test-cli@0.0.10': resolution: {integrity: sha512-B0mMH4ia+MOOtwNiLi79XhA+MLmUItIC8FckEuKrVAVriIuSWjt7vv4+bF8qVFiNFe4QRfzPaIZk39FZGWEwHA==} @@ -1512,8 +1512,8 @@ packages: '@vscode/vsce-sign@2.0.5': resolution: {integrity: sha512-GfYWrsT/vypTMDMgWDm75iDmAOMe7F71sZECJ+Ws6/xyIfmB3ELVnVN+LwMFAvmXY+e6eWhR2EzNGF/zAhWY3Q==} - '@vscode/vsce@3.2.2': - resolution: {integrity: sha512-4TqdUq/yKlQTHcQMk/DamR632bq/+IJDomSbexOMee/UAYWqYm0XHWA6scGslsCpzY+sCWEhhl0nqdOB0XW1kw==} + '@vscode/vsce@3.3.0': + resolution: {integrity: sha512-HA/pUyvh/TQWkc4wG7AudPIWUvsR8i4jiWZZgM/a69ncPi9Nm5FDogf/wVEk4EWJs4/UdxU7J6X18dfAwfPbxA==} engines: {node: '>= 20'} hasBin: true @@ -1546,8 +1546,8 @@ packages: '@vue/shared@3.5.13': resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} - acorn@8.14.0: - resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + acorn@8.14.1: + resolution: {integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==} engines: {node: '>=0.4.0'} hasBin: true @@ -1583,8 +1583,8 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} - antd@5.24.2: - resolution: {integrity: sha512-7Z9HsE3ZIK3sE/WuUqii3w7Gl1IJuRL21sDUTtkN95JS5KhRYP8ISv7m/HxsJ3Mn/yxgojBCgLPJ212+Dn+aPw==} + antd@5.24.4: + resolution: {integrity: sha512-s89666DcoWeekJFaIqbtz2vRlIvgPR28GuDYYGUpW1mVP08bV7HZAPBH5lFJKYNGKrN3dHbZGgRK5aNRD2iPHg==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -1603,8 +1603,8 @@ packages: asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - axios@1.8.1: - resolution: {integrity: sha512-NN+fvwH/kV01dYUQ3PTOZns4LWtWhOFCAhQ/pHb88WQ1hNe5V/dvFwc4VJcDL11LT9xSX0QtsR8sWUuyOuOq7g==} + axios@1.8.3: + resolution: {integrity: sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==} azure-devops-node-api@12.5.0: resolution: {integrity: sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og==} @@ -1681,16 +1681,16 @@ packages: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} - call-bound@1.0.3: - resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} engines: {node: '>= 0.4'} camelcase@6.3.0: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001701: - resolution: {integrity: sha512-faRs/AW3jA9nTwmJBSO1PQ6L/EOgsB5HMQQq4iCu5zhPgVVgO/pZRHlmatwijZKetFw8/Pr4q6dEN8sJuq8qTw==} + caniuse-lite@1.0.30001705: + resolution: {integrity: sha512-S0uyMMiYvA7CxNgomYBwwwPUnWzFD83f3B1ce5jHUfHTH//QL6hHsreI8RVC5606R4ssqravelYO5TU6t8sEyg==} chai@5.2.0: resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==} @@ -1908,8 +1908,8 @@ packages: ecdsa-sig-formatter@1.0.11: resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} - electron-to-chromium@1.5.109: - resolution: {integrity: sha512-AidaH9JETVRr9DIPGfp1kAarm/W6hRJTPuCnkF+2MqhF4KaAgRIcBc8nvjk+YMXZhwfISof/7WG29eS4iGxQLQ==} + electron-to-chromium@1.5.119: + resolution: {integrity: sha512-Ku4NMzUjz3e3Vweh7PhApPrZSS4fyiCIbcIrG9eKrriYVLmbMepETR/v6SU7xPm98QTqMSYiCwfO89QNjXLkbQ==} emnapi@1.3.1: resolution: {integrity: sha512-8rnw2VLJmHAXBSyhtrL9O5aW1VdbXA1ovRslp0IyTwnM62Fz83jQIo+VaIObgzdo6r1A98J9AHEq4KTqIR67Aw==} @@ -1961,8 +1961,8 @@ packages: resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} engines: {node: '>= 0.4'} - esbuild@0.25.0: - resolution: {integrity: sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==} + esbuild@0.25.1: + resolution: {integrity: sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==} engines: {node: '>=18'} hasBin: true @@ -2452,8 +2452,8 @@ packages: resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} engines: {node: ^18.17.0 || >=20.5.0} - nanoid@3.3.8: - resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} + nanoid@3.3.10: + resolution: {integrity: sha512-vSJJTG+t/dIKAUhUDw/dLdZ9s//5OxcHqLaDWWrW4Cdq7o6tdLIczUkMXt2MBNmk6sJRZBZRXVixs7URY1CmIg==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true @@ -2509,8 +2509,8 @@ packages: engines: {node: '>= 20'} hasBin: true - oxlint@0.15.12: - resolution: {integrity: sha512-nfiT04swYLhh1nutpvp+kCgY6GcIRKv1WWIUIzQrVaoF0+I/FRX7XS5Qm/cznaLWN38hn/pDI/Ge+0XJdHSyxg==} + oxlint@0.16.0: + resolution: {integrity: sha512-Kx3ehMy+F0sIvg8PPKB967SB7cjjj98vxVOpQaAfKFIYrQFkM10usb3aQKqk1HXYivMvs6axdZM1sLq2fvjbKw==} engines: {node: '>=8.*'} hasBin: true @@ -2661,8 +2661,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-image@7.11.0: - resolution: {integrity: sha512-aZkTEZXqeqfPZtnSdNUnKQA0N/3MbgR7nUnZ+/4MfSFWPFHZau4p5r5ShaI0KPEMnNjv4kijSCFq/9wtJpwykw==} + rc-image@7.11.1: + resolution: {integrity: sha512-XuoWx4KUXg7hNy5mRTy1i8c8p3K8boWg6UajbHpDXS5AlRVucNfTi5YxTtPBTBzegxAZpvuLfh3emXFt6ybUdA==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' @@ -2788,8 +2788,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-table@7.50.3: - resolution: {integrity: sha512-Z4/zNCzjv7f/XzPRecb+vJU0DJKdsYt4YRkDzNl4G05m7JmxrKGYC2KqN1Ew6jw2zJq7cxVv3z39qyZOHMuf7A==} + rc-table@7.50.4: + resolution: {integrity: sha512-Y+YuncnQqoS5e7yHvfvlv8BmCvwDYDX/2VixTBEhkMDk9itS9aBINp4nhzXFKiBP/frG4w0pS9d9Rgisl0T1Bw==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -2839,8 +2839,8 @@ packages: react: '>=16.9.0' react-dom: '>=16.9.0' - rc-virtual-list@3.18.3: - resolution: {integrity: sha512-s1/bZQY2uwnmgXYeXxJkk2cSTz1cdUPDCrxAq/y1WQM115HilFFIvLi+JVFfkD4xCq3TZxGM17FQH4NLesWfwg==} + rc-virtual-list@3.18.4: + resolution: {integrity: sha512-qkurwgc4Je4xJaYe1DprDl2fwtfEZcuC4UhsJRiX2YZ6wSZAUPQXH/lIX+ZRtNEWmz3pzSBQ7NX3Csjp0wCtcg==} engines: {node: '>=8.x'} peerDependencies: react: '>=16.9.0' @@ -2894,8 +2894,8 @@ packages: resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - rollup@4.34.9: - resolution: {integrity: sha512-nF5XYqWWp9hx/LrpC8sZvvvmq0TeTjQgaZHYmAgwysT9nh8sWnZhBnM8ZyVbbJFIQBLwHDNoMqsBZBbUo4U8sQ==} + rollup@4.36.0: + resolution: {integrity: sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -2994,8 +2994,8 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - std-env@3.8.0: - resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} + std-env@3.8.1: + resolution: {integrity: sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==} stdin-discarder@0.1.0: resolution: {integrity: sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==} @@ -3167,8 +3167,8 @@ packages: undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} - undici@6.21.1: - resolution: {integrity: sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==} + undici@6.21.2: + resolution: {integrity: sha512-uROZWze0R0itiAKVPsYhFov9LxrPMHLMEQFszeI2gCN6bnIIZ8twzBCJcN2LJrBBLfrP0t1FW0g+JmKVl8Vk1g==} engines: {node: '>=18.17'} universal-user-agent@7.0.2: @@ -3194,13 +3194,13 @@ packages: resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} engines: {node: '>=10.12.0'} - vite-node@3.0.7: - resolution: {integrity: sha512-2fX0QwX4GkkkpULXdT1Pf4q0tC1i1lFOyseKoonavXUNlQ77KpW2XqBGGNIm/J4Ows4KxgGJzDguYVPKwG/n5A==} + vite-node@3.0.8: + resolution: {integrity: sha512-6PhR4H9VGlcwXZ+KWCdMqbtG649xCPZqfI9j2PsK1FcXgEzro5bGHcVKFCTqPLaNKZES8Evqv4LwvZARsq5qlg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true - vite@6.2.0: - resolution: {integrity: sha512-7dPxoo+WsT/64rDcwoOjk76XHj+TqNTIvHKcuMQ1k4/SeHDaQt5GFAeLYzrimZrMpn/O6DtdI03WUjdxuPM0oQ==} + vite@6.2.2: + resolution: {integrity: sha512-yW7PeMM+LkDzc7CgJuRLMW2Jz0FxMOsVJ8Lv3gpgW9WLcb9cTW+121UEr1hvmfR7w3SegR5ItvYyzVz1vxNJgQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: @@ -3239,16 +3239,16 @@ packages: yaml: optional: true - vitest@3.0.7: - resolution: {integrity: sha512-IP7gPK3LS3Fvn44x30X1dM9vtawm0aesAa2yBIZ9vQf+qB69NXC5776+Qmcr7ohUXIQuLhk7xQR0aSUIDPqavg==} + vitest@3.0.8: + resolution: {integrity: sha512-dfqAsNqRGUc8hB9OVR2P0w8PZPEckti2+5rdZip0WIz9WW0MnImJ8XiR61QhqLa92EQzKP2uPkzenKOAHyEIbA==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/debug': ^4.1.12 '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - '@vitest/browser': 3.0.7 - '@vitest/ui': 3.0.7 + '@vitest/browser': 3.0.8 + '@vitest/ui': 3.0.8 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -3380,8 +3380,8 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - yocto-queue@1.1.1: - resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} + yocto-queue@1.2.0: + resolution: {integrity: sha512-KHBC7z61OJeaMGnF3wqNZj+GGNXOyypZviiKpQeiHirG5Ib1ImwcLBH70rbMSkKfSmUNBsdf2PwaEJtKvgmkNw==} engines: {node: '>=12.20'} yoctocolors-cjs@2.1.2: @@ -3402,14 +3402,14 @@ snapshots: '@ant-design/cssinjs-utils@1.1.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: '@ant-design/cssinjs': 1.23.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 react-dom: 19.0.0(react@19.0.0) '@ant-design/cssinjs@1.23.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@emotion/hash': 0.8.0 '@emotion/unitless': 0.7.5 classnames: 2.5.1 @@ -3421,7 +3421,7 @@ snapshots: '@ant-design/fast-color@2.0.6': dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@ant-design/icons-svg@4.4.2': {} @@ -3429,7 +3429,7 @@ snapshots: dependencies: '@ant-design/colors': 7.2.0 '@ant-design/icons-svg': 4.4.2 - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -3437,7 +3437,7 @@ snapshots: '@ant-design/react-slick@1.1.2(react@19.0.0)': dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 json2mq: 0.2.0 react: 19.0.0 @@ -3454,11 +3454,11 @@ snapshots: '@azure/core-util': 1.11.0 tslib: 2.8.1 - '@azure/core-client@1.9.2': + '@azure/core-client@1.9.3': dependencies: '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.9.0 - '@azure/core-rest-pipeline': 1.19.0 + '@azure/core-rest-pipeline': 1.19.1 '@azure/core-tracing': 1.2.0 '@azure/core-util': 1.11.0 '@azure/logger': 1.1.4 @@ -3466,7 +3466,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@azure/core-rest-pipeline@1.19.0': + '@azure/core-rest-pipeline@1.19.1': dependencies: '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.9.0 @@ -3488,17 +3488,17 @@ snapshots: '@azure/abort-controller': 2.1.2 tslib: 2.8.1 - '@azure/identity@4.7.0': + '@azure/identity@4.8.0': dependencies: '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.9.0 - '@azure/core-client': 1.9.2 - '@azure/core-rest-pipeline': 1.19.0 + '@azure/core-client': 1.9.3 + '@azure/core-rest-pipeline': 1.19.1 '@azure/core-tracing': 1.2.0 '@azure/core-util': 1.11.0 '@azure/logger': 1.1.4 - '@azure/msal-browser': 4.5.0 - '@azure/msal-node': 3.2.3 + '@azure/msal-browser': 4.7.0 + '@azure/msal-node': 3.3.0 events: 3.3.0 jws: 4.0.0 open: 10.1.0 @@ -3511,15 +3511,15 @@ snapshots: dependencies: tslib: 2.8.1 - '@azure/msal-browser@4.5.0': + '@azure/msal-browser@4.7.0': dependencies: - '@azure/msal-common': 15.2.0 + '@azure/msal-common': 15.2.1 - '@azure/msal-common@15.2.0': {} + '@azure/msal-common@15.2.1': {} - '@azure/msal-node@3.2.3': + '@azure/msal-node@3.3.0': dependencies: - '@azure/msal-common': 15.2.0 + '@azure/msal-common': 15.2.1 jsonwebtoken: 9.0.2 uuid: 8.3.2 @@ -3531,18 +3531,18 @@ snapshots: '@babel/compat-data@7.26.8': {} - '@babel/core@7.26.9': + '@babel/core@7.26.10': dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.26.2 - '@babel/generator': 7.26.9 + '@babel/generator': 7.26.10 '@babel/helper-compilation-targets': 7.26.5 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.9) - '@babel/helpers': 7.26.9 - '@babel/parser': 7.26.9 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.10) + '@babel/helpers': 7.26.10 + '@babel/parser': 7.26.10 '@babel/template': 7.26.9 - '@babel/traverse': 7.26.9 - '@babel/types': 7.26.9 + '@babel/traverse': 7.26.10 + '@babel/types': 7.26.10 convert-source-map: 2.0.0 debug: 4.4.0(supports-color@8.1.1) gensync: 1.0.0-beta.2 @@ -3551,17 +3551,17 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.26.9': + '@babel/generator@7.26.10': dependencies: - '@babel/parser': 7.26.9 - '@babel/types': 7.26.9 + '@babel/parser': 7.26.10 + '@babel/types': 7.26.10 '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.1.0 '@babel/helper-annotate-as-pure@7.25.9': dependencies: - '@babel/types': 7.26.9 + '@babel/types': 7.26.10 '@babel/helper-compilation-targets@7.26.5': dependencies: @@ -3571,70 +3571,70 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.26.9(@babel/core@7.26.9)': + '@babel/helper-create-class-features-plugin@7.26.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-annotate-as-pure': 7.25.9 '@babel/helper-member-expression-to-functions': 7.25.9 '@babel/helper-optimise-call-expression': 7.25.9 - '@babel/helper-replace-supers': 7.26.5(@babel/core@7.26.9) + '@babel/helper-replace-supers': 7.26.5(@babel/core@7.26.10) '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - '@babel/traverse': 7.26.9 + '@babel/traverse': 7.26.10 semver: 6.3.1 transitivePeerDependencies: - supports-color '@babel/helper-member-expression-to-functions@7.25.9': dependencies: - '@babel/traverse': 7.26.9 - '@babel/types': 7.26.9 + '@babel/traverse': 7.26.10 + '@babel/types': 7.26.10 transitivePeerDependencies: - supports-color '@babel/helper-module-imports@7.25.9': dependencies: - '@babel/traverse': 7.26.9 - '@babel/types': 7.26.9 + '@babel/traverse': 7.26.10 + '@babel/types': 7.26.10 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.9)': + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-module-imports': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.26.9 + '@babel/traverse': 7.26.10 transitivePeerDependencies: - supports-color '@babel/helper-optimise-call-expression@7.25.9': dependencies: - '@babel/types': 7.26.9 + '@babel/types': 7.26.10 '@babel/helper-plugin-utils@7.26.5': {} - '@babel/helper-remap-async-to-generator@7.25.9(@babel/core@7.26.9)': + '@babel/helper-remap-async-to-generator@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-annotate-as-pure': 7.25.9 '@babel/helper-wrap-function': 7.25.9 - '@babel/traverse': 7.26.9 + '@babel/traverse': 7.26.10 transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.26.5(@babel/core@7.26.9)': + '@babel/helper-replace-supers@7.26.5(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-member-expression-to-functions': 7.25.9 '@babel/helper-optimise-call-expression': 7.25.9 - '@babel/traverse': 7.26.9 + '@babel/traverse': 7.26.10 transitivePeerDependencies: - supports-color '@babel/helper-skip-transparent-expression-wrappers@7.25.9': dependencies: - '@babel/traverse': 7.26.9 - '@babel/types': 7.26.9 + '@babel/traverse': 7.26.10 + '@babel/types': 7.26.10 transitivePeerDependencies: - supports-color @@ -3647,148 +3647,148 @@ snapshots: '@babel/helper-wrap-function@7.25.9': dependencies: '@babel/template': 7.26.9 - '@babel/traverse': 7.26.9 - '@babel/types': 7.26.9 + '@babel/traverse': 7.26.10 + '@babel/types': 7.26.10 transitivePeerDependencies: - supports-color - '@babel/helpers@7.26.9': + '@babel/helpers@7.26.10': dependencies: '@babel/template': 7.26.9 - '@babel/types': 7.26.9 + '@babel/types': 7.26.10 - '@babel/parser@7.26.9': + '@babel/parser@7.26.10': dependencies: - '@babel/types': 7.26.9 + '@babel/types': 7.26.10 - '@babel/plugin-external-helpers@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-external-helpers@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-proposal-decorators@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-proposal-decorators@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-create-class-features-plugin': 7.26.9(@babel/core@7.26.9) + '@babel/core': 7.26.10 + '@babel/helper-create-class-features-plugin': 7.26.9(@babel/core@7.26.10) '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-decorators': 7.25.9(@babel/core@7.26.9) + '@babel/plugin-syntax-decorators': 7.25.9(@babel/core@7.26.10) transitivePeerDependencies: - supports-color - '@babel/plugin-proposal-explicit-resource-management@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-proposal-explicit-resource-management@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-decorators@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-syntax-decorators@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-arrow-functions@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-transform-arrow-functions@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-async-to-generator@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-transform-async-to-generator@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-module-imports': 7.25.9 '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.26.9) + '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.26.10) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-class-properties@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-transform-class-properties@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-create-class-features-plugin': 7.26.9(@babel/core@7.26.9) + '@babel/core': 7.26.10 + '@babel/helper-create-class-features-plugin': 7.26.9(@babel/core@7.26.10) '@babel/helper-plugin-utils': 7.26.5 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-class-static-block@7.26.0(@babel/core@7.26.9)': + '@babel/plugin-transform-class-static-block@7.26.0(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-create-class-features-plugin': 7.26.9(@babel/core@7.26.9) + '@babel/core': 7.26.10 + '@babel/helper-create-class-features-plugin': 7.26.9(@babel/core@7.26.10) '@babel/helper-plugin-utils': 7.26.5 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-exponentiation-operator@7.26.3(@babel/core@7.26.9)': + '@babel/plugin-transform-exponentiation-operator@7.26.3(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-logical-assignment-operators@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-transform-logical-assignment-operators@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-optional-chaining@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-transform-optional-chaining@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-methods@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-transform-private-methods@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 - '@babel/helper-create-class-features-plugin': 7.26.9(@babel/core@7.26.9) + '@babel/core': 7.26.10 + '@babel/helper-create-class-features-plugin': 7.26.9(@babel/core@7.26.10) '@babel/helper-plugin-utils': 7.26.5 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-property-in-object@7.25.9(@babel/core@7.26.9)': + '@babel/plugin-transform-private-property-in-object@7.25.9(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-create-class-features-plugin': 7.26.9(@babel/core@7.26.9) + '@babel/helper-create-class-features-plugin': 7.26.9(@babel/core@7.26.10) '@babel/helper-plugin-utils': 7.26.5 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-typescript@7.26.8(@babel/core@7.26.9)': + '@babel/plugin-transform-typescript@7.26.8(@babel/core@7.26.10)': dependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-create-class-features-plugin': 7.26.9(@babel/core@7.26.9) + '@babel/helper-create-class-features-plugin': 7.26.9(@babel/core@7.26.10) '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.9) + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.10) transitivePeerDependencies: - supports-color - '@babel/runtime@7.26.9': + '@babel/runtime@7.26.10': dependencies: regenerator-runtime: 0.14.1 '@babel/template@7.26.9': dependencies: '@babel/code-frame': 7.26.2 - '@babel/parser': 7.26.9 - '@babel/types': 7.26.9 + '@babel/parser': 7.26.10 + '@babel/types': 7.26.10 - '@babel/traverse@7.26.9': + '@babel/traverse@7.26.10': dependencies: '@babel/code-frame': 7.26.2 - '@babel/generator': 7.26.9 - '@babel/parser': 7.26.9 + '@babel/generator': 7.26.10 + '@babel/parser': 7.26.10 '@babel/template': 7.26.9 - '@babel/types': 7.26.9 + '@babel/types': 7.26.10 debug: 4.4.0(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.26.9': + '@babel/types@7.26.10': dependencies: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 @@ -3797,18 +3797,18 @@ snapshots: '@codspeed/core@4.0.0': dependencies: - axios: 1.8.1 + axios: 1.8.3 find-up: 6.3.0 form-data: 4.0.2 node-gyp-build: 4.8.4 transitivePeerDependencies: - debug - '@codspeed/vitest-plugin@4.0.0(vite@6.2.0(@types/node@22.13.8)(terser@5.39.0))(vitest@3.0.7(@types/node@22.13.8)(terser@5.39.0))': + '@codspeed/vitest-plugin@4.0.0(vite@6.2.2(@types/node@22.13.10)(terser@5.39.0))(vitest@3.0.8(@types/node@22.13.10)(terser@5.39.0))': dependencies: '@codspeed/core': 4.0.0 - vite: 6.2.0(@types/node@22.13.8)(terser@5.39.0) - vitest: 3.0.7(@types/node@22.13.8)(terser@5.39.0) + vite: 6.2.2(@types/node@22.13.10)(terser@5.39.0) + vitest: 3.0.8(@types/node@22.13.10)(terser@5.39.0) transitivePeerDependencies: - debug @@ -3832,102 +3832,102 @@ snapshots: '@emotion/unitless@0.7.5': {} - '@esbuild/aix-ppc64@0.25.0': + '@esbuild/aix-ppc64@0.25.1': optional: true - '@esbuild/android-arm64@0.25.0': + '@esbuild/android-arm64@0.25.1': optional: true - '@esbuild/android-arm@0.25.0': + '@esbuild/android-arm@0.25.1': optional: true - '@esbuild/android-x64@0.25.0': + '@esbuild/android-x64@0.25.1': optional: true - '@esbuild/darwin-arm64@0.25.0': + '@esbuild/darwin-arm64@0.25.1': optional: true - '@esbuild/darwin-x64@0.25.0': + '@esbuild/darwin-x64@0.25.1': optional: true - '@esbuild/freebsd-arm64@0.25.0': + '@esbuild/freebsd-arm64@0.25.1': optional: true - '@esbuild/freebsd-x64@0.25.0': + '@esbuild/freebsd-x64@0.25.1': optional: true - '@esbuild/linux-arm64@0.25.0': + '@esbuild/linux-arm64@0.25.1': optional: true - '@esbuild/linux-arm@0.25.0': + '@esbuild/linux-arm@0.25.1': optional: true - '@esbuild/linux-ia32@0.25.0': + '@esbuild/linux-ia32@0.25.1': optional: true - '@esbuild/linux-loong64@0.25.0': + '@esbuild/linux-loong64@0.25.1': optional: true - '@esbuild/linux-mips64el@0.25.0': + '@esbuild/linux-mips64el@0.25.1': optional: true - '@esbuild/linux-ppc64@0.25.0': + '@esbuild/linux-ppc64@0.25.1': optional: true - '@esbuild/linux-riscv64@0.25.0': + '@esbuild/linux-riscv64@0.25.1': optional: true - '@esbuild/linux-s390x@0.25.0': + '@esbuild/linux-s390x@0.25.1': optional: true - '@esbuild/linux-x64@0.25.0': + '@esbuild/linux-x64@0.25.1': optional: true - '@esbuild/netbsd-arm64@0.25.0': + '@esbuild/netbsd-arm64@0.25.1': optional: true - '@esbuild/netbsd-x64@0.25.0': + '@esbuild/netbsd-x64@0.25.1': optional: true - '@esbuild/openbsd-arm64@0.25.0': + '@esbuild/openbsd-arm64@0.25.1': optional: true - '@esbuild/openbsd-x64@0.25.0': + '@esbuild/openbsd-x64@0.25.1': optional: true - '@esbuild/sunos-x64@0.25.0': + '@esbuild/sunos-x64@0.25.1': optional: true - '@esbuild/win32-arm64@0.25.0': + '@esbuild/win32-arm64@0.25.1': optional: true - '@esbuild/win32-ia32@0.25.0': + '@esbuild/win32-ia32@0.25.1': optional: true - '@esbuild/win32-x64@0.25.0': + '@esbuild/win32-x64@0.25.1': optional: true - '@inquirer/checkbox@4.1.2(@types/node@22.13.8)': + '@inquirer/checkbox@4.1.4(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.7(@types/node@22.13.8) - '@inquirer/figures': 1.0.10 - '@inquirer/type': 3.0.4(@types/node@22.13.8) + '@inquirer/core': 10.1.9(@types/node@22.13.10) + '@inquirer/figures': 1.0.11 + '@inquirer/type': 3.0.5(@types/node@22.13.10) ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 - '@inquirer/confirm@5.1.6(@types/node@22.13.8)': + '@inquirer/confirm@5.1.8(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.7(@types/node@22.13.8) - '@inquirer/type': 3.0.4(@types/node@22.13.8) + '@inquirer/core': 10.1.9(@types/node@22.13.10) + '@inquirer/type': 3.0.5(@types/node@22.13.10) optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 - '@inquirer/core@10.1.7(@types/node@22.13.8)': + '@inquirer/core@10.1.9(@types/node@22.13.10)': dependencies: - '@inquirer/figures': 1.0.10 - '@inquirer/type': 3.0.4(@types/node@22.13.8) + '@inquirer/figures': 1.0.11 + '@inquirer/type': 3.0.5(@types/node@22.13.10) ansi-escapes: 4.3.2 cli-width: 4.1.0 mute-stream: 2.0.0 @@ -3935,93 +3935,93 @@ snapshots: wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 - '@inquirer/editor@4.2.7(@types/node@22.13.8)': + '@inquirer/editor@4.2.9(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.7(@types/node@22.13.8) - '@inquirer/type': 3.0.4(@types/node@22.13.8) + '@inquirer/core': 10.1.9(@types/node@22.13.10) + '@inquirer/type': 3.0.5(@types/node@22.13.10) external-editor: 3.1.0 optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 - '@inquirer/expand@4.0.9(@types/node@22.13.8)': + '@inquirer/expand@4.0.11(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.7(@types/node@22.13.8) - '@inquirer/type': 3.0.4(@types/node@22.13.8) + '@inquirer/core': 10.1.9(@types/node@22.13.10) + '@inquirer/type': 3.0.5(@types/node@22.13.10) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 - '@inquirer/figures@1.0.10': {} + '@inquirer/figures@1.0.11': {} - '@inquirer/input@4.1.6(@types/node@22.13.8)': + '@inquirer/input@4.1.8(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.7(@types/node@22.13.8) - '@inquirer/type': 3.0.4(@types/node@22.13.8) + '@inquirer/core': 10.1.9(@types/node@22.13.10) + '@inquirer/type': 3.0.5(@types/node@22.13.10) optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 - '@inquirer/number@3.0.9(@types/node@22.13.8)': + '@inquirer/number@3.0.11(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.7(@types/node@22.13.8) - '@inquirer/type': 3.0.4(@types/node@22.13.8) + '@inquirer/core': 10.1.9(@types/node@22.13.10) + '@inquirer/type': 3.0.5(@types/node@22.13.10) optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 - '@inquirer/password@4.0.9(@types/node@22.13.8)': + '@inquirer/password@4.0.11(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.7(@types/node@22.13.8) - '@inquirer/type': 3.0.4(@types/node@22.13.8) + '@inquirer/core': 10.1.9(@types/node@22.13.10) + '@inquirer/type': 3.0.5(@types/node@22.13.10) ansi-escapes: 4.3.2 optionalDependencies: - '@types/node': 22.13.8 - - '@inquirer/prompts@7.3.2(@types/node@22.13.8)': - dependencies: - '@inquirer/checkbox': 4.1.2(@types/node@22.13.8) - '@inquirer/confirm': 5.1.6(@types/node@22.13.8) - '@inquirer/editor': 4.2.7(@types/node@22.13.8) - '@inquirer/expand': 4.0.9(@types/node@22.13.8) - '@inquirer/input': 4.1.6(@types/node@22.13.8) - '@inquirer/number': 3.0.9(@types/node@22.13.8) - '@inquirer/password': 4.0.9(@types/node@22.13.8) - '@inquirer/rawlist': 4.0.9(@types/node@22.13.8) - '@inquirer/search': 3.0.9(@types/node@22.13.8) - '@inquirer/select': 4.0.9(@types/node@22.13.8) + '@types/node': 22.13.10 + + '@inquirer/prompts@7.4.0(@types/node@22.13.10)': + dependencies: + '@inquirer/checkbox': 4.1.4(@types/node@22.13.10) + '@inquirer/confirm': 5.1.8(@types/node@22.13.10) + '@inquirer/editor': 4.2.9(@types/node@22.13.10) + '@inquirer/expand': 4.0.11(@types/node@22.13.10) + '@inquirer/input': 4.1.8(@types/node@22.13.10) + '@inquirer/number': 3.0.11(@types/node@22.13.10) + '@inquirer/password': 4.0.11(@types/node@22.13.10) + '@inquirer/rawlist': 4.0.11(@types/node@22.13.10) + '@inquirer/search': 3.0.11(@types/node@22.13.10) + '@inquirer/select': 4.1.0(@types/node@22.13.10) optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 - '@inquirer/rawlist@4.0.9(@types/node@22.13.8)': + '@inquirer/rawlist@4.0.11(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.7(@types/node@22.13.8) - '@inquirer/type': 3.0.4(@types/node@22.13.8) + '@inquirer/core': 10.1.9(@types/node@22.13.10) + '@inquirer/type': 3.0.5(@types/node@22.13.10) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 - '@inquirer/search@3.0.9(@types/node@22.13.8)': + '@inquirer/search@3.0.11(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.7(@types/node@22.13.8) - '@inquirer/figures': 1.0.10 - '@inquirer/type': 3.0.4(@types/node@22.13.8) + '@inquirer/core': 10.1.9(@types/node@22.13.10) + '@inquirer/figures': 1.0.11 + '@inquirer/type': 3.0.5(@types/node@22.13.10) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 - '@inquirer/select@4.0.9(@types/node@22.13.8)': + '@inquirer/select@4.1.0(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.7(@types/node@22.13.8) - '@inquirer/figures': 1.0.10 - '@inquirer/type': 3.0.4(@types/node@22.13.8) + '@inquirer/core': 10.1.9(@types/node@22.13.10) + '@inquirer/figures': 1.0.11 + '@inquirer/type': 3.0.5(@types/node@22.13.10) ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 - '@inquirer/type@3.0.4(@types/node@22.13.8)': + '@inquirer/type@3.0.5(@types/node@22.13.10)': optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 '@isaacs/cliui@8.0.2': dependencies: @@ -4060,7 +4060,7 @@ snapshots: dependencies: tslib: 2.8.1 - '@jsonjoy.com/json-pack@1.1.1(tslib@2.8.1)': + '@jsonjoy.com/json-pack@1.2.0(tslib@2.8.1)': dependencies: '@jsonjoy.com/base64': 1.1.2(tslib@2.8.1) '@jsonjoy.com/util': 1.5.0(tslib@2.8.1) @@ -4072,11 +4072,11 @@ snapshots: dependencies: tslib: 2.8.1 - '@napi-rs/cli@3.0.0-alpha.73(@emnapi/runtime@1.3.1)(@types/node@22.13.8)(emnapi@1.3.1)': + '@napi-rs/cli@3.0.0-alpha.75(@emnapi/runtime@1.3.1)(@types/node@22.13.10)(emnapi@1.3.1)': dependencies: - '@inquirer/prompts': 7.3.2(@types/node@22.13.8) + '@inquirer/prompts': 7.4.0(@types/node@22.13.10) '@napi-rs/cross-toolchain': 0.0.19 - '@napi-rs/wasm-tools': 0.0.2 + '@napi-rs/wasm-tools': 0.0.3 '@octokit/rest': 21.1.1 clipanion: 3.2.1(typanion@3.14.0) colorette: 2.0.20 @@ -4257,62 +4257,62 @@ snapshots: '@tybys/wasm-util': 0.9.0 optional: true - '@napi-rs/wasm-tools-android-arm-eabi@0.0.2': + '@napi-rs/wasm-tools-android-arm-eabi@0.0.3': optional: true - '@napi-rs/wasm-tools-android-arm64@0.0.2': + '@napi-rs/wasm-tools-android-arm64@0.0.3': optional: true - '@napi-rs/wasm-tools-darwin-arm64@0.0.2': + '@napi-rs/wasm-tools-darwin-arm64@0.0.3': optional: true - '@napi-rs/wasm-tools-darwin-x64@0.0.2': + '@napi-rs/wasm-tools-darwin-x64@0.0.3': optional: true - '@napi-rs/wasm-tools-freebsd-x64@0.0.2': + '@napi-rs/wasm-tools-freebsd-x64@0.0.3': optional: true - '@napi-rs/wasm-tools-linux-arm64-gnu@0.0.2': + '@napi-rs/wasm-tools-linux-arm64-gnu@0.0.3': optional: true - '@napi-rs/wasm-tools-linux-arm64-musl@0.0.2': + '@napi-rs/wasm-tools-linux-arm64-musl@0.0.3': optional: true - '@napi-rs/wasm-tools-linux-x64-gnu@0.0.2': + '@napi-rs/wasm-tools-linux-x64-gnu@0.0.3': optional: true - '@napi-rs/wasm-tools-linux-x64-musl@0.0.2': + '@napi-rs/wasm-tools-linux-x64-musl@0.0.3': optional: true - '@napi-rs/wasm-tools-wasm32-wasi@0.0.2': + '@napi-rs/wasm-tools-wasm32-wasi@0.0.3': dependencies: '@napi-rs/wasm-runtime': 0.2.7 optional: true - '@napi-rs/wasm-tools-win32-arm64-msvc@0.0.2': + '@napi-rs/wasm-tools-win32-arm64-msvc@0.0.3': optional: true - '@napi-rs/wasm-tools-win32-ia32-msvc@0.0.2': + '@napi-rs/wasm-tools-win32-ia32-msvc@0.0.3': optional: true - '@napi-rs/wasm-tools-win32-x64-msvc@0.0.2': + '@napi-rs/wasm-tools-win32-x64-msvc@0.0.3': optional: true - '@napi-rs/wasm-tools@0.0.2': + '@napi-rs/wasm-tools@0.0.3': optionalDependencies: - '@napi-rs/wasm-tools-android-arm-eabi': 0.0.2 - '@napi-rs/wasm-tools-android-arm64': 0.0.2 - '@napi-rs/wasm-tools-darwin-arm64': 0.0.2 - '@napi-rs/wasm-tools-darwin-x64': 0.0.2 - '@napi-rs/wasm-tools-freebsd-x64': 0.0.2 - '@napi-rs/wasm-tools-linux-arm64-gnu': 0.0.2 - '@napi-rs/wasm-tools-linux-arm64-musl': 0.0.2 - '@napi-rs/wasm-tools-linux-x64-gnu': 0.0.2 - '@napi-rs/wasm-tools-linux-x64-musl': 0.0.2 - '@napi-rs/wasm-tools-wasm32-wasi': 0.0.2 - '@napi-rs/wasm-tools-win32-arm64-msvc': 0.0.2 - '@napi-rs/wasm-tools-win32-ia32-msvc': 0.0.2 - '@napi-rs/wasm-tools-win32-x64-msvc': 0.0.2 + '@napi-rs/wasm-tools-android-arm-eabi': 0.0.3 + '@napi-rs/wasm-tools-android-arm64': 0.0.3 + '@napi-rs/wasm-tools-darwin-arm64': 0.0.3 + '@napi-rs/wasm-tools-darwin-x64': 0.0.3 + '@napi-rs/wasm-tools-freebsd-x64': 0.0.3 + '@napi-rs/wasm-tools-linux-arm64-gnu': 0.0.3 + '@napi-rs/wasm-tools-linux-arm64-musl': 0.0.3 + '@napi-rs/wasm-tools-linux-x64-gnu': 0.0.3 + '@napi-rs/wasm-tools-linux-x64-musl': 0.0.3 + '@napi-rs/wasm-tools-wasm32-wasi': 0.0.3 + '@napi-rs/wasm-tools-win32-arm64-msvc': 0.0.3 + '@napi-rs/wasm-tools-win32-ia32-msvc': 0.0.3 + '@napi-rs/wasm-tools-win32-x64-msvc': 0.0.3 '@octokit/auth-token@5.1.2': {} @@ -4376,28 +4376,28 @@ snapshots: dependencies: '@octokit/openapi-types': 23.0.1 - '@oxlint/darwin-arm64@0.15.12': + '@oxlint/darwin-arm64@0.16.0': optional: true - '@oxlint/darwin-x64@0.15.12': + '@oxlint/darwin-x64@0.16.0': optional: true - '@oxlint/linux-arm64-gnu@0.15.12': + '@oxlint/linux-arm64-gnu@0.16.0': optional: true - '@oxlint/linux-arm64-musl@0.15.12': + '@oxlint/linux-arm64-musl@0.16.0': optional: true - '@oxlint/linux-x64-gnu@0.15.12': + '@oxlint/linux-x64-gnu@0.16.0': optional: true - '@oxlint/linux-x64-musl@0.15.12': + '@oxlint/linux-x64-musl@0.16.0': optional: true - '@oxlint/win32-arm64@0.15.12': + '@oxlint/win32-arm64@0.16.0': optional: true - '@oxlint/win32-x64@0.15.12': + '@oxlint/win32-x64@0.16.0': optional: true '@pkgjs/parseargs@0.11.0': @@ -4405,12 +4405,12 @@ snapshots: '@rc-component/async-validator@5.0.4': dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/color-picker@2.0.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: '@ant-design/fast-color': 2.0.6 - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -4418,18 +4418,18 @@ snapshots: '@rc-component/context@1.4.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 react-dom: 19.0.0(react@19.0.0) '@rc-component/mini-decimal@1.1.0': dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/mutate-observer@1.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -4437,7 +4437,7 @@ snapshots: '@rc-component/portal@1.1.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -4445,7 +4445,7 @@ snapshots: '@rc-component/qrcode@1.0.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -4453,7 +4453,7 @@ snapshots: '@rc-component/tour@1.15.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/portal': 1.1.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@rc-component/trigger': 2.2.6(react-dom@19.0.0(react@19.0.0))(react@19.0.0) classnames: 2.5.1 @@ -4463,7 +4463,7 @@ snapshots: '@rc-component/trigger@2.2.6(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/portal': 1.1.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) classnames: 2.5.1 rc-motion: 2.9.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -4472,61 +4472,61 @@ snapshots: react: 19.0.0 react-dom: 19.0.0(react@19.0.0) - '@rollup/rollup-android-arm-eabi@4.34.9': + '@rollup/rollup-android-arm-eabi@4.36.0': optional: true - '@rollup/rollup-android-arm64@4.34.9': + '@rollup/rollup-android-arm64@4.36.0': optional: true - '@rollup/rollup-darwin-arm64@4.34.9': + '@rollup/rollup-darwin-arm64@4.36.0': optional: true - '@rollup/rollup-darwin-x64@4.34.9': + '@rollup/rollup-darwin-x64@4.36.0': optional: true - '@rollup/rollup-freebsd-arm64@4.34.9': + '@rollup/rollup-freebsd-arm64@4.36.0': optional: true - '@rollup/rollup-freebsd-x64@4.34.9': + '@rollup/rollup-freebsd-x64@4.36.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.34.9': + '@rollup/rollup-linux-arm-gnueabihf@4.36.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.34.9': + '@rollup/rollup-linux-arm-musleabihf@4.36.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.34.9': + '@rollup/rollup-linux-arm64-gnu@4.36.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.34.9': + '@rollup/rollup-linux-arm64-musl@4.36.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.34.9': + '@rollup/rollup-linux-loongarch64-gnu@4.36.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.34.9': + '@rollup/rollup-linux-powerpc64le-gnu@4.36.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.34.9': + '@rollup/rollup-linux-riscv64-gnu@4.36.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.34.9': + '@rollup/rollup-linux-s390x-gnu@4.36.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.34.9': + '@rollup/rollup-linux-x64-gnu@4.36.0': optional: true - '@rollup/rollup-linux-x64-musl@4.34.9': + '@rollup/rollup-linux-x64-musl@4.36.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.34.9': + '@rollup/rollup-win32-arm64-msvc@4.36.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.34.9': + '@rollup/rollup-win32-ia32-msvc@4.36.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.34.9': + '@rollup/rollup-win32-x64-msvc@4.36.0': optional: true '@tybys/wasm-util@0.9.0': @@ -4540,49 +4540,49 @@ snapshots: '@types/mocha@10.0.10': {} - '@types/node@22.13.8': + '@types/node@22.13.10': dependencies: undici-types: 6.20.0 '@types/vscode@1.93.0': {} - '@vitest/expect@3.0.7': + '@vitest/expect@3.0.8': dependencies: - '@vitest/spy': 3.0.7 - '@vitest/utils': 3.0.7 + '@vitest/spy': 3.0.8 + '@vitest/utils': 3.0.8 chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.0.7(vite@6.2.0(@types/node@22.13.8)(terser@5.39.0))': + '@vitest/mocker@3.0.8(vite@6.2.2(@types/node@22.13.10)(terser@5.39.0))': dependencies: - '@vitest/spy': 3.0.7 + '@vitest/spy': 3.0.8 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 6.2.0(@types/node@22.13.8)(terser@5.39.0) + vite: 6.2.2(@types/node@22.13.10)(terser@5.39.0) - '@vitest/pretty-format@3.0.7': + '@vitest/pretty-format@3.0.8': dependencies: tinyrainbow: 2.0.0 - '@vitest/runner@3.0.7': + '@vitest/runner@3.0.8': dependencies: - '@vitest/utils': 3.0.7 + '@vitest/utils': 3.0.8 pathe: 2.0.3 - '@vitest/snapshot@3.0.7': + '@vitest/snapshot@3.0.8': dependencies: - '@vitest/pretty-format': 3.0.7 + '@vitest/pretty-format': 3.0.8 magic-string: 0.30.17 pathe: 2.0.3 - '@vitest/spy@3.0.7': + '@vitest/spy@3.0.8': dependencies: tinyspy: 3.0.2 - '@vitest/utils@3.0.7': + '@vitest/utils@3.0.8': dependencies: - '@vitest/pretty-format': 3.0.7 + '@vitest/pretty-format': 3.0.8 loupe: 3.1.3 tinyrainbow: 2.0.0 @@ -4647,9 +4647,9 @@ snapshots: '@vscode/vsce-sign-win32-arm64': 2.0.2 '@vscode/vsce-sign-win32-x64': 2.0.2 - '@vscode/vsce@3.2.2': + '@vscode/vsce@3.3.0': dependencies: - '@azure/identity': 4.7.0 + '@azure/identity': 4.8.0 '@vscode/vsce-sign': 2.0.5 azure-devops-node-api: 12.5.0 chalk: 2.4.2 @@ -4680,7 +4680,7 @@ snapshots: '@vue/compiler-core@3.5.13': dependencies: - '@babel/parser': 7.26.9 + '@babel/parser': 7.26.10 '@vue/shared': 3.5.13 entities: 4.5.0 estree-walker: 2.0.2 @@ -4693,7 +4693,7 @@ snapshots: '@vue/compiler-sfc@3.5.13': dependencies: - '@babel/parser': 7.26.9 + '@babel/parser': 7.26.10 '@vue/compiler-core': 3.5.13 '@vue/compiler-dom': 3.5.13 '@vue/compiler-ssr': 3.5.13 @@ -4732,7 +4732,7 @@ snapshots: '@vue/shared@3.5.13': {} - acorn@8.14.0: {} + acorn@8.14.1: {} agent-base@7.1.3: {} @@ -4756,7 +4756,7 @@ snapshots: ansi-styles@6.2.1: {} - antd@5.24.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + antd@5.24.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: '@ant-design/colors': 7.2.0 '@ant-design/cssinjs': 1.23.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -4764,7 +4764,7 @@ snapshots: '@ant-design/fast-color': 2.0.6 '@ant-design/icons': 5.6.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@ant-design/react-slick': 1.1.2(react@19.0.0) - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/color-picker': 2.0.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@rc-component/mutate-observer': 1.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@rc-component/qrcode': 1.0.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -4780,7 +4780,7 @@ snapshots: rc-drawer: 7.2.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-dropdown: 4.2.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-field-form: 2.7.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - rc-image: 7.11.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + rc-image: 7.11.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-input: 1.7.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-input-number: 9.4.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-mentions: 2.19.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -4797,7 +4797,7 @@ snapshots: rc-slider: 11.1.8(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-steps: 6.0.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-switch: 4.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - rc-table: 7.50.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + rc-table: 7.50.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-tabs: 15.5.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-textarea: 1.9.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-tooltip: 6.4.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -4825,7 +4825,7 @@ snapshots: asynckit@0.4.0: {} - axios@1.8.1: + axios@1.8.3: dependencies: follow-redirects: 1.15.9 form-data: 4.0.2 @@ -4878,8 +4878,8 @@ snapshots: browserslist@4.24.4: dependencies: - caniuse-lite: 1.0.30001701 - electron-to-chromium: 1.5.109 + caniuse-lite: 1.0.30001705 + electron-to-chromium: 1.5.119 node-releases: 2.0.19 update-browserslist-db: 1.1.3(browserslist@4.24.4) @@ -4925,14 +4925,14 @@ snapshots: es-errors: 1.3.0 function-bind: 1.1.2 - call-bound@1.0.3: + call-bound@1.0.4: dependencies: call-bind-apply-helpers: 1.0.2 get-intrinsic: 1.3.0 camelcase@6.3.0: {} - caniuse-lite@1.0.30001701: {} + caniuse-lite@1.0.30001705: {} chai@5.2.0: dependencies: @@ -4979,7 +4979,7 @@ snapshots: parse5: 7.2.1 parse5-htmlparser2-tree-adapter: 7.1.0 parse5-parser-stream: 7.1.2 - undici: 6.21.1 + undici: 6.21.2 whatwg-mimetype: 4.0.0 chokidar@3.6.0: @@ -5153,7 +5153,7 @@ snapshots: dependencies: safe-buffer: 5.2.1 - electron-to-chromium@1.5.109: {} + electron-to-chromium@1.5.119: {} emnapi@1.3.1: {} @@ -5197,33 +5197,33 @@ snapshots: has-tostringtag: 1.0.2 hasown: 2.0.2 - esbuild@0.25.0: + esbuild@0.25.1: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.0 - '@esbuild/android-arm': 0.25.0 - '@esbuild/android-arm64': 0.25.0 - '@esbuild/android-x64': 0.25.0 - '@esbuild/darwin-arm64': 0.25.0 - '@esbuild/darwin-x64': 0.25.0 - '@esbuild/freebsd-arm64': 0.25.0 - '@esbuild/freebsd-x64': 0.25.0 - '@esbuild/linux-arm': 0.25.0 - '@esbuild/linux-arm64': 0.25.0 - '@esbuild/linux-ia32': 0.25.0 - '@esbuild/linux-loong64': 0.25.0 - '@esbuild/linux-mips64el': 0.25.0 - '@esbuild/linux-ppc64': 0.25.0 - '@esbuild/linux-riscv64': 0.25.0 - '@esbuild/linux-s390x': 0.25.0 - '@esbuild/linux-x64': 0.25.0 - '@esbuild/netbsd-arm64': 0.25.0 - '@esbuild/netbsd-x64': 0.25.0 - '@esbuild/openbsd-arm64': 0.25.0 - '@esbuild/openbsd-x64': 0.25.0 - '@esbuild/sunos-x64': 0.25.0 - '@esbuild/win32-arm64': 0.25.0 - '@esbuild/win32-ia32': 0.25.0 - '@esbuild/win32-x64': 0.25.0 + '@esbuild/aix-ppc64': 0.25.1 + '@esbuild/android-arm': 0.25.1 + '@esbuild/android-arm64': 0.25.1 + '@esbuild/android-x64': 0.25.1 + '@esbuild/darwin-arm64': 0.25.1 + '@esbuild/darwin-x64': 0.25.1 + '@esbuild/freebsd-arm64': 0.25.1 + '@esbuild/freebsd-x64': 0.25.1 + '@esbuild/linux-arm': 0.25.1 + '@esbuild/linux-arm64': 0.25.1 + '@esbuild/linux-ia32': 0.25.1 + '@esbuild/linux-loong64': 0.25.1 + '@esbuild/linux-mips64el': 0.25.1 + '@esbuild/linux-ppc64': 0.25.1 + '@esbuild/linux-riscv64': 0.25.1 + '@esbuild/linux-s390x': 0.25.1 + '@esbuild/linux-x64': 0.25.1 + '@esbuild/netbsd-arm64': 0.25.1 + '@esbuild/netbsd-x64': 0.25.1 + '@esbuild/openbsd-arm64': 0.25.1 + '@esbuild/openbsd-x64': 0.25.1 + '@esbuild/sunos-x64': 0.25.1 + '@esbuild/win32-arm64': 0.25.1 + '@esbuild/win32-ia32': 0.25.1 + '@esbuild/win32-x64': 0.25.1 escalade@3.2.0: {} @@ -5643,7 +5643,7 @@ snapshots: memfs@4.17.0: dependencies: - '@jsonjoy.com/json-pack': 1.1.1(tslib@2.8.1) + '@jsonjoy.com/json-pack': 1.2.0(tslib@2.8.1) '@jsonjoy.com/util': 1.5.0(tslib@2.8.1) tree-dump: 1.0.2(tslib@2.8.1) tslib: 2.8.1 @@ -5714,7 +5714,7 @@ snapshots: mute-stream@2.0.0: {} - nanoid@3.3.8: {} + nanoid@3.3.10: {} napi-build-utils@2.0.0: optional: true @@ -5770,7 +5770,7 @@ snapshots: ovsx@0.10.1: dependencies: - '@vscode/vsce': 3.2.2 + '@vscode/vsce': 3.3.0 commander: 6.2.1 follow-redirects: 1.15.9 is-ci: 2.0.0 @@ -5782,16 +5782,16 @@ snapshots: - debug - supports-color - oxlint@0.15.12: + oxlint@0.16.0: optionalDependencies: - '@oxlint/darwin-arm64': 0.15.12 - '@oxlint/darwin-x64': 0.15.12 - '@oxlint/linux-arm64-gnu': 0.15.12 - '@oxlint/linux-arm64-musl': 0.15.12 - '@oxlint/linux-x64-gnu': 0.15.12 - '@oxlint/linux-x64-musl': 0.15.12 - '@oxlint/win32-arm64': 0.15.12 - '@oxlint/win32-x64': 0.15.12 + '@oxlint/darwin-arm64': 0.16.0 + '@oxlint/darwin-x64': 0.16.0 + '@oxlint/linux-arm64-gnu': 0.16.0 + '@oxlint/linux-arm64-musl': 0.16.0 + '@oxlint/linux-x64-gnu': 0.16.0 + '@oxlint/linux-x64-musl': 0.16.0 + '@oxlint/win32-arm64': 0.16.0 + '@oxlint/win32-x64': 0.16.0 p-limit@3.1.0: dependencies: @@ -5799,7 +5799,7 @@ snapshots: p-limit@4.0.0: dependencies: - yocto-queue: 1.1.1 + yocto-queue: 1.2.0 p-locate@5.0.0: dependencies: @@ -5860,7 +5860,7 @@ snapshots: postcss@8.5.3: dependencies: - nanoid: 3.3.8 + nanoid: 3.3.10 picocolors: 1.1.1 source-map-js: 1.2.1 @@ -5902,7 +5902,7 @@ snapshots: rc-cascader@3.33.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-select: 14.16.6(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-tree: 5.13.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -5912,7 +5912,7 @@ snapshots: rc-checkbox@3.5.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -5920,7 +5920,7 @@ snapshots: rc-collapse@3.9.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-motion: 2.9.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -5929,7 +5929,7 @@ snapshots: rc-dialog@9.6.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/portal': 1.1.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) classnames: 2.5.1 rc-motion: 2.9.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -5939,7 +5939,7 @@ snapshots: rc-drawer@7.2.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/portal': 1.1.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) classnames: 2.5.1 rc-motion: 2.9.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -5949,7 +5949,7 @@ snapshots: rc-dropdown@4.2.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/trigger': 2.2.6(react-dom@19.0.0(react@19.0.0))(react@19.0.0) classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -5958,15 +5958,15 @@ snapshots: rc-field-form@2.7.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/async-validator': 5.0.4 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 react-dom: 19.0.0(react@19.0.0) - rc-image@7.11.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + rc-image@7.11.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/portal': 1.1.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) classnames: 2.5.1 rc-dialog: 9.6.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -5977,7 +5977,7 @@ snapshots: rc-input-number@9.4.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/mini-decimal': 1.1.0 classnames: 2.5.1 rc-input: 1.7.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -5987,7 +5987,7 @@ snapshots: rc-input@1.7.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -5995,7 +5995,7 @@ snapshots: rc-mentions@2.19.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/trigger': 2.2.6(react-dom@19.0.0(react@19.0.0))(react@19.0.0) classnames: 2.5.1 rc-input: 1.7.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -6007,7 +6007,7 @@ snapshots: rc-menu@9.16.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/trigger': 2.2.6(react-dom@19.0.0(react@19.0.0))(react@19.0.0) classnames: 2.5.1 rc-motion: 2.9.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -6018,7 +6018,7 @@ snapshots: rc-motion@2.9.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -6026,7 +6026,7 @@ snapshots: rc-notification@5.6.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-motion: 2.9.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -6035,7 +6035,7 @@ snapshots: rc-overflow@1.4.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-resize-observer: 1.4.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -6044,7 +6044,7 @@ snapshots: rc-pagination@5.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -6052,7 +6052,7 @@ snapshots: rc-picker@4.11.3(dayjs@1.11.13)(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/trigger': 2.2.6(react-dom@19.0.0(react@19.0.0))(react@19.0.0) classnames: 2.5.1 rc-overflow: 1.4.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -6065,7 +6065,7 @@ snapshots: rc-progress@4.0.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -6073,7 +6073,7 @@ snapshots: rc-rate@2.13.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -6081,7 +6081,7 @@ snapshots: rc-resize-observer@1.4.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -6090,7 +6090,7 @@ snapshots: rc-segmented@2.7.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-motion: 2.9.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -6099,19 +6099,19 @@ snapshots: rc-select@14.16.6(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/trigger': 2.2.6(react-dom@19.0.0(react@19.0.0))(react@19.0.0) classnames: 2.5.1 rc-motion: 2.9.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-overflow: 1.4.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - rc-virtual-list: 3.18.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + rc-virtual-list: 3.18.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 react-dom: 19.0.0(react@19.0.0) rc-slider@11.1.8(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -6119,7 +6119,7 @@ snapshots: rc-steps@6.0.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -6127,26 +6127,26 @@ snapshots: rc-switch@4.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 react-dom: 19.0.0(react@19.0.0) - rc-table@7.50.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + rc-table@7.50.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/context': 1.4.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) classnames: 2.5.1 rc-resize-observer: 1.4.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - rc-virtual-list: 3.18.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + rc-virtual-list: 3.18.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 react-dom: 19.0.0(react@19.0.0) rc-tabs@15.5.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-dropdown: 4.2.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-menu: 9.16.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -6158,7 +6158,7 @@ snapshots: rc-textarea@1.9.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-input: 1.7.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-resize-observer: 1.4.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -6168,7 +6168,7 @@ snapshots: rc-tooltip@6.4.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@rc-component/trigger': 2.2.6(react-dom@19.0.0(react@19.0.0))(react@19.0.0) classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -6177,7 +6177,7 @@ snapshots: rc-tree-select@5.27.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-select: 14.16.6(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-tree: 5.13.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -6187,17 +6187,17 @@ snapshots: rc-tree@5.13.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-motion: 2.9.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - rc-virtual-list: 3.18.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + rc-virtual-list: 3.18.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 react-dom: 19.0.0(react@19.0.0) rc-upload@4.8.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 @@ -6205,14 +6205,14 @@ snapshots: rc-util@5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 react: 19.0.0 react-dom: 19.0.0(react@19.0.0) react-is: 18.3.1 - rc-virtual-list@3.18.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + rc-virtual-list@3.18.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 classnames: 2.5.1 rc-resize-observer: 1.4.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -6273,29 +6273,29 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 - rollup@4.34.9: + rollup@4.36.0: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.34.9 - '@rollup/rollup-android-arm64': 4.34.9 - '@rollup/rollup-darwin-arm64': 4.34.9 - '@rollup/rollup-darwin-x64': 4.34.9 - '@rollup/rollup-freebsd-arm64': 4.34.9 - '@rollup/rollup-freebsd-x64': 4.34.9 - '@rollup/rollup-linux-arm-gnueabihf': 4.34.9 - '@rollup/rollup-linux-arm-musleabihf': 4.34.9 - '@rollup/rollup-linux-arm64-gnu': 4.34.9 - '@rollup/rollup-linux-arm64-musl': 4.34.9 - '@rollup/rollup-linux-loongarch64-gnu': 4.34.9 - '@rollup/rollup-linux-powerpc64le-gnu': 4.34.9 - '@rollup/rollup-linux-riscv64-gnu': 4.34.9 - '@rollup/rollup-linux-s390x-gnu': 4.34.9 - '@rollup/rollup-linux-x64-gnu': 4.34.9 - '@rollup/rollup-linux-x64-musl': 4.34.9 - '@rollup/rollup-win32-arm64-msvc': 4.34.9 - '@rollup/rollup-win32-ia32-msvc': 4.34.9 - '@rollup/rollup-win32-x64-msvc': 4.34.9 + '@rollup/rollup-android-arm-eabi': 4.36.0 + '@rollup/rollup-android-arm64': 4.36.0 + '@rollup/rollup-darwin-arm64': 4.36.0 + '@rollup/rollup-darwin-x64': 4.36.0 + '@rollup/rollup-freebsd-arm64': 4.36.0 + '@rollup/rollup-freebsd-x64': 4.36.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.36.0 + '@rollup/rollup-linux-arm-musleabihf': 4.36.0 + '@rollup/rollup-linux-arm64-gnu': 4.36.0 + '@rollup/rollup-linux-arm64-musl': 4.36.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.36.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.36.0 + '@rollup/rollup-linux-riscv64-gnu': 4.36.0 + '@rollup/rollup-linux-s390x-gnu': 4.36.0 + '@rollup/rollup-linux-x64-gnu': 4.36.0 + '@rollup/rollup-linux-x64-musl': 4.36.0 + '@rollup/rollup-win32-arm64-msvc': 4.36.0 + '@rollup/rollup-win32-ia32-msvc': 4.36.0 + '@rollup/rollup-win32-x64-msvc': 4.36.0 fsevents: 2.3.3 run-applescript@7.0.0: {} @@ -6339,14 +6339,14 @@ snapshots: side-channel-map@1.0.1: dependencies: - call-bound: 1.0.3 + call-bound: 1.0.4 es-errors: 1.3.0 get-intrinsic: 1.3.0 object-inspect: 1.13.4 side-channel-weakmap@1.0.2: dependencies: - call-bound: 1.0.3 + call-bound: 1.0.4 es-errors: 1.3.0 get-intrinsic: 1.3.0 object-inspect: 1.13.4 @@ -6387,7 +6387,7 @@ snapshots: stackback@0.0.2: {} - std-env@3.8.0: {} + std-env@3.8.1: {} stdin-discarder@0.1.0: dependencies: @@ -6474,7 +6474,7 @@ snapshots: terser@5.39.0: dependencies: '@jridgewell/source-map': 0.3.6 - acorn: 8.14.0 + acorn: 8.14.1 commander: 2.20.3 source-map-support: 0.5.21 @@ -6545,7 +6545,7 @@ snapshots: undici-types@6.20.0: {} - undici@6.21.1: {} + undici@6.21.2: {} universal-user-agent@7.0.2: {} @@ -6567,13 +6567,13 @@ snapshots: '@types/istanbul-lib-coverage': 2.0.6 convert-source-map: 2.0.0 - vite-node@3.0.7(@types/node@22.13.8)(terser@5.39.0): + vite-node@3.0.8(@types/node@22.13.10)(terser@5.39.0): dependencies: cac: 6.7.14 debug: 4.4.0(supports-color@8.1.1) es-module-lexer: 1.6.0 pathe: 2.0.3 - vite: 6.2.0(@types/node@22.13.8)(terser@5.39.0) + vite: 6.2.2(@types/node@22.13.10)(terser@5.39.0) transitivePeerDependencies: - '@types/node' - jiti @@ -6588,40 +6588,40 @@ snapshots: - tsx - yaml - vite@6.2.0(@types/node@22.13.8)(terser@5.39.0): + vite@6.2.2(@types/node@22.13.10)(terser@5.39.0): dependencies: - esbuild: 0.25.0 + esbuild: 0.25.1 postcss: 8.5.3 - rollup: 4.34.9 + rollup: 4.36.0 optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 fsevents: 2.3.3 terser: 5.39.0 - vitest@3.0.7(@types/node@22.13.8)(terser@5.39.0): + vitest@3.0.8(@types/node@22.13.10)(terser@5.39.0): dependencies: - '@vitest/expect': 3.0.7 - '@vitest/mocker': 3.0.7(vite@6.2.0(@types/node@22.13.8)(terser@5.39.0)) - '@vitest/pretty-format': 3.0.7 - '@vitest/runner': 3.0.7 - '@vitest/snapshot': 3.0.7 - '@vitest/spy': 3.0.7 - '@vitest/utils': 3.0.7 + '@vitest/expect': 3.0.8 + '@vitest/mocker': 3.0.8(vite@6.2.2(@types/node@22.13.10)(terser@5.39.0)) + '@vitest/pretty-format': 3.0.8 + '@vitest/runner': 3.0.8 + '@vitest/snapshot': 3.0.8 + '@vitest/spy': 3.0.8 + '@vitest/utils': 3.0.8 chai: 5.2.0 debug: 4.4.0(supports-color@8.1.1) expect-type: 1.2.0 magic-string: 0.30.17 pathe: 2.0.3 - std-env: 3.8.0 + std-env: 3.8.1 tinybench: 2.9.0 tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 2.0.0 - vite: 6.2.0(@types/node@22.13.8)(terser@5.39.0) - vite-node: 3.0.7(@types/node@22.13.8)(terser@5.39.0) + vite: 6.2.2(@types/node@22.13.10)(terser@5.39.0) + vite-node: 3.0.8(@types/node@22.13.10)(terser@5.39.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.13.8 + '@types/node': 22.13.10 transitivePeerDependencies: - jiti - less @@ -6760,6 +6760,6 @@ snapshots: yocto-queue@0.1.0: {} - yocto-queue@1.1.1: {} + yocto-queue@1.2.0: {} yoctocolors-cjs@2.1.2: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 242b01bb47039..eb9b0a191f014 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -8,6 +8,6 @@ packages: - 'tasks/e2e' catalog: - "@napi-rs/cli": 3.0.0-alpha.73 - "vitest": 3.0.7 + "@napi-rs/cli": 3.0.0-alpha.75 + "vitest": 3.0.8 "typescript": 5.8.2 diff --git a/tasks/transform_conformance/snapshots/babel_exec.snap.md b/tasks/transform_conformance/snapshots/babel_exec.snap.md index 297e4df29d254..d6196eda10b59 100644 --- a/tasks/transform_conformance/snapshots/babel_exec.snap.md +++ b/tasks/transform_conformance/snapshots/babel_exec.snap.md @@ -45,8 +45,8 @@ TypeError: e.has is not a function ./fixtures/babel/babel-plugin-transform-class-properties-test-fixtures-public-computed-toPrimitive-exec.test.js AssertionError: expected [Function] to throw error including '@@toPrimitive must return a primitive…' but got 'Cannot convert object to primitive va…' - at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.7/node_modules/@vitest/expect/dist/index.js:1646:21) - at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.7/node_modules/@vitest/expect/dist/index.js:1035:17) + at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.8/node_modules/@vitest/expect/dist/index.js:1646:21) + at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.8/node_modules/@vitest/expect/dist/index.js:1035:17) at Proxy.methodWrapper (./node_modules/.pnpm/chai@5.2.0/node_modules/chai/chai.js:1618:25) at ./tasks/transform_conformance/fixtures/babel/babel-plugin-transform-class-properties-test-fixtures-public-computed-toPrimitive-exec.test.js:37:5 @@ -414,8 +414,8 @@ ReferenceError: _Foo_brand is not defined ./fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-private-loose-rhs-not-object-exec.test.js AssertionError: expected [Function] to throw error including 'right-hand side of \'in\' should be a…' but got '_Class_brand is not defined' - at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.7/node_modules/@vitest/expect/dist/index.js:1646:21) - at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.7/node_modules/@vitest/expect/dist/index.js:1035:17) + at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.8/node_modules/@vitest/expect/dist/index.js:1646:21) + at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.8/node_modules/@vitest/expect/dist/index.js:1035:17) at Proxy.methodWrapper (./node_modules/.pnpm/chai@5.2.0/node_modules/chai/chai.js:1618:25) at ./tasks/transform_conformance/fixtures/babel/babel-plugin-transform-private-property-in-object-test-fixtures-private-loose-rhs-not-object-exec.test.js:176:5 @@ -454,8 +454,8 @@ ReferenceError: transformAsync is not defined ./fixtures/babel/babel-preset-env-test-fixtures-plugins-integration-issue-15170-exec.test.js AssertionError: expected [Function] to not throw an error but 'ReferenceError: x is not defined' was thrown - at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.7/node_modules/@vitest/expect/dist/index.js:1646:21) - at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.7/node_modules/@vitest/expect/dist/index.js:1035:17) + at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.8/node_modules/@vitest/expect/dist/index.js:1646:21) + at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.8/node_modules/@vitest/expect/dist/index.js:1035:17) at Proxy.methodWrapper (./node_modules/.pnpm/chai@5.2.0/node_modules/chai/chai.js:1618:25) at ./tasks/transform_conformance/fixtures/babel/babel-preset-env-test-fixtures-plugins-integration-issue-15170-exec.test.js:6:9 diff --git a/tasks/transform_conformance/snapshots/oxc_exec.snap.md b/tasks/transform_conformance/snapshots/oxc_exec.snap.md index f4ca560914b2e..c3e4d275edf2e 100644 --- a/tasks/transform_conformance/snapshots/oxc_exec.snap.md +++ b/tasks/transform_conformance/snapshots/oxc_exec.snap.md @@ -8,8 +8,8 @@ Failures: ./fixtures/oxc/babel-plugin-transform-class-properties-test-fixtures-private-field-resolve-to-method-in-computed-key-exec.test.js AssertionError: expected [Function] to throw error including 'Receiver must be an instance of class…' but got 'Private element is not present on thi…' - at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.7/node_modules/@vitest/expect/dist/index.js:1646:21) - at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.7/node_modules/@vitest/expect/dist/index.js:1035:17) + at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.8/node_modules/@vitest/expect/dist/index.js:1646:21) + at Proxy. (./node_modules/.pnpm/@vitest+expect@3.0.8/node_modules/@vitest/expect/dist/index.js:1035:17) at Proxy.methodWrapper (./node_modules/.pnpm/chai@5.2.0/node_modules/chai/chai.js:1618:25) at ./tasks/transform_conformance/fixtures/oxc/babel-plugin-transform-class-properties-test-fixtures-private-field-resolve-to-method-in-computed-key-exec.test.js:96:33 From b34cf94c9b4cd6eb2efd4caf2e3bc0d05763319d Mon Sep 17 00:00:00 2001 From: Boshen <1430279+Boshen@users.noreply.github.com> Date: Mon, 17 Mar 2025 09:19:55 +0000 Subject: [PATCH 05/22] refactor(oxlint): remove `jemallocator` (#9823) jemallocator is inactively maintained. mimalloc is slightly faster on all platforms. This should also improve cold compile time for this project. The only downside of mimalloc is that it requires `cmake`. --- Cargo.lock | 21 --------------------- Cargo.toml | 1 - apps/oxlint/Cargo.toml | 14 +++++++------- apps/oxlint/src/main.rs | 8 ++------ 4 files changed, 9 insertions(+), 35 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a403982021ff4..b08b95de24f0f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1176,26 +1176,6 @@ dependencies = [ "phf", ] -[[package]] -name = "jemalloc-sys" -version = "0.5.4+5.3.0-patched" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac6c1946e1cea1788cbfde01c993b52a10e2da07f4bac608228d1bed20bfebf2" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "jemallocator" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0de374a9f8e63150e6f5e8a60cc14c668226d7a347d8aee1a45766e3c4dd3bc" -dependencies = [ - "jemalloc-sys", - "libc", -] - [[package]] name = "jiff" version = "0.2.4" @@ -2329,7 +2309,6 @@ dependencies = [ "cow-utils", "ignore", "insta", - "jemallocator", "mimalloc-safe", "oxc-miette", "oxc_diagnostics", diff --git a/Cargo.toml b/Cargo.toml index b7b1af52d0d2b..8e892db425e6e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -189,7 +189,6 @@ insta = "1.42.1" itertools = "0.14.0" itoa = "1.0.14" javascript-globals = "1.0.0" -jemallocator = "0.5.4" json-strip-comments = "1.0.4" language-tags = "0.3.2" lazy_static = "1.5.0" diff --git a/apps/oxlint/Cargo.toml b/apps/oxlint/Cargo.toml index 645bd4900f72f..f2e97cdada230 100644 --- a/apps/oxlint/Cargo.toml +++ b/apps/oxlint/Cargo.toml @@ -24,12 +24,6 @@ path = "src/main.rs" test = false doctest = false -[target.'cfg(all(not(target_env = "msvc"), not(target_os = "windows")))'.dependencies] -jemallocator = { workspace = true, optional = true } - -[target.'cfg(target_os = "windows")'.dependencies] -mimalloc-safe = { workspace = true, optional = true } - [dependencies] oxc_diagnostics = { workspace = true } oxc_linter = { workspace = true } @@ -46,10 +40,16 @@ serde_json = { workspace = true } tempfile = { workspace = true } tracing-subscriber = { workspace = true, features = [] } # Omit the `regex` feature +[target.'cfg(all(not(target_os = "linux"), not(target_os = "freebsd"), not(target_family = "wasm")))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } + +[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } + [dev-dependencies] insta = { workspace = true } regex = { workspace = true } [features] default = [] -allocator = ["dep:jemallocator", "dep:mimalloc-safe"] +allocator = ["dep:mimalloc-safe"] diff --git a/apps/oxlint/src/main.rs b/apps/oxlint/src/main.rs index a3a3e9e7a9fa3..4137d2b48d75e 100644 --- a/apps/oxlint/src/main.rs +++ b/apps/oxlint/src/main.rs @@ -1,9 +1,5 @@ -// NB: Miri does not support custom allocators -#[cfg(all(feature = "allocator", not(miri), not(target_env = "msvc"), not(target_os = "windows")))] -#[global_allocator] -static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc; - -#[cfg(all(feature = "allocator", not(miri), target_os = "windows"))] +// NOTE: Miri does not support custom allocators +#[cfg(all(feature = "allocator", not(miri), not(target_family = "wasm")))] #[global_allocator] static GLOBAL: mimalloc_safe::MiMalloc = mimalloc_safe::MiMalloc; From 6407200768dfcf9e51a322d61dd647d82173bfcb Mon Sep 17 00:00:00 2001 From: dalaoshu Date: Mon, 17 Mar 2025 18:33:20 +0800 Subject: [PATCH 06/22] refactor(linter): improve `unicorn/new-for-builtins` (#9804) Related to #6050 - Improve the documentation - Better code style --- .../src/rules/unicorn/new_for_builtins.rs | 89 ++++++++----------- 1 file changed, 35 insertions(+), 54 deletions(-) diff --git a/crates/oxc_linter/src/rules/unicorn/new_for_builtins.rs b/crates/oxc_linter/src/rules/unicorn/new_for_builtins.rs index 4ddad5e877f09..fe4f72ae9877d 100644 --- a/crates/oxc_linter/src/rules/unicorn/new_for_builtins.rs +++ b/crates/oxc_linter/src/rules/unicorn/new_for_builtins.rs @@ -1,7 +1,4 @@ -use oxc_ast::{ - AstKind, - ast::{Expression, match_member_expression}, -}; +use oxc_ast::{AstKind, ast::Expression}; use oxc_diagnostics::OxcDiagnostic; use oxc_macros::declare_oxc_lint; use oxc_span::Span; @@ -24,16 +21,18 @@ pub struct NewForBuiltins; declare_oxc_lint!( /// ### What it does /// - /// Enforces the use of `new` for following builtins: `Object`, `Array`, `ArrayBuffer`, `BigInt64Array`, `BigUint64Array`, `DataView`, `Date`, `Error`, `Float32Array`, `Float64Array`, `Function`, `Int8Array`, `Int16Array`, `Int32Array`, `Map`, `WeakMap`, `Set`, `WeakSet`, `Promise`, `RegExp`, `Uint8Array`, `Uint16Array`, `Uint32Array`, `Uint8ClampedArray`, `SharedArrayBuffer`, `Proxy`, `WeakRef`, `FinalizationRegistry`. - /// - /// Disallows the use of `new` for following builtins: `String`, `Number`, `Boolean`, `Symbol`, `BigInt`. + /// Enforces the use of `new` for the following builtins: `Object`, `Array`, `ArrayBuffer`, `BigInt64Array`, + /// `BigUint64Array`, `DataView`, `Date`, `Error`, `Float32Array`, `Float64Array`, `Function`, `Int8Array`, + /// `Int16Array`, `Int32Array`, `Map`, `WeakMap`, `Set`, `WeakSet`, `Promise`, `RegExp`, `Uint8Array`, + /// `Uint16Array`, `Uint32Array`, `Uint8ClampedArray`, `SharedArrayBuffer`, `Proxy`, `WeakRef`, `FinalizationRegistry`. /// - /// These should not use `new` as that would create object wrappers for the primitive values, which is not what you want. However, without `new` they can be useful for coercing a value to that type. + /// Disallows the use of `new` for the following builtins: `String`, `Number`, `Boolean`, `Symbol`, `BigInt`. /// /// ### Why is this bad? /// - /// They work the same, but `new` should be preferred for consistency with other constructors. - /// + /// Using `new` inconsistently can cause confusion. Constructors like `Array` and `RegExp` should always use `new` + /// to ensure the expected instance type. Meanwhile, `String`, `Number`, `Boolean`, `Symbol`, and `BigInt` should not use `new`, + /// as they create object wrappers instead of primitive values. /// /// ### Examples /// @@ -57,32 +56,27 @@ impl Rule for NewForBuiltins { fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { match node.kind() { AstKind::NewExpression(new_expr) => { - let callee = new_expr.callee.without_parentheses(); - - let Some(builtin_name) = is_expr_global_builtin(callee, ctx) else { + let Some(builtin_name) = is_expr_global_builtin(&new_expr.callee, ctx) else { return; }; - if DISALLOW_NEW_FOR_BUILTINS.contains(builtin_name) { + if DISALLOW_NEW_FOR_BUILTINS.contains(&builtin_name) { ctx.diagnostic(disallow(new_expr.span, builtin_name)); } } AstKind::CallExpression(call_expr) => { - let Some(builtin_name) = - is_expr_global_builtin(call_expr.callee.without_parentheses(), ctx) - else { + let Some(builtin_name) = is_expr_global_builtin(&call_expr.callee, ctx) else { return; }; if ENFORCE_NEW_FOR_BUILTINS.contains(builtin_name) { if builtin_name == "Object" { - if let Some(parent) = ctx.nodes().parent_node(node.id()) { - if let AstKind::BinaryExpression(bin_expr) = parent.kind() { - if bin_expr.operator == BinaryOperator::StrictEquality - || bin_expr.operator == BinaryOperator::StrictInequality - { - return; - } + let parent_kind = ctx.nodes().parent_kind(node.id()); + if let Some(AstKind::BinaryExpression(bin_expr)) = parent_kind { + if bin_expr.operator == BinaryOperator::StrictEquality + || bin_expr.operator == BinaryOperator::StrictInequality + { + return; } } } @@ -99,33 +93,26 @@ fn is_expr_global_builtin<'a, 'b>( expr: &'b Expression<'a>, ctx: &'b LintContext<'a>, ) -> Option<&'b str> { - match expr { - Expression::Identifier(ident) => { - if !ctx.scoping().root_unresolved_references().contains_key(ident.name.as_str()) { - return None; - } - - if !ENFORCE_NEW_FOR_BUILTINS.contains(&ident.name) - && !DISALLOW_NEW_FOR_BUILTINS.contains(&ident.name) - { - return None; - } - - Some(ident.name.as_str()) + let expr = expr.without_parentheses(); + if let Expression::Identifier(ident) = expr { + let name = ident.name.as_str(); + if !ctx.scoping().root_unresolved_references().contains_key(name) { + return None; } - match_member_expression!(Expression) => { - let member_expr = expr.to_member_expression(); - let Expression::Identifier(ident) = member_expr.object() else { - return None; - }; - if !GLOBAL_OBJECT_NAMES.contains(ident.name.as_str()) { - return None; - } + Some(name) + } else { + let member_expr = expr.as_member_expression()?; - member_expr.static_property_name() + let Expression::Identifier(ident) = member_expr.object() else { + return None; + }; + + if !GLOBAL_OBJECT_NAMES.contains(&ident.name) { + return None; } - _ => None, + + member_expr.static_property_name() } } @@ -160,13 +147,7 @@ const ENFORCE_NEW_FOR_BUILTINS: phf::Set<&'static str> = phf_set! { "FinalizationRegistry", }; -const DISALLOW_NEW_FOR_BUILTINS: phf::Set<&'static str> = phf_set! { - "BigInt", - "Boolean", - "Number", - "Symbol", - "String", -}; +const DISALLOW_NEW_FOR_BUILTINS: [&str; 5] = ["BigInt", "Boolean", "Number", "Symbol", "String"]; #[test] fn test() { From e6f7c74ee2605ab40488e5ff2dcfdd3898ea589a Mon Sep 17 00:00:00 2001 From: Ulrich Stark <8657779+ulrichstark@users.noreply.github.com> Date: Mon, 17 Mar 2025 11:36:09 +0100 Subject: [PATCH 07/22] fix(linter): import and fix tests for typescript::no_unnecessary_parameter_property_assignment (#9720) Followup to #9618. PRs for oxc/no-redundant-constructor-init: #9299 #9364 typescript-eslint rule: [Docs](https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment) [Source](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/rules/no-unnecessary-parameter-property-assignment.ts) [Tests](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/tests/rules/no-unnecessary-parameter-property-assignment.test.ts) Changes of this PR: - Imported tests from typescript-eslint - Added one more passing test to the end - Fixed all new test cases - Changed rule category back to correctness This is my first major change to OXC. If there's anything wrong or not the OXC-way, I will happily improve on that. --- ...gnore fixtures__linter__nan.js@oxlint.snap | 2 +- ...ern _____.vue fixtures__linter@oxlint.snap | 2 +- ...l -D no-cycle fixtures__flow__@oxlint.snap | 2 +- ...ugin fixtures__flow__index.mjs@oxlint.snap | 2 +- ...rc_vitest_replace__foo.test.js@oxlint.snap | 2 +- ... fixtures__linter__debugger.js@oxlint.snap | 2 +- ... fixtures__linter__debugger.js@oxlint.snap | 2 +- ...ixtures__eslintrc_env__test.js@oxlint.snap | 2 +- ...on fixtures__no_undef__test.js@oxlint.snap | 2 +- ...ore_patterns__ignore_extension@oxlint.snap | 2 +- ...ixtures__eslintrc_env__test.js@oxlint.snap | 2 +- ...ixtures__eslintrc_off__test.js@oxlint.snap | 2 +- ...rc_vitest_replace__foo.test.js@oxlint.snap | 2 +- ... fixtures__linter__debugger.js@oxlint.snap | 2 +- ...tures__no_console_off__test.js@oxlint.snap | 2 +- ...pty_allow_empty_catch__test.js@oxlint.snap | 2 +- ..._disallow_empty_catch__test.js@oxlint.snap | 2 +- ...fixtures__overrides__other.jsx@oxlint.snap | 6 +- ...onfig.json fixtures__overrides@oxlint.snap | 2 +- ...es__typescript_eslint__test.ts@oxlint.snap | 2 +- ...ixtures__astro__debugger.astro@oxlint.snap | 2 +- .../snapshots/_fixtures__linter@oxlint.snap | 2 +- ...er.js fixtures__linter__nan.js@oxlint.snap | 2 +- ..._fixtures__linter__debugger.js@oxlint.snap | 2 +- ...tures__svelte__debugger.svelte@oxlint.snap | 2 +- .../_fixtures__vue__debugger.vue@oxlint.snap | 2 +- .../_fixtures__vue__empty.vue@oxlint.snap | 2 +- .../src/snapshots/_foo.asdf@oxlint.snap | 2 +- ...ore_directory_-c eslintrc.json@oxlint.snap | 2 +- ...c.json --ignore-pattern _.ts .@oxlint.snap | 2 +- ...s_rules_config.json console.js@oxlint.snap | 2 +- ...extends_config.json console.js@oxlint.snap | 2 +- ...config_--disable-nested-config@oxlint.snap | 2 +- .../fixtures__linter_debugger.js@oxlint.snap | 2 +- ...-config oxlint-no-console.json@oxlint.snap | 2 +- ...-config oxlint-no-console.json@oxlint.snap | 2 +- ...-config oxlint-no-console.json@oxlint.snap | 2 +- ...-config oxlint-no-console.json@oxlint.snap | 2 +- ...nv_globals_-c .oxlintrc.json .@oxlint.snap | 2 +- ...necessary_parameter_property_assignment.rs | 531 ++++++++++++++++-- ...cessary_parameter_property_assignment.snap | 180 ++++++ 41 files changed, 717 insertions(+), 76 deletions(-) diff --git a/apps/oxlint/src/snapshots/_--ignore-path fixtures__linter__.customignore --no-ignore fixtures__linter__nan.js@oxlint.snap b/apps/oxlint/src/snapshots/_--ignore-path fixtures__linter__.customignore --no-ignore fixtures__linter__nan.js@oxlint.snap index 7721f36078f12..793153d1c29ba 100644 --- a/apps/oxlint/src/snapshots/_--ignore-path fixtures__linter__.customignore --no-ignore fixtures__linter__nan.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_--ignore-path fixtures__linter__.customignore --no-ignore fixtures__linter__nan.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: help: Use the isNaN function to compare with NaN. Found 1 warning and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_--ignore-pattern _____.js --ignore-pattern _____.vue fixtures__linter@oxlint.snap b/apps/oxlint/src/snapshots/_--ignore-pattern _____.js --ignore-pattern _____.vue fixtures__linter@oxlint.snap index 04b817f25309c..8ea072d42aa2d 100644 --- a/apps/oxlint/src/snapshots/_--ignore-pattern _____.js --ignore-pattern _____.vue fixtures__linter@oxlint.snap +++ b/apps/oxlint/src/snapshots/_--ignore-pattern _____.js --ignore-pattern _____.vue fixtures__linter@oxlint.snap @@ -6,7 +6,7 @@ arguments: --ignore-pattern **/*.js --ignore-pattern **/*.vue fixtures/linter working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 0 files with 99 rules using 1 threads. +Finished in ms on 0 files with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_--import-plugin -A all -D no-cycle fixtures__flow__@oxlint.snap b/apps/oxlint/src/snapshots/_--import-plugin -A all -D no-cycle fixtures__flow__@oxlint.snap index 6183fcb7dd170..7e4f316c2326d 100644 --- a/apps/oxlint/src/snapshots/_--import-plugin -A all -D no-cycle fixtures__flow__@oxlint.snap +++ b/apps/oxlint/src/snapshots/_--import-plugin -A all -D no-cycle fixtures__flow__@oxlint.snap @@ -6,7 +6,7 @@ arguments: --import-plugin -A all -D no-cycle fixtures/flow/ working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 2 files with 101 rules using 1 threads. +Finished in ms on 2 files with 102 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_--import-plugin fixtures__flow__index.mjs@oxlint.snap b/apps/oxlint/src/snapshots/_--import-plugin fixtures__flow__index.mjs@oxlint.snap index 75aa4eebb7d41..811d383f709ad 100644 --- a/apps/oxlint/src/snapshots/_--import-plugin fixtures__flow__index.mjs@oxlint.snap +++ b/apps/oxlint/src/snapshots/_--import-plugin fixtures__flow__index.mjs@oxlint.snap @@ -6,7 +6,7 @@ arguments: --import-plugin fixtures/flow/index.mjs working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 101 rules using 1 threads. +Finished in ms on 1 file with 102 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_--vitest-plugin -c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap b/apps/oxlint/src/snapshots/_--vitest-plugin -c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap index cfb742a24ce9a..67e7af76f2f71 100644 --- a/apps/oxlint/src/snapshots/_--vitest-plugin -c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_--vitest-plugin -c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap @@ -23,7 +23,7 @@ working directory: help: Remove the appending `.skip` Found 1 warning and 1 error. -Finished in ms on 1 file with 111 rules using 1 threads. +Finished in ms on 1 file with 112 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_-D correctness fixtures__linter__debugger.js@oxlint.snap b/apps/oxlint/src/snapshots/_-D correctness fixtures__linter__debugger.js@oxlint.snap index d39c1c9fb58cc..441c21e84022b 100644 --- a/apps/oxlint/src/snapshots/_-D correctness fixtures__linter__debugger.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-D correctness fixtures__linter__debugger.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: help: Delete this code. Found 0 warnings and 1 error. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_-W correctness -A no-debugger fixtures__linter__debugger.js@oxlint.snap b/apps/oxlint/src/snapshots/_-W correctness -A no-debugger fixtures__linter__debugger.js@oxlint.snap index 11926e74336bd..4537edb45733b 100644 --- a/apps/oxlint/src/snapshots/_-W correctness -A no-debugger fixtures__linter__debugger.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-W correctness -A no-debugger fixtures__linter__debugger.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -W correctness -A no-debugger fixtures/linter/debugger.js working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 98 rules using 1 threads. +Finished in ms on 1 file with 99 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__eslintrc_env__eslintrc_no_env.json fixtures__eslintrc_env__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__eslintrc_env__eslintrc_no_env.json fixtures__eslintrc_env__test.js@oxlint.snap index 451e6f250263f..712a2dd9295f5 100644 --- a/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__eslintrc_env__eslintrc_no_env.json fixtures__eslintrc_env__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__eslintrc_env__eslintrc_no_env.json fixtures__eslintrc_env__test.js@oxlint.snap @@ -13,7 +13,7 @@ working directory: `---- Found 1 warning and 0 errors. -Finished in ms on 1 file with 100 rules using 1 threads. +Finished in ms on 1 file with 101 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__no_undef__eslintrc.json fixtures__no_undef__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__no_undef__eslintrc.json fixtures__no_undef__test.js@oxlint.snap index b34f6ffdb16df..1cca05a40f550 100644 --- a/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__no_undef__eslintrc.json fixtures__no_undef__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__no_undef__eslintrc.json fixtures__no_undef__test.js@oxlint.snap @@ -13,7 +13,7 @@ working directory: `---- Found 1 warning and 0 errors. -Finished in ms on 1 file with 100 rules using 1 threads. +Finished in ms on 1 file with 101 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__config_ignore_patterns__ignore_extension__eslintrc.json fixtures__config_ignore_patterns__ignore_extension@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__config_ignore_patterns__ignore_extension__eslintrc.json fixtures__config_ignore_patterns__ignore_extension@oxlint.snap index a43786a245a3e..8140a8404ab68 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__config_ignore_patterns__ignore_extension__eslintrc.json fixtures__config_ignore_patterns__ignore_extension@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__config_ignore_patterns__ignore_extension__eslintrc.json fixtures__config_ignore_patterns__ignore_extension@oxlint.snap @@ -12,7 +12,7 @@ working directory: help: Delete this file or add some code to it. Found 1 warning and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_env__eslintrc_env_browser.json fixtures__eslintrc_env__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_env__eslintrc_env_browser.json fixtures__eslintrc_env__test.js@oxlint.snap index cb33e86eda5d2..dce69c6b57347 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_env__eslintrc_env_browser.json fixtures__eslintrc_env__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_env__eslintrc_env_browser.json fixtures__eslintrc_env__test.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c fixtures/eslintrc_env/eslintrc_env_browser.json fixtures/eslintrc_ working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 100 rules using 1 threads. +Finished in ms on 1 file with 101 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_off__eslintrc.json fixtures__eslintrc_off__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_off__eslintrc.json fixtures__eslintrc_off__test.js@oxlint.snap index 49f293a3120bc..1882960fa4ff7 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_off__eslintrc.json fixtures__eslintrc_off__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_off__eslintrc.json fixtures__eslintrc_off__test.js@oxlint.snap @@ -12,7 +12,7 @@ working directory: help: Delete this file or add some code to it. Found 1 warning and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap index 77f21d13514f5..be8c10c9b0c28 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c fixtures/eslintrc_vitest_replace/eslintrc.json fixtures/eslintrc_v working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__linter__eslintrc.json fixtures__linter__debugger.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__linter__eslintrc.json fixtures__linter__debugger.js@oxlint.snap index 065900024163f..58480b8f1f2e4 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__linter__eslintrc.json fixtures__linter__debugger.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__linter__eslintrc.json fixtures__linter__debugger.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: help: Delete this code. Found 0 warnings and 1 error. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__no_console_off__eslintrc.json fixtures__no_console_off__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__no_console_off__eslintrc.json fixtures__no_console_off__test.js@oxlint.snap index 382c554509c03..4e4b1a536da0e 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__no_console_off__eslintrc.json fixtures__no_console_off__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__no_console_off__eslintrc.json fixtures__no_console_off__test.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c fixtures/no_console_off/eslintrc.json fixtures/no_console_off/test working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__no_empty_allow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_allow_empty_catch__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__no_empty_allow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_allow_empty_catch__test.js@oxlint.snap index a3f53acca7df7..3ffc946d29825 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__no_empty_allow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_allow_empty_catch__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__no_empty_allow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_allow_empty_catch__test.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c fixtures/no_empty_allow_empty_catch/eslintrc.json -W no-empty fixt working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 100 rules using 1 threads. +Finished in ms on 1 file with 101 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__no_empty_disallow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_disallow_empty_catch__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__no_empty_disallow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_disallow_empty_catch__test.js@oxlint.snap index 95a340ff42192..b5beddcc6e2ae 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__no_empty_disallow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_disallow_empty_catch__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__no_empty_disallow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_disallow_empty_catch__test.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: help: Remove this block or add a comment inside it Found 1 warning and 0 errors. -Finished in ms on 1 file with 100 rules using 1 threads. +Finished in ms on 1 file with 101 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.js -c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.ts -c fixtures__overrides__.oxlintrc.json fixtures__overrides__other.jsx@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.js -c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.ts -c fixtures__overrides__.oxlintrc.json fixtures__overrides__other.jsx@oxlint.snap index a03d8b7ba3ebf..6aecdc8f28e8f 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.js -c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.ts -c fixtures__overrides__.oxlintrc.json fixtures__overrides__other.jsx@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.js -c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.ts -c fixtures__overrides__.oxlintrc.json fixtures__overrides__other.jsx@oxlint.snap @@ -15,7 +15,7 @@ working directory: help: Replace var with let or const Found 0 warnings and 1 error. -Finished in ms on 1 file with 101 rules using 1 threads. +Finished in ms on 1 file with 102 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- @@ -42,7 +42,7 @@ working directory: help: Delete this console statement. Found 1 warning and 1 error. -Finished in ms on 1 file with 101 rules using 1 threads. +Finished in ms on 1 file with 102 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- @@ -61,7 +61,7 @@ working directory: help: Replace var with let or const Found 0 warnings and 1 error. -Finished in ms on 1 file with 101 rules using 1 threads. +Finished in ms on 1 file with 102 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__overrides__directories-config.json fixtures__overrides@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__overrides__directories-config.json fixtures__overrides@oxlint.snap index 0a80dbaf99147..57b9411a37cef 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__overrides__directories-config.json fixtures__overrides@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__overrides__directories-config.json fixtures__overrides@oxlint.snap @@ -35,7 +35,7 @@ working directory: help: Delete this code. Found 2 warnings and 2 errors. -Finished in ms on 7 files with 98 rules using 1 threads. +Finished in ms on 7 files with 99 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__typescript_eslint__eslintrc.json fixtures__typescript_eslint__test.ts@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__typescript_eslint__eslintrc.json fixtures__typescript_eslint__test.ts@oxlint.snap index 4548ba332d5e3..01b130e641302 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__typescript_eslint__eslintrc.json fixtures__typescript_eslint__test.ts@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__typescript_eslint__eslintrc.json fixtures__typescript_eslint__test.ts@oxlint.snap @@ -31,7 +31,7 @@ working directory: `---- Found 2 warnings and 1 error. -Finished in ms on 1 file with 60 rules using 1 threads. +Finished in ms on 1 file with 61 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__astro__debugger.astro@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__astro__debugger.astro@oxlint.snap index 5703cd6213588..ce69650d9a777 100644 --- a/apps/oxlint/src/snapshots/_fixtures__astro__debugger.astro@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__astro__debugger.astro@oxlint.snap @@ -43,7 +43,7 @@ working directory: help: Delete this code. Found 4 warnings and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__linter@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__linter@oxlint.snap index eee2c5b37a5bc..41ed16dd9a11f 100644 --- a/apps/oxlint/src/snapshots/_fixtures__linter@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__linter@oxlint.snap @@ -28,7 +28,7 @@ working directory: help: Use the isNaN function to compare with NaN. Found 3 warnings and 0 errors. -Finished in ms on 3 files with 99 rules using 1 threads. +Finished in ms on 3 files with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js fixtures__linter__nan.js@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js fixtures__linter__nan.js@oxlint.snap index 4e625d4e35454..37ed8ec0779e0 100644 --- a/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js fixtures__linter__nan.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js fixtures__linter__nan.js@oxlint.snap @@ -21,7 +21,7 @@ working directory: help: Use the isNaN function to compare with NaN. Found 2 warnings and 0 errors. -Finished in ms on 2 files with 99 rules using 1 threads. +Finished in ms on 2 files with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js@oxlint.snap index 9e83bac5f6469..7cb26666db9c5 100644 --- a/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: help: Delete this code. Found 1 warning and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__svelte__debugger.svelte@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__svelte__debugger.svelte@oxlint.snap index f18ab5959dbfa..ebf22eaab0dac 100644 --- a/apps/oxlint/src/snapshots/_fixtures__svelte__debugger.svelte@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__svelte__debugger.svelte@oxlint.snap @@ -16,7 +16,7 @@ working directory: help: Delete this code. Found 1 warning and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__vue__debugger.vue@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__vue__debugger.vue@oxlint.snap index 09a771b6b1a94..ed4e77e1e6658 100644 --- a/apps/oxlint/src/snapshots/_fixtures__vue__debugger.vue@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__vue__debugger.vue@oxlint.snap @@ -25,7 +25,7 @@ working directory: help: Delete this code. Found 2 warnings and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__vue__empty.vue@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__vue__empty.vue@oxlint.snap index fe00a080bda4e..cd0e5c08094d9 100644 --- a/apps/oxlint/src/snapshots/_fixtures__vue__empty.vue@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__vue__empty.vue@oxlint.snap @@ -6,7 +6,7 @@ arguments: fixtures/vue/empty.vue working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_foo.asdf@oxlint.snap b/apps/oxlint/src/snapshots/_foo.asdf@oxlint.snap index 4039b37dc6e05..87d399e398cd6 100644 --- a/apps/oxlint/src/snapshots/_foo.asdf@oxlint.snap +++ b/apps/oxlint/src/snapshots/_foo.asdf@oxlint.snap @@ -6,7 +6,7 @@ arguments: foo.asdf working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 0 files with 99 rules using 1 threads. +Finished in ms on 0 files with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__ignore_directory_-c eslintrc.json@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__ignore_directory_-c eslintrc.json@oxlint.snap index c1448f6e7518a..4ffcea39f4c1a 100644 --- a/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__ignore_directory_-c eslintrc.json@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__ignore_directory_-c eslintrc.json@oxlint.snap @@ -14,7 +14,7 @@ working directory: fixtures/config_ignore_patterns/ignore_directory help: Delete this file or add some code to it. Found 1 warning and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__with_oxlintrc_-c .__test__eslintrc.json --ignore-pattern _.ts .@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__with_oxlintrc_-c .__test__eslintrc.json --ignore-pattern _.ts .@oxlint.snap index 874ec0f5979e3..3b73dab0a2caf 100644 --- a/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__with_oxlintrc_-c .__test__eslintrc.json --ignore-pattern _.ts .@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__with_oxlintrc_-c .__test__eslintrc.json --ignore-pattern _.ts .@oxlint.snap @@ -12,7 +12,7 @@ working directory: fixtures/config_ignore_patterns/with_oxlintrc help: Delete this file or add some code to it. Found 1 warning and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__extends_config_--config extends_rules_config.json console.js@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__extends_config_--config extends_rules_config.json console.js@oxlint.snap index a38375fd84b45..9b9e35119c848 100644 --- a/apps/oxlint/src/snapshots/fixtures__extends_config_--config extends_rules_config.json console.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__extends_config_--config extends_rules_config.json console.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: fixtures/extends_config help: Delete this console statement. Found 0 warnings and 1 error. -Finished in ms on 1 file with 100 rules using 1 threads. +Finished in ms on 1 file with 101 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__extends_config_--config relative_paths__extends_extends_config.json console.js@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__extends_config_--config relative_paths__extends_extends_config.json console.js@oxlint.snap index 089ad5cb2ae8f..4caff171f72c2 100644 --- a/apps/oxlint/src/snapshots/fixtures__extends_config_--config relative_paths__extends_extends_config.json console.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__extends_config_--config relative_paths__extends_extends_config.json console.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: fixtures/extends_config help: Delete this console statement. Found 0 warnings and 1 error. -Finished in ms on 1 file with 101 rules using 1 threads. +Finished in ms on 1 file with 102 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__extends_config_--disable-nested-config@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__extends_config_--disable-nested-config@oxlint.snap index c0d4a54492a7d..c670af4aaf67f 100644 --- a/apps/oxlint/src/snapshots/fixtures__extends_config_--disable-nested-config@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__extends_config_--disable-nested-config@oxlint.snap @@ -31,7 +31,7 @@ working directory: fixtures/extends_config help: Delete this code. Found 3 warnings and 0 errors. -Finished in ms on 4 files with 99 rules using 1 threads. +Finished in ms on 4 files with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__linter_debugger.js@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__linter_debugger.js@oxlint.snap index 99fc956e70cd6..ff84a6673d5ef 100644 --- a/apps/oxlint/src/snapshots/fixtures__linter_debugger.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__linter_debugger.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: fixtures/linter help: Delete this code. Found 1 warning and 0 errors. -Finished in ms on 1 file with 99 rules using 1 threads. +Finished in ms on 1 file with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__nested_config_--config oxlint-no-console.json@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__nested_config_--config oxlint-no-console.json@oxlint.snap index 2b1ba527aeb5b..d14d0b2d0a52a 100644 --- a/apps/oxlint/src/snapshots/fixtures__nested_config_--config oxlint-no-console.json@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__nested_config_--config oxlint-no-console.json@oxlint.snap @@ -37,7 +37,7 @@ working directory: fixtures/nested_config help: Delete this console statement. Found 0 warnings and 4 errors. -Finished in ms on 7 files with 99 rules using 1 threads. +Finished in ms on 7 files with 100 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__nested_config_--experimental-nested-config --config oxlint-no-console.json@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__nested_config_--experimental-nested-config --config oxlint-no-console.json@oxlint.snap index 8af77bcd375ec..06d439f0eaf39 100644 --- a/apps/oxlint/src/snapshots/fixtures__nested_config_--experimental-nested-config --config oxlint-no-console.json@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__nested_config_--experimental-nested-config --config oxlint-no-console.json@oxlint.snap @@ -37,7 +37,7 @@ working directory: fixtures/nested_config help: Delete this console statement. Found 0 warnings and 4 errors. -Finished in ms on 7 files with 99 rules using 1 threads. +Finished in ms on 7 files with 100 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__nested_config_--experimental-nested-config -A no-console --config oxlint-no-console.json@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__nested_config_--experimental-nested-config -A no-console --config oxlint-no-console.json@oxlint.snap index 4e1a3a9c113b3..d37e03d3f4cca 100644 --- a/apps/oxlint/src/snapshots/fixtures__nested_config_--experimental-nested-config -A no-console --config oxlint-no-console.json@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__nested_config_--experimental-nested-config -A no-console --config oxlint-no-console.json@oxlint.snap @@ -6,7 +6,7 @@ arguments: --experimental-nested-config -A no-console --config oxlint-no-console working directory: fixtures/nested_config ---------- Found 0 warnings and 0 errors. -Finished in ms on 7 files with 98 rules using 1 threads. +Finished in ms on 7 files with 99 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__nested_config_-A no-console --config oxlint-no-console.json@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__nested_config_-A no-console --config oxlint-no-console.json@oxlint.snap index 7e174ba6c9fa9..55b915af88d5c 100644 --- a/apps/oxlint/src/snapshots/fixtures__nested_config_-A no-console --config oxlint-no-console.json@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__nested_config_-A no-console --config oxlint-no-console.json@oxlint.snap @@ -6,7 +6,7 @@ arguments: -A no-console --config oxlint-no-console.json working directory: fixtures/nested_config ---------- Found 0 warnings and 0 errors. -Finished in ms on 7 files with 98 rules using 1 threads. +Finished in ms on 7 files with 99 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__overrides_env_globals_-c .oxlintrc.json .@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__overrides_env_globals_-c .oxlintrc.json .@oxlint.snap index c69431376ae32..77a289ffcc590 100644 --- a/apps/oxlint/src/snapshots/fixtures__overrides_env_globals_-c .oxlintrc.json .@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__overrides_env_globals_-c .oxlintrc.json .@oxlint.snap @@ -51,7 +51,7 @@ working directory: fixtures/overrides_env_globals `---- Found 5 warnings and 0 errors. -Finished in ms on 3 files with 99 rules using 1 threads. +Finished in ms on 3 files with 100 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/crates/oxc_linter/src/rules/typescript/no_unnecessary_parameter_property_assignment.rs b/crates/oxc_linter/src/rules/typescript/no_unnecessary_parameter_property_assignment.rs index 7b153f36d0e50..97ad70bb06995 100644 --- a/crates/oxc_linter/src/rules/typescript/no_unnecessary_parameter_property_assignment.rs +++ b/crates/oxc_linter/src/rules/typescript/no_unnecessary_parameter_property_assignment.rs @@ -1,10 +1,15 @@ use oxc_ast::{ AstKind, - ast::{AssignmentTarget, Expression, MethodDefinitionKind}, + ast::{ + AssignmentExpression, AssignmentOperator, AssignmentTarget, ClassElement, Expression, + FormalParameter, MethodDefinitionKind, Statement, + }, }; +use oxc_ast_visit::Visit; use oxc_diagnostics::OxcDiagnostic; use oxc_macros::declare_oxc_lint; -use oxc_span::Span; +use oxc_span::{Atom, Span}; +use rustc_hash::FxHashSet; use crate::{AstNode, context::LintContext, rule::Rule}; @@ -47,7 +52,7 @@ declare_oxc_lint!( /// ``` NoUnnecessaryParameterPropertyAssignment, typescript, - nursery, // TODO: import tests from typescript-eslint, fix them and change back to correctness + correctness, pending, ); @@ -59,49 +64,188 @@ impl Rule for NoUnnecessaryParameterPropertyAssignment { if method.kind != MethodDefinitionKind::Constructor { return; } - for param in &method.value.params.items { - if !param.is_public() { + + let parameter_properties: Vec<_> = method + .value + .params + .items + .iter() + .filter(|param| { + // TypeScript offers special syntax for turning a constructor parameter into a class property with the same name and value. + // These are called parameter properties and are created by prefixing a constructor argument with one of the visibility modifiers public, private, protected, or readonly + // https://www.typescriptlang.org/docs/handbook/2/classes.html#parameter-properties + param.accessibility.is_some() || param.readonly + }) + .collect(); + + if parameter_properties.is_empty() { + return; + } + + let Some(parent_node) = ctx.semantic().nodes().parent_node(node.id()) else { + return; + }; + let AstKind::ClassBody(class_body) = parent_node.kind() else { + return; + }; + + let mut assigned_before_constructor = FxHashSet::default(); + for statement in &class_body.body { + let ClassElement::PropertyDefinition(property_definition) = statement else { continue; + }; + let Some(expression) = &property_definition.value else { + continue; + }; + let assignments = get_assignments_inside_expression(expression); + for assignment in assignments { + if let Some(this_property_name) = get_property_name(&assignment.left) { + assigned_before_constructor.insert(this_property_name); + }; } - let Some(ident) = param.pattern.get_binding_identifier() else { + } + + let mut visitor = AssignmentVisitor { + ctx, + parameter_properties, + assigned_before_unnecessary: FxHashSet::default(), + assigned_before_constructor, + }; + visitor.visit_method_definition(method); + } +} + +struct AssignmentVisitor<'a, 'b> { + ctx: &'b LintContext<'a>, + parameter_properties: Vec<&'b FormalParameter<'a>>, + assigned_before_unnecessary: FxHashSet>, + assigned_before_constructor: FxHashSet>, +} + +impl<'a> Visit<'a> for AssignmentVisitor<'a, '_> { + fn visit_assignment_expression( + &mut self, + assignment_expr: &oxc_ast::ast::AssignmentExpression<'a>, + ) { + let Some(this_property_name) = get_property_name(&assignment_expr.left) else { + return; + }; + // assigning to a property of this + + if !is_unnecessary_assignment_operator(assignment_expr.operator) { + self.assigned_before_unnecessary.insert(this_property_name); + return; + } + // operator could be unnecessary + + let Expression::Identifier(right_identifier) = assignment_expr.right.get_inner_expression() + else { + return; + }; + // the right side of the assignment is an identifier + + if this_property_name != right_identifier.name { + return; + } + // the property of this matches the identifier name on the right + + for param in &self.parameter_properties { + let Some(binding_identifier) = param.pattern.get_binding_identifier() else { continue; }; - for reference in ctx.symbol_references(ident.symbol_id()) { - // check if the param is being read which would indicate an assignment - if !reference.is_read() { - continue; - } + if binding_identifier.name != this_property_name { + continue; + } + // name of property parameter matches the name of the assigned property - let Some(AstKind::AssignmentExpression(assignment_expr)) = - ctx.nodes().parent_kind(reference.node_id()) - else { - continue; - }; + let right_reference = self.ctx.scoping().get_reference(right_identifier.reference_id()); + if !self + .ctx + .symbol_references(binding_identifier.symbol_id()) + .any(|reference| reference.node_id() == right_reference.node_id()) + { + continue; + } + // property parameter is same symbol as identifier on the right of assignment - // check for assigning to this: this.x = ? - let AssignmentTarget::StaticMemberExpression(static_member_expr) = - &assignment_expr.left - else { - continue; - }; - if !matches!(&static_member_expr.object, Expression::ThisExpression(_)) { - continue; - } - let assignment_name = static_member_expr.property.name; + if self.assigned_before_unnecessary.contains(&this_property_name) { + continue; // there already was an assignment inside the constructor + } - // check both sides of assignment have the same name: this.x = x - let Expression::Identifier(assignment_target_ident) = &assignment_expr.right else { - continue; - }; - if assignment_target_ident.name != assignment_name { - continue; + if self.assigned_before_constructor.contains(&this_property_name) { + continue; // there already was an assignment outside the constructor + } + + self.ctx.diagnostic(no_unnecessary_parameter_property_assignment_diagnostic( + assignment_expr.span, + )); + } + } +} + +fn get_assignments_inside_expression<'a>( + expression: &'a Expression, +) -> Vec<&'a AssignmentExpression<'a>> { + let mut assignments: Vec<&AssignmentExpression> = Vec::new(); + + match expression.without_parentheses() { + Expression::CallExpression(call) => { + // Immediately Invoked Function Expression (IIFE) + + let function_body = match call.callee.without_parentheses() { + Expression::ArrowFunctionExpression(expr) => Some(&expr.body), + Expression::FunctionExpression(expr) => expr.body.as_ref(), + _ => None, + }; + + if let Some(function_body) = function_body { + for statement in &function_body.statements { + if let Statement::ExpressionStatement(expr) = statement { + if let Expression::AssignmentExpression(assignment) = &expr.expression { + assignments.push(assignment); + } + } } + } + } + Expression::AssignmentExpression(assignment) => { + assignments.push(assignment); + } + _ => (), + }; + + assignments +} + +fn is_unnecessary_assignment_operator(operator: AssignmentOperator) -> bool { + matches!( + operator, + AssignmentOperator::Assign + | AssignmentOperator::LogicalOr + | AssignmentOperator::LogicalAnd + | AssignmentOperator::LogicalNullish + ) +} - ctx.diagnostic(no_unnecessary_parameter_property_assignment_diagnostic( - assignment_expr.span, - )); +fn get_property_name<'a>(assignment_target: &AssignmentTarget<'a>) -> Option> { + match assignment_target { + AssignmentTarget::StaticMemberExpression(expr) + if matches!(&expr.object, Expression::ThisExpression(_)) => + { + // this.property + Some(expr.property.name) + } + AssignmentTarget::ComputedMemberExpression(expr) + if matches!(&expr.object, Expression::ThisExpression(_)) => + { + // this["property"] + if let Expression::StringLiteral(str) = &expr.expression { + Some(str.value) + } else { + None } } + _ => None, } } @@ -159,6 +303,177 @@ fn test() { } } ", + " + class Foo { + constructor(foo: string) {} + } + ", + " + class Foo { + constructor(private foo: string) {} + } + ", + " + class Foo { + constructor(private foo: string) { + this.foo = bar; + } + } + ", + " + class Foo { + constructor(private foo: any) { + this.foo = foo.bar; + } + } + ", + " + class Foo { + constructor(private foo: string) { + this.foo = this.bar; + } + } + ", + " + class Foo { + foo: string; + constructor(foo: string) { + this.foo = foo; + } + } + ", + " + class Foo { + bar: string; + constructor(private foo: string) { + this.bar = foo; + } + } + ", + " + class Foo { + constructor(private foo: string) { + this.bar = () => { + this.foo = foo; + }; + } + } + ", + " + class Foo { + constructor(private foo: string) { + this[`${foo}`] = foo; + } + } + ", + " + function Foo(foo) { + this.foo = foo; + } + ", + " + const foo = 'foo'; + this.foo = foo; + ", + " + class Foo { + constructor(public foo: number) { + this.foo += foo; + this.foo -= foo; + this.foo *= foo; + this.foo /= foo; + this.foo %= foo; + this.foo **= foo; + } + } + ", + " + class Foo { + constructor(public foo: number) { + this.foo += 1; + this.foo = foo; + } + } + ", + " + class Foo { + constructor( + public foo: number, + bar: boolean, + ) { + if (bar) { + this.foo += 1; + } else { + this.foo = foo; + } + } + } + ", + " + class Foo { + constructor(public foo: number) { + this.foo = foo; + } + init = (this.foo += 1); + } + ", + " + class Foo { + constructor(public foo: number) { + { + const foo = 1; + this.foo = foo; + } + } + } + ", + " + declare const name: string; + class Foo { + constructor(public foo: number) { + this[name] = foo; + } + } + ", + " + declare const name: string; + class Foo { + constructor(public foo: number) { + Foo.foo = foo; + } + } + ", + " + class Foo { + constructor(public foo: number) { + this.foo = foo; + } + init = (() => { + this.foo += 1; + })(); + } + ", + " + declare const name: string; + class Foo { + constructor(public foo: number) { + this[name] = foo; + } + init = (this[name] = 1); + init2 = (Foo.foo = 1); + } + ", + " + class Foo { + constructor(public foo: number) { + this.foo = foo; + } + init = (function() { + console.log('hi'); + this.foo += 1; + })(); + } + ", ]; let fail = vec![ @@ -197,6 +512,152 @@ fn test() { } } ", + " + class Foo { + constructor(public foo: string) { + this.foo = foo; + } + } + ", + " + class Foo { + constructor(public foo?: string) { + this.foo = foo!; + } + } + ", + " + class Foo { + constructor(public foo?: string) { + this.foo = foo as any; + } + } + ", + " + class Foo { + constructor(public foo = '') { + this.foo = foo; + } + } + ", + " + class Foo { + constructor(public foo = '') { + this.foo = foo; + this.foo += 'foo'; + } + } + ", + " + class Foo { + constructor(public foo: string) { + this.foo ||= foo; + } + } + ", + " + class Foo { + constructor(public foo: string) { + this.foo ??= foo; + } + } + ", + " + class Foo { + constructor(public foo: string) { + this.foo &&= foo; + } + } + ", + " + class Foo { + constructor(private foo: string) { + this['foo'] = foo; + } + } + ", + " + class Foo { + constructor(private foo: string) { + function bar() { + this.foo = foo; + } + this.foo = foo; + } + } + ", + " + class Foo { + constructor(private foo: string) { + this.bar = () => { + this.foo = foo; + }; + this.foo = foo; + } + } + ", + " + class Foo { + constructor(private foo: string) { + class Bar { + constructor(private foo: string) { + this.foo = foo; + } + } + this.foo = foo; + } + } + ", + " + class Foo { + constructor(private foo: string) { + this.foo = foo; + } + bar = () => { + this.foo = 'foo'; + }; + } + ", + " + class Foo { + constructor(private foo: string) { + this.foo = foo; + } + init = foo => { + this.foo = foo; + }; + } + ", + " + class Foo { + constructor(private foo: string) { + this.foo = foo; + } + init = class Bar { + constructor(private foo: string) { + this.foo = foo; + } + }; + } + ", + " + class Foo { + constructor(private foo: string) { + { + this.foo = foo; + } + } + } + ", + " + class Foo { + constructor(private foo: string) { + (() => { + this.foo = foo; + })(); + } + } + ", ]; Tester::new( diff --git a/crates/oxc_linter/src/snapshots/typescript_no_unnecessary_parameter_property_assignment.snap b/crates/oxc_linter/src/snapshots/typescript_no_unnecessary_parameter_property_assignment.snap index 5e54fdf7f78ae..79343d258487c 100644 --- a/crates/oxc_linter/src/snapshots/typescript_no_unnecessary_parameter_property_assignment.snap +++ b/crates/oxc_linter/src/snapshots/typescript_no_unnecessary_parameter_property_assignment.snap @@ -54,3 +54,183 @@ source: crates/oxc_linter/src/tester.rs 6 │ } else { ╰──── help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:4:13] + 3 │ constructor(public foo: string) { + 4 │ this.foo = foo; + · ────────────── + 5 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:4:13] + 3 │ constructor(public foo?: string) { + 4 │ this.foo = foo!; + · ─────────────── + 5 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:4:13] + 3 │ constructor(public foo?: string) { + 4 │ this.foo = foo as any; + · ───────────────────── + 5 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:4:13] + 3 │ constructor(public foo = '') { + 4 │ this.foo = foo; + · ────────────── + 5 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:4:13] + 3 │ constructor(public foo = '') { + 4 │ this.foo = foo; + · ────────────── + 5 │ this.foo += 'foo'; + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:4:13] + 3 │ constructor(public foo: string) { + 4 │ this.foo ||= foo; + · ──────────────── + 5 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:4:13] + 3 │ constructor(public foo: string) { + 4 │ this.foo ??= foo; + · ──────────────── + 5 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:4:13] + 3 │ constructor(public foo: string) { + 4 │ this.foo &&= foo; + · ──────────────── + 5 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:4:13] + 3 │ constructor(private foo: string) { + 4 │ this['foo'] = foo; + · ───────────────── + 5 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:5:15] + 4 │ function bar() { + 5 │ this.foo = foo; + · ────────────── + 6 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:7:13] + 6 │ } + 7 │ this.foo = foo; + · ────────────── + 8 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:7:13] + 6 │ }; + 7 │ this.foo = foo; + · ────────────── + 8 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:9:13] + 8 │ } + 9 │ this.foo = foo; + · ────────────── + 10 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:6:17] + 5 │ constructor(private foo: string) { + 6 │ this.foo = foo; + · ────────────── + 7 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:4:13] + 3 │ constructor(private foo: string) { + 4 │ this.foo = foo; + · ────────────── + 5 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:4:13] + 3 │ constructor(private foo: string) { + 4 │ this.foo = foo; + · ────────────── + 5 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:4:13] + 3 │ constructor(private foo: string) { + 4 │ this.foo = foo; + · ────────────── + 5 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:8:15] + 7 │ constructor(private foo: string) { + 8 │ this.foo = foo; + · ────────────── + 9 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:5:15] + 4 │ { + 5 │ this.foo = foo; + · ────────────── + 6 │ } + ╰──── + help: Remove the unnecessary assignment + + âš  typescript-eslint(no-unnecessary-parameter-property-assignment): Assignment of parameter property is unnecessary + ╭─[no_unnecessary_parameter_property_assignment.tsx:5:15] + 4 │ (() => { + 5 │ this.foo = foo; + · ────────────── + 6 │ })(); + ╰──── + help: Remove the unnecessary assignment From 62c013285371f73132ff8fe8b5510162a829d7cc Mon Sep 17 00:00:00 2001 From: yefan Date: Mon, 17 Mar 2025 18:37:25 +0800 Subject: [PATCH 08/22] feat(linter): add import/no-empty-named-blocks rule (#9710) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relates to #1117 Rule detail:https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-empty-named-blocks.md --------- Co-authored-by: yefan --- crates/oxc_linter/src/rules.rs | 2 + .../src/rules/import/no_empty_named_blocks.rs | 130 ++++++++++++++++++ .../import_no_empty_named_blocks.snap | 74 ++++++++++ 3 files changed, 206 insertions(+) create mode 100644 crates/oxc_linter/src/rules/import/no_empty_named_blocks.rs create mode 100644 crates/oxc_linter/src/snapshots/import_no_empty_named_blocks.snap diff --git a/crates/oxc_linter/src/rules.rs b/crates/oxc_linter/src/rules.rs index dfb629fcdb8d8..cfa4e1ab86dfd 100644 --- a/crates/oxc_linter/src/rules.rs +++ b/crates/oxc_linter/src/rules.rs @@ -10,6 +10,7 @@ mod import { pub mod exports_last; pub mod no_absolute_path; pub mod no_anonymous_default_export; + pub mod no_empty_named_blocks; pub mod no_mutable_exports; // pub mod no_deprecated; // pub mod no_unused_modules; @@ -703,6 +704,7 @@ oxc_macros::declare_all_lint_rules! { import::export, import::exports_last, import::first, + import::no_empty_named_blocks, import::no_anonymous_default_export, import::no_absolute_path, import::no_mutable_exports, diff --git a/crates/oxc_linter/src/rules/import/no_empty_named_blocks.rs b/crates/oxc_linter/src/rules/import/no_empty_named_blocks.rs new file mode 100644 index 0000000000000..fb597a578deea --- /dev/null +++ b/crates/oxc_linter/src/rules/import/no_empty_named_blocks.rs @@ -0,0 +1,130 @@ +use oxc_ast::AstKind; +use oxc_diagnostics::OxcDiagnostic; +use oxc_macros::declare_oxc_lint; +use oxc_span::Span; + +use crate::{AstNode, context::LintContext, rule::Rule}; + +fn no_empty_named_blocks_diagnostic(span: Span) -> OxcDiagnostic { + // See for details + OxcDiagnostic::warn("Unexpected empty named import block.").with_label(span) +} + +#[derive(Debug, Default, Clone)] +pub struct NoEmptyNamedBlocks; + +declare_oxc_lint!( + /// ### What it does + /// + /// Enforces that named import blocks are not empty + /// + /// ### Why is this bad? + /// + /// Empty named imports serve no practical purpose and + /// often result from accidental deletions or tool-generated code. + /// + /// ### Examples + /// + /// Examples of **incorrect** code for this rule: + /// ```js + /// import {} from 'mod' + /// import Default, {} from 'mod' + /// ``` + /// + /// Examples of **correct** code for this rule: + /// ```js + /// import { mod } from 'mod' + /// import Default, { mod } from 'mod' + /// ``` + NoEmptyNamedBlocks, + import, + suspicious, + fix +); + +impl Rule for NoEmptyNamedBlocks { + #[expect(clippy::cast_possible_truncation)] + fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { + let AstKind::ImportDeclaration(import_decl) = node.kind() else { + return; + }; + // if "import 'foo'" + let Some(specifiers) = import_decl.specifiers.as_ref() else { + return; + }; + if specifiers.is_empty() { + // for "import {} from 'mod'" + ctx.diagnostic_with_fix(no_empty_named_blocks_diagnostic(import_decl.span), |fixer| { + fixer.delete_range(import_decl.span) + }); + } + + let source_token_str = Span::new(import_decl.span.start, import_decl.source.span.start - 1) + .source_text(ctx.source_text()); + // find is there anything between '{' and '}' + if let Some(start) = source_token_str.find('{') { + if let Some(end) = source_token_str[start..].find('}') { + let between_braces = &source_token_str[start + 1..start + end]; + if between_braces.trim().is_empty() { + ctx.diagnostic_with_fix( + no_empty_named_blocks_diagnostic(import_decl.span), + |fixer| { + // "import a, {} from 'mod" => "import a from 'mod'" + // we just remove the space between ',' and '}' + if let Some(comma_idx) = source_token_str[..start].rfind(',') { + let remove_start = comma_idx as u32; + let remove_end = (start + end + 1) as u32; + fixer.delete_range(Span::new(remove_start, remove_end)) + } else { + fixer.noop() + } + }, + ); + } + } + } + } +} + +#[test] +fn test() { + use crate::tester::Tester; + + let pass = vec![ + "import 'mod'", + "import { mod } from 'mod'", + "import Default, { mod } from 'mod'", + "import { Named } from 'mod'", + "import type { Named } from 'mod'", + "import type Default, { Named } from 'mod'", + "import type * as Namespace from 'mod'", + "import * as Namespace from 'mod'", + ]; + + let fail = vec![ + "import {} from 'mod'", + "import Default, {} from 'mod'", + "import{}from'mod'", + "import type {}from'mod'", + "import type {} from 'mod'", + "import type{}from 'mod'", + ]; + + let fix = vec![ + ("import Default, {} from 'mod'", "import Default from 'mod'", None), + ("import { } from 'mod'", "", None), + ("import a, {} from 'mod'", "import a from 'mod'", None), + ("import a, { } from 'mod'", "import a from 'mod'", None), + ("import a, { } from 'mod'", "import a from 'mod'", None), + ("import a, { } from 'mod'", "import a from 'mod'", None), + ("import a, { } from'mod'", "import a from'mod'", None), + ("import type a, { } from'mod'", "import type a from'mod'", None), + ("import a,{} from 'mod'", "import a from 'mod'", None), + ("import type a,{} from 'foo'", "import type a from 'foo'", None), + ("import type {} from 'foo'", "", None), + ]; + + Tester::new(NoEmptyNamedBlocks::NAME, NoEmptyNamedBlocks::PLUGIN, pass, fail) + .expect_fix(fix) + .test_and_snapshot(); +} diff --git a/crates/oxc_linter/src/snapshots/import_no_empty_named_blocks.snap b/crates/oxc_linter/src/snapshots/import_no_empty_named_blocks.snap new file mode 100644 index 0000000000000..606c7ba8e849d --- /dev/null +++ b/crates/oxc_linter/src/snapshots/import_no_empty_named_blocks.snap @@ -0,0 +1,74 @@ +--- +source: crates/oxc_linter/src/tester.rs +--- + âš  eslint-plugin-import(no-empty-named-blocks): Unexpected empty named import block. + ╭─[no_empty_named_blocks.tsx:1:1] + 1 │ import {} from 'mod' + · ──────────────────── + ╰──── + help: Delete this code. + + âš  eslint-plugin-import(no-empty-named-blocks): Unexpected empty named import block. + ╭─[no_empty_named_blocks.tsx:1:1] + 1 │ import {} from 'mod' + · ──────────────────── + ╰──── + + âš  eslint-plugin-import(no-empty-named-blocks): Unexpected empty named import block. + ╭─[no_empty_named_blocks.tsx:1:1] + 1 │ import Default, {} from 'mod' + · ───────────────────────────── + ╰──── + help: Delete this code. + + âš  eslint-plugin-import(no-empty-named-blocks): Unexpected empty named import block. + ╭─[no_empty_named_blocks.tsx:1:1] + 1 │ import{}from'mod' + · ───────────────── + ╰──── + help: Delete this code. + + âš  eslint-plugin-import(no-empty-named-blocks): Unexpected empty named import block. + ╭─[no_empty_named_blocks.tsx:1:1] + 1 │ import{}from'mod' + · ───────────────── + ╰──── + + âš  eslint-plugin-import(no-empty-named-blocks): Unexpected empty named import block. + ╭─[no_empty_named_blocks.tsx:1:1] + 1 │ import type {}from'mod' + · ─────────────────────── + ╰──── + help: Delete this code. + + âš  eslint-plugin-import(no-empty-named-blocks): Unexpected empty named import block. + ╭─[no_empty_named_blocks.tsx:1:1] + 1 │ import type {}from'mod' + · ─────────────────────── + ╰──── + + âš  eslint-plugin-import(no-empty-named-blocks): Unexpected empty named import block. + ╭─[no_empty_named_blocks.tsx:1:1] + 1 │ import type {} from 'mod' + · ───────────────────────── + ╰──── + help: Delete this code. + + âš  eslint-plugin-import(no-empty-named-blocks): Unexpected empty named import block. + ╭─[no_empty_named_blocks.tsx:1:1] + 1 │ import type {} from 'mod' + · ───────────────────────── + ╰──── + + âš  eslint-plugin-import(no-empty-named-blocks): Unexpected empty named import block. + ╭─[no_empty_named_blocks.tsx:1:1] + 1 │ import type{}from 'mod' + · ─────────────────────── + ╰──── + help: Delete this code. + + âš  eslint-plugin-import(no-empty-named-blocks): Unexpected empty named import block. + ╭─[no_empty_named_blocks.tsx:1:1] + 1 │ import type{}from 'mod' + · ─────────────────────── + ╰──── From 8abb4f67ad652960d1ff15b7f5db17d9e84a9dd6 Mon Sep 17 00:00:00 2001 From: camc314 <18101008+camc314@users.noreply.github.com> Date: Mon, 17 Mar 2025 11:02:54 +0000 Subject: [PATCH 09/22] fix(parser): correctly set `export_kind` for `ExportNamedDeclaration` (#9827) closes #9824 --- crates/oxc_ast/src/ast_impl/js.rs | 5 +++++ crates/oxc_codegen/src/gen.rs | 4 +++- crates/oxc_parser/src/js/module.rs | 7 ++++++- crates/oxc_prettier/src/format/print/module.rs | 4 +++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/crates/oxc_ast/src/ast_impl/js.rs b/crates/oxc_ast/src/ast_impl/js.rs index f6d5106f1051a..743dd14dacdad 100644 --- a/crates/oxc_ast/src/ast_impl/js.rs +++ b/crates/oxc_ast/src/ast_impl/js.rs @@ -1044,6 +1044,11 @@ impl<'a> Declaration<'a> { Declaration::TSImportEqualsDeclaration(_) => false, } } + + /// Returns `true` if this declaration is a TypeScript type or interface declaration. + pub fn is_type(&self) -> bool { + matches!(self, Self::TSTypeAliasDeclaration(_) | Self::TSInterfaceDeclaration(_)) + } } impl VariableDeclaration<'_> { diff --git a/crates/oxc_codegen/src/gen.rs b/crates/oxc_codegen/src/gen.rs index 6dd265596fa06..e5b34e0bde73e 100644 --- a/crates/oxc_codegen/src/gen.rs +++ b/crates/oxc_codegen/src/gen.rs @@ -1007,7 +1007,9 @@ impl Gen for ExportNamedDeclaration<'_> { p.add_source_mapping(self.span); p.print_indent(); p.print_str("export"); - if self.export_kind.is_type() { + if self.export_kind.is_type() + && !self.declaration.as_ref().is_some_and(oxc_ast::ast::Declaration::is_type) + { p.print_str(" type "); } if let Some(decl) = &self.declaration { diff --git a/crates/oxc_parser/src/js/module.rs b/crates/oxc_parser/src/js/module.rs index b9ee36cf4b0f1..9af384be3209f 100644 --- a/crates/oxc_parser/src/js/module.rs +++ b/crates/oxc_parser/src/js/module.rs @@ -363,13 +363,18 @@ impl<'a> ParserImpl<'a> { self.ctx = self.ctx.union_ambient_if(modifiers.contains_declare()); let declaration = self.parse_declaration(decl_span, &modifiers)?; + let export_kind = if declaration.is_type() { + ImportOrExportKind::Type + } else { + ImportOrExportKind::Value + }; self.ctx = reserved_ctx; Ok(self.ast.alloc_export_named_declaration( self.end_span(span), Some(declaration), self.ast.vec(), None, - ImportOrExportKind::Value, + export_kind, NONE, )) } diff --git a/crates/oxc_prettier/src/format/print/module.rs b/crates/oxc_prettier/src/format/print/module.rs index 6f0f49f5de59c..15cf8be581034 100644 --- a/crates/oxc_prettier/src/format/print/module.rs +++ b/crates/oxc_prettier/src/format/print/module.rs @@ -121,7 +121,9 @@ pub fn print_export_declaration<'a>( } } ExportDeclarationLike::ExportNamedDeclaration(decl) => { - if decl.export_kind.is_type() { + if decl.export_kind.is_type() + && !decl.declaration.as_ref().is_some_and(oxc_ast::ast::Declaration::is_type) + { parts.push(text!(" type")); } if let Some(decl) = &decl.declaration { From e924c2b6788724f0edbc3b7d0332bb876c3d7e25 Mon Sep 17 00:00:00 2001 From: Boshen <1430279+Boshen@users.noreply.github.com> Date: Mon, 17 Mar 2025 11:47:05 +0000 Subject: [PATCH 10/22] chore(deps): bump `oxc-miette` for `CI` and `FORCE_COLOR` change (#9829) --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b08b95de24f0f..4c02354664f9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1567,9 +1567,9 @@ dependencies = [ [[package]] name = "oxc-miette" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "288e20c3f5128c433165c23bcac0169fce6520c5decc2ae7cc5cce5898d861d5" +checksum = "112f8458565c773a1f6555c14d6cd0255f56c85dd372932029e4baeb15308bbe" dependencies = [ "cfg-if", "owo-colors", diff --git a/Cargo.toml b/Cargo.toml index 8e892db425e6e..cde489b026e19 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -195,7 +195,7 @@ lazy_static = "1.5.0" log = "0.4.25" markdown = "1.0.0-alpha.22" memchr = "2.7.4" -miette = { package = "oxc-miette", version = "2.1.2", features = ["fancy-no-syscall"] } +miette = { package = "oxc-miette", version = "2.2.0", features = ["fancy-no-syscall"] } mimalloc-safe = "0.1.49" nonmax = "0.5.5" num-bigint = "0.4.6" From 17a9320b24f0cf27f2971cf87aa5ce7a5ed7c427 Mon Sep 17 00:00:00 2001 From: Dunqing <29533304+Dunqing@users.noreply.github.com> Date: Mon, 17 Mar 2025 12:26:49 +0000 Subject: [PATCH 11/22] perf(allocator/vec2): optimize reserving memory (#9792) resolve: https://github.com/oxc-project/oxc/pull/9656#issuecomment-2723678880 #9656 brought a small performance improvement for the transformer but also led the parser to 1% performance hits. This PR returns performance by splitting `reserve_internal` to `reserve_exact_internal` and `reserve_amortized_internal` respectively the internal implementation of `reserve_exact` and `reserve`. Why the change can improve performance? The original `reserve_internal` implementation has a check for reserve strategy, https://github.com/oxc-project/oxc/blob/fef680a4775559805e99622fb5aa6155cdf47034/crates/oxc_allocator/src/vec2/raw_vec.rs#L664-L668 which is can be avoided because the caller of `reserve_internal` already knows the reserve strategy. After the change, the `reserve_exact` and `reserve` can call the corresponding internal implementation directly, which can avoid unnecessary checks. Likewise, the `Fallibility` check can also be avoided, https://github.com/oxc-project/oxc/blob/fef680a4775559805e99622fb5aa6155cdf47034/crates/oxc_allocator/src/vec2/raw_vec.rs#L681-L683 because we know where the errors should be handled. ~~Due to this change, I also replaced Bumpalo's `CollecitonAllocErr` with allocator-api2's `TryReserveError` because `CollecitonAllocErr::AllocErr` cannot pass in a `Layout`.~~ I ended up reverting https://github.com/oxc-project/oxc/pull/9792/commits/937c61a65815f84d6998764e77b1aabac4a8dc71 as it caused transformer performance 1%-2% regression (See [codspeed](https://codspeed.io/oxc-project/oxc/branches/03-15-pref_allocator_vec2_optimize_reserving_memory) and switch to "replace CollectionAllocErr with TryReserveError" commit), and replaced by https://github.com/oxc-project/oxc/pull/9792/commits/84edacdcc131e1891a02e9f5862cbf52da71a355 I've tried various way to save the performance but it not work. I suspect the cause is that `TryReserveError` is 16 bytes whereas `CollecitonAllocErr` is only 1 byte. So, after both checks are removed, the performance returns to the original. The whole change is according to standard `RawVec`'s implementation. See https://doc.rust-lang.org/src/alloc/raw_vec.rs.html image --- crates/oxc_allocator/src/vec2/raw_vec.rs | 165 ++++++++++------------- 1 file changed, 71 insertions(+), 94 deletions(-) diff --git a/crates/oxc_allocator/src/vec2/raw_vec.rs b/crates/oxc_allocator/src/vec2/raw_vec.rs index d272a82c779b6..9469b4eb56564 100644 --- a/crates/oxc_allocator/src/vec2/raw_vec.rs +++ b/crates/oxc_allocator/src/vec2/raw_vec.rs @@ -318,7 +318,11 @@ impl<'a, T> RawVec<'a, T> { used_cap: usize, needed_extra_cap: usize, ) -> Result<(), CollectionAllocErr> { - self.fallible_reserve_internal(used_cap, needed_extra_cap, Exact) + if self.needs_to_grow(used_cap, needed_extra_cap) { + self.reserve_exact_internal(used_cap, needed_extra_cap)? + } + + Ok(()) } /// Ensures that the buffer contains at least enough space to hold @@ -342,7 +346,9 @@ impl<'a, T> RawVec<'a, T> { /// /// Aborts on OOM pub fn reserve_exact(&mut self, used_cap: usize, needed_extra_cap: usize) { - self.infallible_reserve_internal(used_cap, needed_extra_cap, Exact) + if let Err(err) = self.try_reserve_exact(used_cap, needed_extra_cap) { + handle_error(err) + } } /// Calculates the buffer's new size given that it'll hold `used_cap + @@ -367,7 +373,11 @@ impl<'a, T> RawVec<'a, T> { used_cap: usize, needed_extra_cap: usize, ) -> Result<(), CollectionAllocErr> { - self.fallible_reserve_internal(used_cap, needed_extra_cap, Amortized) + if self.needs_to_grow(used_cap, needed_extra_cap) { + self.reserve_amortized_internal(used_cap, needed_extra_cap)?; + } + + Ok(()) } /// Ensures that the buffer contains at least enough space to hold @@ -422,9 +432,11 @@ impl<'a, T> RawVec<'a, T> { /// # vector.push_all(&[1, 3, 5, 7, 9]); /// # } /// ``` - #[inline(always)] - pub fn reserve(&mut self, used_cap: usize, needed_extra_cap: usize) { - self.infallible_reserve_internal(used_cap, needed_extra_cap, Amortized) + #[inline] + pub fn reserve(&mut self, used_cap: usize, need_extra_cap: usize) { + if let Err(err) = self.try_reserve(used_cap, need_extra_cap) { + handle_error(err) + } } /* @@ -570,90 +582,42 @@ impl<'a, T> RawVec<'a, T> { } */ -enum Fallibility { - Fallible, - Infallible, -} - -use self::Fallibility::*; - -enum ReserveStrategy { - Exact, - Amortized, -} - -use self::ReserveStrategy::*; - impl<'a, T> RawVec<'a, T> { - #[inline(always)] - fn fallible_reserve_internal( - &mut self, - used_cap: usize, - needed_extra_cap: usize, - strategy: ReserveStrategy, - ) -> Result<(), CollectionAllocErr> { - // This portion of the method should always be inlined. - if self.cap().wrapping_sub(used_cap) >= needed_extra_cap { - return Ok(()); - } - // This portion of the method should never be inlined, and will only be called when - // the check above has confirmed that it is necessary. - self.reserve_internal_or_error(used_cap, needed_extra_cap, Fallible, strategy) + #[inline] + fn needs_to_grow(&self, used_cap: usize, needed_extra_cap: usize) -> bool { + needed_extra_cap > self.cap().wrapping_sub(used_cap) } - #[inline(always)] - fn infallible_reserve_internal( + /// Helper method to reserve additional space, reallocating the backing memory. + /// The caller is responsible for confirming that there is not already enough space available. + fn reserve_exact_internal( &mut self, used_cap: usize, needed_extra_cap: usize, - strategy: ReserveStrategy, - ) { - // This portion of the method should always be inlined. - if self.cap().wrapping_sub(used_cap) >= needed_extra_cap { - return; - } - // This portion of the method should never be inlined, and will only be called when - // the check above has confirmed that it is necessary. - self.reserve_internal_or_panic(used_cap, needed_extra_cap, strategy) - } + ) -> Result<(), CollectionAllocErr> { + unsafe { + // NOTE: we don't early branch on ZSTs here because we want this + // to actually catch "asking for more than usize::MAX" in that case. + // If we make it past the first branch then we are guaranteed to + // panic. - #[inline(never)] - fn reserve_internal_or_panic( - &mut self, - used_cap: usize, - needed_extra_cap: usize, - strategy: ReserveStrategy, - ) { - // Delegates the call to `reserve_internal_or_error` and panics in the event of an error. - // This allows the method to have a return type of `()`, simplifying the assembly at the - // call site. - match self.reserve_internal(used_cap, needed_extra_cap, Infallible, strategy) { - Err(CapacityOverflow) => capacity_overflow(), - Err(AllocErr) => unreachable!(), - Ok(()) => { /* yay */ } - } - } + let new_cap = used_cap.checked_add(needed_extra_cap).ok_or(CapacityOverflow)?; + let new_layout = Layout::array::(new_cap).map_err(|_| CapacityOverflow)?; - #[inline(never)] - fn reserve_internal_or_error( - &mut self, - used_cap: usize, - needed_extra_cap: usize, - fallibility: Fallibility, - strategy: ReserveStrategy, - ) -> Result<(), CollectionAllocErr> { - // Delegates the call to `reserve_internal`, which can be inlined. - self.reserve_internal(used_cap, needed_extra_cap, fallibility, strategy) + self.ptr = self.finish_grow(new_layout)?.cast(); + + self.cap = new_cap; + + Ok(()) + } } /// Helper method to reserve additional space, reallocating the backing memory. /// The caller is responsible for confirming that there is not already enough space available. - fn reserve_internal( + fn reserve_amortized_internal( &mut self, used_cap: usize, needed_extra_cap: usize, - fallibility: Fallibility, - strategy: ReserveStrategy, ) -> Result<(), CollectionAllocErr> { unsafe { // NOTE: we don't early branch on ZSTs here because we want this @@ -661,33 +625,32 @@ impl<'a, T> RawVec<'a, T> { // If we make it past the first branch then we are guaranteed to // panic. - // Nothing we can really do about these checks :( - let new_cap = match strategy { - Exact => used_cap.checked_add(needed_extra_cap).ok_or(CapacityOverflow)?, - Amortized => self.amortized_new_size(used_cap, needed_extra_cap)?, - }; + let new_cap = self.amortized_new_size(used_cap, needed_extra_cap)?; let new_layout = Layout::array::(new_cap).map_err(|_| CapacityOverflow)?; - alloc_guard(new_layout.size())?; - - let res = match self.current_layout() { - Some(layout) => { - debug_assert!(new_layout.align() == layout.align()); - realloc(self.a, self.ptr.cast(), layout, new_layout.size()) - } - None => self.a.allocate(new_layout), - }; - - if let (Err(AllocError), Infallible) = (&res, fallibility) { - handle_alloc_error(new_layout); - } + self.ptr = self.finish_grow(new_layout)?.cast(); - self.ptr = res.map_err(|_| AllocErr)?.cast(); self.cap = new_cap; Ok(()) } } + + // Given a new layout, completes the grow operation. + #[inline] + fn finish_grow(&self, new_layout: Layout) -> Result, CollectionAllocErr> { + alloc_guard(new_layout.size())?; + + let res = match self.current_layout() { + Some(layout) => unsafe { + debug_assert!(new_layout.align() == layout.align()); + realloc(self.a, self.ptr.cast(), layout, new_layout.size()) + }, + None => self.a.allocate(new_layout), + }; + + res.map_err(|_| AllocErr) + } } impl<'a, T> RawVec<'a, T> { @@ -814,6 +777,20 @@ unsafe fn realloc( } } +/// Handle collection allocation errors +/// +// Causing a collection alloc error is rare case, so marked as `#[cold]` and `#[inline(never)]` +// to make the call site function as small as possible, so it can be inlined. +#[inline(never)] +#[cold] +fn handle_error(error: CollectionAllocErr) -> ! { + match error { + CapacityOverflow => capacity_overflow(), + // TODO: call `handle_alloc_error` instead of `panic!` once the AllocErr stored a Layout, + AllocErr => panic!("encountered allocation error"), + } +} + #[cfg(test)] mod tests { use super::*; From ea7e3f0a395de67a6ccfbc609047784efc83b85b Mon Sep 17 00:00:00 2001 From: Nicholas Rayburn <52075362+nrayburn-tech@users.noreply.github.com> Date: Mon, 17 Mar 2025 07:54:55 -0500 Subject: [PATCH 12/22] feat(oxc_language_server): Support nested configs (#9739) This PR is built on https://github.com/oxc-project/oxc/pull/9731. --- crates/oxc_language_server/src/main.rs | 114 +++++++++++++++---- crates/oxc_linter/src/config/config_store.rs | 4 +- 2 files changed, 94 insertions(+), 24 deletions(-) diff --git a/crates/oxc_language_server/src/main.rs b/crates/oxc_language_server/src/main.rs index d902d4faa60b8..e6c2f24dcda06 100644 --- a/crates/oxc_language_server/src/main.rs +++ b/crates/oxc_language_server/src/main.rs @@ -5,7 +5,8 @@ use futures::future::join_all; use globset::Glob; use ignore::gitignore::Gitignore; use log::{debug, error, info}; -use rustc_hash::FxBuildHasher; +use oxc_linter::{ConfigStore, ConfigStoreBuilder, FixKind, LintOptions, Linter, Oxlintrc}; +use rustc_hash::{FxBuildHasher, FxHashMap}; use serde::{Deserialize, Serialize}; use tokio::sync::{Mutex, OnceCell, RwLock, SetError}; use tower_lsp::{ @@ -15,14 +16,12 @@ use tower_lsp::{ CodeAction, CodeActionKind, CodeActionOrCommand, CodeActionParams, CodeActionResponse, ConfigurationItem, Diagnostic, DidChangeConfigurationParams, DidChangeTextDocumentParams, DidChangeWatchedFilesParams, DidCloseTextDocumentParams, DidOpenTextDocumentParams, - DidSaveTextDocumentParams, ExecuteCommandParams, InitializeParams, InitializeResult, - InitializedParams, NumberOrString, Position, Range, ServerInfo, TextEdit, Url, - WorkspaceEdit, + DidSaveTextDocumentParams, ExecuteCommandParams, FileChangeType, InitializeParams, + InitializeResult, InitializedParams, NumberOrString, Position, Range, ServerInfo, TextEdit, + Url, WorkspaceEdit, }, }; -use oxc_linter::{ConfigStoreBuilder, FixKind, LintOptions, Linter, Oxlintrc}; - use crate::capabilities::{CODE_ACTION_KIND_SOURCE_FIX_ALL_OXC, Capabilities}; use crate::linter::error_with_position::DiagnosticReport; use crate::linter::server_linter::ServerLinter; @@ -33,6 +32,8 @@ mod linter; type ConcurrentHashMap = papaya::HashMap; +const OXC_CONFIG_FILE: &str = ".oxlintrc.json"; + struct Backend { client: Client, root_uri: OnceCell>, @@ -40,6 +41,7 @@ struct Backend { diagnostics_report_map: ConcurrentHashMap>, options: Mutex, gitignore_glob: Mutex>, + nested_configs: ConcurrentHashMap, } #[derive(Debug, Serialize, Deserialize, Default, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "camelCase")] @@ -54,11 +56,17 @@ struct Options { run: Run, enable: bool, config_path: String, + flags: FxHashMap, } impl Default for Options { fn default() -> Self { - Self { enable: true, run: Run::default(), config_path: ".oxlintrc.json".into() } + Self { + enable: true, + run: Run::default(), + config_path: OXC_CONFIG_FILE.into(), + flags: FxHashMap::default(), + } } } @@ -77,6 +85,10 @@ impl Options { fn get_config_path(&self) -> Option { if self.config_path.is_empty() { None } else { Some(PathBuf::from(&self.config_path)) } } + + fn disable_nested_configs(&self) -> bool { + self.flags.contains_key("disable_nested_config") + } } #[derive(Debug, PartialEq, PartialOrd, Clone, Copy)] @@ -166,6 +178,10 @@ impl LanguageServer for Backend { self.publish_all_diagnostics(&cleared_diagnostics).await; } + if changed_options.disable_nested_configs() { + self.nested_configs.pin().clear(); + } + *self.options.lock().await = changed_options.clone(); // revalidate the config and all open files, when lint level is not disabled and the config path is changed @@ -180,8 +196,48 @@ impl LanguageServer for Backend { } } - async fn did_change_watched_files(&self, _params: DidChangeWatchedFilesParams) { + async fn did_change_watched_files(&self, params: DidChangeWatchedFilesParams) { debug!("watched file did change"); + if !self.options.lock().await.disable_nested_configs() { + let nested_configs = self.nested_configs.pin(); + + params.changes.iter().for_each(|x| { + let Ok(file_path) = x.uri.to_file_path() else { + info!("Unable to convert {:?} to a file path", x.uri); + return; + }; + let Some(file_name) = file_path.file_name() else { + info!("Unable to retrieve file name from {:?}", file_path); + return; + }; + + if file_name != OXC_CONFIG_FILE { + return; + } + + let Some(dir_path) = file_path.parent() else { + info!("Unable to retrieve parent from {:?}", file_path); + return; + }; + + // spellchecker:off -- "typ" is accurate + if x.typ == FileChangeType::CREATED || x.typ == FileChangeType::CHANGED { + // spellchecker:on + let oxlintrc = + Oxlintrc::from_file(&file_path).expect("Failed to parse config file"); + let config_store_builder = ConfigStoreBuilder::from_oxlintrc(false, oxlintrc) + .expect("Failed to create config store builder"); + let config_store = + config_store_builder.build().expect("Failed to build config store"); + nested_configs.insert(dir_path.to_path_buf(), config_store); + // spellchecker:off -- "typ" is accurate + } else if x.typ == FileChangeType::DELETED { + // spellchecker:on + nested_configs.remove(&dir_path.to_path_buf()); + } + }); + } + self.init_linter_config().await; self.revalidate_open_files().await; } @@ -492,21 +548,34 @@ impl Backend { if config.exists() { config_path = Some(config); } - if let Some(config_path) = config_path { - let mut linter = self.server_linter.write().await; - let config = Oxlintrc::from_file(&config_path) - .expect("should have initialized linter with new options"); - let config_store = ConfigStoreBuilder::from_oxlintrc(true, config.clone()) - .expect("failed to build config") - .build() - .expect("failed to build config"); - *linter = ServerLinter::new_with_linter( - Linter::new(LintOptions::default(), config_store).with_fix(FixKind::SafeFix), - ); - return Some(config); - } - None + let config_path = config_path?; + let oxlintrc = Oxlintrc::from_file(&config_path) + .expect("should have initialized linter with new options"); + let config_store = ConfigStoreBuilder::from_oxlintrc(true, oxlintrc.clone()) + .expect("failed to build config") + .build() + .expect("failed to build config"); + + let linter = if self.options.lock().await.disable_nested_configs() { + Linter::new(LintOptions::default(), config_store).with_fix(FixKind::SafeFix) + } else { + let nested_configs = self.nested_configs.pin(); + let nested_configs_copy: FxHashMap = nested_configs + .iter() + .map(|(key, value)| (key.clone(), value.clone())) + .collect::>(); + + Linter::new_with_nested_configs( + LintOptions::default(), + config_store, + nested_configs_copy, + ) + }; + + *self.server_linter.write().await = ServerLinter::new_with_linter(linter); + + Some(oxlintrc.clone()) } async fn handle_file_update(&self, uri: Url, content: Option, version: Option) { @@ -568,6 +637,7 @@ async fn main() { diagnostics_report_map, options: Mutex::new(Options::default()), gitignore_glob: Mutex::new(vec![]), + nested_configs: ConcurrentHashMap::default(), }) .finish(); diff --git a/crates/oxc_linter/src/config/config_store.rs b/crates/oxc_linter/src/config/config_store.rs index b789a2968353d..f006d4376e514 100644 --- a/crates/oxc_linter/src/config/config_store.rs +++ b/crates/oxc_linter/src/config/config_store.rs @@ -19,7 +19,7 @@ impl Clone for ResolvedLinterState { } } -#[derive(Debug)] +#[derive(Debug, Clone)] struct Config { /// The basic linter state for this configuration. base: ResolvedLinterState, @@ -29,7 +29,7 @@ struct Config { } /// Resolves a lint configuration for a given file, by applying overrides based on the file's path. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct ConfigStore { base: Config, } From a113f7ebca4621cc278e630dacdfc4e5075c5286 Mon Sep 17 00:00:00 2001 From: Boshen <1430279+Boshen@users.noreply.github.com> Date: Mon, 17 Mar 2025 13:32:37 +0000 Subject: [PATCH 13/22] fix(parser): error when `}` and `>` appear in `JSXText` (#9777) closes #9770 --- crates/oxc_codegen/src/gen.rs | 5 +- .../src/rules/eslint/no_unused_expressions.rs | 24 +-- .../src/rules/react/no_unescaped_entities.rs | 4 +- .../src/rules/typescript/array_type.rs | 15 +- .../eslint_no_unused_expressions.snap | 12 +- .../react_no_unescaped_entities.snap | 12 +- .../src/snapshots/typescript_array_type.snap | 196 +++++++++--------- crates/oxc_parser/src/diagnostics.rs | 6 + crates/oxc_parser/src/lexer/jsx.rs | 35 ++-- .../coverage/snapshots/estree_acorn_jsx.snap | 5 +- tasks/coverage/snapshots/parser_babel.snap | 108 ++++------ .../coverage/snapshots/parser_typescript.snap | 35 +++- tasks/coverage/snapshots/semantic_babel.snap | 6 +- 13 files changed, 228 insertions(+), 235 deletions(-) diff --git a/crates/oxc_codegen/src/gen.rs b/crates/oxc_codegen/src/gen.rs index e5b34e0bde73e..629a19fec65be 100644 --- a/crates/oxc_codegen/src/gen.rs +++ b/crates/oxc_codegen/src/gen.rs @@ -2578,8 +2578,9 @@ impl Gen for JSXText<'_> { impl Gen for JSXSpreadChild<'_> { fn r#gen(&self, p: &mut Codegen, _ctx: Context) { - p.print_str("..."); + p.print_str("{..."); p.print_expression(&self.expression); + p.print_ascii_byte(b'}'); } } @@ -2588,7 +2589,7 @@ impl Gen for JSXChild<'_> { match self { Self::Fragment(fragment) => fragment.print(p, ctx), Self::Element(el) => el.print(p, ctx), - Self::Spread(spread) => p.print_expression(&spread.expression), + Self::Spread(spread) => spread.print(p, ctx), Self::ExpressionContainer(expr_container) => expr_container.print(p, ctx), Self::Text(text) => text.print(p, ctx), } diff --git a/crates/oxc_linter/src/rules/eslint/no_unused_expressions.rs b/crates/oxc_linter/src/rules/eslint/no_unused_expressions.rs index 7a382c5ce2193..4cedcaf25d8fb 100644 --- a/crates/oxc_linter/src/rules/eslint/no_unused_expressions.rs +++ b/crates/oxc_linter/src/rules/eslint/no_unused_expressions.rs @@ -292,7 +292,7 @@ fn test() { " namespace Foo { 'use strict'; - + export class Foo {} export class Bar {} } @@ -303,7 +303,7 @@ fn test() { " function foo() { 'use strict'; - + return null; } ", @@ -383,7 +383,7 @@ fn test() { ("<>", Some(serde_json::json!([{ "enforceForJSX": true }]))), // { "parserOptions": { "ecmaFeatures": { "jsx": true } } }, ("class C { static { 'use strict'; } }", None), // { "ecmaVersion": 2022 }, ( - "class C { static { + "class C { static { 'foo' 'bar' } }", @@ -479,7 +479,7 @@ fn test() { namespace Foo { export class Foo {} export class Bar {} - + 'use strict'; } ", @@ -489,7 +489,7 @@ fn test() { " function foo() { const foo = true; - + 'use strict'; } ", @@ -519,13 +519,13 @@ fn test() { ", None, ), - ( - " - declare const foo: number | undefined; - foo; - ", - None, - ), + // ( + // " + // declare const foo: number | undefined; + // foo; + // ", + // None, + // ), ( " declare const foo: number | undefined; diff --git a/crates/oxc_linter/src/rules/react/no_unescaped_entities.rs b/crates/oxc_linter/src/rules/react/no_unescaped_entities.rs index c98346955f1bf..8de3c04835f6c 100644 --- a/crates/oxc_linter/src/rules/react/no_unescaped_entities.rs +++ b/crates/oxc_linter/src/rules/react/no_unescaped_entities.rs @@ -76,13 +76,11 @@ impl Rule for NoUnescapedEntities { } // NOTE: If we add substantially more characters, we should consider using a hash set instead. -pub const CHARS: [char; 4] = ['>', '"', '\'', '}']; +pub const CHARS: [char; 2] = ['"', '\'']; pub const DEFAULTS: Map = phf_map! { - '>' => &[">"], '"' => &[""", "“", """, "”"], '\'' => &["'", "‘", "'", "’"], - '}' => &["}"], }; #[test] diff --git a/crates/oxc_linter/src/rules/typescript/array_type.rs b/crates/oxc_linter/src/rules/typescript/array_type.rs index abf32d68bd787..999335a806a2f 100644 --- a/crates/oxc_linter/src/rules/typescript/array_type.rs +++ b/crates/oxc_linter/src/rules/typescript/array_type.rs @@ -1011,10 +1011,10 @@ fn test() { "let x: Array = [undefined] as undefined[];", Some(serde_json::json!([{"default":"array-simple"}])), ), - ( - "let y: string[] = >['2'];", - Some(serde_json::json!([{"default":"array-simple"}])), - ), + // ( + // "let y: string[] = >['2'];", + // Some(serde_json::json!([{"default":"array-simple"}])), + // ), ("let z: Array = [3, '4'];", Some(serde_json::json!([{"default":"array-simple"}]))), ( "let ya = [[1, '2']] as [number, string][];", @@ -1062,7 +1062,7 @@ fn test() { "let x: Array = [undefined] as undefined[];", Some(serde_json::json!([{"default":"array"}])), ), - ("let y: string[] = >['2'];", Some(serde_json::json!([{"default":"array"}]))), + // ("let y: string[] = >['2'];", Some(serde_json::json!([{"default":"array"}]))), ("let z: Array = [3, '4'];", Some(serde_json::json!([{"default":"array"}]))), ("type Arr = Array;", Some(serde_json::json!([{"default":"array"}]))), // (" @@ -1706,5 +1706,8 @@ fn test() { ), ]; - Tester::new(ArrayType::NAME, ArrayType::PLUGIN, pass, fail).expect_fix(fix).test_and_snapshot(); + Tester::new(ArrayType::NAME, ArrayType::PLUGIN, pass, fail) + .change_rule_path_extension("ts") + .expect_fix(fix) + .test_and_snapshot(); } diff --git a/crates/oxc_linter/src/snapshots/eslint_no_unused_expressions.snap b/crates/oxc_linter/src/snapshots/eslint_no_unused_expressions.snap index 71af5bbb6c115..9e7e2939c048b 100644 --- a/crates/oxc_linter/src/snapshots/eslint_no_unused_expressions.snap +++ b/crates/oxc_linter/src/snapshots/eslint_no_unused_expressions.snap @@ -241,7 +241,7 @@ source: crates/oxc_linter/src/tester.rs âš  eslint(no-unused-expressions): Disallow unused expressions ╭─[no_unused_expressions.tsx:2:4] - 1 │ class C { static { + 1 │ class C { static { 2 │ 'foo' · ───── 3 │ 'bar' @@ -378,7 +378,7 @@ source: crates/oxc_linter/src/tester.rs âš  eslint(no-unused-expressions): Disallow unused expressions ╭─[no_unused_expressions.tsx:6:6] - 5 │ + 5 │ 6 │ 'use strict'; · ───────────── 7 │ } @@ -387,7 +387,7 @@ source: crates/oxc_linter/src/tester.rs âš  eslint(no-unused-expressions): Disallow unused expressions ╭─[no_unused_expressions.tsx:5:6] - 4 │ + 4 │ 5 │ 'use strict'; · ───────────── 6 │ } @@ -442,12 +442,6 @@ source: crates/oxc_linter/src/tester.rs ╰──── help: Consider removing this expression - × Expected `<` but found `EOF` - ╭─[no_unused_expressions.tsx:4:10] - 3 │ foo; - 4 │ - ╰──── - âš  eslint(no-unused-expressions): Disallow unused expressions ╭─[no_unused_expressions.tsx:3:4] 2 │ declare const foo: number | undefined; diff --git a/crates/oxc_linter/src/snapshots/react_no_unescaped_entities.snap b/crates/oxc_linter/src/snapshots/react_no_unescaped_entities.snap index 2051e5b1741aa..768b50afad569 100644 --- a/crates/oxc_linter/src/snapshots/react_no_unescaped_entities.snap +++ b/crates/oxc_linter/src/snapshots/react_no_unescaped_entities.snap @@ -1,19 +1,19 @@ --- source: crates/oxc_linter/src/tester.rs --- - âš  eslint-plugin-react(no-unescaped-entities): `>` can be escaped with > + × Unexpected token. Did you mean `{'>'}` or `>`? ╭─[no_unescaped_entities.tsx:3:24] 2 │ render: function() { 3 │ return <>> babel-eslint; - · ─ + · â–² 4 │ } ╰──── - âš  eslint-plugin-react(no-unescaped-entities): `>` can be escaped with > + × Unexpected token. Did you mean `{'>'}` or `>`? ╭─[no_unescaped_entities.tsx:5:47] 4 │ so is second 5 │ and here are some bad entities: > - · ─ + · â–² 6 │ } ╰──── @@ -25,11 +25,11 @@ source: crates/oxc_linter/src/tester.rs 5 │ } ╰──── - âš  eslint-plugin-react(no-unescaped-entities): `}` can be escaped with } + × Unexpected token. Did you mean `{'}'}` or `}`? ╭─[no_unescaped_entities.tsx:4:60] 3 │ render: function() { 4 │ return <>{"Unbalanced braces - babel-eslint"}}; - · ─ + · â–² 5 │ } ╰──── diff --git a/crates/oxc_linter/src/snapshots/typescript_array_type.snap b/crates/oxc_linter/src/snapshots/typescript_array_type.snap index d99f987a4aaf1..cf338f11210db 100644 --- a/crates/oxc_linter/src/snapshots/typescript_array_type.snap +++ b/crates/oxc_linter/src/snapshots/typescript_array_type.snap @@ -2,446 +2,441 @@ source: crates/oxc_linter/src/tester.rs --- âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: Array = []; · ───────────── ╰──── help: Replace `Array` with `number[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'T[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: Array = []; · ────────────────────── ╰──── help: Replace `Array` with `(string | number)[]`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden. Use 'readonly number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ───────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly number[]`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden. Use 'readonly T[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ────────────────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly (string | number)[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: Array = []; · ───────────── ╰──── help: Replace `Array` with `number[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'T[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: Array = []; · ────────────────────── ╰──── help: Replace `Array` with `(string | number)[]`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden. Use 'readonly number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ───────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly number[]`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden. Use 'readonly T[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ────────────────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly (string | number)[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: Array = []; · ───────────── ╰──── help: Replace `Array` with `number[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'T[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: Array = []; · ────────────────────── ╰──── help: Replace `Array` with `(string | number)[]`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden for simple types. Use 'readonly number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ───────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly number[]`. âš  typescript-eslint(array-type): Array type using 'readonly T[]' is forbidden for non-simple types. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly (string | number)[] = []; · ──────────────────────────── ╰──── help: Replace `readonly (string | number)[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: Array = []; · ───────────── ╰──── help: Replace `Array` with `number[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'T[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: Array = []; · ────────────────────── ╰──── help: Replace `Array` with `(string | number)[]`. âš  typescript-eslint(array-type): Array type using 'readonly number[]' is forbidden. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly number[] = []; · ───────────────── ╰──── help: Replace `readonly number[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'readonly T[]' is forbidden. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly (string | number)[] = []; · ──────────────────────────── ╰──── help: Replace `readonly (string | number)[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden for simple types. Use 'number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: Array = []; · ───────────── ╰──── help: Replace `Array` with `number[]`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden for non-simple types. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: (string | number)[] = []; · ─────────────────── ╰──── help: Replace `(string | number)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden for simple types. Use 'readonly number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ───────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly number[]`. âš  typescript-eslint(array-type): Array type using 'readonly T[]' is forbidden for non-simple types. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly (string | number)[] = []; · ──────────────────────────── ╰──── help: Replace `readonly (string | number)[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden for simple types. Use 'number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: Array = []; · ───────────── ╰──── help: Replace `Array` with `number[]`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden for non-simple types. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: (string | number)[] = []; · ─────────────────── ╰──── help: Replace `(string | number)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden. Use 'readonly number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ───────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly number[]`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden. Use 'readonly T[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ────────────────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly (string | number)[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden for simple types. Use 'number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: Array = []; · ───────────── ╰──── help: Replace `Array` with `number[]`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden for non-simple types. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: (string | number)[] = []; · ─────────────────── ╰──── help: Replace `(string | number)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden for simple types. Use 'readonly number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ───────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly number[]`. âš  typescript-eslint(array-type): Array type using 'readonly T[]' is forbidden for non-simple types. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly (string | number)[] = []; · ──────────────────────────── ╰──── help: Replace `readonly (string | number)[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden for simple types. Use 'number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: Array = []; · ───────────── ╰──── help: Replace `Array` with `number[]`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden for non-simple types. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: (string | number)[] = []; · ─────────────────── ╰──── help: Replace `(string | number)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'readonly number[]' is forbidden. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly number[] = []; · ───────────────── ╰──── help: Replace `readonly number[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'readonly T[]' is forbidden. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly (string | number)[] = []; · ──────────────────────────── ╰──── help: Replace `readonly (string | number)[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'number[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: number[] = []; · ──────── ╰──── help: Replace `number[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: (string | number)[] = []; · ─────────────────── ╰──── help: Replace `(string | number)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'readonly number[]' is forbidden. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly number[] = []; · ───────────────── ╰──── help: Replace `readonly number[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'readonly T[]' is forbidden. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly (string | number)[] = []; · ──────────────────────────── ╰──── help: Replace `readonly (string | number)[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'number[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: number[] = []; · ──────── ╰──── help: Replace `number[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: (string | number)[] = []; · ─────────────────── ╰──── help: Replace `(string | number)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden. Use 'readonly number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ───────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly number[]`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden. Use 'readonly T[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ────────────────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly (string | number)[]`. âš  typescript-eslint(array-type): Array type using 'number[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: number[] = []; · ──────── ╰──── help: Replace `number[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: (string | number)[] = []; · ─────────────────── ╰──── help: Replace `(string | number)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden for simple types. Use 'readonly number[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ───────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly number[]`. âš  typescript-eslint(array-type): Array type using 'readonly T[]' is forbidden for non-simple types. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly (string | number)[] = []; · ──────────────────────────── ╰──── help: Replace `readonly (string | number)[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'number[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: number[] = []; · ──────── ╰──── help: Replace `number[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: (string | number)[] = []; · ─────────────────── ╰──── help: Replace `(string | number)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'readonly number[]' is forbidden. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly number[] = []; · ───────────────── ╰──── help: Replace `readonly number[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'readonly T[]' is forbidden. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly (string | number)[] = []; · ──────────────────────────── ╰──── help: Replace `readonly (string | number)[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'bigint[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: bigint[] = []; · ──────── ╰──── help: Replace `bigint[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: (string | bigint)[] = []; · ─────────────────── ╰──── help: Replace `(string | bigint)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden for simple types. Use 'readonly bigint[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: ReadonlyArray = []; · ───────────────────── ╰──── help: Replace `ReadonlyArray` with `readonly bigint[]`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: (string | bigint)[] = []; · ─────────────────── ╰──── help: Replace `(string | bigint)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'readonly bigint[]' is forbidden. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly bigint[] = []; · ───────────────── ╰──── help: Replace `readonly bigint[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'readonly T[]' is forbidden. Use 'ReadonlyArray' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let a: readonly (string | bigint)[] = []; · ──────────────────────────── ╰──── help: Replace `readonly (string | bigint)[]` with `ReadonlyArray`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'Bar[]' instead. - ╭─[array_type.tsx:1:15] + ╭─[array_type.ts:1:15] 1 │ let a: { foo: Array }[] = []; · ────────── ╰──── help: Replace `Array` with `Bar[]`. âš  typescript-eslint(array-type): Array type using 'Bar[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:21] + ╭─[array_type.ts:1:21] 1 │ let a: Array<{ foo: Bar[] }> = []; · ───── ╰──── help: Replace `Bar[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'Bar[]' instead. - ╭─[array_type.tsx:1:17] + ╭─[array_type.ts:1:17] 1 │ function foo(a: Array): Array {} · ────────── ╰──── help: Replace `Array` with `Bar[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'Bar[]' instead. - ╭─[array_type.tsx:1:30] + ╭─[array_type.ts:1:30] 1 │ function foo(a: Array): Array {} · ────────── ╰──── help: Replace `Array` with `Bar[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden for simple types. Use 'undefined[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let x: Array = [undefined] as undefined[]; · ──────────────── ╰──── help: Replace `Array` with `undefined[]`. - × Expected `<` but found `EOF` - ╭─[array_type.tsx:1:40] - 1 │ let y: string[] = >['2']; - ╰──── - âš  typescript-eslint(array-type): Array type using 'Array' is forbidden for simple types. Use 'any[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let z: Array = [3, '4']; · ───── ╰──── help: Replace `Array` with `any[]`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden for non-simple types. Use 'Array' instead. - ╭─[array_type.tsx:1:24] + ╭─[array_type.ts:1:24] 1 │ let ya = [[1, '2']] as [number, string][]; · ────────────────── ╰──── help: Replace `[number, string][]` with `Array<[number, string]>`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden for simple types. Use 'T[]' instead. - ╭─[array_type.tsx:1:15] + ╭─[array_type.ts:1:15] 1 │ type Arr = Array; · ──────── ╰──── help: Replace `Array` with `T[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden for simple types. Use 'T[]' instead. - ╭─[array_type.tsx:3:14] + ╭─[array_type.ts:3:14] 2 │ interface ArrayClass { 3 │ foo: Array; · ──────── @@ -450,7 +445,7 @@ source: crates/oxc_linter/src/tester.rs help: Replace `Array` with `T[]`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden for non-simple types. Use 'Array' instead. - ╭─[array_type.tsx:2:35] + ╭─[array_type.ts:2:35] 1 │ 2 │ function barFunction(bar: ArrayClass[]) { · ──────────────────── @@ -459,54 +454,49 @@ source: crates/oxc_linter/src/tester.rs help: Replace `ArrayClass[]` with `Array>`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden for non-simple types. Use 'Array' instead. - ╭─[array_type.tsx:1:13] + ╭─[array_type.ts:1:13] 1 │ let barVar: ((c: number) => number)[]; · ───────────────────────── ╰──── help: Replace `((c: number) => number)[]` with `Array<(c: number) => number>`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden for non-simple types. Use 'Array' instead. - ╭─[array_type.tsx:1:17] + ╭─[array_type.ts:1:17] 1 │ type barUnion = (string | number | boolean)[]; · ───────────────────────────── ╰──── help: Replace `(string | number | boolean)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden for non-simple types. Use 'Array' instead. - ╭─[array_type.tsx:1:24] + ╭─[array_type.ts:1:24] 1 │ type barIntersection = (string & number)[]; · ─────────────────── ╰──── help: Replace `(string & number)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'undefined[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let x: Array = [undefined] as undefined[]; · ──────────────── ╰──── help: Replace `Array` with `undefined[]`. - × Expected `<` but found `EOF` - ╭─[array_type.tsx:1:40] - 1 │ let y: string[] = >['2']; - ╰──── - âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'any[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let z: Array = [3, '4']; · ───── ╰──── help: Replace `Array` with `any[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'T[]' instead. - ╭─[array_type.tsx:1:15] + ╭─[array_type.ts:1:15] 1 │ type Arr = Array; · ──────── ╰──── help: Replace `Array` with `T[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'T[]' instead. - ╭─[array_type.tsx:3:14] + ╭─[array_type.ts:3:14] 2 │ interface ArrayClass { 3 │ foo: Array; · ──────── @@ -515,7 +505,7 @@ source: crates/oxc_linter/src/tester.rs help: Replace `Array` with `T[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'T[]' instead. - ╭─[array_type.tsx:2:35] + ╭─[array_type.ts:2:35] 1 │ 2 │ function fooFunction(foo: Array>) { · ───────────────────────── @@ -524,75 +514,77 @@ source: crates/oxc_linter/src/tester.rs help: Replace `Array>` with `ArrayClass[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'T[]' instead. - ╭─[array_type.tsx:1:13] + ╭─[array_type.ts:1:13] 1 │ let fooVar: Array<(c: number) => number>; · ──────────────────────────── ╰──── help: Replace `Array<(c: number) => number>` with `((c: number) => number)[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'T[]' instead. - ╭─[array_type.tsx:1:17] + ╭─[array_type.ts:1:17] 1 │ type fooUnion = Array; · ──────────────────────────────── ╰──── help: Replace `Array` with `(string | number | boolean)[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'T[]' instead. - ╭─[array_type.tsx:1:24] + ╭─[array_type.ts:1:24] 1 │ type fooIntersection = Array; · ────────────────────── ╰──── help: Replace `Array` with `(string & number)[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'any[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let x: Array; · ───── ╰──── help: Replace `Array` with `any[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'any[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let x: Array<>; · ─────── ╰──── help: Replace `Array<>` with `any[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden for simple types. Use 'any[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let x: Array; · ───── ╰──── help: Replace `Array` with `any[]`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden for simple types. Use 'any[]' instead. - ╭─[array_type.tsx:1:8] + ╭─[array_type.ts:1:8] 1 │ let x: Array<>; · ─────── ╰──── help: Replace `Array<>` with `any[]`. âš  typescript-eslint(array-type): Array type using 'number[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:31] + ╭─[array_type.ts:1:31] 1 │ let x: Array = [1] as number[]; · ──────── ╰──── help: Replace `number[]` with `Array`. - × Expected `<` but found `EOF` - ╭─[array_type.tsx:1:40] + âš  typescript-eslint(array-type): Array type using 'string[]' is forbidden. Use 'Array' instead. + ╭─[array_type.ts:1:8] 1 │ let y: string[] = >['2']; + · ──────── ╰──── + help: Replace `string[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:24] + ╭─[array_type.ts:1:24] 1 │ let ya = [[1, '2']] as [number, string][]; · ────────────────── ╰──── help: Replace `[number, string][]` with `Array<[number, string]>`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:4:14] + ╭─[array_type.ts:4:14] 3 │ foo: Array; 4 │ bar: T[]; · ─── @@ -601,7 +593,7 @@ source: crates/oxc_linter/src/tester.rs help: Replace `T[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:2:35] + ╭─[array_type.ts:2:35] 1 │ 2 │ function barFunction(bar: ArrayClass[]) { · ──────────────────── @@ -610,28 +602,28 @@ source: crates/oxc_linter/src/tester.rs help: Replace `ArrayClass[]` with `Array>`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:13] + ╭─[array_type.ts:1:13] 1 │ let barVar: ((c: number) => number)[]; · ───────────────────────── ╰──── help: Replace `((c: number) => number)[]` with `Array<(c: number) => number>`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:17] + ╭─[array_type.ts:1:17] 1 │ type barUnion = (string | number | boolean)[]; · ───────────────────────────── ╰──── help: Replace `(string | number | boolean)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'T[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:24] + ╭─[array_type.ts:1:24] 1 │ type barIntersection = (string & number)[]; · ─────────────────── ╰──── help: Replace `(string & number)[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'string[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:3:24] + ╭─[array_type.ts:3:24] 2 │ interface FooInterface { 3 │ '.bar': { baz: string[] }; · ──────── @@ -640,21 +632,21 @@ source: crates/oxc_linter/src/tester.rs help: Replace `string[]` with `Array`. âš  typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'T[]' instead. - ╭─[array_type.tsx:1:12] + ╭─[array_type.ts:1:12] 1 │ const foo: Array void> = []; · ─────────────────────────────────── ╰──── help: Replace `Array void>` with `(new (...args: any[]) => void)[]`. âš  typescript-eslint(array-type): Array type using 'ReadonlyArray' is forbidden. Use 'readonly T[]' instead. - ╭─[array_type.tsx:1:12] + ╭─[array_type.ts:1:12] 1 │ const foo: ReadonlyArray void> = []; · ─────────────────────────────────────────── ╰──── help: Replace `ReadonlyArray void>` with `readonly (new (...args: any[]) => void)[]`. âš  typescript-eslint(array-type): Array type using 'string[]' is forbidden. Use 'Array' instead. - ╭─[array_type.tsx:1:16] + ╭─[array_type.ts:1:16] 1 │ let a: Promise = Promise.resolve([]); · ──────── ╰──── diff --git a/crates/oxc_parser/src/diagnostics.rs b/crates/oxc_parser/src/diagnostics.rs index 4ec152d3896ae..7a1ce56761087 100644 --- a/crates/oxc_parser/src/diagnostics.rs +++ b/crates/oxc_parser/src/diagnostics.rs @@ -90,6 +90,12 @@ pub fn unexpected_end(span: Span) -> OxcDiagnostic { OxcDiagnostic::error("Unexpected end of file").with_label(span) } +#[cold] +pub fn unexpected_jsx_end(span: Span, a: char, b: &str) -> OxcDiagnostic { + OxcDiagnostic::error(format!("Unexpected token. Did you mean `{{'{a}'}}` or `&{b};`?")) + .with_label(span) +} + #[cold] pub fn unterminated_reg_exp(span: Span) -> OxcDiagnostic { OxcDiagnostic::error("Unterminated regular expression").with_label(span) diff --git a/crates/oxc_parser/src/lexer/jsx.rs b/crates/oxc_parser/src/lexer/jsx.rs index 66a280b9a91f8..c5dbce2d5cc66 100644 --- a/crates/oxc_parser/src/lexer/jsx.rs +++ b/crates/oxc_parser/src/lexer/jsx.rs @@ -1,5 +1,6 @@ -use memchr::{memchr, memchr2}; +use memchr::memchr; +use oxc_span::Span; use oxc_syntax::identifier::is_identifier_part; use crate::diagnostics; @@ -12,6 +13,9 @@ use super::{ static NOT_ASCII_JSX_ID_CONTINUE_TABLE: SafeByteMatchTable = safe_byte_match_table!(|b| !(b.is_ascii_alphanumeric() || matches!(b, b'_' | b'$' | b'-'))); +static JSX_CHILD_END_TABLE: SafeByteMatchTable = + safe_byte_match_table!(|b| b == b'{' || b == b'}' || b == b'>' || b == b'<'); + /// `JSXDoubleStringCharacters` :: /// `JSXDoubleStringCharacter` `JSXDoubleStringCharactersopt` /// `JSXDoubleStringCharacter` :: @@ -72,18 +76,23 @@ impl Lexer<'_> { Kind::LCurly } Some(_) => { - // The tokens `{`, `<`, `>` and `}` cannot appear in JSX text. - // The TypeScript compiler raises the error "Unexpected token. Did you mean `{'>'}` or `>`?". - // Where as the Babel compiler does not raise any errors. - // The following check omits `>` and `}` so that more Babel tests can be passed. - let len = memchr2(b'{', b'<', self.remaining().as_bytes()); - if let Some(len) = len { - // SAFETY: `memchr2` guarantees `len` will be offset from current position - // of a `{` or `<` byte. So must be a valid UTF-8 boundary, and within bounds of source. - let end = unsafe { self.source.position().add(len) }; - self.source.set_position(end); - } else { - self.source.advance_to_end(); + let start = self.source.position(); + let next_byte = byte_search! { + lexer: self, + table: JSX_CHILD_END_TABLE, + start: start, + handle_eof: { + return Kind::Undetermined; + }, + }; + if matches!(next_byte, b'}' | b'>') { + let start = self.offset(); + self.error(diagnostics::unexpected_jsx_end( + Span::new(start, start), + next_byte as char, + if next_byte == b'}' { "rbrace" } else { "gt" }, + )); + return Kind::Undetermined; } Kind::JSXText } diff --git a/tasks/coverage/snapshots/estree_acorn_jsx.snap b/tasks/coverage/snapshots/estree_acorn_jsx.snap index ca086f9306ea4..5f9a6eded068a 100644 --- a/tasks/coverage/snapshots/estree_acorn_jsx.snap +++ b/tasks/coverage/snapshots/estree_acorn_jsx.snap @@ -3,10 +3,7 @@ commit: eb5e9976 estree_acorn_jsx Summary: AST Parsed : 39/39 (100.00%) Positive Passed: 35/39 (89.74%) -Negative Passed: 6/9 (66.67%) -Expect Syntax Error: tasks/coverage/acorn-test262/test-acorn-jsx/fail/036.jsx -Expect Syntax Error: tasks/coverage/acorn-test262/test-acorn-jsx/fail/039.jsx -Expect Syntax Error: tasks/coverage/acorn-test262/test-acorn-jsx/fail/040.jsx +Negative Passed: 9/9 (100.00%) Mismatch: tasks/coverage/acorn-test262/test-acorn-jsx/pass/010.jsx Mismatch: tasks/coverage/acorn-test262/test-acorn-jsx/pass/013.jsx Mismatch: tasks/coverage/acorn-test262/test-acorn-jsx/pass/020.jsx diff --git a/tasks/coverage/snapshots/parser_babel.snap b/tasks/coverage/snapshots/parser_babel.snap index d0b06dca2668c..c1ecaadb28c5b 100644 --- a/tasks/coverage/snapshots/parser_babel.snap +++ b/tasks/coverage/snapshots/parser_babel.snap @@ -3,7 +3,7 @@ commit: 578ac4df parser_babel Summary: AST Parsed : 2303/2322 (99.18%) Positive Passed: 2282/2322 (98.28%) -Negative Passed: 1548/1673 (92.53%) +Negative Passed: 1549/1673 (92.59%) Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-if-body/input.js Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-if/input.js Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/input.js @@ -99,7 +99,6 @@ Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/ty Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-modifier-static/input.ts Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-blocks-with-modifer-declare-01/input.ts Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-blocks-with-modifier-readonly-01/input.ts -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/tsx/invalid-gt-arrow-like/input.ts Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/call-optional-chain-invalid/input.ts Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-function/input.ts Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-function-babel-7/input.ts @@ -294,21 +293,25 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022 ╰──── Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param-no-flow/input.js - × Expected `<` but found `EOF` - ╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param-no-flow/input.js:2:1] + × Unexpected token. Did you mean `{'>'}` or `>`? + ╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param-no-flow/input.js:1:10] 1 │
() => {} + · ▲ ╰──── Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param-no-flow-babel-7/input.js - × Expected `<` but found `EOF` - ╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param-no-flow-babel-7/input.js:2:1] + × Unexpected token. Did you mean `{'>'}` or `>`? + ╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param-no-flow-babel-7/input.js:1:10] 1 │
() => {} + · ▲ ╰──── Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/arrow-function/generic-tsx-babel-7/input.ts - × Expected `<` but found `EOF` - ╭─[babel/packages/babel-parser/test/fixtures/typescript/arrow-function/generic-tsx-babel-7/input.ts:3:1] + × Unexpected token. Did you mean `{'>'}` or `>`? + ╭─[babel/packages/babel-parser/test/fixtures/typescript/arrow-function/generic-tsx-babel-7/input.ts:2:15] + 1 │ // Same as `generic`. Verify that JSX doesn't change things. 2 │ (a: T): T => a; + · ▲ ╰──── Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/constructor-with-modifier-names/input.ts @@ -11392,14 +11395,16 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc · ─ ╰──── - × Expected `<` but found `EOF` - ╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-type-param/input.js:2:1] + × Unexpected token. Did you mean `{'>'}` or `>`? + ╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-type-param/input.js:1:10] 1 │
() => {} + · ▲ ╰──── - × Expected `<` but found `EOF` - ╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/unclosed-jsx-element/input.js:2:1] + × Unexpected token. Did you mean `{'>'}` or `>`? + ╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/unclosed-jsx-element/input.js:1:10] 1 │
() => {} + · ▲ ╰──── × Unexpected token @@ -11533,11 +11538,12 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc · ─ ╰──── - × Unexpected token - ╭─[babel/packages/babel-parser/test/fixtures/typescript/arrow-function/generic-tsx/input.ts:4:3] + × Unexpected token. Did you mean `{'>'}` or `>`? + ╭─[babel/packages/babel-parser/test/fixtures/typescript/arrow-function/generic-tsx/input.ts:2:15] + 1 │ // Generics without trailing comma are disallowed in JSX + 2 │ (a: T): T => a; + · ▲ 3 │ - 4 │ (a: T): T => a; - · ─ ╰──── × Keywords cannot contain escape characters @@ -12805,6 +12811,12 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc 4 │ ); ╰──── + × Unexpected token. Did you mean `{'>'}` or `>`? + ╭─[babel/packages/babel-parser/test/fixtures/typescript/tsx/invalid-gt-arrow-like/input.ts:1:8] + 1 │ () => {}; + · ▲ + ╰──── + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-alias/declare-new-line/input.ts:1:8] 1 │ declare type @@ -13024,57 +13036,21 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc ╰──── help: Remove the duplicate modifier. - × TS(1273): 'public' modifier cannot be used on a type parameter. - ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-with-jsx/input.tsx:98:10] - 97 │ - 98 │ type T20 = T; // Error - · ────── - 99 │ type T21 = T; // Error - ╰──── - - × TS(1030): in' modifier already seen. - ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-with-jsx/input.tsx:99:17] - 98 │ type T20 = T; // Error - 99 │ type T21 = T; // Error - · ── - 100 │ type T22 = T; // Error - ╰──── - help: Remove the duplicate modifier. - - × TS(1030): out' modifier already seen. - ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-with-jsx/input.tsx:100:17] - 99 │ type T21 = T; // Error - 100 │ type T22 = T; // Error - · ─── - 101 │ type T23 = T; // Error - ╰──── - help: Remove the duplicate modifier. - - × TS(1273): 'public' modifier cannot be used on a type parameter. - ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-with-jsx-babel-7/input.tsx:98:10] - 97 │ - 98 │ type T20 = T; // Error - · ────── - 99 │ type T21 = T; // Error - ╰──── - - × TS(1030): in' modifier already seen. - ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-with-jsx-babel-7/input.tsx:99:17] - 98 │ type T20 = T; // Error - 99 │ type T21 = T; // Error - · ── - 100 │ type T22 = T; // Error - ╰──── - help: Remove the duplicate modifier. + × Unexpected token. Did you mean `{'>'}` or `>`? + ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-with-jsx/input.tsx:2:11] + 1 │ // valid JSX + 2 │ () => {}; + · ▲ + 3 │ + ╰──── - × TS(1030): out' modifier already seen. - ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-with-jsx-babel-7/input.tsx:100:17] - 99 │ type T21 = T; // Error - 100 │ type T22 = T; // Error - · ─── - 101 │ type T23 = T; // Error - ╰──── - help: Remove the duplicate modifier. + × Unexpected token. Did you mean `{'>'}` or `>`? + ╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-with-jsx-babel-7/input.tsx:2:11] + 1 │ // valid JSX + 2 │ () => {}; + · ▲ + 3 │ + ╰──── × Expected `]` but found `EOF` ╭─[babel/packages/babel-parser/test/fixtures/typescript/types-arrow-function/invalid-incomplete-array-like/input.ts:2:1] diff --git a/tasks/coverage/snapshots/parser_typescript.snap b/tasks/coverage/snapshots/parser_typescript.snap index 0ce0f5c68b6e9..c8be9aa211ed0 100644 --- a/tasks/coverage/snapshots/parser_typescript.snap +++ b/tasks/coverage/snapshots/parser_typescript.snap @@ -3,7 +3,7 @@ commit: 15392346 parser_typescript Summary: AST Parsed : 6522/6531 (99.86%) Positive Passed: 6511/6531 (99.69%) -Negative Passed: 1285/5754 (22.33%) +Negative Passed: 1287/5754 (22.37%) Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration24.ts Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ExportAssignment7.ts Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ExportAssignment8.ts @@ -3498,7 +3498,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/inlin Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/inline/inlineJsxFactoryLocalTypeGlobalFallback.tsx Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/inline/inlineJsxFactoryWithFragmentIsError.tsx Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/jsxCheckJsxNoTypeArgumentsAllowed.tsx -Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/jsxParsingError2.tsx Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/jsxParsingError3.tsx Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/jsxSpreadOverwritesAttributeStrict.tsx @@ -3538,7 +3537,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxEl Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxElementResolution8.tsx Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxElementResolution9.tsx Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxEmit3.tsx -Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxGenericArrowFunctionParsing.tsx Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxIntrinsicAttributeErrors.tsx Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxNamespacedTagName2.tsx @@ -7857,10 +7855,11 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private ╰──── help: Try insert a semicolon here - × Expected `<` but found `EOF` - ╭─[typescript/tests/cases/compiler/errorSpanForUnclosedJsxTag.tsx:11:23] + × Unexpected token + ╭─[typescript/tests/cases/compiler/errorSpanForUnclosedJsxTag.tsx:11:18] 10 │ 11 │ let y = < Baz >Hello + · ───── ╰──── × 'with' statements are not allowed @@ -10883,16 +10882,18 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private · ─ ╰──── - × Expected `<` but found `EOF` - ╭─[typescript/tests/cases/compiler/parseUnaryExpressionNoTypeAssertionInJsx1.ts:2:24] + × Unexpected token + ╭─[typescript/tests/cases/compiler/parseUnaryExpressionNoTypeAssertionInJsx1.ts:2:21] 1 │ const x = "oops"; 2 │ const y = + x; + · ─── ╰──── - × Expected `<` but found `EOF` - ╭─[typescript/tests/cases/compiler/parseUnaryExpressionNoTypeAssertionInJsx2.ts:2:18] + × Unexpected token + ╭─[typescript/tests/cases/compiler/parseUnaryExpressionNoTypeAssertionInJsx2.ts:2:15] 1 │ const x = "oops"; 2 │ const y = + <> x; + · ─── ╰──── × Unexpected token @@ -20481,6 +20482,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private 8 │
╰──── + × Unexpected token. Did you mean `{'>'}` or `>`? + ╭─[typescript/tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx:40:41] + 39 │ + 40 │ right=monkeys /> gorillas />; + · â–² + 41 │ + ╰──── + × Unexpected token ╭─[typescript/tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx:3:2] 2 │ @@ -20566,6 +20575,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private 10 │ ╰──── + × Unexpected token. Did you mean `{'>'}` or `>`? + ╭─[typescript/tests/cases/conformance/jsx/tsxGenericArrowFunctionParsing.tsx:8:17] + 7 │ // This is an element + 8 │ var x1 = () => {}; + · â–² + 9 │ x1.isElement; + ╰──── + × Expected `,` but found `;` ╭─[typescript/tests/cases/conformance/jsx/tsxStatelessFunctionComponents1.tsx:41:16] 40 │ let o = { diff --git a/tasks/coverage/snapshots/semantic_babel.snap b/tasks/coverage/snapshots/semantic_babel.snap index a97329fc4aa00..523b2499f867d 100644 --- a/tasks/coverage/snapshots/semantic_babel.snap +++ b/tasks/coverage/snapshots/semantic_babel.snap @@ -236,10 +236,10 @@ after transform: ["T", "foo"] rebuilt : ["foo"] tasks/coverage/babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param-no-flow/input.js -semantic error: Expected `<` but found `EOF` +semantic error: Unexpected token. Did you mean `{'>'}` or `>`? tasks/coverage/babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param-no-flow-babel-7/input.js -semantic error: Expected `<` but found `EOF` +semantic error: Unexpected token. Did you mean `{'>'}` or `>`? tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/arrow-function/arrow-function-with-newline/input.ts semantic error: Unresolved references mismatch: @@ -272,7 +272,7 @@ after transform: ["T"] rebuilt : [] tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/arrow-function/generic-tsx-babel-7/input.ts -semantic error: Expected `<` but found `EOF` +semantic error: Unexpected token. Did you mean `{'>'}` or `>`? tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/assert-predicate/arrow-function/input.ts semantic error: Unresolved references mismatch: From 6fc26db1ad1f52e7c5dfb42a786436258936b1bf Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Mon, 17 Mar 2025 14:09:18 +0000 Subject: [PATCH 14/22] perf(lexer): mark error case as cold branch when parsing `JSXText` (#9831) Tiny optimization to lexer, after #9777. Mark the branch for unterminated `JSText` as cold branch to hint to compiler than it shouldn't usually happen. --- crates/oxc_parser/src/lexer/jsx.rs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/crates/oxc_parser/src/lexer/jsx.rs b/crates/oxc_parser/src/lexer/jsx.rs index c5dbce2d5cc66..518e943e90cce 100644 --- a/crates/oxc_parser/src/lexer/jsx.rs +++ b/crates/oxc_parser/src/lexer/jsx.rs @@ -76,25 +76,27 @@ impl Lexer<'_> { Kind::LCurly } Some(_) => { - let start = self.source.position(); let next_byte = byte_search! { lexer: self, table: JSX_CHILD_END_TABLE, - start: start, handle_eof: { return Kind::Undetermined; }, }; - if matches!(next_byte, b'}' | b'>') { - let start = self.offset(); - self.error(diagnostics::unexpected_jsx_end( - Span::new(start, start), - next_byte as char, - if next_byte == b'}' { "rbrace" } else { "gt" }, - )); - return Kind::Undetermined; + + if matches!(next_byte, b'<' | b'{') { + Kind::JSXText + } else { + cold_branch(|| { + let start = self.offset(); + self.error(diagnostics::unexpected_jsx_end( + Span::new(start, start), + next_byte as char, + if next_byte == b'}' { "rbrace" } else { "gt" }, + )); + Kind::Undetermined + }) } - Kind::JSXText } None => Kind::Eof, } From 2b65ed2a69093f30fb2ddaec662ca2b776dd96d4 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Mon, 17 Mar 2025 14:15:19 +0000 Subject: [PATCH 15/22] perf(linter/no_unescaped_entities): optimize string search and error generation (#9832) #9777 made `>` or `}` in `JSXText` a parser error, so `react/no_unescaped_entities` rule can be simplified. Speed it up a little by: * Using `raw` field instead of slicing source. * Iterating over the string as bytes, instead of `char`s. * Using static strings for errors. --- .../src/rules/react/no_unescaped_entities.rs | 33 +++++++------------ 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/crates/oxc_linter/src/rules/react/no_unescaped_entities.rs b/crates/oxc_linter/src/rules/react/no_unescaped_entities.rs index 8de3c04835f6c..ae0839143404c 100644 --- a/crates/oxc_linter/src/rules/react/no_unescaped_entities.rs +++ b/crates/oxc_linter/src/rules/react/no_unescaped_entities.rs @@ -2,7 +2,6 @@ use oxc_ast::AstKind; use oxc_diagnostics::OxcDiagnostic; use oxc_macros::declare_oxc_lint; use oxc_span::Span; -use phf::{Map, phf_map}; use crate::{ AstNode, @@ -10,7 +9,11 @@ use crate::{ rule::Rule, }; -fn no_unescaped_entities_diagnostic(span: Span, unescaped: char, escaped: &str) -> OxcDiagnostic { +static ESCAPED_DOUBLE_QUOTE: &str = "" or “ or " or ”"; +static ESCAPED_SINGLE_QUOTE: &str = "' or ‘ or ' or ’"; + +fn no_unescaped_entities_diagnostic(span: Span, unescaped: char) -> OxcDiagnostic { + let escaped = if unescaped == '"' { ESCAPED_DOUBLE_QUOTE } else { ESCAPED_SINGLE_QUOTE }; OxcDiagnostic::warn(format!("`{unescaped}` can be escaped with {escaped}")).with_label(span) } @@ -50,20 +53,14 @@ declare_oxc_lint!( impl Rule for NoUnescapedEntities { fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { if let AstKind::JSXText(jsx_text) = node.kind() { - let source = jsx_text.span.source_text(ctx.source_text()); - for (i, char) in source.char_indices() { - if !CHARS.contains(&char) { - continue; - } - if let Some(escapes) = DEFAULTS.get(&char) { + let source = jsx_text.raw.unwrap().as_str(); + for (i, &byte) in source.as_bytes().iter().enumerate() { + if matches!(byte, b'\'' | b'\"') { #[expect(clippy::cast_possible_truncation)] + let start = jsx_text.span.start + i as u32; ctx.diagnostic(no_unescaped_entities_diagnostic( - Span::new( - jsx_text.span.start + i as u32, - jsx_text.span.start + i as u32 + 1, - ), - char, - &escapes.join(" or "), + Span::new(start, start + 1), + byte as char, )); } } @@ -75,14 +72,6 @@ impl Rule for NoUnescapedEntities { } } -// NOTE: If we add substantially more characters, we should consider using a hash set instead. -pub const CHARS: [char; 2] = ['"', '\'']; - -pub const DEFAULTS: Map = phf_map! { - '"' => &[""", "“", """, "”"], - '\'' => &["'", "‘", "'", "’"], -}; - #[test] fn test() { use crate::tester::Tester; From 30a03a33486efee4416ccb52582df1280aa8bee6 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Tue, 18 Mar 2025 00:45:55 +0900 Subject: [PATCH 16/22] refactor(napi/playground): use napi-rs wasm for playground (#9803) playground side PR: https://github.com/oxc-project/playground/pull/71 I went ahead testing out this. Let me know if this is not the plan. I think the benefit is that this allows rust-side playground code to reuse some code from other napi crates, for example, `oxc_napi` and `oxc_parser_napi`. For now, I started as mostly copying paste it and replacing `#[wasm_bindgen]` with `#[napi]`, but I also used `oxc_napi` for `OxcError` which replaced diagnostic serialization code from playground. --------- Co-authored-by: Boshen --- .github/workflows/ci.yml | 28 +- Cargo.lock | 16 + dprint.json | 14 +- justfile | 13 +- napi/playground/Cargo.toml | 40 ++ napi/playground/browser.js | 1 + napi/playground/build.rs | 3 + napi/playground/index.d.ts | 127 ++++++ napi/playground/index.js | 375 ++++++++++++++++ napi/playground/package.json | 38 ++ napi/playground/patch.mjs | 11 + napi/playground/playground.wasi-browser.js | 58 +++ napi/playground/playground.wasi.cjs | 90 ++++ napi/playground/src/lib.rs | 485 +++++++++++++++++++++ napi/playground/src/options.rs | 98 +++++ napi/playground/wasi-worker-browser.mjs | 32 ++ napi/playground/wasi-worker.mjs | 63 +++ pnpm-lock.yaml | 11 +- 18 files changed, 1457 insertions(+), 46 deletions(-) create mode 100644 napi/playground/Cargo.toml create mode 100644 napi/playground/browser.js create mode 100644 napi/playground/build.rs create mode 100644 napi/playground/index.d.ts create mode 100644 napi/playground/index.js create mode 100644 napi/playground/package.json create mode 100644 napi/playground/patch.mjs create mode 100644 napi/playground/playground.wasi-browser.js create mode 100644 napi/playground/playground.wasi.cjs create mode 100644 napi/playground/src/lib.rs create mode 100644 napi/playground/src/options.rs create mode 100644 napi/playground/wasi-worker-browser.mjs create mode 100644 napi/playground/wasi-worker.mjs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c997635896a4..38e2429fec5d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,37 +111,12 @@ jobs: - run: pnpm napi build --target wasm32-wasip1-threads --manifest-path ./napi/parser/Cargo.toml - run: pnpm napi build --target wasm32-wasip1-threads --manifest-path ./napi/transform/Cargo.toml - run: pnpm napi build --target wasm32-wasip1-threads --manifest-path ./napi/minify/Cargo.toml + - run: pnpm napi build --target wasm32-wasip1-threads --manifest-path ./napi/playground/Cargo.toml # Fix `index.d.ts` - run: node napi/parser/scripts/fix-wasm-dts.mjs - run: cargo test --target wasm32-wasip1-threads ${TEST_FLAGS} - run: git diff --exit-code # Must commit everything - test-wasm32-unknown-unknown: - name: Check wasm32-unknown-unknown - runs-on: ubuntu-latest - steps: - - uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1 - - - uses: oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0 - with: - cache-key: wasm - save-cache: ${{ github.ref_name == 'main' }} - tools: wasm-pack,just - - name: Check - run: | - rustup target add wasm32-unknown-unknown - cargo check -p oxc_wasm --target wasm32-unknown-unknown - - uses: ./.github/actions/pnpm - - - run: just build-wasm debug - - working-directory: npm/oxc-wasm - run: pnpm run check - - - working-directory: wasm/parser - run: pnpm run build - - working-directory: npm/parser-wasm - run: pnpm run check - typos: name: Spell Check runs-on: ubuntu-latest @@ -319,6 +294,7 @@ jobs: if: steps.filter.outputs.src == 'true' - if: steps.filter.outputs.src == 'true' run: | + rustup target add wasm32-wasip1-threads pnpm run build pnpm run test pnpm --filter e2e run test diff --git a/Cargo.lock b/Cargo.lock index 4c02354664f9b..c77286c5e57dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2041,6 +2041,22 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "oxc_playground_napi" +version = "0.0.1" +dependencies = [ + "napi", + "napi-build", + "napi-derive", + "oxc", + "oxc_index", + "oxc_linter", + "oxc_napi", + "oxc_prettier", + "serde", + "serde_json", +] + [[package]] name = "oxc_prettier" version = "0.0.0" diff --git a/dprint.json b/dprint.json index 43aa6f97d69cd..0dc3d7af90928 100644 --- a/dprint.json +++ b/dprint.json @@ -17,13 +17,13 @@ "**/CHANGELOG.md", "pnpm-workspace.yaml", "pnpm-lock.yaml", - "napi/{transform,minify}/index.js", - "napi/{parser,transform,minify}/index.d.ts", - "napi/{parser,transform,minify}/*.wasi-browser.js", - "napi/{parser,transform,minify}/*.wasi.cjs", - "napi/{parser,transform,minify}/wasi-worker-browser.mjs", - "napi/{parser,transform,minify}/wasi-worker.mjs", - "napi/{parser,transform,minify}/browser.js", + "napi/{transform,minify,playground}/index.js", + "napi/{parser,transform,minify,playground}/index.d.ts", + "napi/{parser,transform,minify,playground}/*.wasi-browser.js", + "napi/{parser,transform,minify,playground}/*.wasi.cjs", + "napi/{parser,transform,minify,playground}/wasi-worker-browser.mjs", + "napi/{parser,transform,minify,playground}/wasi-worker.mjs", + "napi/{parser,transform,minify,playground}/browser.js", "napi/parser/bindings.js", "npm/*/package.json", "npm/oxlint/configuration_schema.json", diff --git a/justfile b/justfile index 8ba9e42e00b1a..02c4f40403eb0 100755 --- a/justfile +++ b/justfile @@ -154,14 +154,11 @@ test-estree *args='': install-wasm: cargo binstall wasm-pack -watch-wasm: - just watch 'just build-wasm dev' - -build-wasm mode="release": - wasm-pack build crates/oxc_wasm --no-pack --target web --scope oxc --out-dir ../../npm/oxc-wasm --{{mode}} - cp crates/oxc_wasm/package.json npm/oxc-wasm/package.json - rm npm/oxc-wasm/.gitignore - node ./crates/oxc_wasm/update-bindings.mjs +watch-playground: + just watch 'pnpm --filter oxc-playground dev' + +build-playground mode="release": + pnpm --filter oxc-playground build # Generate the JavaScript global variables. See `tasks/javascript_globals` javascript-globals: diff --git a/napi/playground/Cargo.toml b/napi/playground/Cargo.toml new file mode 100644 index 0000000000000..7cebc8c8076e6 --- /dev/null +++ b/napi/playground/Cargo.toml @@ -0,0 +1,40 @@ +[package] +name = "oxc_playground_napi" +version = "0.0.1" +authors.workspace = true +categories.workspace = true +edition.workspace = true +homepage.workspace = true +include = ["/src", "build.rs"] +keywords.workspace = true +license.workspace = true +publish = false +repository.workspace = true +rust-version.workspace = true +description.workspace = true + +[lints] +workspace = true + +[lib] +crate-type = ["cdylib", "lib"] +test = false +doctest = false + +[dependencies] +oxc = { workspace = true, features = ["ast_visit", "codegen", "minifier", "semantic", "serialize", "transformer", "isolated_declarations"] } +oxc_index = { workspace = true } +oxc_linter = { workspace = true } +oxc_napi = { workspace = true } +oxc_prettier = { workspace = true } + +napi = { workspace = true } +napi-derive = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } + +[package.metadata.cargo-shear] +ignored = ["napi"] + +[build-dependencies] +napi-build = { workspace = true } diff --git a/napi/playground/browser.js b/napi/playground/browser.js new file mode 100644 index 0000000000000..a9e59de1e5d14 --- /dev/null +++ b/napi/playground/browser.js @@ -0,0 +1 @@ +export * from '@oxc-playground/binding-wasm32-wasi' diff --git a/napi/playground/build.rs b/napi/playground/build.rs new file mode 100644 index 0000000000000..0f1b01002b079 --- /dev/null +++ b/napi/playground/build.rs @@ -0,0 +1,3 @@ +fn main() { + napi_build::setup(); +} diff --git a/napi/playground/index.d.ts b/napi/playground/index.d.ts new file mode 100644 index 0000000000000..dd5ac848e2e8d --- /dev/null +++ b/napi/playground/index.d.ts @@ -0,0 +1,127 @@ +/* auto-generated by NAPI-RS */ +/* eslint-disable */ +export declare class Oxc { + astJson: string + ir: string + controlFlowGraph: string + symbolsJson: string + scopeText: string + codegenText: string + codegenSourcemapText?: string + formattedText: string + prettierFormattedText: string + prettierIrText: string + constructor() + getDiagnostics2(): Array + getDiagnostics(): Array + getComments(): Array + /** + * # Errors + * Serde serialization error + */ + run(sourceText: string, options: OxcOptions): void +} + +export interface Comment { + type: CommentType + value: string + start: number + end: number +} + +export declare const enum CommentType { + Line = 0, + Block = 1 +} + +export interface ErrorLabel { + message?: string + start: number + end: number +} + +export interface OxcCodegenOptions { + indentation?: number + enableTypescript?: boolean + enableSourcemap?: boolean +} + +export interface OxcCompressOptions { + booleans: boolean + dropDebugger: boolean + dropConsole: boolean + evaluate: boolean + joinVars: boolean + loops: boolean + typeofs: boolean +} + +export interface OxcControlFlowOptions { + verbose?: boolean +} + +export interface OxcDiagnostic { + start: number + end: number + severity: string + message: string +} + +export interface OxcError { + severity: Severity + message: string + labels: Array + helpMessage?: string +} + +export interface OxcLinterOptions { + +} + +export interface OxcMinifierOptions { + whitespace?: boolean + mangle?: boolean + compress?: boolean + compressOptions?: OxcCompressOptions +} + +export interface OxcOptions { + run?: OxcRunOptions + parser?: OxcParserOptions + linter?: OxcLinterOptions + transformer?: OxcTransformerOptions + codegen?: OxcCodegenOptions + minifier?: OxcMinifierOptions + controlFlow?: OxcControlFlowOptions +} + +export interface OxcParserOptions { + allowReturnOutsideFunction?: boolean + preserveParens?: boolean + allowV8Intrinsics?: boolean + sourceType?: string + sourceFilename?: string +} + +export interface OxcRunOptions { + syntax?: boolean + lint?: boolean + format?: boolean + prettierFormat?: boolean + prettierIr?: boolean + transform?: boolean + typeCheck?: boolean + scope?: boolean + symbol?: boolean +} + +export interface OxcTransformerOptions { + target?: string + isolatedDeclarations?: boolean +} + +export declare const enum Severity { + Error = 'Error', + Warning = 'Warning', + Advice = 'Advice' +} diff --git a/napi/playground/index.js b/napi/playground/index.js new file mode 100644 index 0000000000000..473ac1db6002e --- /dev/null +++ b/napi/playground/index.js @@ -0,0 +1,375 @@ +// prettier-ignore +/* eslint-disable */ +// @ts-nocheck +/* auto-generated by NAPI-RS */ + +const { createRequire } = require('node:module') +require = createRequire(__filename) + +const { readFileSync } = require('node:fs') +let nativeBinding = null +const loadErrors = [] + +const isMusl = () => { + let musl = false + if (process.platform === 'linux') { + musl = isMuslFromFilesystem() + if (musl === null) { + musl = isMuslFromReport() + } + if (musl === null) { + musl = isMuslFromChildProcess() + } + } + return musl +} + +const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-') + +const isMuslFromFilesystem = () => { + try { + return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl') + } catch { + return null + } +} + +const isMuslFromReport = () => { + const report = typeof process.report.getReport === 'function' ? process.report.getReport() : null + if (!report) { + return null + } + if (report.header && report.header.glibcVersionRuntime) { + return false + } + if (Array.isArray(report.sharedObjects)) { + if (report.sharedObjects.some(isFileMusl)) { + return true + } + } + return false +} + +const isMuslFromChildProcess = () => { + try { + return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl') + } catch (e) { + // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false + return false + } +} + +function requireNative() { + if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) { + try { + nativeBinding = require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH); + } catch (err) { + loadErrors.push(err); + } + } else if (process.platform === 'android') { + if (process.arch === 'arm64') { + try { + return require('./playground.android-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-android-arm64') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'arm') { + try { + return require('./playground.android-arm-eabi.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-android-arm-eabi') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`)) + } + } else if (process.platform === 'win32') { + if (process.arch === 'x64') { + try { + return require('./playground.win32-x64-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-win32-x64-msvc') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'ia32') { + try { + return require('./playground.win32-ia32-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-win32-ia32-msvc') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'arm64') { + try { + return require('./playground.win32-arm64-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-win32-arm64-msvc') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`)) + } + } else if (process.platform === 'darwin') { + try { + return require('./playground.darwin-universal.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-darwin-universal') + } catch (e) { + loadErrors.push(e) + } + + if (process.arch === 'x64') { + try { + return require('./playground.darwin-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-darwin-x64') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'arm64') { + try { + return require('./playground.darwin-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-darwin-arm64') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`)) + } + } else if (process.platform === 'freebsd') { + if (process.arch === 'x64') { + try { + return require('./playground.freebsd-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-freebsd-x64') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'arm64') { + try { + return require('./playground.freebsd-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-freebsd-arm64') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`)) + } + } else if (process.platform === 'linux') { + if (process.arch === 'x64') { + if (isMusl()) { + try { + return require('./playground.linux-x64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-linux-x64-musl') + } catch (e) { + loadErrors.push(e) + } + + } else { + try { + return require('./playground.linux-x64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-linux-x64-gnu') + } catch (e) { + loadErrors.push(e) + } + + } + } else if (process.arch === 'arm64') { + if (isMusl()) { + try { + return require('./playground.linux-arm64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-linux-arm64-musl') + } catch (e) { + loadErrors.push(e) + } + + } else { + try { + return require('./playground.linux-arm64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-linux-arm64-gnu') + } catch (e) { + loadErrors.push(e) + } + + } + } else if (process.arch === 'arm') { + if (isMusl()) { + try { + return require('./playground.linux-arm-musleabihf.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-linux-arm-musleabihf') + } catch (e) { + loadErrors.push(e) + } + + } else { + try { + return require('./playground.linux-arm-gnueabihf.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-linux-arm-gnueabihf') + } catch (e) { + loadErrors.push(e) + } + + } + } else if (process.arch === 'riscv64') { + if (isMusl()) { + try { + return require('./playground.linux-riscv64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-linux-riscv64-musl') + } catch (e) { + loadErrors.push(e) + } + + } else { + try { + return require('./playground.linux-riscv64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-linux-riscv64-gnu') + } catch (e) { + loadErrors.push(e) + } + + } + } else if (process.arch === 'ppc64') { + try { + return require('./playground.linux-ppc64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-linux-ppc64-gnu') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 's390x') { + try { + return require('./playground.linux-s390x-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@oxc-playground/binding-linux-s390x-gnu') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`)) + } + } else { + loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`)) + } +} + +nativeBinding = requireNative() + +if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { + try { + nativeBinding = require('./playground.wasi.cjs') + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + loadErrors.push(err) + } + } + if (!nativeBinding) { + try { + nativeBinding = require('@oxc-playground/binding-wasm32-wasi') + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + loadErrors.push(err) + } + } + } +} + +if (!nativeBinding) { + if (loadErrors.length > 0) { + // TODO Link to documentation with potential fixes + // - The package owner could build/publish bindings for this arch + // - The user may need to bundle the correct files + // - The user may need to re-install node_modules to get new packages + throw new Error('Failed to load native binding', { cause: loadErrors }) + } + throw new Error(`Failed to load native binding`) +} + +module.exports.Oxc = nativeBinding.Oxc +module.exports.CommentType = nativeBinding.CommentType +module.exports.Severity = nativeBinding.Severity diff --git a/napi/playground/package.json b/napi/playground/package.json new file mode 100644 index 0000000000000..6ef4f2c59134c --- /dev/null +++ b/napi/playground/package.json @@ -0,0 +1,38 @@ +{ + "name": "oxc-playground", + "version": "0.0.0", + "private": true, + "license": "MIT", + "type": "commonjs", + "exports": { + ".": { + "types": "./index.d.ts", + "browser": "./playground.wasi-browser.js", + "default": "./index.js" + }, + "./*": "./*" + }, + "scripts": { + "build": "napi build --no-dts-cache --platform --release --target wasm32-wasip1-threads && node patch.mjs", + "dev": "napi build --no-dts-cache --platform --target wasm32-wasip1-threads && node patch.mjs" + }, + "dependencies": { + "@napi-rs/wasm-runtime": "^0.2.7" + }, + "collaborators": [ + "Boshen ", + "Oxc contributors" + ], + "napi": { + "binaryName": "playground", + "packageName": "@oxc-playground/binding", + "targets": [ + "wasm32-wasip1-threads" + ], + "wasm": { + "browser": { + "fs": false + } + } + } +} diff --git a/napi/playground/patch.mjs b/napi/playground/patch.mjs new file mode 100644 index 0000000000000..150dd6b49cfc4 --- /dev/null +++ b/napi/playground/patch.mjs @@ -0,0 +1,11 @@ +import fs from 'node:fs'; + +// patch to use async init to workaround sync compile limit 8MB +// Waiting for https://github.com/napi-rs/napi-rs/issues/2513 +const filename = './playground.wasi-browser.js'; +let data = fs.readFileSync(filename, 'utf-8'); +data = data.replace( + '__emnapiInstantiateNapiModuleSync(__wasmFile', + 'await (await import("@napi-rs/wasm-runtime")).instantiateNapiModule(__wasmFile', +); +fs.writeFileSync(filename, data); diff --git a/napi/playground/playground.wasi-browser.js b/napi/playground/playground.wasi-browser.js new file mode 100644 index 0000000000000..81cb30c0e32e3 --- /dev/null +++ b/napi/playground/playground.wasi-browser.js @@ -0,0 +1,58 @@ +import { + instantiateNapiModuleSync as __emnapiInstantiateNapiModuleSync, + getDefaultContext as __emnapiGetDefaultContext, + WASI as __WASI, + createOnMessage as __wasmCreateOnMessageForFsProxy, +} from '@napi-rs/wasm-runtime' + +import __wasmUrl from './playground.wasm32-wasi.wasm?url' + +const __wasi = new __WASI({ + version: 'preview1', +}) + +const __emnapiContext = __emnapiGetDefaultContext() + +const __sharedMemory = new WebAssembly.Memory({ + initial: 4000, + maximum: 65536, + shared: true, +}) + +const __wasmFile = await fetch(__wasmUrl).then((res) => res.arrayBuffer()) + +const { + instance: __napiInstance, + module: __wasiModule, + napiModule: __napiModule, +} = await (await import("@napi-rs/wasm-runtime")).instantiateNapiModule(__wasmFile, { + context: __emnapiContext, + asyncWorkPoolSize: 4, + wasi: __wasi, + onCreateWorker() { + const worker = new Worker(new URL('./wasi-worker-browser.mjs', import.meta.url), { + type: 'module', + }) + + return worker + }, + overwriteImports(importObject) { + importObject.env = { + ...importObject.env, + ...importObject.napi, + ...importObject.emnapi, + memory: __sharedMemory, + } + return importObject + }, + beforeInit({ instance }) { + for (const name of Object.keys(instance.exports)) { + if (name.startsWith('__napi_register__')) { + instance.exports[name]() + } + } + }, +}) +export const Oxc = __napiModule.exports.Oxc +export const CommentType = __napiModule.exports.CommentType +export const Severity = __napiModule.exports.Severity diff --git a/napi/playground/playground.wasi.cjs b/napi/playground/playground.wasi.cjs new file mode 100644 index 0000000000000..bc6b008bc21f8 --- /dev/null +++ b/napi/playground/playground.wasi.cjs @@ -0,0 +1,90 @@ +/* eslint-disable */ +/* prettier-ignore */ + +/* auto-generated by NAPI-RS */ + +const __nodeFs = require('node:fs') +const __nodePath = require('node:path') +const { WASI: __nodeWASI } = require('node:wasi') +const { Worker } = require('node:worker_threads') + +const { + instantiateNapiModuleSync: __emnapiInstantiateNapiModuleSync, + getDefaultContext: __emnapiGetDefaultContext, + createOnMessage: __wasmCreateOnMessageForFsProxy, +} = require('@napi-rs/wasm-runtime') + +const __rootDir = __nodePath.parse(process.cwd()).root + +const __wasi = new __nodeWASI({ + version: 'preview1', + env: process.env, + preopens: { + [__rootDir]: __rootDir, + } +}) + +const __emnapiContext = __emnapiGetDefaultContext() + +const __sharedMemory = new WebAssembly.Memory({ + initial: 4000, + maximum: 65536, + shared: true, +}) + +let __wasmFilePath = __nodePath.join(__dirname, 'playground.wasm32-wasi.wasm') +const __wasmDebugFilePath = __nodePath.join(__dirname, 'playground.wasm32-wasi.debug.wasm') + +if (__nodeFs.existsSync(__wasmDebugFilePath)) { + __wasmFilePath = __wasmDebugFilePath +} else if (!__nodeFs.existsSync(__wasmFilePath)) { + try { + __wasmFilePath = __nodePath.resolve('@oxc-playground/binding-wasm32-wasi') + } catch { + throw new Error('Cannot find playground.wasm32-wasi.wasm file, and @oxc-playground/binding-wasm32-wasi package is not installed.') + } +} + +const { instance: __napiInstance, module: __wasiModule, napiModule: __napiModule } = __emnapiInstantiateNapiModuleSync(__nodeFs.readFileSync(__wasmFilePath), { + context: __emnapiContext, + asyncWorkPoolSize: (function() { + const threadsSizeFromEnv = Number(process.env.NAPI_RS_ASYNC_WORK_POOL_SIZE ?? process.env.UV_THREADPOOL_SIZE) + // NaN > 0 is false + if (threadsSizeFromEnv > 0) { + return threadsSizeFromEnv + } else { + return 4 + } + })(), + reuseWorker: true, + wasi: __wasi, + onCreateWorker() { + const worker = new Worker(__nodePath.join(__dirname, 'wasi-worker.mjs'), { + env: process.env, + }) + worker.onmessage = ({ data }) => { + __wasmCreateOnMessageForFsProxy(__nodeFs)(data) + } + return worker + }, + overwriteImports(importObject) { + importObject.env = { + ...importObject.env, + ...importObject.napi, + ...importObject.emnapi, + memory: __sharedMemory, + } + return importObject + }, + beforeInit({ instance }) { + for (const name of Object.keys(instance.exports)) { + if (name.startsWith('__napi_register__')) { + instance.exports[name]() + } + } + }, +}) + +module.exports.Oxc = __napiModule.exports.Oxc +module.exports.CommentType = __napiModule.exports.CommentType +module.exports.Severity = __napiModule.exports.Severity diff --git a/napi/playground/src/lib.rs b/napi/playground/src/lib.rs new file mode 100644 index 0000000000000..b374d321136cc --- /dev/null +++ b/napi/playground/src/lib.rs @@ -0,0 +1,485 @@ +use std::{ + cell::{Cell, RefCell}, + path::{Path, PathBuf}, + rc::Rc, + sync::Arc, +}; + +use napi_derive::napi; +use oxc::{ + allocator::Allocator, + ast::{Comment as OxcComment, CommentKind, ast::Program}, + ast_visit::{Visit, utf8_to_utf16::Utf8ToUtf16}, + codegen::{CodeGenerator, CodegenOptions}, + isolated_declarations::{IsolatedDeclarations, IsolatedDeclarationsOptions}, + minifier::{CompressOptions, MangleOptions, Minifier, MinifierOptions}, + parser::{ParseOptions, Parser, ParserReturn}, + semantic::{ + ReferenceId, ScopeFlags, ScopeId, Scoping, SemanticBuilder, SymbolFlags, + dot::{DebugDot, DebugDotContext}, + }, + span::{SourceType, Span}, + syntax::reference::Reference, + transformer::{TransformOptions, Transformer}, +}; +use oxc_index::Idx; +use oxc_linter::{ConfigStoreBuilder, LintOptions, Linter, ModuleRecord}; +use oxc_napi::OxcError; +use oxc_prettier::{Prettier, PrettierOptions}; +use serde::Serialize; + +use crate::options::{OxcOptions, OxcRunOptions}; + +mod options; + +#[derive(Default)] +#[napi] +pub struct Oxc { + pub ast_json: String, + pub ir: String, + pub control_flow_graph: String, + pub symbols_json: String, + pub scope_text: String, + pub codegen_text: String, + pub codegen_sourcemap_text: Option, + pub formatted_text: String, + pub prettier_formatted_text: String, + pub prettier_ir_text: String, + comments: Vec, + diagnostics: RefCell>, +} + +#[derive(Clone)] +#[napi(object)] +pub struct Comment { + pub r#type: CommentType, + pub value: String, + pub start: u32, + pub end: u32, +} + +#[derive(Clone)] +#[napi] +pub enum CommentType { + Line, + Block, +} + +#[derive(Default, Clone)] +#[napi(object)] +pub struct OxcDiagnostic { + pub start: u32, + pub end: u32, + pub severity: String, + pub message: String, +} + +#[napi] +impl Oxc { + #[napi(constructor)] + pub fn new() -> Self { + Self::default() + } + + #[napi] + pub fn get_diagnostics2(&self) -> Vec { + self.diagnostics.borrow().clone().into_iter().map(OxcError::from).collect() + } + + #[napi] + pub fn get_diagnostics(&self) -> Vec { + self.diagnostics + .borrow() + .iter() + .flat_map(|error| match &error.labels { + Some(labels) => labels + .iter() + .map(|label| OxcDiagnostic { + #[expect(clippy::cast_possible_truncation)] + start: label.offset() as u32, + #[expect(clippy::cast_possible_truncation)] + end: (label.offset() + label.len()) as u32, + severity: format!("{:?}", error.severity), + message: format!("{error}"), + }) + .collect::>(), + None => vec![OxcDiagnostic { + start: 0, + end: 0, + severity: format!("{:?}", error.severity), + message: format!("{error}"), + }], + }) + .collect::>() + } + + #[napi] + pub fn get_comments(&self) -> Vec { + self.comments.clone() + } + + /// # Errors + /// Serde serialization error + #[napi] + #[allow(clippy::allow_attributes)] + #[allow(clippy::needless_pass_by_value)] + pub fn run(&mut self, source_text: String, options: OxcOptions) -> napi::Result<()> { + self.diagnostics = RefCell::default(); + + let OxcOptions { + run: run_options, + parser: parser_options, + linter: linter_options, + transformer: transform_options, + codegen: codegen_options, + minifier: minifier_options, + control_flow: control_flow_options, + } = options; + let run_options = run_options.unwrap_or_default(); + let parser_options = parser_options.unwrap_or_default(); + let _linter_options = linter_options.unwrap_or_default(); + let minifier_options = minifier_options.unwrap_or_default(); + let codegen_options = codegen_options.unwrap_or_default(); + let transform_options = transform_options.unwrap_or_default(); + let control_flow_options = control_flow_options.unwrap_or_default(); + + let allocator = Allocator::default(); + + let path = PathBuf::from( + parser_options.source_filename.clone().unwrap_or_else(|| "test.tsx".to_string()), + ); + let source_type = SourceType::from_path(&path).unwrap_or_default(); + let source_type = match parser_options.source_type.as_deref() { + Some("script") => source_type.with_script(true), + Some("module") => source_type.with_module(true), + _ => source_type, + }; + + let default_parser_options = ParseOptions::default(); + let oxc_parser_options = ParseOptions { + parse_regular_expression: true, + allow_return_outside_function: parser_options + .allow_return_outside_function + .unwrap_or(default_parser_options.allow_return_outside_function), + preserve_parens: parser_options + .preserve_parens + .unwrap_or(default_parser_options.preserve_parens), + allow_v8_intrinsics: parser_options + .allow_v8_intrinsics + .unwrap_or(default_parser_options.allow_v8_intrinsics), + }; + let ParserReturn { mut program, errors, module_record, .. } = + Parser::new(&allocator, &source_text, source_type) + .with_options(oxc_parser_options) + .parse(); + + let mut semantic_builder = SemanticBuilder::new(); + if run_options.transform.unwrap_or_default() { + // Estimate transformer will triple scopes, symbols, references + semantic_builder = semantic_builder.with_excess_capacity(2.0); + } + let semantic_ret = + semantic_builder.with_check_syntax_error(true).with_cfg(true).build(&program); + let semantic = semantic_ret.semantic; + + self.control_flow_graph = semantic.cfg().map_or_else(String::default, |cfg| { + cfg.debug_dot(DebugDotContext::new( + semantic.nodes(), + control_flow_options.verbose.unwrap_or_default(), + )) + }); + if run_options.syntax.unwrap_or_default() { + self.save_diagnostics( + errors.into_iter().chain(semantic_ret.errors).collect::>(), + ); + } + + let module_record = Arc::new(ModuleRecord::new(&path, &module_record, &semantic)); + self.run_linter(&run_options, &path, &program, &module_record); + + self.run_prettier(&run_options, &source_text, source_type); + + let scoping = semantic.into_scoping(); + + if !source_type.is_typescript_definition() { + if run_options.scope.unwrap_or_default() { + self.scope_text = Self::get_scope_text(&program, &scoping); + } + if run_options.symbol.unwrap_or_default() { + self.symbols_json = Self::get_symbols_text(&scoping)?; + } + } + + if run_options.transform.unwrap_or_default() { + if transform_options.isolated_declarations == Some(true) { + let ret = + IsolatedDeclarations::new(&allocator, IsolatedDeclarationsOptions::default()) + .build(&program); + if ret.errors.is_empty() { + let codegen_result = CodeGenerator::new() + .with_options(CodegenOptions { + source_map_path: codegen_options + .enable_sourcemap + .unwrap_or_default() + .then(|| path.clone()), + ..CodegenOptions::default() + }) + .build(&ret.program); + self.codegen_text = codegen_result.code; + self.codegen_sourcemap_text = + codegen_result.map.map(|map| map.to_json_string()); + } else { + self.save_diagnostics(ret.errors.into_iter().collect::>()); + self.codegen_text = String::new(); + self.codegen_sourcemap_text = None; + } + return Ok(()); + } + + let options = transform_options + .target + .as_ref() + .and_then(|target| { + TransformOptions::from_target(target) + .map_err(|err| { + self.save_diagnostics(vec![oxc::diagnostics::OxcDiagnostic::error( + err, + )]); + }) + .ok() + }) + .unwrap_or_default(); + let result = Transformer::new(&allocator, &path, &options) + .build_with_scoping(scoping, &mut program); + if !result.errors.is_empty() { + self.save_diagnostics(result.errors.into_iter().collect::>()); + } + } + + let symbol_table = if minifier_options.compress.unwrap_or_default() + || minifier_options.mangle.unwrap_or_default() + { + let compress_options = minifier_options.compress_options.unwrap_or_default(); + let options = MinifierOptions { + mangle: minifier_options.mangle.unwrap_or_default().then(MangleOptions::default), + compress: Some(if minifier_options.compress.unwrap_or_default() { + CompressOptions { + drop_console: compress_options.drop_console, + drop_debugger: compress_options.drop_debugger, + ..CompressOptions::all_false() + } + } else { + CompressOptions::all_false() + }), + }; + Minifier::new(options).build(&allocator, &mut program).scoping + } else { + None + }; + + let codegen_result = CodeGenerator::new() + .with_scoping(symbol_table) + .with_options(CodegenOptions { + minify: minifier_options.whitespace.unwrap_or_default(), + source_map_path: codegen_options + .enable_sourcemap + .unwrap_or_default() + .then(|| path.clone()), + ..CodegenOptions::default() + }) + .build(&program); + self.codegen_text = codegen_result.code; + self.codegen_sourcemap_text = codegen_result.map.map(|map| map.to_json_string()); + self.ir = format!("{:#?}", program.body); + self.convert_ast(&mut program); + + Ok(()) + } + + fn run_linter( + &self, + run_options: &OxcRunOptions, + path: &Path, + program: &Program, + module_record: &Arc, + ) { + // Only lint if there are no syntax errors + if run_options.lint.unwrap_or_default() && self.diagnostics.borrow().is_empty() { + let semantic_ret = SemanticBuilder::new().with_cfg(true).build(program); + let semantic = Rc::new(semantic_ret.semantic); + let lint_config = + ConfigStoreBuilder::default().build().expect("Failed to build config store"); + let linter_ret = Linter::new(LintOptions::default(), lint_config).run( + path, + Rc::clone(&semantic), + Arc::clone(module_record), + ); + let diagnostics = linter_ret.into_iter().map(|e| e.error).collect(); + self.save_diagnostics(diagnostics); + } + } + + fn run_prettier( + &mut self, + run_options: &OxcRunOptions, + source_text: &str, + source_type: SourceType, + ) { + let allocator = Allocator::default(); + if run_options.prettier_format.unwrap_or_default() + || run_options.prettier_ir.unwrap_or_default() + { + let ret = Parser::new(&allocator, source_text, source_type) + .with_options(ParseOptions { preserve_parens: false, ..ParseOptions::default() }) + .parse(); + + let mut prettier = Prettier::new(&allocator, PrettierOptions::default()); + + if run_options.prettier_format.unwrap_or_default() { + self.prettier_formatted_text = prettier.build(&ret.program); + } + + if run_options.prettier_ir.unwrap_or_default() { + let prettier_doc = prettier.doc(&ret.program).to_string(); + self.prettier_ir_text = { + let ret = Parser::new(&allocator, &prettier_doc, SourceType::default()).parse(); + Prettier::new(&allocator, PrettierOptions::default()).build(&ret.program) + }; + } + } + } + + fn get_scope_text(program: &Program<'_>, scoping: &Scoping) -> String { + struct ScopesTextWriter<'s> { + scoping: &'s Scoping, + scope_text: String, + indent: usize, + space: String, + } + + impl<'s> ScopesTextWriter<'s> { + fn new(scoping: &'s Scoping) -> Self { + Self { scoping, scope_text: String::new(), indent: 0, space: String::new() } + } + + fn write_line>(&mut self, line: S) { + self.scope_text.push_str(&self.space[0..self.indent]); + self.scope_text.push_str(line.as_ref()); + self.scope_text.push('\n'); + } + + fn indent_in(&mut self) { + self.indent += 2; + if self.space.len() < self.indent { + self.space.push_str(" "); + } + } + + fn indent_out(&mut self) { + self.indent -= 2; + } + } + + impl Visit<'_> for ScopesTextWriter<'_> { + fn enter_scope(&mut self, _: ScopeFlags, scope_id: &Cell>) { + let scope_id = scope_id.get().unwrap(); + let flags = self.scoping.scope_flags(scope_id); + self.write_line(format!("Scope {} ({flags:?}) {{", scope_id.index())); + self.indent_in(); + + let bindings = self.scoping.get_bindings(scope_id); + if !bindings.is_empty() { + self.write_line("Bindings: {"); + for (name, &symbol_id) in bindings { + let symbol_flags = self.scoping.symbol_flags(symbol_id); + self.write_line(format!(" {name} ({symbol_id:?} {symbol_flags:?})",)); + } + self.write_line("}"); + } + } + + fn leave_scope(&mut self) { + self.indent_out(); + self.write_line("}"); + } + } + + let mut writer = ScopesTextWriter::new(scoping); + writer.visit_program(program); + writer.scope_text + } + + fn get_symbols_text(scoping: &Scoping) -> napi::Result { + #[derive(Serialize)] + struct Data { + span: Span, + name: String, + flags: SymbolFlags, + scope_id: ScopeId, + resolved_references: Vec, + references: Vec, + } + + let data = scoping + .symbol_ids() + .map(|symbol_id| Data { + span: scoping.symbol_span(symbol_id), + name: scoping.symbol_name(symbol_id).into(), + flags: scoping.symbol_flags(symbol_id), + scope_id: scoping.symbol_scope_id(symbol_id), + resolved_references: scoping + .get_resolved_reference_ids(symbol_id) + .iter() + .copied() + .collect::>(), + references: scoping + .get_resolved_reference_ids(symbol_id) + .iter() + .map(|reference_id| scoping.get_reference(*reference_id).clone()) + .collect::>(), + }) + .collect::>(); + + serde_json::to_string_pretty(&data).map_err(|e| napi::Error::from_reason(e.to_string())) + } + + fn save_diagnostics(&self, diagnostics: Vec) { + self.diagnostics.borrow_mut().extend(diagnostics); + } + + fn convert_ast(&mut self, program: &mut Program) { + let span_converter = Utf8ToUtf16::new(program.source_text); + span_converter.convert_program(program); + self.ast_json = program.to_pretty_estree_ts_json(); + + self.comments = Self::map_comments(program.source_text, &program.comments, &span_converter); + } + + fn map_comments( + source_text: &str, + comments: &[OxcComment], + span_converter: &Utf8ToUtf16, + ) -> Vec { + let mut offset_converter = span_converter.converter(); + + comments + .iter() + .map(|comment| { + let value = comment.content_span().source_text(source_text).to_string(); + let mut span = comment.span; + if let Some(converter) = &mut offset_converter { + converter.convert_span(&mut span); + } + Comment { + r#type: match comment.kind { + CommentKind::Line => CommentType::Line, + CommentKind::Block => CommentType::Block, + }, + value, + start: span.start, + end: span.end, + } + }) + .collect() + } +} diff --git a/napi/playground/src/options.rs b/napi/playground/src/options.rs new file mode 100644 index 0000000000000..3af28c1e3954f --- /dev/null +++ b/napi/playground/src/options.rs @@ -0,0 +1,98 @@ +use napi_derive::napi; + +#[napi(object)] +#[derive(Default)] +pub struct OxcOptions { + pub run: Option, + pub parser: Option, + pub linter: Option, + pub transformer: Option, + pub codegen: Option, + pub minifier: Option, + pub control_flow: Option, +} + +#[napi(object)] +#[derive(Default)] +pub struct OxcRunOptions { + pub syntax: Option, + pub lint: Option, + pub format: Option, + pub prettier_format: Option, + pub prettier_ir: Option, + pub transform: Option, + pub type_check: Option, + pub scope: Option, + pub symbol: Option, +} + +#[napi(object)] +#[derive(Default)] +pub struct OxcParserOptions { + pub allow_return_outside_function: Option, + pub preserve_parens: Option, + pub allow_v8_intrinsics: Option, + pub source_type: Option, + pub source_filename: Option, +} + +#[napi(object)] +#[derive(Default)] +#[expect(clippy::empty_structs_with_brackets)] +pub struct OxcLinterOptions {} + +#[napi(object)] +#[derive(Default)] +pub struct OxcTransformerOptions { + pub target: Option, + pub isolated_declarations: Option, +} + +#[napi(object)] +#[derive(Default)] +pub struct OxcCodegenOptions { + pub indentation: Option, + pub enable_typescript: Option, + pub enable_sourcemap: Option, +} + +#[napi(object)] +#[derive(Default)] +pub struct OxcControlFlowOptions { + pub verbose: Option, +} + +#[napi(object)] +#[derive(Default)] +pub struct OxcMinifierOptions { + pub whitespace: Option, + pub mangle: Option, + pub compress: Option, + pub compress_options: Option, +} + +#[napi(object)] +pub struct OxcCompressOptions { + pub booleans: bool, + pub drop_debugger: bool, + pub drop_console: bool, + pub evaluate: bool, + pub join_vars: bool, + pub loops: bool, + pub typeofs: bool, +} + +// keep same with `oxc_minifier::options::CompressOptions` +impl Default for OxcCompressOptions { + fn default() -> Self { + Self { + booleans: true, + drop_debugger: true, + drop_console: false, + evaluate: true, + join_vars: true, + loops: true, + typeofs: true, + } + } +} diff --git a/napi/playground/wasi-worker-browser.mjs b/napi/playground/wasi-worker-browser.mjs new file mode 100644 index 0000000000000..8b1b1722177fc --- /dev/null +++ b/napi/playground/wasi-worker-browser.mjs @@ -0,0 +1,32 @@ +import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime' + +const handler = new MessageHandler({ + onLoad({ wasmModule, wasmMemory }) { + const wasi = new WASI({ + print: function () { + // eslint-disable-next-line no-console + console.log.apply(console, arguments) + }, + printErr: function() { + // eslint-disable-next-line no-console + console.error.apply(console, arguments) + }, + }) + return instantiateNapiModuleSync(wasmModule, { + childThread: true, + wasi, + overwriteImports(importObject) { + importObject.env = { + ...importObject.env, + ...importObject.napi, + ...importObject.emnapi, + memory: wasmMemory, + } + }, + }) + }, +}) + +globalThis.onmessage = function (e) { + handler.handle(e) +} diff --git a/napi/playground/wasi-worker.mjs b/napi/playground/wasi-worker.mjs new file mode 100644 index 0000000000000..84b448fcc52ab --- /dev/null +++ b/napi/playground/wasi-worker.mjs @@ -0,0 +1,63 @@ +import fs from "node:fs"; +import { createRequire } from "node:module"; +import { parse } from "node:path"; +import { WASI } from "node:wasi"; +import { parentPort, Worker } from "node:worker_threads"; + +const require = createRequire(import.meta.url); + +const { instantiateNapiModuleSync, MessageHandler, getDefaultContext } = require("@napi-rs/wasm-runtime"); + +if (parentPort) { + parentPort.on("message", (data) => { + globalThis.onmessage({ data }); + }); +} + +Object.assign(globalThis, { + self: globalThis, + require, + Worker, + importScripts: function (f) { + ;(0, eval)(fs.readFileSync(f, "utf8") + "//# sourceURL=" + f); + }, + postMessage: function (msg) { + if (parentPort) { + parentPort.postMessage(msg); + } + }, +}); + +const emnapiContext = getDefaultContext(); + +const __rootDir = parse(process.cwd()).root; + +const handler = new MessageHandler({ + onLoad({ wasmModule, wasmMemory }) { + const wasi = new WASI({ + version: 'preview1', + env: process.env, + preopens: { + [__rootDir]: __rootDir, + }, + }); + + return instantiateNapiModuleSync(wasmModule, { + childThread: true, + wasi, + context: emnapiContext, + overwriteImports(importObject) { + importObject.env = { + ...importObject.env, + ...importObject.napi, + ...importObject.emnapi, + memory: wasmMemory + }; + }, + }); + }, +}); + +globalThis.onmessage = function (e) { + handler.handle(e); +}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e7da1b9aba8c9..4f0b6a184ec10 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -92,6 +92,12 @@ importers: specifier: 'catalog:' version: 3.0.8(@types/node@22.13.10)(terser@5.39.0) + napi/playground: + dependencies: + '@napi-rs/wasm-runtime': + specifier: ^0.2.7 + version: 0.2.7 + napi/transform: devDependencies: vitest: @@ -3816,17 +3822,14 @@ snapshots: dependencies: '@emnapi/wasi-threads': 1.0.1 tslib: 2.8.1 - optional: true '@emnapi/runtime@1.3.1': dependencies: tslib: 2.8.1 - optional: true '@emnapi/wasi-threads@1.0.1': dependencies: tslib: 2.8.1 - optional: true '@emotion/hash@0.8.0': {} @@ -4255,7 +4258,6 @@ snapshots: '@emnapi/core': 1.3.1 '@emnapi/runtime': 1.3.1 '@tybys/wasm-util': 0.9.0 - optional: true '@napi-rs/wasm-tools-android-arm-eabi@0.0.3': optional: true @@ -4532,7 +4534,6 @@ snapshots: '@tybys/wasm-util@0.9.0': dependencies: tslib: 2.8.1 - optional: true '@types/estree@1.0.6': {} From 7149c72e4169ba5c4e3dc481af2d91f5fb8467fd Mon Sep 17 00:00:00 2001 From: Boshen Date: Mon, 17 Mar 2025 23:48:45 +0800 Subject: [PATCH 17/22] chore(renovate): remove `renovate/**` trigger --- .github/workflows/ci.yml | 1 - .github/workflows/ci_security.yml | 1 - .github/workflows/ci_vscode.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38e2429fec5d6..f463c5865dcd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,6 @@ on: push: branches: - main - - "renovate/**" paths-ignore: - "**/*.md" - "**/*.yml" diff --git a/.github/workflows/ci_security.yml b/.github/workflows/ci_security.yml index ac92b7acac342..1973f2ede392d 100644 --- a/.github/workflows/ci_security.yml +++ b/.github/workflows/ci_security.yml @@ -11,7 +11,6 @@ on: push: branches: - main - - "renovate/**" paths: - ".github/workflows/**" diff --git a/.github/workflows/ci_vscode.yml b/.github/workflows/ci_vscode.yml index 9e6ab37152d7b..99453e4d13dc0 100644 --- a/.github/workflows/ci_vscode.yml +++ b/.github/workflows/ci_vscode.yml @@ -14,7 +14,6 @@ on: push: branches: - main - - "renovate/**" paths: - "pnpm-lock.yaml" - "crates/oxc_language_server/**" From e893fbbd0eb8877624d5209892df32c13a7dbad7 Mon Sep 17 00:00:00 2001 From: Boshen <1430279+Boshen@users.noreply.github.com> Date: Mon, 17 Mar 2025 16:17:35 +0000 Subject: [PATCH 18/22] chore(oxc_wasm): remove the `oxc_wasm` crate in favor of napi/playground (#9833) --- .github/codecov.yml | 1 - .github/workflows/ci.yml | 1 - .typos.toml | 1 - Cargo.lock | 25 - Cargo.toml | 3 +- crates/oxc_wasm/.gitignore | 3 - crates/oxc_wasm/Cargo.toml | 32 -- crates/oxc_wasm/package.json | 33 -- crates/oxc_wasm/src/lib.rs | 528 ------------------ crates/oxc_wasm/src/options.rs | 142 ----- crates/oxc_wasm/update-bindings.mjs | 50 -- justfile | 4 +- npm/oxc-wasm/oxc_wasm.d.ts | 197 ------- npm/oxc-wasm/oxc_wasm.js | 804 ---------------------------- npm/oxc-wasm/oxc_wasm_bg.wasm.d.ts | 28 - npm/oxc-wasm/package.json | 33 -- 16 files changed, 3 insertions(+), 1882 deletions(-) delete mode 100644 crates/oxc_wasm/.gitignore delete mode 100644 crates/oxc_wasm/Cargo.toml delete mode 100644 crates/oxc_wasm/package.json delete mode 100644 crates/oxc_wasm/src/lib.rs delete mode 100644 crates/oxc_wasm/src/options.rs delete mode 100644 crates/oxc_wasm/update-bindings.mjs delete mode 100644 npm/oxc-wasm/oxc_wasm.d.ts delete mode 100644 npm/oxc-wasm/oxc_wasm.js delete mode 100644 npm/oxc-wasm/oxc_wasm_bg.wasm.d.ts delete mode 100644 npm/oxc-wasm/package.json diff --git a/.github/codecov.yml b/.github/codecov.yml index 72f6b7af9ae5c..51e15bbef930e 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -18,5 +18,4 @@ ignore: - "napi" - "crates/oxc_ast/src/generated" - "crates/oxc_traverse/src/generated" - - "crates/oxc_wasm" # Remove this once wasm is completed - "crates/oxc_diagnostics" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f463c5865dcd0..295a1c9a9aa3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -178,7 +178,6 @@ jobs: - '!npm/**' - '!wasm/**' - '!crates/oxc_linter/**' - - '!crates/oxc_wasm/**' - '!crates/oxc_language_server/**' - '!tasks/**' - 'tasks/conformance/**' diff --git a/.typos.toml b/.typos.toml index 0439ebd00e2f9..9b9e54f3129df 100644 --- a/.typos.toml +++ b/.typos.toml @@ -25,7 +25,6 @@ extend-exclude = [ "tasks/transform_conformance/tests/**/output.js", "tasks/transform_conformance/overrides", "tasks/transform_conformance/snapshots", - "npm/oxc-wasm/oxc_wasm.js", "napi/minify/test/terser.test.ts", ] diff --git a/Cargo.lock b/Cargo.lock index c77286c5e57dc..16f1254a05c32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -325,16 +325,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "console_error_panic_hook" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" -dependencies = [ - "cfg-if", - "wasm-bindgen", -] - [[package]] name = "convert_case" version = "0.8.0" @@ -2302,21 +2292,6 @@ dependencies = [ "rustc-hash", ] -[[package]] -name = "oxc_wasm" -version = "0.0.0" -dependencies = [ - "console_error_panic_hook", - "oxc", - "oxc_index", - "oxc_linter", - "oxc_prettier", - "serde", - "serde-wasm-bindgen", - "tsify", - "wasm-bindgen", -] - [[package]] name = "oxlint" version = "0.16.0" diff --git a/Cargo.toml b/Cargo.toml index cde489b026e19..4c5a5552b2bed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -169,7 +169,6 @@ bpaf = "0.9.16" bumpalo = "=3.17.0" compact_str = "0.9.0" console = "0.15.10" -console_error_panic_hook = "0.1.7" convert_case = "0.8.0" cow-utils = "0.1.3" criterion2 = { version = "3.0.0", default-features = false } @@ -247,7 +246,7 @@ oxc_ast_macros.opt-level = 1 insta.opt-level = 3 similar.opt-level = 3 -[profile.release.package.oxc_wasm] +[profile.release.package.oxc_playground_napi] opt-level = 'z' [profile.release] diff --git a/crates/oxc_wasm/.gitignore b/crates/oxc_wasm/.gitignore deleted file mode 100644 index 1109c3370769a..0000000000000 --- a/crates/oxc_wasm/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -bin/ -pkg/ -wasm-pack.log diff --git a/crates/oxc_wasm/Cargo.toml b/crates/oxc_wasm/Cargo.toml deleted file mode 100644 index 8da57acd9a490..0000000000000 --- a/crates/oxc_wasm/Cargo.toml +++ /dev/null @@ -1,32 +0,0 @@ -[package] -name = "oxc_wasm" -version = "0.0.0" -authors.workspace = true -categories.workspace = true -edition.workspace = true -include = ["/src"] -keywords.workspace = true -license.workspace = true -publish = false -rust-version.workspace = true - -[lints] -workspace = true - -[lib] -crate-type = ["cdylib", "rlib"] -test = false -doctest = false - -[dependencies] -oxc = { workspace = true, features = ["ast_visit", "codegen", "minifier", "semantic", "serialize", "transformer", "isolated_declarations", "wasm"] } - -oxc_index = { workspace = true } -oxc_linter = { workspace = true } -oxc_prettier = { workspace = true } - -console_error_panic_hook = { workspace = true } -serde = { workspace = true } -serde-wasm-bindgen = { workspace = true } -tsify = { workspace = true } -wasm-bindgen = { workspace = true } diff --git a/crates/oxc_wasm/package.json b/crates/oxc_wasm/package.json deleted file mode 100644 index f05aa8a71adef..0000000000000 --- a/crates/oxc_wasm/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@oxc/oxc_wasm", - "type": "module", - "collaborators": [ - "Boshen ", - "Oxc contributors" - ], - "version": "0.0.0", - "license": "MIT", - "files": [ - "oxc_wasm_bg.wasm", - "oxc_wasm.js", - "oxc_wasm.d.ts" - ], - "main": "oxc_wasm.js", - "types": "oxc_wasm.d.ts", - "sideEffects": [ - "./snippets/*" - ], - "keywords": [ - "JavaScript", - "TypeScript", - "linter", - "minifier", - "parser" - ], - "scripts": { - "check": "tsc --lib es2020,dom ./oxc_wasm.d.ts" - }, - "dependencies": { - "@oxc-project/types": "workspace:^" - } -} diff --git a/crates/oxc_wasm/src/lib.rs b/crates/oxc_wasm/src/lib.rs deleted file mode 100644 index cdfa18768134a..0000000000000 --- a/crates/oxc_wasm/src/lib.rs +++ /dev/null @@ -1,528 +0,0 @@ -use std::{ - cell::{Cell, RefCell}, - path::{Path, PathBuf}, - rc::Rc, - sync::Arc, -}; - -use serde::Serialize; -use tsify::Tsify; -use wasm_bindgen::prelude::*; - -use oxc::{ - allocator::Allocator, - ast::{Comment as OxcComment, CommentKind, ast::Program}, - ast_visit::{Visit, utf8_to_utf16::Utf8ToUtf16}, - codegen::{CodeGenerator, CodegenOptions}, - isolated_declarations::{IsolatedDeclarations, IsolatedDeclarationsOptions}, - minifier::{CompressOptions, MangleOptions, Minifier, MinifierOptions}, - parser::{ParseOptions, Parser, ParserReturn}, - semantic::{ - ReferenceId, ScopeFlags, ScopeId, Scoping, SemanticBuilder, SymbolFlags, - dot::{DebugDot, DebugDotContext}, - }, - span::{SourceType, Span}, - syntax::reference::Reference, - transformer::{TransformOptions, Transformer}, -}; -use oxc_index::Idx; -use oxc_linter::{ConfigStoreBuilder, LintOptions, Linter, ModuleRecord}; -use oxc_prettier::{Prettier, PrettierOptions}; - -use crate::options::{OxcOptions, OxcRunOptions}; - -mod options; - -#[wasm_bindgen::prelude::wasm_bindgen(typescript_custom_section)] -const TS_APPEND_CONTENT: &'static str = r#" -import type { Program, Span } from "@oxc-project/types"; -export * from "@oxc-project/types"; -"#; - -#[wasm_bindgen(getter_with_clone)] -#[derive(Default, Tsify)] -#[serde(rename_all = "camelCase")] -pub struct Oxc { - // Dummy field, only present to make `tsify` include it in the type definition for `Oxc`. - // The getter for this field in WASM bindings is generated by `update-bindings.mjs` script. - #[wasm_bindgen(skip)] - #[tsify(type = "Program")] - pub ast: (), - - #[wasm_bindgen(readonly, skip_typescript, js_name = astJson)] - pub ast_json: String, - - #[wasm_bindgen(readonly, skip_typescript)] - pub ir: String, - - #[wasm_bindgen(readonly, skip_typescript, js_name = "controlFlowGraph")] - pub control_flow_graph: String, - - #[wasm_bindgen(readonly, skip_typescript)] - #[tsify(type = "any")] - pub symbols: JsValue, - - #[wasm_bindgen(readonly, skip_typescript, js_name = "scopeText")] - pub scope_text: String, - - #[wasm_bindgen(readonly, skip_typescript, js_name = "codegenText")] - pub codegen_text: String, - - #[wasm_bindgen(readonly, skip_typescript, js_name = "codegenSourcemapText")] - pub codegen_sourcemap_text: Option, - - #[wasm_bindgen(readonly, skip_typescript, js_name = "formattedText")] - pub formatted_text: String, - - #[wasm_bindgen(readonly, skip_typescript, js_name = "prettierFormattedText")] - pub prettier_formatted_text: String, - - #[wasm_bindgen(readonly, skip_typescript, js_name = "prettierIrText")] - pub prettier_ir_text: String, - - #[serde(skip)] - comments: Vec, - - #[serde(skip)] - diagnostics: RefCell>, - - #[serde(skip)] - serializer: serde_wasm_bindgen::Serializer, -} - -#[derive(Clone, Tsify, Serialize)] -#[tsify(into_wasm_abi)] -pub struct Comment { - pub r#type: CommentType, - pub value: String, - pub start: u32, - pub end: u32, -} - -#[derive(Clone, Copy, Tsify, Serialize)] -#[tsify(into_wasm_abi)] -pub enum CommentType { - Line, - Block, -} - -#[derive(Default, Clone, Serialize)] -pub struct OxcDiagnostic { - pub start: usize, - pub end: usize, - pub severity: String, - pub message: String, -} - -#[wasm_bindgen] -impl Oxc { - #[wasm_bindgen(constructor)] - pub fn new() -> Self { - console_error_panic_hook::set_once(); - Self { serializer: serde_wasm_bindgen::Serializer::json_compatible(), ..Self::default() } - } - - /// Returns Array of String - /// # Errors - /// # Panics - #[wasm_bindgen(js_name = getDiagnostics)] - pub fn get_diagnostics(&self) -> Result, serde_wasm_bindgen::Error> { - Ok(self - .diagnostics - .borrow() - .iter() - .flat_map(|error| match &error.labels { - Some(labels) => labels - .iter() - .map(|label| OxcDiagnostic { - start: label.offset(), - end: label.offset() + label.len(), - severity: format!("{:?}", error.severity), - message: format!("{error}"), - }) - .collect::>(), - None => vec![OxcDiagnostic { - start: 0, - end: 0, - severity: format!("{:?}", error.severity), - message: format!("{error}"), - }], - }) - .map(|v| v.serialize(&self.serializer).unwrap()) - .collect::>()) - } - - /// Returns comments - /// # Errors - #[wasm_bindgen(js_name = getComments)] - pub fn get_comments(&self) -> Result, serde_wasm_bindgen::Error> { - self.comments.iter().map(|c| c.serialize(&self.serializer)).collect() - } - - /// # Errors - /// Serde serialization error - #[wasm_bindgen] - pub fn run( - &mut self, - source_text: &str, - options: OxcOptions, - ) -> Result<(), serde_wasm_bindgen::Error> { - self.diagnostics = RefCell::default(); - - let OxcOptions { - run: run_options, - parser: parser_options, - linter: linter_options, - transformer: transform_options, - codegen: codegen_options, - minifier: minifier_options, - control_flow: control_flow_options, - } = options; - let run_options = run_options.unwrap_or_default(); - let parser_options = parser_options.unwrap_or_default(); - let _linter_options = linter_options.unwrap_or_default(); - let minifier_options = minifier_options.unwrap_or_default(); - let codegen_options = codegen_options.unwrap_or_default(); - let transform_options = transform_options.unwrap_or_default(); - let control_flow_options = control_flow_options.unwrap_or_default(); - - let allocator = Allocator::default(); - - let path = PathBuf::from( - parser_options.source_filename.clone().unwrap_or_else(|| "test.tsx".to_string()), - ); - let source_type = SourceType::from_path(&path).unwrap_or_default(); - let source_type = match parser_options.source_type.as_deref() { - Some("script") => source_type.with_script(true), - Some("module") => source_type.with_module(true), - _ => source_type, - }; - - let default_parser_options = ParseOptions::default(); - let oxc_parser_options = ParseOptions { - parse_regular_expression: true, - allow_return_outside_function: parser_options - .allow_return_outside_function - .unwrap_or(default_parser_options.allow_return_outside_function), - preserve_parens: parser_options - .preserve_parens - .unwrap_or(default_parser_options.preserve_parens), - allow_v8_intrinsics: parser_options - .allow_v8_intrinsics - .unwrap_or(default_parser_options.allow_v8_intrinsics), - }; - let ParserReturn { mut program, errors, module_record, .. } = - Parser::new(&allocator, source_text, source_type) - .with_options(oxc_parser_options) - .parse(); - - let mut semantic_builder = SemanticBuilder::new(); - if run_options.transform.unwrap_or_default() { - // Estimate transformer will triple scopes, symbols, references - semantic_builder = semantic_builder.with_excess_capacity(2.0); - } - let semantic_ret = - semantic_builder.with_check_syntax_error(true).with_cfg(true).build(&program); - let semantic = semantic_ret.semantic; - - self.control_flow_graph = semantic.cfg().map_or_else(String::default, |cfg| { - cfg.debug_dot(DebugDotContext::new( - semantic.nodes(), - control_flow_options.verbose.unwrap_or_default(), - )) - }); - if run_options.syntax.unwrap_or_default() { - self.save_diagnostics( - errors.into_iter().chain(semantic_ret.errors).collect::>(), - ); - } - - let module_record = Arc::new(ModuleRecord::new(&path, &module_record, &semantic)); - self.run_linter(&run_options, &path, &program, &module_record); - - self.run_prettier(&run_options, source_text, source_type); - - let scoping = semantic.into_scoping(); - - if !source_type.is_typescript_definition() { - if run_options.scope.unwrap_or_default() { - self.scope_text = Self::get_scope_text(&program, &scoping); - } - if run_options.symbol.unwrap_or_default() { - self.symbols = self.get_symbols_text(&scoping)?; - } - } - - if run_options.transform.unwrap_or_default() { - if transform_options.isolated_declarations == Some(true) { - let ret = - IsolatedDeclarations::new(&allocator, IsolatedDeclarationsOptions::default()) - .build(&program); - if ret.errors.is_empty() { - let codegen_result = CodeGenerator::new() - .with_options(CodegenOptions { - source_map_path: codegen_options - .enable_sourcemap - .unwrap_or_default() - .then(|| path.clone()), - ..CodegenOptions::default() - }) - .build(&ret.program); - self.codegen_text = codegen_result.code; - self.codegen_sourcemap_text = - codegen_result.map.map(|map| map.to_json_string()); - } else { - self.save_diagnostics(ret.errors.into_iter().collect::>()); - self.codegen_text = String::new(); - self.codegen_sourcemap_text = None; - } - return Ok(()); - } - - let options = transform_options - .target - .as_ref() - .and_then(|target| { - TransformOptions::from_target(target) - .map_err(|err| { - self.save_diagnostics(vec![oxc::diagnostics::OxcDiagnostic::error( - err, - )]); - }) - .ok() - }) - .unwrap_or_default(); - let result = Transformer::new(&allocator, &path, &options) - .build_with_scoping(scoping, &mut program); - if !result.errors.is_empty() { - self.save_diagnostics(result.errors.into_iter().collect::>()); - } - } - - let symbol_table = if minifier_options.compress.unwrap_or_default() - || minifier_options.mangle.unwrap_or_default() - { - let compress_options = minifier_options.compress_options.unwrap_or_default(); - let options = MinifierOptions { - mangle: minifier_options.mangle.unwrap_or_default().then(MangleOptions::default), - compress: Some(if minifier_options.compress.unwrap_or_default() { - CompressOptions { - drop_console: compress_options.drop_console, - drop_debugger: compress_options.drop_debugger, - ..CompressOptions::all_false() - } - } else { - CompressOptions::all_false() - }), - }; - Minifier::new(options).build(&allocator, &mut program).scoping - } else { - None - }; - - let codegen_result = CodeGenerator::new() - .with_scoping(symbol_table) - .with_options(CodegenOptions { - minify: minifier_options.whitespace.unwrap_or_default(), - source_map_path: codegen_options - .enable_sourcemap - .unwrap_or_default() - .then(|| path.clone()), - ..CodegenOptions::default() - }) - .build(&program); - self.codegen_text = codegen_result.code; - self.codegen_sourcemap_text = codegen_result.map.map(|map| map.to_json_string()); - self.ir = format!("{:#?}", program.body); - self.convert_ast(&mut program); - - Ok(()) - } - - fn run_linter( - &self, - run_options: &OxcRunOptions, - path: &Path, - program: &Program, - module_record: &Arc, - ) { - // Only lint if there are no syntax errors - if run_options.lint.unwrap_or_default() && self.diagnostics.borrow().is_empty() { - let semantic_ret = SemanticBuilder::new().with_cfg(true).build(program); - let semantic = Rc::new(semantic_ret.semantic); - let lint_config = - ConfigStoreBuilder::default().build().expect("Failed to build config store"); - let linter_ret = Linter::new(LintOptions::default(), lint_config).run( - path, - Rc::clone(&semantic), - Arc::clone(module_record), - ); - let diagnostics = linter_ret.into_iter().map(|e| e.error).collect(); - self.save_diagnostics(diagnostics); - } - } - - fn run_prettier( - &mut self, - run_options: &OxcRunOptions, - source_text: &str, - source_type: SourceType, - ) { - let allocator = Allocator::default(); - if run_options.prettier_format.unwrap_or_default() - || run_options.prettier_ir.unwrap_or_default() - { - let ret = Parser::new(&allocator, source_text, source_type) - .with_options(ParseOptions { preserve_parens: false, ..ParseOptions::default() }) - .parse(); - - let mut prettier = Prettier::new(&allocator, PrettierOptions::default()); - - if run_options.prettier_format.unwrap_or_default() { - self.prettier_formatted_text = prettier.build(&ret.program); - } - - if run_options.prettier_ir.unwrap_or_default() { - let prettier_doc = prettier.doc(&ret.program).to_string(); - self.prettier_ir_text = { - let ret = Parser::new(&allocator, &prettier_doc, SourceType::default()).parse(); - Prettier::new(&allocator, PrettierOptions::default()).build(&ret.program) - }; - } - } - } - - fn get_scope_text(program: &Program<'_>, scoping: &Scoping) -> String { - struct ScopesTextWriter<'s> { - scoping: &'s Scoping, - scope_text: String, - indent: usize, - space: String, - } - - impl<'s> ScopesTextWriter<'s> { - fn new(scoping: &'s Scoping) -> Self { - Self { scoping, scope_text: String::new(), indent: 0, space: String::new() } - } - - fn write_line>(&mut self, line: S) { - self.scope_text.push_str(&self.space[0..self.indent]); - self.scope_text.push_str(line.as_ref()); - self.scope_text.push('\n'); - } - - fn indent_in(&mut self) { - self.indent += 2; - if self.space.len() < self.indent { - self.space.push_str(" "); - } - } - - fn indent_out(&mut self) { - self.indent -= 2; - } - } - - impl Visit<'_> for ScopesTextWriter<'_> { - fn enter_scope(&mut self, _: ScopeFlags, scope_id: &Cell>) { - let scope_id = scope_id.get().unwrap(); - let flags = self.scoping.scope_flags(scope_id); - self.write_line(format!("Scope {} ({flags:?}) {{", scope_id.index())); - self.indent_in(); - - let bindings = self.scoping.get_bindings(scope_id); - if !bindings.is_empty() { - self.write_line("Bindings: {"); - for (name, &symbol_id) in bindings { - let symbol_flags = self.scoping.symbol_flags(symbol_id); - self.write_line(format!(" {name} ({symbol_id:?} {symbol_flags:?})",)); - } - self.write_line("}"); - } - } - - fn leave_scope(&mut self) { - self.indent_out(); - self.write_line("}"); - } - } - - let mut writer = ScopesTextWriter::new(scoping); - writer.visit_program(program); - writer.scope_text - } - - fn get_symbols_text(&self, scoping: &Scoping) -> Result { - #[derive(Serialize)] - struct Data { - span: Span, - name: String, - flags: SymbolFlags, - scope_id: ScopeId, - resolved_references: Vec, - references: Vec, - } - - let data = scoping - .symbol_ids() - .map(|symbol_id| Data { - span: scoping.symbol_span(symbol_id), - name: scoping.symbol_name(symbol_id).into(), - flags: scoping.symbol_flags(symbol_id), - scope_id: scoping.symbol_scope_id(symbol_id), - resolved_references: scoping - .get_resolved_reference_ids(symbol_id) - .iter() - .copied() - .collect::>(), - references: scoping - .get_resolved_reference_ids(symbol_id) - .iter() - .map(|reference_id| scoping.get_reference(*reference_id).clone()) - .collect::>(), - }) - .collect::>(); - - data.serialize(&self.serializer) - } - - fn save_diagnostics(&self, diagnostics: Vec) { - self.diagnostics.borrow_mut().extend(diagnostics); - } - - fn convert_ast(&mut self, program: &mut Program) { - let span_converter = Utf8ToUtf16::new(program.source_text); - span_converter.convert_program(program); - self.ast_json = program.to_pretty_estree_ts_json(); - - self.comments = Self::map_comments(program.source_text, &program.comments, &span_converter); - } - - fn map_comments( - source_text: &str, - comments: &[OxcComment], - span_converter: &Utf8ToUtf16, - ) -> Vec { - let mut offset_converter = span_converter.converter(); - - comments - .iter() - .map(|comment| { - let value = comment.content_span().source_text(source_text).to_string(); - let mut span = comment.span; - if let Some(converter) = &mut offset_converter { - converter.convert_span(&mut span); - } - Comment { - r#type: match comment.kind { - CommentKind::Line => CommentType::Line, - CommentKind::Block => CommentType::Block, - }, - value, - start: span.start, - end: span.end, - } - }) - .collect() - } -} diff --git a/crates/oxc_wasm/src/options.rs b/crates/oxc_wasm/src/options.rs deleted file mode 100644 index 167b85ffcb288..0000000000000 --- a/crates/oxc_wasm/src/options.rs +++ /dev/null @@ -1,142 +0,0 @@ -use serde::Deserialize; -use tsify::Tsify; -use wasm_bindgen::prelude::*; - -#[derive(Debug, Default, Clone, Deserialize, Tsify)] -#[tsify(from_wasm_abi)] -#[serde(rename_all = "camelCase")] -pub struct OxcOptions { - #[tsify(optional)] - pub run: Option, - #[tsify(optional)] - pub parser: Option, - #[tsify(optional)] - pub linter: Option, - #[tsify(optional)] - pub transformer: Option, - #[tsify(optional)] - pub codegen: Option, - #[tsify(optional)] - pub minifier: Option, - #[tsify(optional)] - pub control_flow: Option, -} - -#[derive(Debug, Default, Clone, Deserialize, Tsify)] -#[tsify(from_wasm_abi)] -#[serde(rename_all = "camelCase")] -pub struct OxcRunOptions { - #[tsify(optional)] - pub syntax: Option, - #[tsify(optional)] - pub lint: Option, - #[tsify(optional)] - pub format: Option, - #[tsify(optional)] - pub prettier_format: Option, - #[tsify(optional)] - pub prettier_ir: Option, - #[tsify(optional)] - pub transform: Option, - #[tsify(optional)] - pub type_check: Option, - #[tsify(optional)] - pub scope: Option, - #[tsify(optional)] - pub symbol: Option, -} - -#[derive(Debug, Default, Clone, Deserialize, Tsify)] -#[tsify(from_wasm_abi)] -#[serde(rename_all = "camelCase")] -pub struct OxcParserOptions { - #[tsify(optional)] - pub allow_return_outside_function: Option, - #[tsify(optional)] - pub preserve_parens: Option, - #[tsify(optional)] - pub allow_v8_intrinsics: Option, - #[tsify(optional, type = "\"script\" | \"module\"")] - pub source_type: Option, - #[tsify(optional)] - pub source_filename: Option, -} - -#[derive(Debug, Default, Clone, Deserialize, Tsify)] -#[tsify(from_wasm_abi)] -#[serde(rename_all = "camelCase")] -// allow empty object for future compatibility -#[expect(clippy::empty_structs_with_brackets)] -pub struct OxcLinterOptions {} - -#[derive(Debug, Default, Clone, Deserialize, Tsify)] -#[tsify(from_wasm_abi)] -#[serde(rename_all = "camelCase")] -pub struct OxcTransformerOptions { - #[tsify(optional)] - pub target: Option, - - #[tsify(optional)] - pub isolated_declarations: Option, -} - -#[derive(Debug, Default, Clone, Deserialize, Tsify)] -#[tsify(from_wasm_abi)] -#[serde(rename_all = "camelCase")] -pub struct OxcCodegenOptions { - #[tsify(optional)] - pub indentation: Option, - #[tsify(optional)] - pub enable_typescript: Option, - #[tsify(optional)] - pub enable_sourcemap: Option, -} - -#[derive(Debug, Default, Clone, Deserialize, Tsify)] -#[tsify(from_wasm_abi)] -#[serde(rename_all = "camelCase")] -pub struct OxcControlFlowOptions { - #[tsify(optional)] - pub verbose: Option, -} - -#[derive(Debug, Default, Clone, Deserialize, Tsify)] -#[tsify(from_wasm_abi)] -#[serde(rename_all = "camelCase")] -pub struct OxcMinifierOptions { - #[tsify(optional)] - pub whitespace: Option, - #[tsify(optional)] - pub mangle: Option, - #[tsify(optional)] - pub compress: Option, - #[tsify(optional)] - pub compress_options: Option, -} - -#[derive(Debug, Clone, Deserialize, Tsify)] -#[tsify(from_wasm_abi)] -pub struct OxcCompressOptions { - pub booleans: bool, - pub drop_debugger: bool, - pub drop_console: bool, - pub evaluate: bool, - pub join_vars: bool, - pub loops: bool, - pub typeofs: bool, -} - -// keep same with `oxc_minifier::options::CompressOptions` -impl Default for OxcCompressOptions { - fn default() -> Self { - Self { - booleans: true, - drop_debugger: true, - drop_console: false, - evaluate: true, - join_vars: true, - loops: true, - typeofs: true, - } - } -} diff --git a/crates/oxc_wasm/update-bindings.mjs b/crates/oxc_wasm/update-bindings.mjs deleted file mode 100644 index 952115bc0e069..0000000000000 --- a/crates/oxc_wasm/update-bindings.mjs +++ /dev/null @@ -1,50 +0,0 @@ -// Script to inject code for an extra `ast` getter on `class Oxc` in WASM binding file. - -import assert from 'assert'; -import { readFileSync, writeFileSync } from 'fs'; -import { join as pathJoin } from 'path'; -import { fileURLToPath } from 'url'; - -const path = pathJoin(fileURLToPath(import.meta.url), '../../../npm/oxc-wasm/oxc_wasm.js'); - -// Extra getter on `Oxc` `get ast() { ... }` that gets the AST as JSON string, -// and parses it to a `Program` object. -// -// JSON parsing uses a reviver function that sets `value` field of `Literal`s for `BigInt`s and `RegExp`s. -// This is not possible to do on Rust side, as neither can be represented correctly in JSON. -// Invalid regexp, or valid regexp using syntax not supported by the platform is ignored. -// -// Note: This code is repeated in `napi/parser/index.js` and `wasm/parser/update-bindings.mjs`. -// Any changes should be applied in those 2 places too. -// -// Unlike `wasm/parser/update-bindings.mjs`, the getter does not cache the `JSON.parse`-ed value, -// because I (@overlookmotel) believe that the `Oxc` class instance is used as a singleton in playground, -// and the value of `astJson` may change after the source text is changed. -// TODO: Check this assumption is correct. -const getterCode = ` - get ast() { - return JSON.parse(this.astJson, function(key, value) { - if (value === null && key === 'value' && Object.hasOwn(this, 'type') && this.type === 'Literal') { - if (Object.hasOwn(this, 'bigint')) { - return BigInt(this.bigint); - } - if (Object.hasOwn(this, 'regex')) { - const { regex } = this; - try { - return RegExp(regex.pattern, regex.flags); - } catch (_err) {} - } - } - return value; - }); - } -`.trimEnd().replace(/ /g, ' '); - -const insertGetterAfter = 'export class Oxc {'; - -const code = readFileSync(path, 'utf8'); -const parts = code.split(insertGetterAfter); -assert(parts.length === 2); -const [before, after] = parts; -const updatedCode = [before, insertGetterAfter, getterCode, after].join(''); -writeFileSync(path, updatedCode); diff --git a/justfile b/justfile index 02c4f40403eb0..b6ce888360306 100755 --- a/justfile +++ b/justfile @@ -150,9 +150,9 @@ update-transformer-fixtures: test-estree *args='': cargo run -p oxc_coverage --profile coverage -- estree {{args}} -# Install wasm-pack +# Install wasm32-wasip1-threads for playground install-wasm: - cargo binstall wasm-pack + rustup target add wasm32-wasip1-threads watch-playground: just watch 'pnpm --filter oxc-playground dev' diff --git a/npm/oxc-wasm/oxc_wasm.d.ts b/npm/oxc-wasm/oxc_wasm.d.ts deleted file mode 100644 index 357f89b39044d..0000000000000 --- a/npm/oxc-wasm/oxc_wasm.d.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export function browserslist(query: string, opts: any): any; - -import type { Program, Span } from "@oxc-project/types"; -export * from "@oxc-project/types"; - - -export interface Oxc { - ast: Program; - astJson: string; - ir: string; - controlFlowGraph: string; - symbols: any; - scopeText: string; - codegenText: string; - codegenSourcemapText: string | null; - formattedText: string; - prettierFormattedText: string; - prettierIrText: string; -} - -export interface Comment { - type: CommentType; - value: string; - start: number; - end: number; -} - -export type CommentType = "Line" | "Block"; - -export interface OxcOptions { - run?: OxcRunOptions; - parser?: OxcParserOptions; - linter?: OxcLinterOptions; - transformer?: OxcTransformerOptions; - codegen?: OxcCodegenOptions; - minifier?: OxcMinifierOptions; - controlFlow?: OxcControlFlowOptions; -} - -export interface OxcRunOptions { - syntax?: boolean; - lint?: boolean; - format?: boolean; - prettierFormat?: boolean; - prettierIr?: boolean; - transform?: boolean; - typeCheck?: boolean; - scope?: boolean; - symbol?: boolean; -} - -export interface OxcParserOptions { - allowReturnOutsideFunction?: boolean; - preserveParens?: boolean; - sourceType?: "script" | "module"; - sourceFilename?: string; -} - -export interface OxcLinterOptions {} - -export interface OxcTransformerOptions { - target?: string; - isolatedDeclarations?: boolean; -} - -export interface OxcCodegenOptions { - indentation?: number; - enableTypescript?: boolean; - enableSourcemap?: boolean; -} - -export interface OxcControlFlowOptions { - verbose?: boolean; -} - -export interface OxcMinifierOptions { - whitespace?: boolean; - mangle?: boolean; - compress?: boolean; - compressOptions?: OxcCompressOptions; -} - -export interface OxcCompressOptions { - booleans: boolean; - drop_debugger: boolean; - drop_console: boolean; - evaluate: boolean; - join_vars: boolean; - loops: boolean; - typeofs: boolean; -} - - -export type ReferenceId = number; -export type ReferenceFlags = { - None: 0, - Read: 0b1, - Write: 0b10, - Type: 0b100, - Value: 0b11 -} - - - -export type SymbolId = number; -export type SymbolFlags = unknown; -export type RedeclarationId = unknown; - - - -export type ScopeId = number; - - - -export type NodeId = number; -export type NodeFlags = { - JSDoc: 1, - Class: 2, - HasYield: 4 - Parameter: 8 -}; - - -export class Oxc { - free(): void; - constructor(); - /** - * Returns Array of String - * # Errors - * # Panics - */ - getDiagnostics(): any[]; - /** - * Returns comments - * # Errors - */ - getComments(): any[]; - /** - * # Errors - * Serde serialization error - */ - run(source_text: string, options: OxcOptions): void; -} - -export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; - -export interface InitOutput { - readonly memory: WebAssembly.Memory; - readonly __wbg_oxc_free: (a: number, b: number) => void; - readonly __wbg_get_oxc_astJson: (a: number) => [number, number]; - readonly __wbg_get_oxc_ir: (a: number) => [number, number]; - readonly __wbg_get_oxc_controlFlowGraph: (a: number) => [number, number]; - readonly __wbg_get_oxc_symbols: (a: number) => any; - readonly __wbg_get_oxc_scopeText: (a: number) => [number, number]; - readonly __wbg_get_oxc_codegenText: (a: number) => [number, number]; - readonly __wbg_get_oxc_codegenSourcemapText: (a: number) => [number, number]; - readonly __wbg_get_oxc_formattedText: (a: number) => [number, number]; - readonly __wbg_get_oxc_prettierFormattedText: (a: number) => [number, number]; - readonly __wbg_get_oxc_prettierIrText: (a: number) => [number, number]; - readonly oxc_new: () => number; - readonly oxc_getDiagnostics: (a: number) => [number, number, number, number]; - readonly oxc_getComments: (a: number) => [number, number, number, number]; - readonly oxc_run: (a: number, b: number, c: number, d: any) => [number, number]; - readonly browserslist: (a: number, b: number, c: any) => [number, number, number]; - readonly __wbindgen_exn_store: (a: number) => void; - readonly __externref_table_alloc: () => number; - readonly __wbindgen_export_2: WebAssembly.Table; - readonly __wbindgen_free: (a: number, b: number, c: number) => void; - readonly __wbindgen_malloc: (a: number, b: number) => number; - readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; - readonly __externref_table_dealloc: (a: number) => void; - readonly __externref_drop_slice: (a: number, b: number) => void; - readonly __wbindgen_start: () => void; -} - -export type SyncInitInput = BufferSource | WebAssembly.Module; -/** -* Instantiates the given `module`, which can either be bytes or -* a precompiled `WebAssembly.Module`. -* -* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated. -* -* @returns {InitOutput} -*/ -export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput; - -/** -* If `module_or_path` is {RequestInfo} or {URL}, makes a request and -* for everything else, calls `WebAssembly.instantiate` directly. -* -* @param {{ module_or_path: InitInput | Promise }} module_or_path - Passing `InitInput` directly is deprecated. -* -* @returns {Promise} -*/ -export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise } | InitInput | Promise): Promise; diff --git a/npm/oxc-wasm/oxc_wasm.js b/npm/oxc-wasm/oxc_wasm.js deleted file mode 100644 index fbec830cd3306..0000000000000 --- a/npm/oxc-wasm/oxc_wasm.js +++ /dev/null @@ -1,804 +0,0 @@ -let wasm; - -function logError(f, args) { - try { - return f.apply(this, args); - } catch (e) { - let error = (function () { - try { - return e instanceof Error ? `${e.message}\n\nStack:\n${e.stack}` : e.toString(); - } catch(_) { - return ""; - } - }()); - console.error("wasm-bindgen: imported JS function that was not marked as `catch` threw an error:", error); - throw e; - } -} - -function addToExternrefTable0(obj) { - const idx = wasm.__externref_table_alloc(); - wasm.__wbindgen_export_2.set(idx, obj); - return idx; -} - -function handleError(f, args) { - try { - return f.apply(this, args); - } catch (e) { - const idx = addToExternrefTable0(e); - wasm.__wbindgen_exn_store(idx); - } -} - -const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); - -if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; - -let cachedUint8ArrayMemory0 = null; - -function getUint8ArrayMemory0() { - if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { - cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8ArrayMemory0; -} - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); -} - -function _assertBoolean(n) { - if (typeof(n) !== 'boolean') { - throw new Error(`expected a boolean argument, found ${typeof(n)}`); - } -} - -function _assertNum(n) { - if (typeof(n) !== 'number') throw new Error(`expected a number argument, found ${typeof(n)}`); -} - -let WASM_VECTOR_LEN = 0; - -const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } ); - -const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' - ? function (arg, view) { - return cachedTextEncoder.encodeInto(arg, view); -} - : function (arg, view) { - const buf = cachedTextEncoder.encode(arg); - view.set(buf); - return { - read: arg.length, - written: buf.length - }; -}); - -function passStringToWasm0(arg, malloc, realloc) { - - if (typeof(arg) !== 'string') throw new Error(`expected a string argument, found ${typeof(arg)}`); - - if (realloc === undefined) { - const buf = cachedTextEncoder.encode(arg); - const ptr = malloc(buf.length, 1) >>> 0; - getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); - WASM_VECTOR_LEN = buf.length; - return ptr; - } - - let len = arg.length; - let ptr = malloc(len, 1) >>> 0; - - const mem = getUint8ArrayMemory0(); - - let offset = 0; - - for (; offset < len; offset++) { - const code = arg.charCodeAt(offset); - if (code > 0x7F) break; - mem[ptr + offset] = code; - } - - if (offset !== len) { - if (offset !== 0) { - arg = arg.slice(offset); - } - ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; - const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); - const ret = encodeString(arg, view); - if (ret.read !== arg.length) throw new Error('failed to pass whole string'); - offset += ret.written; - ptr = realloc(ptr, len, offset, 1) >>> 0; - } - - WASM_VECTOR_LEN = offset; - return ptr; -} - -let cachedDataViewMemory0 = null; - -function getDataViewMemory0() { - if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { - cachedDataViewMemory0 = new DataView(wasm.memory.buffer); - } - return cachedDataViewMemory0; -} - -function isLikeNone(x) { - return x === undefined || x === null; -} - -function debugString(val) { - // primitive types - const type = typeof val; - if (type == 'number' || type == 'boolean' || val == null) { - return `${val}`; - } - if (type == 'string') { - return `"${val}"`; - } - if (type == 'symbol') { - const description = val.description; - if (description == null) { - return 'Symbol'; - } else { - return `Symbol(${description})`; - } - } - if (type == 'function') { - const name = val.name; - if (typeof name == 'string' && name.length > 0) { - return `Function(${name})`; - } else { - return 'Function'; - } - } - // objects - if (Array.isArray(val)) { - const length = val.length; - let debug = '['; - if (length > 0) { - debug += debugString(val[0]); - } - for(let i = 1; i < length; i++) { - debug += ', ' + debugString(val[i]); - } - debug += ']'; - return debug; - } - // Test for built-in - const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); - let className; - if (builtInMatches && builtInMatches.length > 1) { - className = builtInMatches[1]; - } else { - // Failed to match the standard '[object ClassName]' - return toString.call(val); - } - if (className == 'Object') { - // we're a user defined class or Object - // JSON.stringify avoids problems with cycles, and is generally much - // easier than looping through ownProperties of `val`. - try { - return 'Object(' + JSON.stringify(val) + ')'; - } catch (_) { - return 'Object'; - } - } - // errors - if (val instanceof Error) { - return `${val.name}: ${val.message}\n${val.stack}`; - } - // TODO we could test for more things here, like `Set`s and `Map`s. - return className; -} - -function takeFromExternrefTable0(idx) { - const value = wasm.__wbindgen_export_2.get(idx); - wasm.__externref_table_dealloc(idx); - return value; -} - -function getArrayJsValueFromWasm0(ptr, len) { - ptr = ptr >>> 0; - const mem = getDataViewMemory0(); - const result = []; - for (let i = ptr; i < ptr + 4 * len; i += 4) { - result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true))); - } - wasm.__externref_drop_slice(ptr, len); - return result; -} -/** - * @param {string} query - * @param {any} opts - * @returns {any} - */ -export function browserslist(query, opts) { - const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.browserslist(ptr0, len0, opts); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return takeFromExternrefTable0(ret[0]); -} - -const OxcFinalization = (typeof FinalizationRegistry === 'undefined') - ? { register: () => {}, unregister: () => {} } - : new FinalizationRegistry(ptr => wasm.__wbg_oxc_free(ptr >>> 0, 1)); - -export class Oxc { - get ast() { - return JSON.parse(this.astJson, function(key, value) { - if (value === null && key === 'value' && Object.hasOwn(this, 'type') && this.type === 'Literal') { - if (Object.hasOwn(this, 'bigint')) { - return BigInt(this.bigint); - } - if (Object.hasOwn(this, 'regex')) { - const { regex } = this; - try { - return RegExp(regex.pattern, regex.flags); - } catch (_err) {} - } - } - return value; - }); - } - - __destroy_into_raw() { - const ptr = this.__wbg_ptr; - this.__wbg_ptr = 0; - OxcFinalization.unregister(this); - return ptr; - } - - free() { - const ptr = this.__destroy_into_raw(); - wasm.__wbg_oxc_free(ptr, 0); - } - /** - * @returns {string} - */ - get astJson() { - let deferred1_0; - let deferred1_1; - try { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ret = wasm.__wbg_get_oxc_astJson(this.__wbg_ptr); - deferred1_0 = ret[0]; - deferred1_1 = ret[1]; - return getStringFromWasm0(ret[0], ret[1]); - } finally { - wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); - } - } - /** - * @returns {string} - */ - get ir() { - let deferred1_0; - let deferred1_1; - try { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ret = wasm.__wbg_get_oxc_ir(this.__wbg_ptr); - deferred1_0 = ret[0]; - deferred1_1 = ret[1]; - return getStringFromWasm0(ret[0], ret[1]); - } finally { - wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); - } - } - /** - * @returns {string} - */ - get controlFlowGraph() { - let deferred1_0; - let deferred1_1; - try { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ret = wasm.__wbg_get_oxc_controlFlowGraph(this.__wbg_ptr); - deferred1_0 = ret[0]; - deferred1_1 = ret[1]; - return getStringFromWasm0(ret[0], ret[1]); - } finally { - wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); - } - } - /** - * @returns {any} - */ - get symbols() { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ret = wasm.__wbg_get_oxc_symbols(this.__wbg_ptr); - return ret; - } - /** - * @returns {string} - */ - get scopeText() { - let deferred1_0; - let deferred1_1; - try { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ret = wasm.__wbg_get_oxc_scopeText(this.__wbg_ptr); - deferred1_0 = ret[0]; - deferred1_1 = ret[1]; - return getStringFromWasm0(ret[0], ret[1]); - } finally { - wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); - } - } - /** - * @returns {string} - */ - get codegenText() { - let deferred1_0; - let deferred1_1; - try { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ret = wasm.__wbg_get_oxc_codegenText(this.__wbg_ptr); - deferred1_0 = ret[0]; - deferred1_1 = ret[1]; - return getStringFromWasm0(ret[0], ret[1]); - } finally { - wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); - } - } - /** - * @returns {string | undefined} - */ - get codegenSourcemapText() { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ret = wasm.__wbg_get_oxc_codegenSourcemapText(this.__wbg_ptr); - let v1; - if (ret[0] !== 0) { - v1 = getStringFromWasm0(ret[0], ret[1]).slice(); - wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); - } - return v1; - } - /** - * @returns {string} - */ - get formattedText() { - let deferred1_0; - let deferred1_1; - try { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ret = wasm.__wbg_get_oxc_formattedText(this.__wbg_ptr); - deferred1_0 = ret[0]; - deferred1_1 = ret[1]; - return getStringFromWasm0(ret[0], ret[1]); - } finally { - wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); - } - } - /** - * @returns {string} - */ - get prettierFormattedText() { - let deferred1_0; - let deferred1_1; - try { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ret = wasm.__wbg_get_oxc_prettierFormattedText(this.__wbg_ptr); - deferred1_0 = ret[0]; - deferred1_1 = ret[1]; - return getStringFromWasm0(ret[0], ret[1]); - } finally { - wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); - } - } - /** - * @returns {string} - */ - get prettierIrText() { - let deferred1_0; - let deferred1_1; - try { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ret = wasm.__wbg_get_oxc_prettierIrText(this.__wbg_ptr); - deferred1_0 = ret[0]; - deferred1_1 = ret[1]; - return getStringFromWasm0(ret[0], ret[1]); - } finally { - wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); - } - } - constructor() { - const ret = wasm.oxc_new(); - this.__wbg_ptr = ret >>> 0; - OxcFinalization.register(this, this.__wbg_ptr, this); - return this; - } - /** - * Returns Array of String - * # Errors - * # Panics - * @returns {any[]} - */ - getDiagnostics() { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ret = wasm.oxc_getDiagnostics(this.__wbg_ptr); - if (ret[3]) { - throw takeFromExternrefTable0(ret[2]); - } - var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); - wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); - return v1; - } - /** - * Returns comments - * # Errors - * @returns {any[]} - */ - getComments() { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ret = wasm.oxc_getComments(this.__wbg_ptr); - if (ret[3]) { - throw takeFromExternrefTable0(ret[2]); - } - var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); - wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); - return v1; - } - /** - * # Errors - * Serde serialization error - * @param {string} source_text - * @param {OxcOptions} options - */ - run(source_text, options) { - if (this.__wbg_ptr == 0) throw new Error('Attempt to use a moved value'); - _assertNum(this.__wbg_ptr); - const ptr0 = passStringToWasm0(source_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.oxc_run(this.__wbg_ptr, ptr0, len0, options); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } - } -} - -async function __wbg_load(module, imports) { - if (typeof Response === 'function' && module instanceof Response) { - if (typeof WebAssembly.instantiateStreaming === 'function') { - try { - return await WebAssembly.instantiateStreaming(module, imports); - - } catch (e) { - if (module.headers.get('Content-Type') != 'application/wasm') { - console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); - - } else { - throw e; - } - } - } - - const bytes = await module.arrayBuffer(); - return await WebAssembly.instantiate(bytes, imports); - - } else { - const instance = await WebAssembly.instantiate(module, imports); - - if (instance instanceof WebAssembly.Instance) { - return { instance, module }; - - } else { - return instance; - } - } -} - -function __wbg_get_imports() { - const imports = {}; - imports.wbg = {}; - imports.wbg.__wbg_buffer_609cc3eee51ed158 = function() { return logError(function (arg0) { - const ret = arg0.buffer; - return ret; - }, arguments) }; - imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) { - const ret = arg0.call(arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function() { return logError(function (arg0, arg1) { - let deferred0_0; - let deferred0_1; - try { - deferred0_0 = arg0; - deferred0_1 = arg1; - console.error(getStringFromWasm0(arg0, arg1)); - } finally { - wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); - } - }, arguments) }; - imports.wbg.__wbg_getTime_46267b1c24877e30 = function() { return logError(function (arg0) { - const ret = arg0.getTime(); - return ret; - }, arguments) }; - imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) { - const ret = Reflect.get(arg0, arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function() { return logError(function (arg0, arg1) { - const ret = arg0[arg1]; - return ret; - }, arguments) }; - imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function() { return logError(function (arg0) { - let result; - try { - result = arg0 instanceof ArrayBuffer; - } catch (_) { - result = false; - } - const ret = result; - _assertBoolean(ret); - return ret; - }, arguments) }; - imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function() { return logError(function (arg0) { - let result; - try { - result = arg0 instanceof Uint8Array; - } catch (_) { - result = false; - } - const ret = result; - _assertBoolean(ret); - return ret; - }, arguments) }; - imports.wbg.__wbg_length_a446193dc22c12f8 = function() { return logError(function (arg0) { - const ret = arg0.length; - _assertNum(ret); - return ret; - }, arguments) }; - imports.wbg.__wbg_new0_f788a2397c7ca929 = function() { return logError(function () { - const ret = new Date(); - return ret; - }, arguments) }; - imports.wbg.__wbg_new_405e22f390576ce2 = function() { return logError(function () { - const ret = new Object(); - return ret; - }, arguments) }; - imports.wbg.__wbg_new_5e0be73521bc8c17 = function() { return logError(function () { - const ret = new Map(); - return ret; - }, arguments) }; - imports.wbg.__wbg_new_78feb108b6472713 = function() { return logError(function () { - const ret = new Array(); - return ret; - }, arguments) }; - imports.wbg.__wbg_new_8a6f238a6ece86ea = function() { return logError(function () { - const ret = new Error(); - return ret; - }, arguments) }; - imports.wbg.__wbg_new_a12002a7f91c75be = function() { return logError(function (arg0) { - const ret = new Uint8Array(arg0); - return ret; - }, arguments) }; - imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function() { return logError(function (arg0, arg1) { - const ret = new Function(getStringFromWasm0(arg0, arg1)); - return ret; - }, arguments) }; - imports.wbg.__wbg_set_37837023f3d740e8 = function() { return logError(function (arg0, arg1, arg2) { - arg0[arg1 >>> 0] = arg2; - }, arguments) }; - imports.wbg.__wbg_set_3f1d0b984ed272ed = function() { return logError(function (arg0, arg1, arg2) { - arg0[arg1] = arg2; - }, arguments) }; - imports.wbg.__wbg_set_65595bdd868b3009 = function() { return logError(function (arg0, arg1, arg2) { - arg0.set(arg1, arg2 >>> 0); - }, arguments) }; - imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function() { return logError(function (arg0, arg1, arg2) { - const ret = arg0.set(arg1, arg2); - return ret; - }, arguments) }; - imports.wbg.__wbg_stack_0ed75d68575b0f3c = function() { return logError(function (arg0, arg1) { - const ret = arg1.stack; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() { return logError(function () { - const ret = typeof global === 'undefined' ? null : global; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() { return logError(function () { - const ret = typeof globalThis === 'undefined' ? null : globalThis; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() { return logError(function () { - const ret = typeof self === 'undefined' ? null : self; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() { return logError(function () { - const ret = typeof window === 'undefined' ? null : window; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) { - const ret = JSON.stringify(arg0); - return ret; - }, arguments) }; - imports.wbg.__wbindgen_as_number = function(arg0) { - const ret = +arg0; - return ret; - }; - imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) { - const ret = BigInt.asUintN(64, arg0); - return ret; - }; - imports.wbg.__wbindgen_boolean_get = function(arg0) { - const v = arg0; - const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; - _assertNum(ret); - return ret; - }; - imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { - const ret = debugString(arg1); - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbindgen_error_new = function(arg0, arg1) { - const ret = new Error(getStringFromWasm0(arg0, arg1)); - return ret; - }; - imports.wbg.__wbindgen_in = function(arg0, arg1) { - const ret = arg0 in arg1; - _assertBoolean(ret); - return ret; - }; - imports.wbg.__wbindgen_init_externref_table = function() { - const table = wasm.__wbindgen_export_2; - const offset = table.grow(4); - table.set(0, undefined); - table.set(offset + 0, undefined); - table.set(offset + 1, null); - table.set(offset + 2, true); - table.set(offset + 3, false); - ; - }; - imports.wbg.__wbindgen_is_object = function(arg0) { - const val = arg0; - const ret = typeof(val) === 'object' && val !== null; - _assertBoolean(ret); - return ret; - }; - imports.wbg.__wbindgen_is_string = function(arg0) { - const ret = typeof(arg0) === 'string'; - _assertBoolean(ret); - return ret; - }; - imports.wbg.__wbindgen_is_undefined = function(arg0) { - const ret = arg0 === undefined; - _assertBoolean(ret); - return ret; - }; - imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) { - const ret = arg0 == arg1; - _assertBoolean(ret); - return ret; - }; - imports.wbg.__wbindgen_memory = function() { - const ret = wasm.memory; - return ret; - }; - imports.wbg.__wbindgen_number_get = function(arg0, arg1) { - const obj = arg1; - const ret = typeof(obj) === 'number' ? obj : undefined; - if (!isLikeNone(ret)) { - _assertNum(ret); - } - getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); - }; - imports.wbg.__wbindgen_number_new = function(arg0) { - const ret = arg0; - return ret; - }; - imports.wbg.__wbindgen_string_get = function(arg0, arg1) { - const obj = arg1; - const ret = typeof(obj) === 'string' ? obj : undefined; - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return ret; - }; - imports.wbg.__wbindgen_throw = function(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); - }; - - return imports; -} - -function __wbg_init_memory(imports, memory) { - -} - -function __wbg_finalize_init(instance, module) { - wasm = instance.exports; - __wbg_init.__wbindgen_wasm_module = module; - cachedDataViewMemory0 = null; - cachedUint8ArrayMemory0 = null; - - - wasm.__wbindgen_start(); - return wasm; -} - -function initSync(module) { - if (wasm !== undefined) return wasm; - - - if (typeof module !== 'undefined') { - if (Object.getPrototypeOf(module) === Object.prototype) { - ({module} = module) - } else { - console.warn('using deprecated parameters for `initSync()`; pass a single object instead') - } - } - - const imports = __wbg_get_imports(); - - __wbg_init_memory(imports); - - if (!(module instanceof WebAssembly.Module)) { - module = new WebAssembly.Module(module); - } - - const instance = new WebAssembly.Instance(module, imports); - - return __wbg_finalize_init(instance, module); -} - -async function __wbg_init(module_or_path) { - if (wasm !== undefined) return wasm; - - - if (typeof module_or_path !== 'undefined') { - if (Object.getPrototypeOf(module_or_path) === Object.prototype) { - ({module_or_path} = module_or_path) - } else { - console.warn('using deprecated parameters for the initialization function; pass a single object instead') - } - } - - if (typeof module_or_path === 'undefined') { - module_or_path = new URL('oxc_wasm_bg.wasm', import.meta.url); - } - const imports = __wbg_get_imports(); - - if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { - module_or_path = fetch(module_or_path); - } - - __wbg_init_memory(imports); - - const { instance, module } = await __wbg_load(await module_or_path, imports); - - return __wbg_finalize_init(instance, module); -} - -export { initSync }; -export default __wbg_init; diff --git a/npm/oxc-wasm/oxc_wasm_bg.wasm.d.ts b/npm/oxc-wasm/oxc_wasm_bg.wasm.d.ts deleted file mode 100644 index caea2c4543622..0000000000000 --- a/npm/oxc-wasm/oxc_wasm_bg.wasm.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export const memory: WebAssembly.Memory; -export const __wbg_oxc_free: (a: number, b: number) => void; -export const __wbg_get_oxc_astJson: (a: number) => [number, number]; -export const __wbg_get_oxc_ir: (a: number) => [number, number]; -export const __wbg_get_oxc_controlFlowGraph: (a: number) => [number, number]; -export const __wbg_get_oxc_symbols: (a: number) => any; -export const __wbg_get_oxc_scopeText: (a: number) => [number, number]; -export const __wbg_get_oxc_codegenText: (a: number) => [number, number]; -export const __wbg_get_oxc_codegenSourcemapText: (a: number) => [number, number]; -export const __wbg_get_oxc_formattedText: (a: number) => [number, number]; -export const __wbg_get_oxc_prettierFormattedText: (a: number) => [number, number]; -export const __wbg_get_oxc_prettierIrText: (a: number) => [number, number]; -export const oxc_new: () => number; -export const oxc_getDiagnostics: (a: number) => [number, number, number, number]; -export const oxc_getComments: (a: number) => [number, number, number, number]; -export const oxc_run: (a: number, b: number, c: number, d: any) => [number, number]; -export const browserslist: (a: number, b: number, c: any) => [number, number, number]; -export const __wbindgen_exn_store: (a: number) => void; -export const __externref_table_alloc: () => number; -export const __wbindgen_export_2: WebAssembly.Table; -export const __wbindgen_free: (a: number, b: number, c: number) => void; -export const __wbindgen_malloc: (a: number, b: number) => number; -export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; -export const __externref_table_dealloc: (a: number) => void; -export const __externref_drop_slice: (a: number, b: number) => void; -export const __wbindgen_start: () => void; diff --git a/npm/oxc-wasm/package.json b/npm/oxc-wasm/package.json deleted file mode 100644 index f05aa8a71adef..0000000000000 --- a/npm/oxc-wasm/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@oxc/oxc_wasm", - "type": "module", - "collaborators": [ - "Boshen ", - "Oxc contributors" - ], - "version": "0.0.0", - "license": "MIT", - "files": [ - "oxc_wasm_bg.wasm", - "oxc_wasm.js", - "oxc_wasm.d.ts" - ], - "main": "oxc_wasm.js", - "types": "oxc_wasm.d.ts", - "sideEffects": [ - "./snippets/*" - ], - "keywords": [ - "JavaScript", - "TypeScript", - "linter", - "minifier", - "parser" - ], - "scripts": { - "check": "tsc --lib es2020,dom ./oxc_wasm.d.ts" - }, - "dependencies": { - "@oxc-project/types": "workspace:^" - } -} From e408db8f0cd53911c48d36d827b271d9076522f3 Mon Sep 17 00:00:00 2001 From: shulaoda <165626830+shulaoda@users.noreply.github.com> Date: Mon, 17 Mar 2025 16:48:07 +0000 Subject: [PATCH 19/22] docs(linter): improve docs for `unicorn/no-abusive-eslint-disable` (#9834) It also supports `oxlint-disable`, indicating this. --- .../src/rules/unicorn/no_abusive_eslint_disable.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/oxc_linter/src/rules/unicorn/no_abusive_eslint_disable.rs b/crates/oxc_linter/src/rules/unicorn/no_abusive_eslint_disable.rs index 016c4ad7a52b4..3ef9b9b7270bf 100644 --- a/crates/oxc_linter/src/rules/unicorn/no_abusive_eslint_disable.rs +++ b/crates/oxc_linter/src/rules/unicorn/no_abusive_eslint_disable.rs @@ -18,11 +18,12 @@ pub struct NoAbusiveEslintDisable; declare_oxc_lint!( /// ### What it does /// - /// This rule disallows `eslint-disable` comments that do not specify any rules to disable. + /// Disallows `oxlint-disable` or `eslint-disable` comments without specifying rules. /// /// ### Why is this bad? /// - /// When only one rule should be disabled but the `eslint-disable` comment does not specify any rules, other useful errors will also be silently ignored. + /// A general `oxlint-disable` or `eslint-disable` comment suppresses all lint errors, not just the intended one, + /// potentially hiding useful warnings and making debugging harder. /// /// ### Examples /// From 44b1b5a63721a616259e68532394029b138f101f Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Mon, 17 Mar 2025 14:08:58 +0900 Subject: [PATCH 20/22] fix(ast/estree): fix some --- crates/oxc_ast/src/ast/js.rs | 15 +- crates/oxc_ast/src/ast/jsx.rs | 6 +- crates/oxc_ast/src/ast/ts.rs | 10 +- crates/oxc_ast/src/ast_builder_impl.rs | 2 +- .../oxc_ast/src/generated/assert_layouts.rs | 36 +-- crates/oxc_ast/src/generated/ast_builder.rs | 245 ++++++++--------- .../oxc_ast/src/generated/derive_clone_in.rs | 18 +- .../src/generated/derive_content_eq.rs | 18 +- crates/oxc_ast/src/generated/derive_estree.rs | 18 +- crates/oxc_ast_visit/src/generated/visit.rs | 36 +-- .../oxc_ast_visit/src/generated/visit_mut.rs | 36 +-- crates/oxc_codegen/src/gen.rs | 14 +- crates/oxc_isolated_declarations/src/class.rs | 2 +- crates/oxc_isolated_declarations/src/scope.rs | 2 +- .../src/rules/eslint/no_array_constructor.rs | 4 +- .../src/rules/eslint/no_object_constructor.rs | 11 +- .../rules/eslint/no_unexpected_multiline.rs | 4 +- .../src/rules/jest/no_untyped_mock_factory.rs | 2 +- .../src/rules/typescript/array_type.rs | 12 +- .../consistent_generic_constructors.rs | 6 +- .../consistent_indexed_object_style.rs | 4 +- .../rules/unicorn/consistent_date_clone.rs | 2 +- crates/oxc_prettier/src/format/jsx.rs | 2 +- .../src/format/print/assignment.rs | 2 +- .../src/format/print/call_expression.rs | 4 +- crates/oxc_prettier/src/format/print/class.rs | 2 +- .../src/format/print/template_literal.rs | 2 +- crates/oxc_prettier/src/format/typescript.rs | 8 +- crates/oxc_semantic/src/builder.rs | 2 +- .../src/typescript/annotations.rs | 10 +- crates/oxc_traverse/src/generated/ancestor.rs | 251 +++++++++--------- crates/oxc_traverse/src/generated/walk.rs | 37 ++- napi/parser/deserialize-js.js | 8 +- napi/parser/deserialize-ts.js | 18 +- npm/oxc-types/types.d.ts | 18 +- 35 files changed, 426 insertions(+), 441 deletions(-) diff --git a/crates/oxc_ast/src/ast/js.rs b/crates/oxc_ast/src/ast/js.rs index d2c73eae3d148..ca4a2a27c6ee1 100644 --- a/crates/oxc_ast/src/ast/js.rs +++ b/crates/oxc_ast/src/ast/js.rs @@ -437,7 +437,7 @@ pub struct TaggedTemplateExpression<'a> { pub tag: Expression<'a>, pub quasi: TemplateLiteral<'a>, #[ts] - pub type_parameters: Option>>, + pub type_arguments: Option>>, } /// `Hello, ` in `` `Hello, ${name}` `` @@ -567,7 +567,7 @@ pub struct PrivateFieldExpression<'a> { /// // ^ optional /// /// const z = foo(1, 2) -/// // ^^^^^^^^^^^^^^ type_parameters +/// // ^^^^^^^^^^^^^^ type_arguments /// ``` #[ast(visit)] #[derive(Debug)] @@ -576,7 +576,7 @@ pub struct CallExpression<'a> { pub span: Span, pub callee: Expression<'a>, #[ts] - pub type_parameters: Option>>, + pub type_arguments: Option>>, pub arguments: Vec<'a, Argument<'a>>, pub optional: bool, // for optional chaining /// `true` if the call expression is marked with a `/* @__PURE__ */` comment @@ -595,7 +595,7 @@ pub struct CallExpression<'a> { /// // ↓↓↓ ↓↓↓↓ /// const foo = new Foo(1, 2) /// // ↑↑↑↑↑↑↑↑ -/// // type_parameters +/// // type_arguments /// ``` #[ast(visit)] #[derive(Debug)] @@ -605,7 +605,7 @@ pub struct NewExpression<'a> { pub callee: Expression<'a>, pub arguments: Vec<'a, Argument<'a>>, #[ts] - pub type_parameters: Option>>, + pub type_arguments: Option>>, /// `true` if the new expression is marked with a `/* @__PURE__ */` comment #[builder(default)] #[estree(skip)] @@ -1211,6 +1211,7 @@ pub struct EmptyStatement { #[ast(visit)] #[derive(Debug)] #[generate_derive(CloneIn, GetSpan, GetSpanMut, ContentEq, ESTree)] +// #[estree(add_fields(directive = Null),)] pub struct ExpressionStatement<'a> { pub span: Span, pub expression: Expression<'a>, @@ -1850,7 +1851,7 @@ pub struct YieldExpression<'a> { #[rustfmt::skip] #[estree(field_order( r#type, span, id, super_class, body, - decorators, type_parameters, super_type_parameters, implements, r#abstract, declare, + decorators, type_parameters, super_type_arguments, implements, r#abstract, declare, ))] pub struct Class<'a> { pub span: Span, @@ -1888,7 +1889,7 @@ pub struct Class<'a> { /// // ^ /// ``` #[ts] - pub super_type_parameters: Option>>, + pub super_type_arguments: Option>>, /// Interface implementation clause for TypeScript classes. /// /// ## Example diff --git a/crates/oxc_ast/src/ast/jsx.rs b/crates/oxc_ast/src/ast/jsx.rs index 84bf9c57d69da..01b2dc26eb37b 100644 --- a/crates/oxc_ast/src/ast/jsx.rs +++ b/crates/oxc_ast/src/ast/jsx.rs @@ -57,12 +57,12 @@ pub struct JSXElement<'a> { /// /// // element with self-closing tag (self_closing = true) /// /> -/// // ^ type_parameters +/// // ^ type_arguments /// ``` #[ast(visit)] #[derive(Debug)] #[generate_derive(CloneIn, GetSpan, GetSpanMut, ContentEq, ESTree)] -#[estree(field_order(span, attributes, name, self_closing, type_parameters))] +#[estree(field_order(span, attributes, name, self_closing, type_arguments))] pub struct JSXOpeningElement<'a> { /// Node location in source code pub span: Span, @@ -80,7 +80,7 @@ pub struct JSXOpeningElement<'a> { pub attributes: Vec<'a, JSXAttributeItem<'a>>, /// Type parameters for generic JSX elements. #[ts] - pub type_parameters: Option>>, + pub type_arguments: Option>>, } /// JSX Closing Element diff --git a/crates/oxc_ast/src/ast/ts.rs b/crates/oxc_ast/src/ast/ts.rs index 940f8de2902a6..bb914e5654343 100644 --- a/crates/oxc_ast/src/ast/ts.rs +++ b/crates/oxc_ast/src/ast/ts.rs @@ -718,7 +718,7 @@ pub struct TSBigIntKeyword { pub struct TSTypeReference<'a> { pub span: Span, pub type_name: TSTypeName<'a>, - pub type_parameters: Option>>, + pub type_arguments: Option>>, } /// TypeName: @@ -850,7 +850,7 @@ pub enum TSAccessibility { /// ```ts /// // ___ expression /// class Foo implements Bar, Baz {} -/// // type_parameters ^^^^^^^^^^^^^^ +/// // type_arguments ^^^^^^^^^^^^^^ /// ``` #[ast(visit)] #[derive(Debug)] @@ -858,7 +858,7 @@ pub enum TSAccessibility { pub struct TSClassImplements<'a> { pub span: Span, pub expression: TSTypeName<'a>, - pub type_parameters: Option>>, + pub type_arguments: Option>>, } /// TypeScriptInterface Declaration @@ -1042,7 +1042,7 @@ pub struct TSIndexSignatureName<'a> { pub struct TSInterfaceHeritage<'a> { pub span: Span, pub expression: Expression<'a>, - pub type_parameters: Option>>, + pub type_arguments: Option>>, } /// TypeScript Type Predicate @@ -1254,7 +1254,7 @@ pub struct TSInferType<'a> { pub struct TSTypeQuery<'a> { pub span: Span, pub expr_name: TSTypeQueryExprName<'a>, - pub type_parameters: Option>>, + pub type_arguments: Option>>, } inherit_variants! { diff --git a/crates/oxc_ast/src/ast_builder_impl.rs b/crates/oxc_ast/src/ast_builder_impl.rs index 089b77b6204e8..27ad10af6b411 100644 --- a/crates/oxc_ast/src/ast_builder_impl.rs +++ b/crates/oxc_ast/src/ast_builder_impl.rs @@ -378,7 +378,7 @@ impl<'a> AstBuilder<'a> { extends.into_iter().map(|(expression, type_parameters, span)| TSInterfaceHeritage { span, expression, - type_parameters, + type_arguments: type_parameters, }), self.allocator, ) diff --git a/crates/oxc_ast/src/generated/assert_layouts.rs b/crates/oxc_ast/src/generated/assert_layouts.rs index 746e0e8b16075..38999b9006988 100644 --- a/crates/oxc_ast/src/generated/assert_layouts.rs +++ b/crates/oxc_ast/src/generated/assert_layouts.rs @@ -98,7 +98,7 @@ const _: () = { assert!(offset_of!(TaggedTemplateExpression, span) == 0); assert!(offset_of!(TaggedTemplateExpression, tag) == 8); assert!(offset_of!(TaggedTemplateExpression, quasi) == 24); - assert!(offset_of!(TaggedTemplateExpression, type_parameters) == 96); + assert!(offset_of!(TaggedTemplateExpression, type_arguments) == 96); assert!(size_of::() == 48); assert!(align_of::() == 8); @@ -139,7 +139,7 @@ const _: () = { assert!(align_of::() == 8); assert!(offset_of!(CallExpression, span) == 0); assert!(offset_of!(CallExpression, callee) == 8); - assert!(offset_of!(CallExpression, type_parameters) == 24); + assert!(offset_of!(CallExpression, type_arguments) == 24); assert!(offset_of!(CallExpression, arguments) == 32); assert!(offset_of!(CallExpression, optional) == 64); assert!(offset_of!(CallExpression, pure) == 65); @@ -149,7 +149,7 @@ const _: () = { assert!(offset_of!(NewExpression, span) == 0); assert!(offset_of!(NewExpression, callee) == 8); assert!(offset_of!(NewExpression, arguments) == 24); - assert!(offset_of!(NewExpression, type_parameters) == 56); + assert!(offset_of!(NewExpression, type_arguments) == 56); assert!(offset_of!(NewExpression, pure) == 64); assert!(size_of::() == 56); @@ -571,7 +571,7 @@ const _: () = { assert!(offset_of!(Class, id) == 48); assert!(offset_of!(Class, type_parameters) == 80); assert!(offset_of!(Class, super_class) == 88); - assert!(offset_of!(Class, super_type_parameters) == 104); + assert!(offset_of!(Class, super_type_arguments) == 104); assert!(offset_of!(Class, implements) == 112); assert!(offset_of!(Class, body) == 144); assert!(offset_of!(Class, r#abstract) == 152); @@ -813,7 +813,7 @@ const _: () = { assert!(offset_of!(JSXOpeningElement, self_closing) == 8); assert!(offset_of!(JSXOpeningElement, name) == 16); assert!(offset_of!(JSXOpeningElement, attributes) == 32); - assert!(offset_of!(JSXOpeningElement, type_parameters) == 64); + assert!(offset_of!(JSXOpeningElement, type_arguments) == 64); assert!(size_of::() == 24); assert!(align_of::() == 8); @@ -1073,7 +1073,7 @@ const _: () = { assert!(align_of::() == 8); assert!(offset_of!(TSTypeReference, span) == 0); assert!(offset_of!(TSTypeReference, type_name) == 8); - assert!(offset_of!(TSTypeReference, type_parameters) == 24); + assert!(offset_of!(TSTypeReference, type_arguments) == 24); assert!(size_of::() == 16); assert!(align_of::() == 8); @@ -1120,7 +1120,7 @@ const _: () = { assert!(align_of::() == 8); assert!(offset_of!(TSClassImplements, span) == 0); assert!(offset_of!(TSClassImplements, expression) == 8); - assert!(offset_of!(TSClassImplements, type_parameters) == 24); + assert!(offset_of!(TSClassImplements, type_arguments) == 24); assert!(size_of::() == 96); assert!(align_of::() == 8); @@ -1199,7 +1199,7 @@ const _: () = { assert!(align_of::() == 8); assert!(offset_of!(TSInterfaceHeritage, span) == 0); assert!(offset_of!(TSInterfaceHeritage, expression) == 8); - assert!(offset_of!(TSInterfaceHeritage, type_parameters) == 24); + assert!(offset_of!(TSInterfaceHeritage, type_arguments) == 24); assert!(size_of::() == 40); assert!(align_of::() == 8); @@ -1249,7 +1249,7 @@ const _: () = { assert!(align_of::() == 8); assert!(offset_of!(TSTypeQuery, span) == 0); assert!(offset_of!(TSTypeQuery, expr_name) == 8); - assert!(offset_of!(TSTypeQuery, type_parameters) == 24); + assert!(offset_of!(TSTypeQuery, type_arguments) == 24); assert!(size_of::() == 16); assert!(align_of::() == 8); @@ -1503,7 +1503,7 @@ const _: () = { assert!(offset_of!(TaggedTemplateExpression, span) == 0); assert!(offset_of!(TaggedTemplateExpression, tag) == 8); assert!(offset_of!(TaggedTemplateExpression, quasi) == 16); - assert!(offset_of!(TaggedTemplateExpression, type_parameters) == 56); + assert!(offset_of!(TaggedTemplateExpression, type_arguments) == 56); assert!(size_of::() == 28); assert!(align_of::() == 4); @@ -1544,7 +1544,7 @@ const _: () = { assert!(align_of::() == 4); assert!(offset_of!(CallExpression, span) == 0); assert!(offset_of!(CallExpression, callee) == 8); - assert!(offset_of!(CallExpression, type_parameters) == 16); + assert!(offset_of!(CallExpression, type_arguments) == 16); assert!(offset_of!(CallExpression, arguments) == 20); assert!(offset_of!(CallExpression, optional) == 36); assert!(offset_of!(CallExpression, pure) == 37); @@ -1554,7 +1554,7 @@ const _: () = { assert!(offset_of!(NewExpression, span) == 0); assert!(offset_of!(NewExpression, callee) == 8); assert!(offset_of!(NewExpression, arguments) == 16); - assert!(offset_of!(NewExpression, type_parameters) == 32); + assert!(offset_of!(NewExpression, type_arguments) == 32); assert!(offset_of!(NewExpression, pure) == 36); assert!(size_of::() == 40); @@ -1976,7 +1976,7 @@ const _: () = { assert!(offset_of!(Class, id) == 28); assert!(offset_of!(Class, type_parameters) == 48); assert!(offset_of!(Class, super_class) == 52); - assert!(offset_of!(Class, super_type_parameters) == 60); + assert!(offset_of!(Class, super_type_arguments) == 60); assert!(offset_of!(Class, implements) == 64); assert!(offset_of!(Class, body) == 80); assert!(offset_of!(Class, r#abstract) == 84); @@ -2218,7 +2218,7 @@ const _: () = { assert!(offset_of!(JSXOpeningElement, self_closing) == 8); assert!(offset_of!(JSXOpeningElement, name) == 12); assert!(offset_of!(JSXOpeningElement, attributes) == 20); - assert!(offset_of!(JSXOpeningElement, type_parameters) == 36); + assert!(offset_of!(JSXOpeningElement, type_arguments) == 36); assert!(size_of::() == 16); assert!(align_of::() == 4); @@ -2478,7 +2478,7 @@ const _: () = { assert!(align_of::() == 4); assert!(offset_of!(TSTypeReference, span) == 0); assert!(offset_of!(TSTypeReference, type_name) == 8); - assert!(offset_of!(TSTypeReference, type_parameters) == 16); + assert!(offset_of!(TSTypeReference, type_arguments) == 16); assert!(size_of::() == 8); assert!(align_of::() == 4); @@ -2525,7 +2525,7 @@ const _: () = { assert!(align_of::() == 4); assert!(offset_of!(TSClassImplements, span) == 0); assert!(offset_of!(TSClassImplements, expression) == 8); - assert!(offset_of!(TSClassImplements, type_parameters) == 16); + assert!(offset_of!(TSClassImplements, type_arguments) == 16); assert!(size_of::() == 60); assert!(align_of::() == 4); @@ -2604,7 +2604,7 @@ const _: () = { assert!(align_of::() == 4); assert!(offset_of!(TSInterfaceHeritage, span) == 0); assert!(offset_of!(TSInterfaceHeritage, expression) == 8); - assert!(offset_of!(TSInterfaceHeritage, type_parameters) == 16); + assert!(offset_of!(TSInterfaceHeritage, type_arguments) == 16); assert!(size_of::() == 28); assert!(align_of::() == 4); @@ -2654,7 +2654,7 @@ const _: () = { assert!(align_of::() == 4); assert!(offset_of!(TSTypeQuery, span) == 0); assert!(offset_of!(TSTypeQuery, expr_name) == 8); - assert!(offset_of!(TSTypeQuery, type_parameters) == 16); + assert!(offset_of!(TSTypeQuery, type_arguments) == 16); assert!(size_of::() == 8); assert!(align_of::() == 4); diff --git a/crates/oxc_ast/src/generated/ast_builder.rs b/crates/oxc_ast/src/generated/ast_builder.rs index 2b9728399e9fb..396a27df2965d 100644 --- a/crates/oxc_ast/src/generated/ast_builder.rs +++ b/crates/oxc_ast/src/generated/ast_builder.rs @@ -530,7 +530,7 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `callee` - /// * `type_parameters` + /// * `type_arguments` /// * `arguments` /// * `optional` #[inline] @@ -538,7 +538,7 @@ impl<'a> AstBuilder<'a> { self, span: Span, callee: Expression<'a>, - type_parameters: T1, + type_arguments: T1, arguments: Vec<'a, Argument<'a>>, optional: bool, ) -> Expression<'a> @@ -548,7 +548,7 @@ impl<'a> AstBuilder<'a> { Expression::CallExpression(self.alloc_call_expression( span, callee, - type_parameters, + type_arguments, arguments, optional, )) @@ -561,7 +561,7 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `callee` - /// * `type_parameters` + /// * `type_arguments` /// * `arguments` /// * `optional` /// * `pure`: `true` if the call expression is marked with a `/* @__PURE__ */` comment @@ -570,7 +570,7 @@ impl<'a> AstBuilder<'a> { self, span: Span, callee: Expression<'a>, - type_parameters: T1, + type_arguments: T1, arguments: Vec<'a, Argument<'a>>, optional: bool, pure: bool, @@ -581,7 +581,7 @@ impl<'a> AstBuilder<'a> { Expression::CallExpression(self.alloc_call_expression_with_pure( span, callee, - type_parameters, + type_arguments, arguments, optional, pure, @@ -611,7 +611,7 @@ impl<'a> AstBuilder<'a> { /// * `id`: Class identifier, AKA the name /// * `type_parameters` /// * `super_class`: Super class. When present, this will usually be an [`IdentifierReference`]. - /// * `super_type_parameters`: Type parameters passed to super class. + /// * `super_type_arguments`: Type parameters passed to super class. /// * `implements`: Interface implementation clause for TypeScript classes. /// * `body` /// * `abstract`: Whether the class is abstract @@ -625,7 +625,7 @@ impl<'a> AstBuilder<'a> { id: Option>, type_parameters: T1, super_class: Option>, - super_type_parameters: T2, + super_type_arguments: T2, implements: Option>>, body: T3, r#abstract: bool, @@ -643,7 +643,7 @@ impl<'a> AstBuilder<'a> { id, type_parameters, super_class, - super_type_parameters, + super_type_arguments, implements, body, r#abstract, @@ -662,7 +662,7 @@ impl<'a> AstBuilder<'a> { /// * `id`: Class identifier, AKA the name /// * `type_parameters` /// * `super_class`: Super class. When present, this will usually be an [`IdentifierReference`]. - /// * `super_type_parameters`: Type parameters passed to super class. + /// * `super_type_arguments`: Type parameters passed to super class. /// * `implements`: Interface implementation clause for TypeScript classes. /// * `body` /// * `abstract`: Whether the class is abstract @@ -677,7 +677,7 @@ impl<'a> AstBuilder<'a> { id: Option>, type_parameters: T1, super_class: Option>, - super_type_parameters: T2, + super_type_arguments: T2, implements: Option>>, body: T3, r#abstract: bool, @@ -696,7 +696,7 @@ impl<'a> AstBuilder<'a> { id, type_parameters, super_class, - super_type_parameters, + super_type_arguments, implements, body, r#abstract, @@ -887,14 +887,14 @@ impl<'a> AstBuilder<'a> { /// * `span`: The [`Span`] covering this node /// * `callee` /// * `arguments` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn expression_new( self, span: Span, callee: Expression<'a>, arguments: Vec<'a, Argument<'a>>, - type_parameters: T1, + type_arguments: T1, ) -> Expression<'a> where T1: IntoIn<'a, Option>>>, @@ -903,7 +903,7 @@ impl<'a> AstBuilder<'a> { span, callee, arguments, - type_parameters, + type_arguments, )) } @@ -915,7 +915,7 @@ impl<'a> AstBuilder<'a> { /// * `span`: The [`Span`] covering this node /// * `callee` /// * `arguments` - /// * `type_parameters` + /// * `type_arguments` /// * `pure`: `true` if the new expression is marked with a `/* @__PURE__ */` comment #[inline] pub fn expression_new_with_pure( @@ -923,7 +923,7 @@ impl<'a> AstBuilder<'a> { span: Span, callee: Expression<'a>, arguments: Vec<'a, Argument<'a>>, - type_parameters: T1, + type_arguments: T1, pure: bool, ) -> Expression<'a> where @@ -933,7 +933,7 @@ impl<'a> AstBuilder<'a> { span, callee, arguments, - type_parameters, + type_arguments, pure, )) } @@ -996,14 +996,14 @@ impl<'a> AstBuilder<'a> { /// * `span`: The [`Span`] covering this node /// * `tag` /// * `quasi` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn expression_tagged_template( self, span: Span, tag: Expression<'a>, quasi: TemplateLiteral<'a>, - type_parameters: T1, + type_arguments: T1, ) -> Expression<'a> where T1: IntoIn<'a, Option>>>, @@ -1012,7 +1012,7 @@ impl<'a> AstBuilder<'a> { span, tag, quasi, - type_parameters, + type_arguments, )) } @@ -1811,14 +1811,14 @@ impl<'a> AstBuilder<'a> { /// * `span`: The [`Span`] covering this node /// * `tag` /// * `quasi` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn tagged_template_expression( self, span: Span, tag: Expression<'a>, quasi: TemplateLiteral<'a>, - type_parameters: T1, + type_arguments: T1, ) -> TaggedTemplateExpression<'a> where T1: IntoIn<'a, Option>>>, @@ -1827,7 +1827,7 @@ impl<'a> AstBuilder<'a> { span, tag, quasi, - type_parameters: type_parameters.into_in(self.allocator), + type_arguments: type_arguments.into_in(self.allocator), } } @@ -1839,20 +1839,20 @@ impl<'a> AstBuilder<'a> { /// * `span`: The [`Span`] covering this node /// * `tag` /// * `quasi` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn alloc_tagged_template_expression( self, span: Span, tag: Expression<'a>, quasi: TemplateLiteral<'a>, - type_parameters: T1, + type_arguments: T1, ) -> Box<'a, TaggedTemplateExpression<'a>> where T1: IntoIn<'a, Option>>>, { Box::new_in( - self.tagged_template_expression(span, tag, quasi, type_parameters), + self.tagged_template_expression(span, tag, quasi, type_arguments), self.allocator, ) } @@ -2089,7 +2089,7 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `callee` - /// * `type_parameters` + /// * `type_arguments` /// * `arguments` /// * `optional` #[inline] @@ -2097,7 +2097,7 @@ impl<'a> AstBuilder<'a> { self, span: Span, callee: Expression<'a>, - type_parameters: T1, + type_arguments: T1, arguments: Vec<'a, Argument<'a>>, optional: bool, ) -> CallExpression<'a> @@ -2107,7 +2107,7 @@ impl<'a> AstBuilder<'a> { CallExpression { span, callee, - type_parameters: type_parameters.into_in(self.allocator), + type_arguments: type_arguments.into_in(self.allocator), arguments, optional, pure: Default::default(), @@ -2121,7 +2121,7 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `callee` - /// * `type_parameters` + /// * `type_arguments` /// * `arguments` /// * `optional` #[inline] @@ -2129,7 +2129,7 @@ impl<'a> AstBuilder<'a> { self, span: Span, callee: Expression<'a>, - type_parameters: T1, + type_arguments: T1, arguments: Vec<'a, Argument<'a>>, optional: bool, ) -> Box<'a, CallExpression<'a>> @@ -2137,7 +2137,7 @@ impl<'a> AstBuilder<'a> { T1: IntoIn<'a, Option>>>, { Box::new_in( - self.call_expression(span, callee, type_parameters, arguments, optional), + self.call_expression(span, callee, type_arguments, arguments, optional), self.allocator, ) } @@ -2149,7 +2149,7 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `callee` - /// * `type_parameters` + /// * `type_arguments` /// * `arguments` /// * `optional` /// * `pure`: `true` if the call expression is marked with a `/* @__PURE__ */` comment @@ -2158,7 +2158,7 @@ impl<'a> AstBuilder<'a> { self, span: Span, callee: Expression<'a>, - type_parameters: T1, + type_arguments: T1, arguments: Vec<'a, Argument<'a>>, optional: bool, pure: bool, @@ -2169,7 +2169,7 @@ impl<'a> AstBuilder<'a> { CallExpression { span, callee, - type_parameters: type_parameters.into_in(self.allocator), + type_arguments: type_arguments.into_in(self.allocator), arguments, optional, pure, @@ -2183,7 +2183,7 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `callee` - /// * `type_parameters` + /// * `type_arguments` /// * `arguments` /// * `optional` /// * `pure`: `true` if the call expression is marked with a `/* @__PURE__ */` comment @@ -2192,7 +2192,7 @@ impl<'a> AstBuilder<'a> { self, span: Span, callee: Expression<'a>, - type_parameters: T1, + type_arguments: T1, arguments: Vec<'a, Argument<'a>>, optional: bool, pure: bool, @@ -2201,14 +2201,7 @@ impl<'a> AstBuilder<'a> { T1: IntoIn<'a, Option>>>, { Box::new_in( - self.call_expression_with_pure( - span, - callee, - type_parameters, - arguments, - optional, - pure, - ), + self.call_expression_with_pure(span, callee, type_arguments, arguments, optional, pure), self.allocator, ) } @@ -2221,14 +2214,14 @@ impl<'a> AstBuilder<'a> { /// * `span`: The [`Span`] covering this node /// * `callee` /// * `arguments` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn new_expression( self, span: Span, callee: Expression<'a>, arguments: Vec<'a, Argument<'a>>, - type_parameters: T1, + type_arguments: T1, ) -> NewExpression<'a> where T1: IntoIn<'a, Option>>>, @@ -2237,7 +2230,7 @@ impl<'a> AstBuilder<'a> { span, callee, arguments, - type_parameters: type_parameters.into_in(self.allocator), + type_arguments: type_arguments.into_in(self.allocator), pure: Default::default(), } } @@ -2250,19 +2243,19 @@ impl<'a> AstBuilder<'a> { /// * `span`: The [`Span`] covering this node /// * `callee` /// * `arguments` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn alloc_new_expression( self, span: Span, callee: Expression<'a>, arguments: Vec<'a, Argument<'a>>, - type_parameters: T1, + type_arguments: T1, ) -> Box<'a, NewExpression<'a>> where T1: IntoIn<'a, Option>>>, { - Box::new_in(self.new_expression(span, callee, arguments, type_parameters), self.allocator) + Box::new_in(self.new_expression(span, callee, arguments, type_arguments), self.allocator) } /// Build a [`NewExpression`] with `pure`. @@ -2273,7 +2266,7 @@ impl<'a> AstBuilder<'a> { /// * `span`: The [`Span`] covering this node /// * `callee` /// * `arguments` - /// * `type_parameters` + /// * `type_arguments` /// * `pure`: `true` if the new expression is marked with a `/* @__PURE__ */` comment #[inline] pub fn new_expression_with_pure( @@ -2281,7 +2274,7 @@ impl<'a> AstBuilder<'a> { span: Span, callee: Expression<'a>, arguments: Vec<'a, Argument<'a>>, - type_parameters: T1, + type_arguments: T1, pure: bool, ) -> NewExpression<'a> where @@ -2291,7 +2284,7 @@ impl<'a> AstBuilder<'a> { span, callee, arguments, - type_parameters: type_parameters.into_in(self.allocator), + type_arguments: type_arguments.into_in(self.allocator), pure, } } @@ -2304,7 +2297,7 @@ impl<'a> AstBuilder<'a> { /// * `span`: The [`Span`] covering this node /// * `callee` /// * `arguments` - /// * `type_parameters` + /// * `type_arguments` /// * `pure`: `true` if the new expression is marked with a `/* @__PURE__ */` comment #[inline] pub fn alloc_new_expression_with_pure( @@ -2312,14 +2305,14 @@ impl<'a> AstBuilder<'a> { span: Span, callee: Expression<'a>, arguments: Vec<'a, Argument<'a>>, - type_parameters: T1, + type_arguments: T1, pure: bool, ) -> Box<'a, NewExpression<'a>> where T1: IntoIn<'a, Option>>>, { Box::new_in( - self.new_expression_with_pure(span, callee, arguments, type_parameters, pure), + self.new_expression_with_pure(span, callee, arguments, type_arguments, pure), self.allocator, ) } @@ -3250,7 +3243,7 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `callee` - /// * `type_parameters` + /// * `type_arguments` /// * `arguments` /// * `optional` #[inline] @@ -3258,7 +3251,7 @@ impl<'a> AstBuilder<'a> { self, span: Span, callee: Expression<'a>, - type_parameters: T1, + type_arguments: T1, arguments: Vec<'a, Argument<'a>>, optional: bool, ) -> ChainElement<'a> @@ -3268,7 +3261,7 @@ impl<'a> AstBuilder<'a> { ChainElement::CallExpression(self.alloc_call_expression( span, callee, - type_parameters, + type_arguments, arguments, optional, )) @@ -3281,7 +3274,7 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `callee` - /// * `type_parameters` + /// * `type_arguments` /// * `arguments` /// * `optional` /// * `pure`: `true` if the call expression is marked with a `/* @__PURE__ */` comment @@ -3290,7 +3283,7 @@ impl<'a> AstBuilder<'a> { self, span: Span, callee: Expression<'a>, - type_parameters: T1, + type_arguments: T1, arguments: Vec<'a, Argument<'a>>, optional: bool, pure: bool, @@ -3301,7 +3294,7 @@ impl<'a> AstBuilder<'a> { ChainElement::CallExpression(self.alloc_call_expression_with_pure( span, callee, - type_parameters, + type_arguments, arguments, optional, pure, @@ -4056,7 +4049,7 @@ impl<'a> AstBuilder<'a> { /// * `id`: Class identifier, AKA the name /// * `type_parameters` /// * `super_class`: Super class. When present, this will usually be an [`IdentifierReference`]. - /// * `super_type_parameters`: Type parameters passed to super class. + /// * `super_type_arguments`: Type parameters passed to super class. /// * `implements`: Interface implementation clause for TypeScript classes. /// * `body` /// * `abstract`: Whether the class is abstract @@ -4070,7 +4063,7 @@ impl<'a> AstBuilder<'a> { id: Option>, type_parameters: T1, super_class: Option>, - super_type_parameters: T2, + super_type_arguments: T2, implements: Option>>, body: T3, r#abstract: bool, @@ -4088,7 +4081,7 @@ impl<'a> AstBuilder<'a> { id, type_parameters, super_class, - super_type_parameters, + super_type_arguments, implements, body, r#abstract, @@ -4107,7 +4100,7 @@ impl<'a> AstBuilder<'a> { /// * `id`: Class identifier, AKA the name /// * `type_parameters` /// * `super_class`: Super class. When present, this will usually be an [`IdentifierReference`]. - /// * `super_type_parameters`: Type parameters passed to super class. + /// * `super_type_arguments`: Type parameters passed to super class. /// * `implements`: Interface implementation clause for TypeScript classes. /// * `body` /// * `abstract`: Whether the class is abstract @@ -4122,7 +4115,7 @@ impl<'a> AstBuilder<'a> { id: Option>, type_parameters: T1, super_class: Option>, - super_type_parameters: T2, + super_type_arguments: T2, implements: Option>>, body: T3, r#abstract: bool, @@ -4141,7 +4134,7 @@ impl<'a> AstBuilder<'a> { id, type_parameters, super_class, - super_type_parameters, + super_type_arguments, implements, body, r#abstract, @@ -6438,7 +6431,7 @@ impl<'a> AstBuilder<'a> { /// * `id`: Class identifier, AKA the name /// * `type_parameters` /// * `super_class`: Super class. When present, this will usually be an [`IdentifierReference`]. - /// * `super_type_parameters`: Type parameters passed to super class. + /// * `super_type_arguments`: Type parameters passed to super class. /// * `implements`: Interface implementation clause for TypeScript classes. /// * `body` /// * `abstract`: Whether the class is abstract @@ -6452,7 +6445,7 @@ impl<'a> AstBuilder<'a> { id: Option>, type_parameters: T1, super_class: Option>, - super_type_parameters: T2, + super_type_arguments: T2, implements: Option>>, body: T3, r#abstract: bool, @@ -6470,7 +6463,7 @@ impl<'a> AstBuilder<'a> { id, type_parameters: type_parameters.into_in(self.allocator), super_class, - super_type_parameters: super_type_parameters.into_in(self.allocator), + super_type_arguments: super_type_arguments.into_in(self.allocator), implements, body: body.into_in(self.allocator), r#abstract, @@ -6490,7 +6483,7 @@ impl<'a> AstBuilder<'a> { /// * `id`: Class identifier, AKA the name /// * `type_parameters` /// * `super_class`: Super class. When present, this will usually be an [`IdentifierReference`]. - /// * `super_type_parameters`: Type parameters passed to super class. + /// * `super_type_arguments`: Type parameters passed to super class. /// * `implements`: Interface implementation clause for TypeScript classes. /// * `body` /// * `abstract`: Whether the class is abstract @@ -6504,7 +6497,7 @@ impl<'a> AstBuilder<'a> { id: Option>, type_parameters: T1, super_class: Option>, - super_type_parameters: T2, + super_type_arguments: T2, implements: Option>>, body: T3, r#abstract: bool, @@ -6523,7 +6516,7 @@ impl<'a> AstBuilder<'a> { id, type_parameters, super_class, - super_type_parameters, + super_type_arguments, implements, body, r#abstract, @@ -6544,7 +6537,7 @@ impl<'a> AstBuilder<'a> { /// * `id`: Class identifier, AKA the name /// * `type_parameters` /// * `super_class`: Super class. When present, this will usually be an [`IdentifierReference`]. - /// * `super_type_parameters`: Type parameters passed to super class. + /// * `super_type_arguments`: Type parameters passed to super class. /// * `implements`: Interface implementation clause for TypeScript classes. /// * `body` /// * `abstract`: Whether the class is abstract @@ -6559,7 +6552,7 @@ impl<'a> AstBuilder<'a> { id: Option>, type_parameters: T1, super_class: Option>, - super_type_parameters: T2, + super_type_arguments: T2, implements: Option>>, body: T3, r#abstract: bool, @@ -6578,7 +6571,7 @@ impl<'a> AstBuilder<'a> { id, type_parameters: type_parameters.into_in(self.allocator), super_class, - super_type_parameters: super_type_parameters.into_in(self.allocator), + super_type_arguments: super_type_arguments.into_in(self.allocator), implements, body: body.into_in(self.allocator), r#abstract, @@ -6598,7 +6591,7 @@ impl<'a> AstBuilder<'a> { /// * `id`: Class identifier, AKA the name /// * `type_parameters` /// * `super_class`: Super class. When present, this will usually be an [`IdentifierReference`]. - /// * `super_type_parameters`: Type parameters passed to super class. + /// * `super_type_arguments`: Type parameters passed to super class. /// * `implements`: Interface implementation clause for TypeScript classes. /// * `body` /// * `abstract`: Whether the class is abstract @@ -6613,7 +6606,7 @@ impl<'a> AstBuilder<'a> { id: Option>, type_parameters: T1, super_class: Option>, - super_type_parameters: T2, + super_type_arguments: T2, implements: Option>>, body: T3, r#abstract: bool, @@ -6633,7 +6626,7 @@ impl<'a> AstBuilder<'a> { id, type_parameters, super_class, - super_type_parameters, + super_type_arguments, implements, body, r#abstract, @@ -8164,7 +8157,7 @@ impl<'a> AstBuilder<'a> { /// * `id`: Class identifier, AKA the name /// * `type_parameters` /// * `super_class`: Super class. When present, this will usually be an [`IdentifierReference`]. - /// * `super_type_parameters`: Type parameters passed to super class. + /// * `super_type_arguments`: Type parameters passed to super class. /// * `implements`: Interface implementation clause for TypeScript classes. /// * `body` /// * `abstract`: Whether the class is abstract @@ -8178,7 +8171,7 @@ impl<'a> AstBuilder<'a> { id: Option>, type_parameters: T1, super_class: Option>, - super_type_parameters: T2, + super_type_arguments: T2, implements: Option>>, body: T3, r#abstract: bool, @@ -8196,7 +8189,7 @@ impl<'a> AstBuilder<'a> { id, type_parameters, super_class, - super_type_parameters, + super_type_arguments, implements, body, r#abstract, @@ -8215,7 +8208,7 @@ impl<'a> AstBuilder<'a> { /// * `id`: Class identifier, AKA the name /// * `type_parameters` /// * `super_class`: Super class. When present, this will usually be an [`IdentifierReference`]. - /// * `super_type_parameters`: Type parameters passed to super class. + /// * `super_type_arguments`: Type parameters passed to super class. /// * `implements`: Interface implementation clause for TypeScript classes. /// * `body` /// * `abstract`: Whether the class is abstract @@ -8230,7 +8223,7 @@ impl<'a> AstBuilder<'a> { id: Option>, type_parameters: T1, super_class: Option>, - super_type_parameters: T2, + super_type_arguments: T2, implements: Option>>, body: T3, r#abstract: bool, @@ -8249,7 +8242,7 @@ impl<'a> AstBuilder<'a> { id, type_parameters, super_class, - super_type_parameters, + super_type_arguments, implements, body, r#abstract, @@ -8702,7 +8695,7 @@ impl<'a> AstBuilder<'a> { /// * `self_closing`: Is this tag self-closing? /// * `name`: The possibly-namespaced tag name, e.g. `Foo` in ``. /// * `attributes`: List of JSX attributes. In React-like applications, these become props. - /// * `type_parameters`: Type parameters for generic JSX elements. + /// * `type_arguments`: Type parameters for generic JSX elements. #[inline] pub fn jsx_opening_element( self, @@ -8710,7 +8703,7 @@ impl<'a> AstBuilder<'a> { self_closing: bool, name: JSXElementName<'a>, attributes: Vec<'a, JSXAttributeItem<'a>>, - type_parameters: T1, + type_arguments: T1, ) -> JSXOpeningElement<'a> where T1: IntoIn<'a, Option>>>, @@ -8720,7 +8713,7 @@ impl<'a> AstBuilder<'a> { self_closing, name, attributes, - type_parameters: type_parameters.into_in(self.allocator), + type_arguments: type_arguments.into_in(self.allocator), } } @@ -8733,7 +8726,7 @@ impl<'a> AstBuilder<'a> { /// * `self_closing`: Is this tag self-closing? /// * `name`: The possibly-namespaced tag name, e.g. `Foo` in ``. /// * `attributes`: List of JSX attributes. In React-like applications, these become props. - /// * `type_parameters`: Type parameters for generic JSX elements. + /// * `type_arguments`: Type parameters for generic JSX elements. #[inline] pub fn alloc_jsx_opening_element( self, @@ -8741,13 +8734,13 @@ impl<'a> AstBuilder<'a> { self_closing: bool, name: JSXElementName<'a>, attributes: Vec<'a, JSXAttributeItem<'a>>, - type_parameters: T1, + type_arguments: T1, ) -> Box<'a, JSXOpeningElement<'a>> where T1: IntoIn<'a, Option>>>, { Box::new_in( - self.jsx_opening_element(span, self_closing, name, attributes, type_parameters), + self.jsx_opening_element(span, self_closing, name, attributes, type_arguments), self.allocator, ) } @@ -10610,18 +10603,18 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `expr_name` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn ts_type_type_query( self, span: Span, expr_name: TSTypeQueryExprName<'a>, - type_parameters: T1, + type_arguments: T1, ) -> TSType<'a> where T1: IntoIn<'a, Option>>>, { - TSType::TSTypeQuery(self.alloc_ts_type_query(span, expr_name, type_parameters)) + TSType::TSTypeQuery(self.alloc_ts_type_query(span, expr_name, type_arguments)) } /// Build a [`TSType::TSTypeReference`]. @@ -10631,18 +10624,18 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `type_name` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn ts_type_type_reference( self, span: Span, type_name: TSTypeName<'a>, - type_parameters: T1, + type_arguments: T1, ) -> TSType<'a> where T1: IntoIn<'a, Option>>>, { - TSType::TSTypeReference(self.alloc_ts_type_reference(span, type_name, type_parameters)) + TSType::TSTypeReference(self.alloc_ts_type_reference(span, type_name, type_arguments)) } /// Build a [`TSType::TSUnionType`]. @@ -11506,22 +11499,18 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `type_name` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn ts_type_reference( self, span: Span, type_name: TSTypeName<'a>, - type_parameters: T1, + type_arguments: T1, ) -> TSTypeReference<'a> where T1: IntoIn<'a, Option>>>, { - TSTypeReference { - span, - type_name, - type_parameters: type_parameters.into_in(self.allocator), - } + TSTypeReference { span, type_name, type_arguments: type_arguments.into_in(self.allocator) } } /// Build a [`TSTypeReference`], and store it in the memory arena. @@ -11531,18 +11520,18 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `type_name` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn alloc_ts_type_reference( self, span: Span, type_name: TSTypeName<'a>, - type_parameters: T1, + type_arguments: T1, ) -> Box<'a, TSTypeReference<'a>> where T1: IntoIn<'a, Option>>>, { - Box::new_in(self.ts_type_reference(span, type_name, type_parameters), self.allocator) + Box::new_in(self.ts_type_reference(span, type_name, type_arguments), self.allocator) } /// Build a [`TSTypeName::IdentifierReference`]. @@ -11896,13 +11885,13 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `expression` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn ts_class_implements( self, span: Span, expression: TSTypeName<'a>, - type_parameters: T1, + type_arguments: T1, ) -> TSClassImplements<'a> where T1: IntoIn<'a, Option>>>, @@ -11910,7 +11899,7 @@ impl<'a> AstBuilder<'a> { TSClassImplements { span, expression, - type_parameters: type_parameters.into_in(self.allocator), + type_arguments: type_arguments.into_in(self.allocator), } } @@ -11921,18 +11910,18 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `expression` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn alloc_ts_class_implements( self, span: Span, expression: TSTypeName<'a>, - type_parameters: T1, + type_arguments: T1, ) -> Box<'a, TSClassImplements<'a>> where T1: IntoIn<'a, Option>>>, { - Box::new_in(self.ts_class_implements(span, expression, type_parameters), self.allocator) + Box::new_in(self.ts_class_implements(span, expression, type_arguments), self.allocator) } /// Build a [`TSInterfaceDeclaration`]. @@ -12943,13 +12932,13 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `expression` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn ts_interface_heritage( self, span: Span, expression: Expression<'a>, - type_parameters: T1, + type_arguments: T1, ) -> TSInterfaceHeritage<'a> where T1: IntoIn<'a, Option>>>, @@ -12957,7 +12946,7 @@ impl<'a> AstBuilder<'a> { TSInterfaceHeritage { span, expression, - type_parameters: type_parameters.into_in(self.allocator), + type_arguments: type_arguments.into_in(self.allocator), } } @@ -12968,18 +12957,18 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `expression` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn alloc_ts_interface_heritage( self, span: Span, expression: Expression<'a>, - type_parameters: T1, + type_arguments: T1, ) -> Box<'a, TSInterfaceHeritage<'a>> where T1: IntoIn<'a, Option>>>, { - Box::new_in(self.ts_interface_heritage(span, expression, type_parameters), self.allocator) + Box::new_in(self.ts_interface_heritage(span, expression, type_arguments), self.allocator) } /// Build a [`TSTypePredicate`]. @@ -13389,18 +13378,18 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `expr_name` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn ts_type_query( self, span: Span, expr_name: TSTypeQueryExprName<'a>, - type_parameters: T1, + type_arguments: T1, ) -> TSTypeQuery<'a> where T1: IntoIn<'a, Option>>>, { - TSTypeQuery { span, expr_name, type_parameters: type_parameters.into_in(self.allocator) } + TSTypeQuery { span, expr_name, type_arguments: type_arguments.into_in(self.allocator) } } /// Build a [`TSTypeQuery`], and store it in the memory arena. @@ -13410,18 +13399,18 @@ impl<'a> AstBuilder<'a> { /// ## Parameters /// * `span`: The [`Span`] covering this node /// * `expr_name` - /// * `type_parameters` + /// * `type_arguments` #[inline] pub fn alloc_ts_type_query( self, span: Span, expr_name: TSTypeQueryExprName<'a>, - type_parameters: T1, + type_arguments: T1, ) -> Box<'a, TSTypeQuery<'a>> where T1: IntoIn<'a, Option>>>, { - Box::new_in(self.ts_type_query(span, expr_name, type_parameters), self.allocator) + Box::new_in(self.ts_type_query(span, expr_name, type_arguments), self.allocator) } /// Build a [`TSTypeQueryExprName::TSImportType`]. diff --git a/crates/oxc_ast/src/generated/derive_clone_in.rs b/crates/oxc_ast/src/generated/derive_clone_in.rs index b0cd851cb99c0..dcf53914b3b4b 100644 --- a/crates/oxc_ast/src/generated/derive_clone_in.rs +++ b/crates/oxc_ast/src/generated/derive_clone_in.rs @@ -542,7 +542,7 @@ impl<'new_alloc> CloneIn<'new_alloc> for TaggedTemplateExpression<'_> { span: CloneIn::clone_in(&self.span, allocator), tag: CloneIn::clone_in(&self.tag, allocator), quasi: CloneIn::clone_in(&self.quasi, allocator), - type_parameters: CloneIn::clone_in(&self.type_parameters, allocator), + type_arguments: CloneIn::clone_in(&self.type_arguments, allocator), } } } @@ -627,7 +627,7 @@ impl<'new_alloc> CloneIn<'new_alloc> for CallExpression<'_> { CallExpression { span: CloneIn::clone_in(&self.span, allocator), callee: CloneIn::clone_in(&self.callee, allocator), - type_parameters: CloneIn::clone_in(&self.type_parameters, allocator), + type_arguments: CloneIn::clone_in(&self.type_arguments, allocator), arguments: CloneIn::clone_in(&self.arguments, allocator), optional: CloneIn::clone_in(&self.optional, allocator), pure: CloneIn::clone_in(&self.pure, allocator), @@ -642,7 +642,7 @@ impl<'new_alloc> CloneIn<'new_alloc> for NewExpression<'_> { span: CloneIn::clone_in(&self.span, allocator), callee: CloneIn::clone_in(&self.callee, allocator), arguments: CloneIn::clone_in(&self.arguments, allocator), - type_parameters: CloneIn::clone_in(&self.type_parameters, allocator), + type_arguments: CloneIn::clone_in(&self.type_arguments, allocator), pure: CloneIn::clone_in(&self.pure, allocator), } } @@ -1935,7 +1935,7 @@ impl<'new_alloc> CloneIn<'new_alloc> for Class<'_> { id: CloneIn::clone_in(&self.id, allocator), type_parameters: CloneIn::clone_in(&self.type_parameters, allocator), super_class: CloneIn::clone_in(&self.super_class, allocator), - super_type_parameters: CloneIn::clone_in(&self.super_type_parameters, allocator), + super_type_arguments: CloneIn::clone_in(&self.super_type_arguments, allocator), implements: CloneIn::clone_in(&self.implements, allocator), body: CloneIn::clone_in(&self.body, allocator), r#abstract: CloneIn::clone_in(&self.r#abstract, allocator), @@ -2602,7 +2602,7 @@ impl<'new_alloc> CloneIn<'new_alloc> for JSXOpeningElement<'_> { self_closing: CloneIn::clone_in(&self.self_closing, allocator), name: CloneIn::clone_in(&self.name, allocator), attributes: CloneIn::clone_in(&self.attributes, allocator), - type_parameters: CloneIn::clone_in(&self.type_parameters, allocator), + type_arguments: CloneIn::clone_in(&self.type_arguments, allocator), } } } @@ -3458,7 +3458,7 @@ impl<'new_alloc> CloneIn<'new_alloc> for TSTypeReference<'_> { TSTypeReference { span: CloneIn::clone_in(&self.span, allocator), type_name: CloneIn::clone_in(&self.type_name, allocator), - type_parameters: CloneIn::clone_in(&self.type_parameters, allocator), + type_arguments: CloneIn::clone_in(&self.type_arguments, allocator), } } } @@ -3552,7 +3552,7 @@ impl<'new_alloc> CloneIn<'new_alloc> for TSClassImplements<'_> { TSClassImplements { span: CloneIn::clone_in(&self.span, allocator), expression: CloneIn::clone_in(&self.expression, allocator), - type_parameters: CloneIn::clone_in(&self.type_parameters, allocator), + type_arguments: CloneIn::clone_in(&self.type_arguments, allocator), } } } @@ -3704,7 +3704,7 @@ impl<'new_alloc> CloneIn<'new_alloc> for TSInterfaceHeritage<'_> { TSInterfaceHeritage { span: CloneIn::clone_in(&self.span, allocator), expression: CloneIn::clone_in(&self.expression, allocator), - type_parameters: CloneIn::clone_in(&self.type_parameters, allocator), + type_arguments: CloneIn::clone_in(&self.type_arguments, allocator), } } } @@ -3823,7 +3823,7 @@ impl<'new_alloc> CloneIn<'new_alloc> for TSTypeQuery<'_> { TSTypeQuery { span: CloneIn::clone_in(&self.span, allocator), expr_name: CloneIn::clone_in(&self.expr_name, allocator), - type_parameters: CloneIn::clone_in(&self.type_parameters, allocator), + type_arguments: CloneIn::clone_in(&self.type_arguments, allocator), } } } diff --git a/crates/oxc_ast/src/generated/derive_content_eq.rs b/crates/oxc_ast/src/generated/derive_content_eq.rs index c9b044ab6d89a..6d074c0e044ed 100644 --- a/crates/oxc_ast/src/generated/derive_content_eq.rs +++ b/crates/oxc_ast/src/generated/derive_content_eq.rs @@ -283,7 +283,7 @@ impl ContentEq for TaggedTemplateExpression<'_> { fn content_eq(&self, other: &Self) -> bool { ContentEq::content_eq(&self.tag, &other.tag) && ContentEq::content_eq(&self.quasi, &other.quasi) - && ContentEq::content_eq(&self.type_parameters, &other.type_parameters) + && ContentEq::content_eq(&self.type_arguments, &other.type_arguments) } } @@ -341,7 +341,7 @@ impl ContentEq for PrivateFieldExpression<'_> { impl ContentEq for CallExpression<'_> { fn content_eq(&self, other: &Self) -> bool { ContentEq::content_eq(&self.callee, &other.callee) - && ContentEq::content_eq(&self.type_parameters, &other.type_parameters) + && ContentEq::content_eq(&self.type_arguments, &other.type_arguments) && ContentEq::content_eq(&self.arguments, &other.arguments) && ContentEq::content_eq(&self.optional, &other.optional) && ContentEq::content_eq(&self.pure, &other.pure) @@ -352,7 +352,7 @@ impl ContentEq for NewExpression<'_> { fn content_eq(&self, other: &Self) -> bool { ContentEq::content_eq(&self.callee, &other.callee) && ContentEq::content_eq(&self.arguments, &other.arguments) - && ContentEq::content_eq(&self.type_parameters, &other.type_parameters) + && ContentEq::content_eq(&self.type_arguments, &other.type_arguments) && ContentEq::content_eq(&self.pure, &other.pure) } } @@ -1123,7 +1123,7 @@ impl ContentEq for Class<'_> { && ContentEq::content_eq(&self.id, &other.id) && ContentEq::content_eq(&self.type_parameters, &other.type_parameters) && ContentEq::content_eq(&self.super_class, &other.super_class) - && ContentEq::content_eq(&self.super_type_parameters, &other.super_type_parameters) + && ContentEq::content_eq(&self.super_type_arguments, &other.super_type_arguments) && ContentEq::content_eq(&self.implements, &other.implements) && ContentEq::content_eq(&self.body, &other.body) && ContentEq::content_eq(&self.r#abstract, &other.r#abstract) @@ -1506,7 +1506,7 @@ impl ContentEq for JSXOpeningElement<'_> { ContentEq::content_eq(&self.self_closing, &other.self_closing) && ContentEq::content_eq(&self.name, &other.name) && ContentEq::content_eq(&self.attributes, &other.attributes) - && ContentEq::content_eq(&self.type_parameters, &other.type_parameters) + && ContentEq::content_eq(&self.type_arguments, &other.type_arguments) } } @@ -2036,7 +2036,7 @@ impl ContentEq for TSBigIntKeyword { impl ContentEq for TSTypeReference<'_> { fn content_eq(&self, other: &Self) -> bool { ContentEq::content_eq(&self.type_name, &other.type_name) - && ContentEq::content_eq(&self.type_parameters, &other.type_parameters) + && ContentEq::content_eq(&self.type_arguments, &other.type_arguments) } } @@ -2098,7 +2098,7 @@ impl ContentEq for TSAccessibility { impl ContentEq for TSClassImplements<'_> { fn content_eq(&self, other: &Self) -> bool { ContentEq::content_eq(&self.expression, &other.expression) - && ContentEq::content_eq(&self.type_parameters, &other.type_parameters) + && ContentEq::content_eq(&self.type_arguments, &other.type_arguments) } } @@ -2201,7 +2201,7 @@ impl ContentEq for TSIndexSignatureName<'_> { impl ContentEq for TSInterfaceHeritage<'_> { fn content_eq(&self, other: &Self) -> bool { ContentEq::content_eq(&self.expression, &other.expression) - && ContentEq::content_eq(&self.type_parameters, &other.type_parameters) + && ContentEq::content_eq(&self.type_arguments, &other.type_arguments) } } @@ -2280,7 +2280,7 @@ impl ContentEq for TSInferType<'_> { impl ContentEq for TSTypeQuery<'_> { fn content_eq(&self, other: &Self) -> bool { ContentEq::content_eq(&self.expr_name, &other.expr_name) - && ContentEq::content_eq(&self.type_parameters, &other.type_parameters) + && ContentEq::content_eq(&self.type_arguments, &other.type_arguments) } } diff --git a/crates/oxc_ast/src/generated/derive_estree.rs b/crates/oxc_ast/src/generated/derive_estree.rs index 19e436419c7ed..3333b22589d98 100644 --- a/crates/oxc_ast/src/generated/derive_estree.rs +++ b/crates/oxc_ast/src/generated/derive_estree.rs @@ -321,7 +321,7 @@ impl ESTree for TaggedTemplateExpression<'_> { state.serialize_field("end", &self.span.end); state.serialize_field("tag", &self.tag); state.serialize_field("quasi", &self.quasi); - state.serialize_ts_field("typeParameters", &self.type_parameters); + state.serialize_ts_field("typeArguments", &self.type_arguments); state.end(); } } @@ -408,7 +408,7 @@ impl ESTree for CallExpression<'_> { state.serialize_field("callee", &self.callee); state.serialize_field("arguments", &self.arguments); state.serialize_field("optional", &self.optional); - state.serialize_ts_field("typeParameters", &self.type_parameters); + state.serialize_ts_field("typeArguments", &self.type_arguments); state.end(); } } @@ -421,7 +421,7 @@ impl ESTree for NewExpression<'_> { state.serialize_field("end", &self.span.end); state.serialize_field("callee", &self.callee); state.serialize_field("arguments", &self.arguments); - state.serialize_ts_field("typeParameters", &self.type_parameters); + state.serialize_ts_field("typeArguments", &self.type_arguments); state.end(); } } @@ -1449,7 +1449,7 @@ impl ESTree for Class<'_> { state.serialize_field("body", &self.body); state.serialize_ts_field("decorators", &self.decorators); state.serialize_ts_field("typeParameters", &self.type_parameters); - state.serialize_ts_field("superTypeParameters", &self.super_type_parameters); + state.serialize_ts_field("superTypeArguments", &self.super_type_arguments); state.serialize_ts_field("implements", &self.implements); state.serialize_ts_field("abstract", &self.r#abstract); state.serialize_ts_field("declare", &self.declare); @@ -1989,7 +1989,7 @@ impl ESTree for JSXOpeningElement<'_> { state.serialize_field("attributes", &self.attributes); state.serialize_field("name", &self.name); state.serialize_field("selfClosing", &self.self_closing); - state.serialize_ts_field("typeParameters", &self.type_parameters); + state.serialize_ts_field("typeArguments", &self.type_arguments); state.end(); } } @@ -2720,7 +2720,7 @@ impl ESTree for TSTypeReference<'_> { state.serialize_field("start", &self.span.start); state.serialize_field("end", &self.span.end); state.serialize_field("typeName", &self.type_name); - state.serialize_field("typeParameters", &self.type_parameters); + state.serialize_field("typeArguments", &self.type_arguments); state.end(); } } @@ -2815,7 +2815,7 @@ impl ESTree for TSClassImplements<'_> { state.serialize_field("start", &self.span.start); state.serialize_field("end", &self.span.end); state.serialize_field("expression", &self.expression); - state.serialize_field("typeParameters", &self.type_parameters); + state.serialize_field("typeArguments", &self.type_arguments); state.end(); } } @@ -2961,7 +2961,7 @@ impl ESTree for TSInterfaceHeritage<'_> { state.serialize_field("start", &self.span.start); state.serialize_field("end", &self.span.end); state.serialize_field("expression", &self.expression); - state.serialize_field("typeParameters", &self.type_parameters); + state.serialize_field("typeArguments", &self.type_arguments); state.end(); } } @@ -3073,7 +3073,7 @@ impl ESTree for TSTypeQuery<'_> { state.serialize_field("start", &self.span.start); state.serialize_field("end", &self.span.end); state.serialize_field("exprName", &self.expr_name); - state.serialize_field("typeParameters", &self.type_parameters); + state.serialize_field("typeArguments", &self.type_arguments); state.end(); } } diff --git a/crates/oxc_ast_visit/src/generated/visit.rs b/crates/oxc_ast_visit/src/generated/visit.rs index 5095adc21fb09..de6b7c0942aed 100644 --- a/crates/oxc_ast_visit/src/generated/visit.rs +++ b/crates/oxc_ast_visit/src/generated/visit.rs @@ -1576,8 +1576,8 @@ pub mod walk { visitor.visit_span(&it.span); visitor.visit_expression(&it.tag); visitor.visit_template_literal(&it.quasi); - if let Some(type_parameters) = &it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } @@ -1645,8 +1645,8 @@ pub mod walk { visitor.enter_node(kind); visitor.visit_span(&it.span); visitor.visit_expression(&it.callee); - if let Some(type_parameters) = &it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.visit_arguments(&it.arguments); visitor.leave_node(kind); @@ -1659,8 +1659,8 @@ pub mod walk { visitor.visit_span(&it.span); visitor.visit_expression(&it.callee); visitor.visit_arguments(&it.arguments); - if let Some(type_parameters) = &it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } @@ -2563,8 +2563,8 @@ pub mod walk { if let Some(super_class) = &it.super_class { visitor.visit_expression(super_class); } - if let Some(super_type_parameters) = &it.super_type_parameters { - visitor.visit_ts_type_parameter_instantiation(super_type_parameters); + if let Some(super_type_arguments) = &it.super_type_arguments { + visitor.visit_ts_type_parameter_instantiation(super_type_arguments); } if let Some(implements) = &it.implements { visitor.visit_ts_class_implementses(implements); @@ -2964,8 +2964,8 @@ pub mod walk { visitor.visit_span(&it.span); visitor.visit_jsx_element_name(&it.name); visitor.visit_jsx_attribute_items(&it.attributes); - if let Some(type_parameters) = &it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } @@ -3529,8 +3529,8 @@ pub mod walk { visitor.enter_node(kind); visitor.visit_span(&it.span); visitor.visit_ts_type_name(&it.type_name); - if let Some(type_parameters) = &it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } @@ -3619,8 +3619,8 @@ pub mod walk { visitor.enter_node(kind); visitor.visit_span(&it.span); visitor.visit_ts_type_name(&it.expression); - if let Some(type_parameters) = &it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } @@ -3770,8 +3770,8 @@ pub mod walk { visitor.enter_node(kind); visitor.visit_span(&it.span); visitor.visit_expression(&it.expression); - if let Some(type_parameters) = &it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } @@ -3884,8 +3884,8 @@ pub mod walk { visitor.enter_node(kind); visitor.visit_span(&it.span); visitor.visit_ts_type_query_expr_name(&it.expr_name); - if let Some(type_parameters) = &it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } diff --git a/crates/oxc_ast_visit/src/generated/visit_mut.rs b/crates/oxc_ast_visit/src/generated/visit_mut.rs index b932b53fb7195..09dc6f1ededac 100644 --- a/crates/oxc_ast_visit/src/generated/visit_mut.rs +++ b/crates/oxc_ast_visit/src/generated/visit_mut.rs @@ -1586,8 +1586,8 @@ pub mod walk_mut { visitor.visit_span(&mut it.span); visitor.visit_expression(&mut it.tag); visitor.visit_template_literal(&mut it.quasi); - if let Some(type_parameters) = &mut it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &mut it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } @@ -1661,8 +1661,8 @@ pub mod walk_mut { visitor.enter_node(kind); visitor.visit_span(&mut it.span); visitor.visit_expression(&mut it.callee); - if let Some(type_parameters) = &mut it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &mut it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.visit_arguments(&mut it.arguments); visitor.leave_node(kind); @@ -1675,8 +1675,8 @@ pub mod walk_mut { visitor.visit_span(&mut it.span); visitor.visit_expression(&mut it.callee); visitor.visit_arguments(&mut it.arguments); - if let Some(type_parameters) = &mut it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &mut it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } @@ -2649,8 +2649,8 @@ pub mod walk_mut { if let Some(super_class) = &mut it.super_class { visitor.visit_expression(super_class); } - if let Some(super_type_parameters) = &mut it.super_type_parameters { - visitor.visit_ts_type_parameter_instantiation(super_type_parameters); + if let Some(super_type_arguments) = &mut it.super_type_arguments { + visitor.visit_ts_type_parameter_instantiation(super_type_arguments); } if let Some(implements) = &mut it.implements { visitor.visit_ts_class_implementses(implements); @@ -3083,8 +3083,8 @@ pub mod walk_mut { visitor.visit_span(&mut it.span); visitor.visit_jsx_element_name(&mut it.name); visitor.visit_jsx_attribute_items(&mut it.attributes); - if let Some(type_parameters) = &mut it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &mut it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } @@ -3717,8 +3717,8 @@ pub mod walk_mut { visitor.enter_node(kind); visitor.visit_span(&mut it.span); visitor.visit_ts_type_name(&mut it.type_name); - if let Some(type_parameters) = &mut it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &mut it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } @@ -3816,8 +3816,8 @@ pub mod walk_mut { visitor.enter_node(kind); visitor.visit_span(&mut it.span); visitor.visit_ts_type_name(&mut it.expression); - if let Some(type_parameters) = &mut it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &mut it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } @@ -3976,8 +3976,8 @@ pub mod walk_mut { visitor.enter_node(kind); visitor.visit_span(&mut it.span); visitor.visit_expression(&mut it.expression); - if let Some(type_parameters) = &mut it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &mut it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } @@ -4093,8 +4093,8 @@ pub mod walk_mut { visitor.enter_node(kind); visitor.visit_span(&mut it.span); visitor.visit_ts_type_query_expr_name(&mut it.expr_name); - if let Some(type_parameters) = &mut it.type_parameters { - visitor.visit_ts_type_parameter_instantiation(type_parameters); + if let Some(type_arguments) = &mut it.type_arguments { + visitor.visit_ts_type_parameter_instantiation(type_arguments); } visitor.leave_node(kind); } diff --git a/crates/oxc_codegen/src/gen.rs b/crates/oxc_codegen/src/gen.rs index 629a19fec65be..7f5b295f43bfd 100644 --- a/crates/oxc_codegen/src/gen.rs +++ b/crates/oxc_codegen/src/gen.rs @@ -1451,7 +1451,7 @@ impl GenExpr for CallExpression<'_> { if self.optional { p.print_str("?."); } - if let Some(type_parameters) = &self.type_parameters { + if let Some(type_parameters) = &self.type_arguments { type_parameters.print(p, ctx); } p.print_ascii_byte(b'('); @@ -2156,7 +2156,7 @@ impl Gen for TaggedTemplateExpression<'_> { fn r#gen(&self, p: &mut Codegen, ctx: Context) { p.add_source_mapping(self.span); self.tag.print_expr(p, Precedence::Postfix, Context::empty()); - if let Some(type_parameters) = &self.type_parameters { + if let Some(type_parameters) = &self.type_arguments { type_parameters.print(p, ctx); } self.quasi.print(p, ctx); @@ -2337,7 +2337,7 @@ impl Gen for Class<'_> { if let Some(super_class) = self.super_class.as_ref() { p.print_str(" extends "); super_class.print_expr(p, Precedence::Postfix, Context::empty()); - if let Some(super_type_parameters) = &self.super_type_parameters { + if let Some(super_type_parameters) = &self.super_type_arguments { super_type_parameters.print(p, ctx); } } @@ -2983,7 +2983,7 @@ impl Gen for Decorator<'_> { impl Gen for TSClassImplements<'_> { fn r#gen(&self, p: &mut Codegen, ctx: Context) { self.expression.print(p, ctx); - if let Some(type_parameters) = self.type_parameters.as_ref() { + if let Some(type_parameters) = self.type_arguments.as_ref() { type_parameters.print(p, ctx); } } @@ -3259,7 +3259,7 @@ impl Gen for TSTypePredicate<'_> { impl Gen for TSTypeReference<'_> { fn r#gen(&self, p: &mut Codegen, ctx: Context) { self.type_name.print(p, ctx); - if let Some(type_parameters) = &self.type_parameters { + if let Some(type_parameters) = &self.type_arguments { type_parameters.print(p, ctx); } } @@ -3530,7 +3530,7 @@ impl Gen for TSTypeQuery<'_> { fn r#gen(&self, p: &mut Codegen, ctx: Context) { p.print_str("typeof "); self.expr_name.print(p, ctx); - if let Some(type_params) = &self.type_parameters { + if let Some(type_params) = &self.type_arguments { type_params.print(p, ctx); } } @@ -3771,7 +3771,7 @@ impl Gen for TSInterfaceDeclaration<'_> { impl Gen for TSInterfaceHeritage<'_> { fn r#gen(&self, p: &mut Codegen, ctx: Context) { self.expression.print_expr(p, Precedence::Call, ctx); - if let Some(type_parameters) = &self.type_parameters { + if let Some(type_parameters) = &self.type_arguments { type_parameters.print(p, ctx); } } diff --git a/crates/oxc_isolated_declarations/src/class.rs b/crates/oxc_isolated_declarations/src/class.rs index e651026f33756..f1637e0aead27 100644 --- a/crates/oxc_isolated_declarations/src/class.rs +++ b/crates/oxc_isolated_declarations/src/class.rs @@ -558,7 +558,7 @@ impl<'a> IsolatedDeclarations<'a> { decl.id.clone_in(self.ast.allocator), decl.type_parameters.clone_in(self.ast.allocator), decl.super_class.clone_in(self.ast.allocator), - decl.super_type_parameters.clone_in(self.ast.allocator), + decl.super_type_arguments.clone_in(self.ast.allocator), decl.implements.clone_in(self.ast.allocator), body, decl.r#abstract, diff --git a/crates/oxc_isolated_declarations/src/scope.rs b/crates/oxc_isolated_declarations/src/scope.rs index 81fb0b5fb415d..8f71c541939ef 100644 --- a/crates/oxc_isolated_declarations/src/scope.rs +++ b/crates/oxc_isolated_declarations/src/scope.rs @@ -118,7 +118,7 @@ impl<'a> Visit<'a> for ScopeTree<'a> { self.add_reference(ident.name, KindFlags::Value); // `typeof Type` // ^^^^^^^^^^^ - if let Some(type_parameters) = &ty.type_parameters { + if let Some(type_parameters) = &ty.type_arguments { self.visit_ts_type_parameter_instantiation(type_parameters); } } else { diff --git a/crates/oxc_linter/src/rules/eslint/no_array_constructor.rs b/crates/oxc_linter/src/rules/eslint/no_array_constructor.rs index bd5fba0220603..98cec84d056e7 100644 --- a/crates/oxc_linter/src/rules/eslint/no_array_constructor.rs +++ b/crates/oxc_linter/src/rules/eslint/no_array_constructor.rs @@ -57,14 +57,14 @@ impl Rule for NoArrayConstructor { call_expr.span, &call_expr.callee, &call_expr.arguments, - &call_expr.type_parameters, + &call_expr.type_arguments, call_expr.optional, ), AstKind::NewExpression(new_expr) => ( new_expr.span, &new_expr.callee, &new_expr.arguments, - &new_expr.type_parameters, + &new_expr.type_arguments, false, ), _ => { diff --git a/crates/oxc_linter/src/rules/eslint/no_object_constructor.rs b/crates/oxc_linter/src/rules/eslint/no_object_constructor.rs index 209c8be22359c..6f2192a0fee8a 100644 --- a/crates/oxc_linter/src/rules/eslint/no_object_constructor.rs +++ b/crates/oxc_linter/src/rules/eslint/no_object_constructor.rs @@ -47,14 +47,11 @@ declare_oxc_lint!( impl Rule for NoObjectConstructor { fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { let (span, callee, arguments, type_parameters) = match node.kind() { - AstKind::CallExpression(call_expr) => ( - call_expr.span, - &call_expr.callee, - &call_expr.arguments, - &call_expr.type_parameters, - ), + AstKind::CallExpression(call_expr) => { + (call_expr.span, &call_expr.callee, &call_expr.arguments, &call_expr.type_arguments) + } AstKind::NewExpression(new_expr) => { - (new_expr.span, &new_expr.callee, &new_expr.arguments, &new_expr.type_parameters) + (new_expr.span, &new_expr.callee, &new_expr.arguments, &new_expr.type_arguments) } _ => { return; diff --git a/crates/oxc_linter/src/rules/eslint/no_unexpected_multiline.rs b/crates/oxc_linter/src/rules/eslint/no_unexpected_multiline.rs index 1c9151a33d1f4..58d08991f319a 100644 --- a/crates/oxc_linter/src/rules/eslint/no_unexpected_multiline.rs +++ b/crates/oxc_linter/src/rules/eslint/no_unexpected_multiline.rs @@ -117,7 +117,7 @@ impl Rule for NoUnexpectedMultiline { return; } - let start = if let Some(generics) = &call_expr.type_parameters { + let start = if let Some(generics) = &call_expr.type_arguments { generics.span.end } else { call_expr.callee.span().end @@ -153,7 +153,7 @@ impl Rule for NoUnexpectedMultiline { } } AstKind::TaggedTemplateExpression(tagged_template_expr) => { - let start = if let Some(generics) = &tagged_template_expr.type_parameters { + let start = if let Some(generics) = &tagged_template_expr.type_arguments { generics.span.end } else { tagged_template_expr.tag.span().end diff --git a/crates/oxc_linter/src/rules/jest/no_untyped_mock_factory.rs b/crates/oxc_linter/src/rules/jest/no_untyped_mock_factory.rs index 09a99e86ecc9c..97efba85a8223 100644 --- a/crates/oxc_linter/src/rules/jest/no_untyped_mock_factory.rs +++ b/crates/oxc_linter/src/rules/jest/no_untyped_mock_factory.rs @@ -124,7 +124,7 @@ impl NoUntypedMockFactory { return; }; - if call_expr.type_parameters.is_some() || Self::has_return_type(factory_node) { + if call_expr.type_arguments.is_some() || Self::has_return_type(factory_node) { return; } diff --git a/crates/oxc_linter/src/rules/typescript/array_type.rs b/crates/oxc_linter/src/rules/typescript/array_type.rs index 999335a806a2f..49972c3eca9ab 100644 --- a/crates/oxc_linter/src/rules/typescript/array_type.rs +++ b/crates/oxc_linter/src/rules/typescript/array_type.rs @@ -250,7 +250,7 @@ fn check_and_report_error_reference( { check_and_report_error_array(default_config, readonly_config, ts_type_reference, ctx); } else if ident_ref_type_name.name.as_str() == "Promise" { - if let Some(type_params) = &ts_type_reference.type_parameters { + if let Some(type_params) = &ts_type_reference.type_arguments { if type_params.params.len() == 1 { if let Some(type_param) = type_params.params.first() { if let TSType::TSArrayType(array_type) = &type_param { @@ -314,7 +314,7 @@ fn check_and_report_error_array( } let readonly_prefix: &'static str = if is_readonly_array_type { "readonly " } else { "" }; let class_name = if is_readonly_array_type { "ReadonlyArray" } else { "Array" }; - let type_params = &ts_type_reference.type_parameters; + let type_params = &ts_type_reference.type_arguments; if type_params.is_none() || type_params.as_ref().unwrap().params.len() == 0 { let diagnostic = match config { @@ -400,16 +400,16 @@ fn is_simple_type(ts_type: &TSType) -> bool { TSType::TSTypeReference(node) => { let type_name = TSTypeName::get_identifier_reference(&node.type_name); if type_name.name.as_str() == "Array" { - if node.type_parameters.is_none() { + if node.type_arguments.is_none() { return true; } - if node.type_parameters.as_ref().unwrap().params.len() == 1 { + if node.type_arguments.as_ref().unwrap().params.len() == 1 { return is_simple_type( - node.type_parameters.as_ref().unwrap().params.first().unwrap(), + node.type_arguments.as_ref().unwrap().params.first().unwrap(), ); } } else { - if node.type_parameters.is_some() { + if node.type_arguments.is_some() { return false; } if let TSTypeName::IdentifierReference(_) = &node.type_name { diff --git a/crates/oxc_linter/src/rules/typescript/consistent_generic_constructors.rs b/crates/oxc_linter/src/rules/typescript/consistent_generic_constructors.rs index 8671c13c029c6..7d97ff5167847 100644 --- a/crates/oxc_linter/src/rules/typescript/consistent_generic_constructors.rs +++ b/crates/oxc_linter/src/rules/typescript/consistent_generic_constructors.rs @@ -155,7 +155,7 @@ impl ConsistentGenericConstructors { if matches!(self.0.option, PreferGenericType::TypeAnnotation) { if type_annotation.is_none() { - if let Some(type_arguments) = &new_expression.type_parameters { + if let Some(type_arguments) = &new_expression.type_arguments { ctx.diagnostic(consistent_generic_constructors_diagnostic_prefer_annotation( type_arguments.span, )); @@ -166,7 +166,7 @@ impl ConsistentGenericConstructors { if let Some(type_arguments) = &type_annotation { if has_type_parameters(&type_arguments.type_annotation) - && new_expression.type_parameters.is_none() + && new_expression.type_arguments.is_none() { ctx.diagnostic(consistent_generic_constructors_diagnostic_prefer_constructor( type_arguments.span, @@ -178,7 +178,7 @@ impl ConsistentGenericConstructors { fn has_type_parameters(ts_type: &TSType) -> bool { match ts_type { - TSType::TSTypeReference(type_ref) => type_ref.type_parameters.is_some(), + TSType::TSTypeReference(type_ref) => type_ref.type_arguments.is_some(), _ => false, } } diff --git a/crates/oxc_linter/src/rules/typescript/consistent_indexed_object_style.rs b/crates/oxc_linter/src/rules/typescript/consistent_indexed_object_style.rs index dc19f813881e0..f000a503d3f68 100644 --- a/crates/oxc_linter/src/rules/typescript/consistent_indexed_object_style.rs +++ b/crates/oxc_linter/src/rules/typescript/consistent_indexed_object_style.rs @@ -217,13 +217,13 @@ impl Rule for ConsistentIndexedObjectStyle { return; } - let Some(params) = &tref.type_parameters else { return }; + let Some(params) = &tref.type_arguments else { return }; if params.params.len() != 2 { return; } if let Some(TSType::TSStringKeyword(first)) = - &tref.type_parameters.as_ref().and_then(|params| params.params.first()) + &tref.type_arguments.as_ref().and_then(|params| params.params.first()) { ctx.diagnostic_with_fix( consistent_indexed_object_style_diagnostic( diff --git a/crates/oxc_linter/src/rules/unicorn/consistent_date_clone.rs b/crates/oxc_linter/src/rules/unicorn/consistent_date_clone.rs index 33b3789d9f03b..76fb77a67faca 100644 --- a/crates/oxc_linter/src/rules/unicorn/consistent_date_clone.rs +++ b/crates/oxc_linter/src/rules/unicorn/consistent_date_clone.rs @@ -52,7 +52,7 @@ impl Rule for ConsistentDateClone { if !(expr.callee.is_specific_id("Date") && expr.arguments.len() == 1 - && expr.type_parameters.is_none()) + && expr.type_arguments.is_none()) { return; } diff --git a/crates/oxc_prettier/src/format/jsx.rs b/crates/oxc_prettier/src/format/jsx.rs index 45df74ff8fdf6..be495c3b6a079 100644 --- a/crates/oxc_prettier/src/format/jsx.rs +++ b/crates/oxc_prettier/src/format/jsx.rs @@ -169,7 +169,7 @@ impl<'a> Format<'a> for JSXOpeningElement<'a> { parts.push(text!("<")); parts.push(self.name.format(p)); - if let Some(type_parameters) = &self.type_parameters { + if let Some(type_parameters) = &self.type_arguments { parts.push(type_parameters.format(p)); } diff --git a/crates/oxc_prettier/src/format/print/assignment.rs b/crates/oxc_prettier/src/format/print/assignment.rs index bbb2c9b61a30b..9f08131eb3612 100644 --- a/crates/oxc_prettier/src/format/print/assignment.rs +++ b/crates/oxc_prettier/src/format/print/assignment.rs @@ -340,7 +340,7 @@ fn is_poorly_breakable_member_or_call_chain<'a>(p: &Prettier<'a>, expr: &Express return false; } - if let Some(type_parameters) = &call_expression.type_parameters { + if let Some(type_parameters) = &call_expression.type_arguments { return is_complex_type_arguments(type_parameters); } } diff --git a/crates/oxc_prettier/src/format/print/call_expression.rs b/crates/oxc_prettier/src/format/print/call_expression.rs index 939fe59fa751e..130432f4da4eb 100644 --- a/crates/oxc_prettier/src/format/print/call_expression.rs +++ b/crates/oxc_prettier/src/format/print/call_expression.rs @@ -52,8 +52,8 @@ impl<'a> CallExpressionLike<'a, '_> { fn type_parameters(&self) -> Option<&oxc_allocator::Box<'a, TSTypeParameterInstantiation<'a>>> { match self { - CallExpressionLike::CallExpression(call) => call.type_parameters.as_ref(), - CallExpressionLike::NewExpression(new) => new.type_parameters.as_ref(), + CallExpressionLike::CallExpression(call) => call.type_arguments.as_ref(), + CallExpressionLike::NewExpression(new) => new.type_arguments.as_ref(), CallExpressionLike::V8Intrinsic(_) => None, } } diff --git a/crates/oxc_prettier/src/format/print/class.rs b/crates/oxc_prettier/src/format/print/class.rs index e393f13c81dfe..1ef97303e9669 100644 --- a/crates/oxc_prettier/src/format/print/class.rs +++ b/crates/oxc_prettier/src/format/print/class.rs @@ -29,7 +29,7 @@ pub fn print_class<'a>(p: &mut Prettier<'a>, class: &Class<'a>) -> Doc<'a> { extend_parts.push(text!("extends ")); extend_parts.push(super_class.format(p)); - if let Some(super_type_parameters) = &class.super_type_parameters { + if let Some(super_type_parameters) = &class.super_type_arguments { extend_parts.push(super_type_parameters.format(p)); } diff --git a/crates/oxc_prettier/src/format/print/template_literal.rs b/crates/oxc_prettier/src/format/print/template_literal.rs index 3d0af26cd5b63..88b321ae7d818 100644 --- a/crates/oxc_prettier/src/format/print/template_literal.rs +++ b/crates/oxc_prettier/src/format/print/template_literal.rs @@ -72,7 +72,7 @@ pub fn print_tagged_template_literal<'a>( let mut parts = Vec::new_in(p.allocator); parts.push(tagged_template_literal.tag.format(p)); - if let Some(type_parameters) = &tagged_template_literal.type_parameters { + if let Some(type_parameters) = &tagged_template_literal.type_arguments { parts.push(type_parameters.format(p)); } parts.push(line_suffix_boundary!()); diff --git a/crates/oxc_prettier/src/format/typescript.rs b/crates/oxc_prettier/src/format/typescript.rs index 441708bd12e8d..785058d93b853 100644 --- a/crates/oxc_prettier/src/format/typescript.rs +++ b/crates/oxc_prettier/src/format/typescript.rs @@ -473,7 +473,7 @@ impl<'a> Format<'a> for TSTypeQuery<'a> { } } - if let Some(type_parameters) = &self.type_parameters { + if let Some(type_parameters) = &self.type_arguments { parts.push(type_parameters.format(p)); } @@ -485,7 +485,7 @@ impl<'a> Format<'a> for TSTypeReference<'a> { fn format(&self, p: &mut Prettier<'a>) -> Doc<'a> { let mut parts = Vec::new_in(p.allocator); parts.push(self.type_name.format(p)); - if let Some(params) = &self.type_parameters { + if let Some(params) = &self.type_arguments { parts.push(params.format(p)); } array!(p, parts) @@ -568,7 +568,7 @@ impl<'a> Format<'a> for TSInterfaceDeclaration<'a> { } extends_parts.push(extend.expression.format(p)); - if let Some(type_parameters) = &extend.type_parameters { + if let Some(type_parameters) = &extend.type_arguments { extends_parts.push(type_parameters.format(p)); } } @@ -897,7 +897,7 @@ impl<'a> Format<'a> for TSClassImplements<'a> { parts.push(self.expression.format(p)); - if let Some(type_parameters) = &self.type_parameters { + if let Some(type_parameters) = &self.type_arguments { parts.push(type_parameters.format(p)); } diff --git a/crates/oxc_semantic/src/builder.rs b/crates/oxc_semantic/src/builder.rs index 394307c1c753d..bb9ec3db8fc14 100644 --- a/crates/oxc_semantic/src/builder.rs +++ b/crates/oxc_semantic/src/builder.rs @@ -687,7 +687,7 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> { if let Some(super_class) = &class.super_class { self.visit_expression(super_class); } - if let Some(super_type_parameters) = &class.super_type_parameters { + if let Some(super_type_parameters) = &class.super_type_arguments { self.visit_ts_type_parameter_instantiation(super_type_parameters); } if let Some(implements) = &class.implements { diff --git a/crates/oxc_transformer/src/typescript/annotations.rs b/crates/oxc_transformer/src/typescript/annotations.rs index dd07b98a2db91..0d5800348f604 100644 --- a/crates/oxc_transformer/src/typescript/annotations.rs +++ b/crates/oxc_transformer/src/typescript/annotations.rs @@ -198,7 +198,7 @@ impl<'a> Traverse<'a> for TypeScriptAnnotations<'a, '_> { } fn enter_call_expression(&mut self, expr: &mut CallExpression<'a>, _ctx: &mut TraverseCtx<'a>) { - expr.type_parameters = None; + expr.type_arguments = None; } fn enter_chain_element(&mut self, element: &mut ChainElement<'a>, ctx: &mut TraverseCtx<'a>) { @@ -218,7 +218,7 @@ impl<'a> Traverse<'a> for TypeScriptAnnotations<'a, '_> { fn enter_class(&mut self, class: &mut Class<'a>, _ctx: &mut TraverseCtx<'a>) { class.type_parameters = None; - class.super_type_parameters = None; + class.super_type_arguments = None; class.implements = None; class.r#abstract = false; } @@ -315,7 +315,7 @@ impl<'a> Traverse<'a> for TypeScriptAnnotations<'a, '_> { elem: &mut JSXOpeningElement<'a>, _ctx: &mut TraverseCtx<'a>, ) { - elem.type_parameters = None; + elem.type_arguments = None; } fn enter_method_definition( @@ -377,7 +377,7 @@ impl<'a> Traverse<'a> for TypeScriptAnnotations<'a, '_> { } fn enter_new_expression(&mut self, expr: &mut NewExpression<'a>, _ctx: &mut TraverseCtx<'a>) { - expr.type_parameters = None; + expr.type_arguments = None; } fn enter_property_definition( @@ -538,7 +538,7 @@ impl<'a> Traverse<'a> for TypeScriptAnnotations<'a, '_> { expr: &mut TaggedTemplateExpression<'a>, _ctx: &mut TraverseCtx<'a>, ) { - expr.type_parameters = None; + expr.type_arguments = None; } fn enter_jsx_element(&mut self, _elem: &mut JSXElement<'a>, _ctx: &mut TraverseCtx<'a>) { diff --git a/crates/oxc_traverse/src/generated/ancestor.rs b/crates/oxc_traverse/src/generated/ancestor.rs index b36cdbcf5a3f9..142f0669a8745 100644 --- a/crates/oxc_traverse/src/generated/ancestor.rs +++ b/crates/oxc_traverse/src/generated/ancestor.rs @@ -32,7 +32,7 @@ pub(crate) enum AncestorType { TemplateLiteralExpressions = 9, TaggedTemplateExpressionTag = 10, TaggedTemplateExpressionQuasi = 11, - TaggedTemplateExpressionTypeParameters = 12, + TaggedTemplateExpressionTypeArguments = 12, ComputedMemberExpressionObject = 13, ComputedMemberExpressionExpression = 14, StaticMemberExpressionObject = 15, @@ -40,11 +40,11 @@ pub(crate) enum AncestorType { PrivateFieldExpressionObject = 17, PrivateFieldExpressionField = 18, CallExpressionCallee = 19, - CallExpressionTypeParameters = 20, + CallExpressionTypeArguments = 20, CallExpressionArguments = 21, NewExpressionCallee = 22, NewExpressionArguments = 23, - NewExpressionTypeParameters = 24, + NewExpressionTypeArguments = 24, MetaPropertyMeta = 25, MetaPropertyProperty = 26, SpreadElementArgument = 27, @@ -149,7 +149,7 @@ pub(crate) enum AncestorType { ClassId = 126, ClassTypeParameters = 127, ClassSuperClass = 128, - ClassSuperTypeParameters = 129, + ClassSuperTypeArguments = 129, ClassImplements = 130, ClassBody = 131, ClassBodyBody = 132, @@ -196,7 +196,7 @@ pub(crate) enum AncestorType { JSXElementChildren = 173, JSXOpeningElementName = 174, JSXOpeningElementAttributes = 175, - JSXOpeningElementTypeParameters = 176, + JSXOpeningElementTypeArguments = 176, JSXClosingElementName = 177, JSXFragmentOpeningFragment = 178, JSXFragmentClosingFragment = 179, @@ -234,7 +234,7 @@ pub(crate) enum AncestorType { TSOptionalTypeTypeAnnotation = 211, TSRestTypeTypeAnnotation = 212, TSTypeReferenceTypeName = 213, - TSTypeReferenceTypeParameters = 214, + TSTypeReferenceTypeArguments = 214, TSQualifiedNameLeft = 215, TSQualifiedNameRight = 216, TSTypeParameterInstantiationParams = 217, @@ -246,7 +246,7 @@ pub(crate) enum AncestorType { TSTypeAliasDeclarationTypeParameters = 223, TSTypeAliasDeclarationTypeAnnotation = 224, TSClassImplementsExpression = 225, - TSClassImplementsTypeParameters = 226, + TSClassImplementsTypeArguments = 226, TSInterfaceDeclarationId = 227, TSInterfaceDeclarationExtends = 228, TSInterfaceDeclarationTypeParameters = 229, @@ -270,7 +270,7 @@ pub(crate) enum AncestorType { TSConstructSignatureDeclarationReturnType = 247, TSIndexSignatureNameTypeAnnotation = 248, TSInterfaceHeritageExpression = 249, - TSInterfaceHeritageTypeParameters = 250, + TSInterfaceHeritageTypeArguments = 250, TSTypePredicateParameterName = 251, TSTypePredicateTypeAnnotation = 252, TSModuleDeclarationId = 253, @@ -280,7 +280,7 @@ pub(crate) enum AncestorType { TSTypeLiteralMembers = 257, TSInferTypeTypeParameter = 258, TSTypeQueryExprName = 259, - TSTypeQueryTypeParameters = 260, + TSTypeQueryTypeArguments = 260, TSImportTypeArgument = 261, TSImportTypeOptions = 262, TSImportTypeQualifier = 263, @@ -360,8 +360,8 @@ pub enum Ancestor<'a, 't> { AncestorType::TaggedTemplateExpressionTag as u16, TaggedTemplateExpressionQuasi(TaggedTemplateExpressionWithoutQuasi<'a, 't>) = AncestorType::TaggedTemplateExpressionQuasi as u16, - TaggedTemplateExpressionTypeParameters(TaggedTemplateExpressionWithoutTypeParameters<'a, 't>) = - AncestorType::TaggedTemplateExpressionTypeParameters as u16, + TaggedTemplateExpressionTypeArguments(TaggedTemplateExpressionWithoutTypeArguments<'a, 't>) = + AncestorType::TaggedTemplateExpressionTypeArguments as u16, ComputedMemberExpressionObject(ComputedMemberExpressionWithoutObject<'a, 't>) = AncestorType::ComputedMemberExpressionObject as u16, ComputedMemberExpressionExpression(ComputedMemberExpressionWithoutExpression<'a, 't>) = @@ -376,16 +376,16 @@ pub enum Ancestor<'a, 't> { AncestorType::PrivateFieldExpressionField as u16, CallExpressionCallee(CallExpressionWithoutCallee<'a, 't>) = AncestorType::CallExpressionCallee as u16, - CallExpressionTypeParameters(CallExpressionWithoutTypeParameters<'a, 't>) = - AncestorType::CallExpressionTypeParameters as u16, + CallExpressionTypeArguments(CallExpressionWithoutTypeArguments<'a, 't>) = + AncestorType::CallExpressionTypeArguments as u16, CallExpressionArguments(CallExpressionWithoutArguments<'a, 't>) = AncestorType::CallExpressionArguments as u16, NewExpressionCallee(NewExpressionWithoutCallee<'a, 't>) = AncestorType::NewExpressionCallee as u16, NewExpressionArguments(NewExpressionWithoutArguments<'a, 't>) = AncestorType::NewExpressionArguments as u16, - NewExpressionTypeParameters(NewExpressionWithoutTypeParameters<'a, 't>) = - AncestorType::NewExpressionTypeParameters as u16, + NewExpressionTypeArguments(NewExpressionWithoutTypeArguments<'a, 't>) = + AncestorType::NewExpressionTypeArguments as u16, MetaPropertyMeta(MetaPropertyWithoutMeta<'a, 't>) = AncestorType::MetaPropertyMeta as u16, MetaPropertyProperty(MetaPropertyWithoutProperty<'a, 't>) = AncestorType::MetaPropertyProperty as u16, @@ -565,8 +565,8 @@ pub enum Ancestor<'a, 't> { ClassTypeParameters(ClassWithoutTypeParameters<'a, 't>) = AncestorType::ClassTypeParameters as u16, ClassSuperClass(ClassWithoutSuperClass<'a, 't>) = AncestorType::ClassSuperClass as u16, - ClassSuperTypeParameters(ClassWithoutSuperTypeParameters<'a, 't>) = - AncestorType::ClassSuperTypeParameters as u16, + ClassSuperTypeArguments(ClassWithoutSuperTypeArguments<'a, 't>) = + AncestorType::ClassSuperTypeArguments as u16, ClassImplements(ClassWithoutImplements<'a, 't>) = AncestorType::ClassImplements as u16, ClassBody(ClassWithoutBody<'a, 't>) = AncestorType::ClassBody as u16, ClassBodyBody(ClassBodyWithoutBody<'a, 't>) = AncestorType::ClassBodyBody as u16, @@ -653,8 +653,8 @@ pub enum Ancestor<'a, 't> { AncestorType::JSXOpeningElementName as u16, JSXOpeningElementAttributes(JSXOpeningElementWithoutAttributes<'a, 't>) = AncestorType::JSXOpeningElementAttributes as u16, - JSXOpeningElementTypeParameters(JSXOpeningElementWithoutTypeParameters<'a, 't>) = - AncestorType::JSXOpeningElementTypeParameters as u16, + JSXOpeningElementTypeArguments(JSXOpeningElementWithoutTypeArguments<'a, 't>) = + AncestorType::JSXOpeningElementTypeArguments as u16, JSXClosingElementName(JSXClosingElementWithoutName<'a, 't>) = AncestorType::JSXClosingElementName as u16, JSXFragmentOpeningFragment(JSXFragmentWithoutOpeningFragment<'a, 't>) = @@ -725,8 +725,8 @@ pub enum Ancestor<'a, 't> { AncestorType::TSRestTypeTypeAnnotation as u16, TSTypeReferenceTypeName(TSTypeReferenceWithoutTypeName<'a, 't>) = AncestorType::TSTypeReferenceTypeName as u16, - TSTypeReferenceTypeParameters(TSTypeReferenceWithoutTypeParameters<'a, 't>) = - AncestorType::TSTypeReferenceTypeParameters as u16, + TSTypeReferenceTypeArguments(TSTypeReferenceWithoutTypeArguments<'a, 't>) = + AncestorType::TSTypeReferenceTypeArguments as u16, TSQualifiedNameLeft(TSQualifiedNameWithoutLeft<'a, 't>) = AncestorType::TSQualifiedNameLeft as u16, TSQualifiedNameRight(TSQualifiedNameWithoutRight<'a, 't>) = @@ -749,8 +749,8 @@ pub enum Ancestor<'a, 't> { AncestorType::TSTypeAliasDeclarationTypeAnnotation as u16, TSClassImplementsExpression(TSClassImplementsWithoutExpression<'a, 't>) = AncestorType::TSClassImplementsExpression as u16, - TSClassImplementsTypeParameters(TSClassImplementsWithoutTypeParameters<'a, 't>) = - AncestorType::TSClassImplementsTypeParameters as u16, + TSClassImplementsTypeArguments(TSClassImplementsWithoutTypeArguments<'a, 't>) = + AncestorType::TSClassImplementsTypeArguments as u16, TSInterfaceDeclarationId(TSInterfaceDeclarationWithoutId<'a, 't>) = AncestorType::TSInterfaceDeclarationId as u16, TSInterfaceDeclarationExtends(TSInterfaceDeclarationWithoutExtends<'a, 't>) = @@ -800,8 +800,8 @@ pub enum Ancestor<'a, 't> { AncestorType::TSIndexSignatureNameTypeAnnotation as u16, TSInterfaceHeritageExpression(TSInterfaceHeritageWithoutExpression<'a, 't>) = AncestorType::TSInterfaceHeritageExpression as u16, - TSInterfaceHeritageTypeParameters(TSInterfaceHeritageWithoutTypeParameters<'a, 't>) = - AncestorType::TSInterfaceHeritageTypeParameters as u16, + TSInterfaceHeritageTypeArguments(TSInterfaceHeritageWithoutTypeArguments<'a, 't>) = + AncestorType::TSInterfaceHeritageTypeArguments as u16, TSTypePredicateParameterName(TSTypePredicateWithoutParameterName<'a, 't>) = AncestorType::TSTypePredicateParameterName as u16, TSTypePredicateTypeAnnotation(TSTypePredicateWithoutTypeAnnotation<'a, 't>) = @@ -819,8 +819,8 @@ pub enum Ancestor<'a, 't> { AncestorType::TSInferTypeTypeParameter as u16, TSTypeQueryExprName(TSTypeQueryWithoutExprName<'a, 't>) = AncestorType::TSTypeQueryExprName as u16, - TSTypeQueryTypeParameters(TSTypeQueryWithoutTypeParameters<'a, 't>) = - AncestorType::TSTypeQueryTypeParameters as u16, + TSTypeQueryTypeArguments(TSTypeQueryWithoutTypeArguments<'a, 't>) = + AncestorType::TSTypeQueryTypeArguments as u16, TSImportTypeArgument(TSImportTypeWithoutArgument<'a, 't>) = AncestorType::TSImportTypeArgument as u16, TSImportTypeOptions(TSImportTypeWithoutOptions<'a, 't>) = @@ -930,7 +930,7 @@ impl<'a, 't> Ancestor<'a, 't> { self, Self::TaggedTemplateExpressionTag(_) | Self::TaggedTemplateExpressionQuasi(_) - | Self::TaggedTemplateExpressionTypeParameters(_) + | Self::TaggedTemplateExpressionTypeArguments(_) ) } @@ -960,7 +960,7 @@ impl<'a, 't> Ancestor<'a, 't> { matches!( self, Self::CallExpressionCallee(_) - | Self::CallExpressionTypeParameters(_) + | Self::CallExpressionTypeArguments(_) | Self::CallExpressionArguments(_) ) } @@ -971,7 +971,7 @@ impl<'a, 't> Ancestor<'a, 't> { self, Self::NewExpressionCallee(_) | Self::NewExpressionArguments(_) - | Self::NewExpressionTypeParameters(_) + | Self::NewExpressionTypeArguments(_) ) } @@ -1307,7 +1307,7 @@ impl<'a, 't> Ancestor<'a, 't> { | Self::ClassId(_) | Self::ClassTypeParameters(_) | Self::ClassSuperClass(_) - | Self::ClassSuperTypeParameters(_) + | Self::ClassSuperTypeArguments(_) | Self::ClassImplements(_) | Self::ClassBody(_) ) @@ -1451,7 +1451,7 @@ impl<'a, 't> Ancestor<'a, 't> { self, Self::JSXOpeningElementName(_) | Self::JSXOpeningElementAttributes(_) - | Self::JSXOpeningElementTypeParameters(_) + | Self::JSXOpeningElementTypeArguments(_) ) } @@ -1591,7 +1591,7 @@ impl<'a, 't> Ancestor<'a, 't> { #[inline] pub fn is_ts_type_reference(self) -> bool { - matches!(self, Self::TSTypeReferenceTypeName(_) | Self::TSTypeReferenceTypeParameters(_)) + matches!(self, Self::TSTypeReferenceTypeName(_) | Self::TSTypeReferenceTypeArguments(_)) } #[inline] @@ -1633,7 +1633,7 @@ impl<'a, 't> Ancestor<'a, 't> { pub fn is_ts_class_implements(self) -> bool { matches!( self, - Self::TSClassImplementsExpression(_) | Self::TSClassImplementsTypeParameters(_) + Self::TSClassImplementsExpression(_) | Self::TSClassImplementsTypeArguments(_) ) } @@ -1708,7 +1708,7 @@ impl<'a, 't> Ancestor<'a, 't> { pub fn is_ts_interface_heritage(self) -> bool { matches!( self, - Self::TSInterfaceHeritageExpression(_) | Self::TSInterfaceHeritageTypeParameters(_) + Self::TSInterfaceHeritageExpression(_) | Self::TSInterfaceHeritageTypeArguments(_) ) } @@ -1742,7 +1742,7 @@ impl<'a, 't> Ancestor<'a, 't> { #[inline] pub fn is_ts_type_query(self) -> bool { - matches!(self, Self::TSTypeQueryExprName(_) | Self::TSTypeQueryTypeParameters(_)) + matches!(self, Self::TSTypeQueryExprName(_) | Self::TSTypeQueryTypeArguments(_)) } #[inline] @@ -2233,7 +2233,7 @@ impl<'a, 't> GetAddress for Ancestor<'a, 't> { Self::TemplateLiteralExpressions(a) => a.address(), Self::TaggedTemplateExpressionTag(a) => a.address(), Self::TaggedTemplateExpressionQuasi(a) => a.address(), - Self::TaggedTemplateExpressionTypeParameters(a) => a.address(), + Self::TaggedTemplateExpressionTypeArguments(a) => a.address(), Self::ComputedMemberExpressionObject(a) => a.address(), Self::ComputedMemberExpressionExpression(a) => a.address(), Self::StaticMemberExpressionObject(a) => a.address(), @@ -2241,11 +2241,11 @@ impl<'a, 't> GetAddress for Ancestor<'a, 't> { Self::PrivateFieldExpressionObject(a) => a.address(), Self::PrivateFieldExpressionField(a) => a.address(), Self::CallExpressionCallee(a) => a.address(), - Self::CallExpressionTypeParameters(a) => a.address(), + Self::CallExpressionTypeArguments(a) => a.address(), Self::CallExpressionArguments(a) => a.address(), Self::NewExpressionCallee(a) => a.address(), Self::NewExpressionArguments(a) => a.address(), - Self::NewExpressionTypeParameters(a) => a.address(), + Self::NewExpressionTypeArguments(a) => a.address(), Self::MetaPropertyMeta(a) => a.address(), Self::MetaPropertyProperty(a) => a.address(), Self::SpreadElementArgument(a) => a.address(), @@ -2350,7 +2350,7 @@ impl<'a, 't> GetAddress for Ancestor<'a, 't> { Self::ClassId(a) => a.address(), Self::ClassTypeParameters(a) => a.address(), Self::ClassSuperClass(a) => a.address(), - Self::ClassSuperTypeParameters(a) => a.address(), + Self::ClassSuperTypeArguments(a) => a.address(), Self::ClassImplements(a) => a.address(), Self::ClassBody(a) => a.address(), Self::ClassBodyBody(a) => a.address(), @@ -2397,7 +2397,7 @@ impl<'a, 't> GetAddress for Ancestor<'a, 't> { Self::JSXElementChildren(a) => a.address(), Self::JSXOpeningElementName(a) => a.address(), Self::JSXOpeningElementAttributes(a) => a.address(), - Self::JSXOpeningElementTypeParameters(a) => a.address(), + Self::JSXOpeningElementTypeArguments(a) => a.address(), Self::JSXClosingElementName(a) => a.address(), Self::JSXFragmentOpeningFragment(a) => a.address(), Self::JSXFragmentClosingFragment(a) => a.address(), @@ -2435,7 +2435,7 @@ impl<'a, 't> GetAddress for Ancestor<'a, 't> { Self::TSOptionalTypeTypeAnnotation(a) => a.address(), Self::TSRestTypeTypeAnnotation(a) => a.address(), Self::TSTypeReferenceTypeName(a) => a.address(), - Self::TSTypeReferenceTypeParameters(a) => a.address(), + Self::TSTypeReferenceTypeArguments(a) => a.address(), Self::TSQualifiedNameLeft(a) => a.address(), Self::TSQualifiedNameRight(a) => a.address(), Self::TSTypeParameterInstantiationParams(a) => a.address(), @@ -2447,7 +2447,7 @@ impl<'a, 't> GetAddress for Ancestor<'a, 't> { Self::TSTypeAliasDeclarationTypeParameters(a) => a.address(), Self::TSTypeAliasDeclarationTypeAnnotation(a) => a.address(), Self::TSClassImplementsExpression(a) => a.address(), - Self::TSClassImplementsTypeParameters(a) => a.address(), + Self::TSClassImplementsTypeArguments(a) => a.address(), Self::TSInterfaceDeclarationId(a) => a.address(), Self::TSInterfaceDeclarationExtends(a) => a.address(), Self::TSInterfaceDeclarationTypeParameters(a) => a.address(), @@ -2471,7 +2471,7 @@ impl<'a, 't> GetAddress for Ancestor<'a, 't> { Self::TSConstructSignatureDeclarationReturnType(a) => a.address(), Self::TSIndexSignatureNameTypeAnnotation(a) => a.address(), Self::TSInterfaceHeritageExpression(a) => a.address(), - Self::TSInterfaceHeritageTypeParameters(a) => a.address(), + Self::TSInterfaceHeritageTypeArguments(a) => a.address(), Self::TSTypePredicateParameterName(a) => a.address(), Self::TSTypePredicateTypeAnnotation(a) => a.address(), Self::TSModuleDeclarationId(a) => a.address(), @@ -2481,7 +2481,7 @@ impl<'a, 't> GetAddress for Ancestor<'a, 't> { Self::TSTypeLiteralMembers(a) => a.address(), Self::TSInferTypeTypeParameter(a) => a.address(), Self::TSTypeQueryExprName(a) => a.address(), - Self::TSTypeQueryTypeParameters(a) => a.address(), + Self::TSTypeQueryTypeArguments(a) => a.address(), Self::TSImportTypeArgument(a) => a.address(), Self::TSImportTypeOptions(a) => a.address(), Self::TSImportTypeQualifier(a) => a.address(), @@ -2947,8 +2947,8 @@ pub(crate) const OFFSET_TAGGED_TEMPLATE_EXPRESSION_TAG: usize = offset_of!(TaggedTemplateExpression, tag); pub(crate) const OFFSET_TAGGED_TEMPLATE_EXPRESSION_QUASI: usize = offset_of!(TaggedTemplateExpression, quasi); -pub(crate) const OFFSET_TAGGED_TEMPLATE_EXPRESSION_TYPE_PARAMETERS: usize = - offset_of!(TaggedTemplateExpression, type_parameters); +pub(crate) const OFFSET_TAGGED_TEMPLATE_EXPRESSION_TYPE_ARGUMENTS: usize = + offset_of!(TaggedTemplateExpression, type_arguments); #[repr(transparent)] #[derive(Clone, Copy, Debug)] @@ -2974,9 +2974,9 @@ impl<'a, 't> TaggedTemplateExpressionWithoutTag<'a, 't> { } #[inline] - pub fn type_parameters(self) -> &'t Option>> { + pub fn type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_TAGGED_TEMPLATE_EXPRESSION_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_TAGGED_TEMPLATE_EXPRESSION_TYPE_ARGUMENTS) as *const Option>>) } } @@ -3013,9 +3013,9 @@ impl<'a, 't> TaggedTemplateExpressionWithoutQuasi<'a, 't> { } #[inline] - pub fn type_parameters(self) -> &'t Option>> { + pub fn type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_TAGGED_TEMPLATE_EXPRESSION_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_TAGGED_TEMPLATE_EXPRESSION_TYPE_ARGUMENTS) as *const Option>>) } } @@ -3030,12 +3030,12 @@ impl<'a, 't> GetAddress for TaggedTemplateExpressionWithoutQuasi<'a, 't> { #[repr(transparent)] #[derive(Clone, Copy, Debug)] -pub struct TaggedTemplateExpressionWithoutTypeParameters<'a, 't>( +pub struct TaggedTemplateExpressionWithoutTypeArguments<'a, 't>( pub(crate) *const TaggedTemplateExpression<'a>, pub(crate) PhantomData<&'t ()>, ); -impl<'a, 't> TaggedTemplateExpressionWithoutTypeParameters<'a, 't> { +impl<'a, 't> TaggedTemplateExpressionWithoutTypeArguments<'a, 't> { #[inline] pub fn span(self) -> &'t Span { unsafe { @@ -3060,7 +3060,7 @@ impl<'a, 't> TaggedTemplateExpressionWithoutTypeParameters<'a, 't> { } } -impl<'a, 't> GetAddress for TaggedTemplateExpressionWithoutTypeParameters<'a, 't> { +impl<'a, 't> GetAddress for TaggedTemplateExpressionWithoutTypeArguments<'a, 't> { #[inline] fn address(&self) -> Address { Address::from_ptr(self.0) @@ -3324,8 +3324,8 @@ impl<'a, 't> GetAddress for PrivateFieldExpressionWithoutField<'a, 't> { pub(crate) const OFFSET_CALL_EXPRESSION_SPAN: usize = offset_of!(CallExpression, span); pub(crate) const OFFSET_CALL_EXPRESSION_CALLEE: usize = offset_of!(CallExpression, callee); -pub(crate) const OFFSET_CALL_EXPRESSION_TYPE_PARAMETERS: usize = - offset_of!(CallExpression, type_parameters); +pub(crate) const OFFSET_CALL_EXPRESSION_TYPE_ARGUMENTS: usize = + offset_of!(CallExpression, type_arguments); pub(crate) const OFFSET_CALL_EXPRESSION_ARGUMENTS: usize = offset_of!(CallExpression, arguments); pub(crate) const OFFSET_CALL_EXPRESSION_OPTIONAL: usize = offset_of!(CallExpression, optional); pub(crate) const OFFSET_CALL_EXPRESSION_PURE: usize = offset_of!(CallExpression, pure); @@ -3344,9 +3344,9 @@ impl<'a, 't> CallExpressionWithoutCallee<'a, 't> { } #[inline] - pub fn type_parameters(self) -> &'t Option>> { + pub fn type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_CALL_EXPRESSION_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_CALL_EXPRESSION_TYPE_ARGUMENTS) as *const Option>>) } } @@ -3379,12 +3379,12 @@ impl<'a, 't> GetAddress for CallExpressionWithoutCallee<'a, 't> { #[repr(transparent)] #[derive(Clone, Copy, Debug)] -pub struct CallExpressionWithoutTypeParameters<'a, 't>( +pub struct CallExpressionWithoutTypeArguments<'a, 't>( pub(crate) *const CallExpression<'a>, pub(crate) PhantomData<&'t ()>, ); -impl<'a, 't> CallExpressionWithoutTypeParameters<'a, 't> { +impl<'a, 't> CallExpressionWithoutTypeArguments<'a, 't> { #[inline] pub fn span(self) -> &'t Span { unsafe { &*((self.0 as *const u8).add(OFFSET_CALL_EXPRESSION_SPAN) as *const Span) } @@ -3416,7 +3416,7 @@ impl<'a, 't> CallExpressionWithoutTypeParameters<'a, 't> { } } -impl<'a, 't> GetAddress for CallExpressionWithoutTypeParameters<'a, 't> { +impl<'a, 't> GetAddress for CallExpressionWithoutTypeArguments<'a, 't> { #[inline] fn address(&self) -> Address { Address::from_ptr(self.0) @@ -3444,9 +3444,9 @@ impl<'a, 't> CallExpressionWithoutArguments<'a, 't> { } #[inline] - pub fn type_parameters(self) -> &'t Option>> { + pub fn type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_CALL_EXPRESSION_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_CALL_EXPRESSION_TYPE_ARGUMENTS) as *const Option>>) } } @@ -3472,8 +3472,8 @@ impl<'a, 't> GetAddress for CallExpressionWithoutArguments<'a, 't> { pub(crate) const OFFSET_NEW_EXPRESSION_SPAN: usize = offset_of!(NewExpression, span); pub(crate) const OFFSET_NEW_EXPRESSION_CALLEE: usize = offset_of!(NewExpression, callee); pub(crate) const OFFSET_NEW_EXPRESSION_ARGUMENTS: usize = offset_of!(NewExpression, arguments); -pub(crate) const OFFSET_NEW_EXPRESSION_TYPE_PARAMETERS: usize = - offset_of!(NewExpression, type_parameters); +pub(crate) const OFFSET_NEW_EXPRESSION_TYPE_ARGUMENTS: usize = + offset_of!(NewExpression, type_arguments); pub(crate) const OFFSET_NEW_EXPRESSION_PURE: usize = offset_of!(NewExpression, pure); #[repr(transparent)] @@ -3498,9 +3498,9 @@ impl<'a, 't> NewExpressionWithoutCallee<'a, 't> { } #[inline] - pub fn type_parameters(self) -> &'t Option>> { + pub fn type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_NEW_EXPRESSION_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_NEW_EXPRESSION_TYPE_ARGUMENTS) as *const Option>>) } } @@ -3539,9 +3539,9 @@ impl<'a, 't> NewExpressionWithoutArguments<'a, 't> { } #[inline] - pub fn type_parameters(self) -> &'t Option>> { + pub fn type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_NEW_EXPRESSION_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_NEW_EXPRESSION_TYPE_ARGUMENTS) as *const Option>>) } } @@ -3561,12 +3561,12 @@ impl<'a, 't> GetAddress for NewExpressionWithoutArguments<'a, 't> { #[repr(transparent)] #[derive(Clone, Copy, Debug)] -pub struct NewExpressionWithoutTypeParameters<'a, 't>( +pub struct NewExpressionWithoutTypeArguments<'a, 't>( pub(crate) *const NewExpression<'a>, pub(crate) PhantomData<&'t ()>, ); -impl<'a, 't> NewExpressionWithoutTypeParameters<'a, 't> { +impl<'a, 't> NewExpressionWithoutTypeArguments<'a, 't> { #[inline] pub fn span(self) -> &'t Span { unsafe { &*((self.0 as *const u8).add(OFFSET_NEW_EXPRESSION_SPAN) as *const Span) } @@ -3593,7 +3593,7 @@ impl<'a, 't> NewExpressionWithoutTypeParameters<'a, 't> { } } -impl<'a, 't> GetAddress for NewExpressionWithoutTypeParameters<'a, 't> { +impl<'a, 't> GetAddress for NewExpressionWithoutTypeArguments<'a, 't> { #[inline] fn address(&self) -> Address { Address::from_ptr(self.0) @@ -7740,8 +7740,7 @@ pub(crate) const OFFSET_CLASS_DECORATORS: usize = offset_of!(Class, decorators); pub(crate) const OFFSET_CLASS_ID: usize = offset_of!(Class, id); pub(crate) const OFFSET_CLASS_TYPE_PARAMETERS: usize = offset_of!(Class, type_parameters); pub(crate) const OFFSET_CLASS_SUPER_CLASS: usize = offset_of!(Class, super_class); -pub(crate) const OFFSET_CLASS_SUPER_TYPE_PARAMETERS: usize = - offset_of!(Class, super_type_parameters); +pub(crate) const OFFSET_CLASS_SUPER_TYPE_ARGUMENTS: usize = offset_of!(Class, super_type_arguments); pub(crate) const OFFSET_CLASS_IMPLEMENTS: usize = offset_of!(Class, implements); pub(crate) const OFFSET_CLASS_BODY: usize = offset_of!(Class, body); pub(crate) const OFFSET_CLASS_ABSTRACT: usize = offset_of!(Class, r#abstract); @@ -7789,9 +7788,9 @@ impl<'a, 't> ClassWithoutDecorators<'a, 't> { } #[inline] - pub fn super_type_parameters(self) -> &'t Option>> { + pub fn super_type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_CLASS_SUPER_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_CLASS_SUPER_TYPE_ARGUMENTS) as *const Option>>) } } @@ -7872,9 +7871,9 @@ impl<'a, 't> ClassWithoutId<'a, 't> { } #[inline] - pub fn super_type_parameters(self) -> &'t Option>> { + pub fn super_type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_CLASS_SUPER_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_CLASS_SUPER_TYPE_ARGUMENTS) as *const Option>>) } } @@ -7957,9 +7956,9 @@ impl<'a, 't> ClassWithoutTypeParameters<'a, 't> { } #[inline] - pub fn super_type_parameters(self) -> &'t Option>> { + pub fn super_type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_CLASS_SUPER_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_CLASS_SUPER_TYPE_ARGUMENTS) as *const Option>>) } } @@ -8043,9 +8042,9 @@ impl<'a, 't> ClassWithoutSuperClass<'a, 't> { } #[inline] - pub fn super_type_parameters(self) -> &'t Option>> { + pub fn super_type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_CLASS_SUPER_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_CLASS_SUPER_TYPE_ARGUMENTS) as *const Option>>) } } @@ -8090,12 +8089,12 @@ impl<'a, 't> GetAddress for ClassWithoutSuperClass<'a, 't> { #[repr(transparent)] #[derive(Clone, Copy, Debug)] -pub struct ClassWithoutSuperTypeParameters<'a, 't>( +pub struct ClassWithoutSuperTypeArguments<'a, 't>( pub(crate) *const Class<'a>, pub(crate) PhantomData<&'t ()>, ); -impl<'a, 't> ClassWithoutSuperTypeParameters<'a, 't> { +impl<'a, 't> ClassWithoutSuperTypeArguments<'a, 't> { #[inline] pub fn span(self) -> &'t Span { unsafe { &*((self.0 as *const u8).add(OFFSET_CLASS_SPAN) as *const Span) } @@ -8166,7 +8165,7 @@ impl<'a, 't> ClassWithoutSuperTypeParameters<'a, 't> { } } -impl<'a, 't> GetAddress for ClassWithoutSuperTypeParameters<'a, 't> { +impl<'a, 't> GetAddress for ClassWithoutSuperTypeArguments<'a, 't> { #[inline] fn address(&self) -> Address { Address::from_ptr(self.0) @@ -8221,9 +8220,9 @@ impl<'a, 't> ClassWithoutImplements<'a, 't> { } #[inline] - pub fn super_type_parameters(self) -> &'t Option>> { + pub fn super_type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_CLASS_SUPER_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_CLASS_SUPER_TYPE_ARGUMENTS) as *const Option>>) } } @@ -8303,9 +8302,9 @@ impl<'a, 't> ClassWithoutBody<'a, 't> { } #[inline] - pub fn super_type_parameters(self) -> &'t Option>> { + pub fn super_type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_CLASS_SUPER_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_CLASS_SUPER_TYPE_ARGUMENTS) as *const Option>>) } } @@ -10600,8 +10599,8 @@ pub(crate) const OFFSET_JSX_OPENING_ELEMENT_SELF_CLOSING: usize = pub(crate) const OFFSET_JSX_OPENING_ELEMENT_NAME: usize = offset_of!(JSXOpeningElement, name); pub(crate) const OFFSET_JSX_OPENING_ELEMENT_ATTRIBUTES: usize = offset_of!(JSXOpeningElement, attributes); -pub(crate) const OFFSET_JSX_OPENING_ELEMENT_TYPE_PARAMETERS: usize = - offset_of!(JSXOpeningElement, type_parameters); +pub(crate) const OFFSET_JSX_OPENING_ELEMENT_TYPE_ARGUMENTS: usize = + offset_of!(JSXOpeningElement, type_arguments); #[repr(transparent)] #[derive(Clone, Copy, Debug)] @@ -10632,9 +10631,9 @@ impl<'a, 't> JSXOpeningElementWithoutName<'a, 't> { } #[inline] - pub fn type_parameters(self) -> &'t Option>> { + pub fn type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_JSX_OPENING_ELEMENT_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_JSX_OPENING_ELEMENT_TYPE_ARGUMENTS) as *const Option>>) } } @@ -10676,9 +10675,9 @@ impl<'a, 't> JSXOpeningElementWithoutAttributes<'a, 't> { } #[inline] - pub fn type_parameters(self) -> &'t Option>> { + pub fn type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_JSX_OPENING_ELEMENT_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_JSX_OPENING_ELEMENT_TYPE_ARGUMENTS) as *const Option>>) } } @@ -10693,12 +10692,12 @@ impl<'a, 't> GetAddress for JSXOpeningElementWithoutAttributes<'a, 't> { #[repr(transparent)] #[derive(Clone, Copy, Debug)] -pub struct JSXOpeningElementWithoutTypeParameters<'a, 't>( +pub struct JSXOpeningElementWithoutTypeArguments<'a, 't>( pub(crate) *const JSXOpeningElement<'a>, pub(crate) PhantomData<&'t ()>, ); -impl<'a, 't> JSXOpeningElementWithoutTypeParameters<'a, 't> { +impl<'a, 't> JSXOpeningElementWithoutTypeArguments<'a, 't> { #[inline] pub fn span(self) -> &'t Span { unsafe { &*((self.0 as *const u8).add(OFFSET_JSX_OPENING_ELEMENT_SPAN) as *const Span) } @@ -10728,7 +10727,7 @@ impl<'a, 't> JSXOpeningElementWithoutTypeParameters<'a, 't> { } } -impl<'a, 't> GetAddress for JSXOpeningElementWithoutTypeParameters<'a, 't> { +impl<'a, 't> GetAddress for JSXOpeningElementWithoutTypeArguments<'a, 't> { #[inline] fn address(&self) -> Address { Address::from_ptr(self.0) @@ -11956,8 +11955,8 @@ impl<'a, 't> GetAddress for TSRestTypeWithoutTypeAnnotation<'a, 't> { pub(crate) const OFFSET_TS_TYPE_REFERENCE_SPAN: usize = offset_of!(TSTypeReference, span); pub(crate) const OFFSET_TS_TYPE_REFERENCE_TYPE_NAME: usize = offset_of!(TSTypeReference, type_name); -pub(crate) const OFFSET_TS_TYPE_REFERENCE_TYPE_PARAMETERS: usize = - offset_of!(TSTypeReference, type_parameters); +pub(crate) const OFFSET_TS_TYPE_REFERENCE_TYPE_ARGUMENTS: usize = + offset_of!(TSTypeReference, type_arguments); #[repr(transparent)] #[derive(Clone, Copy, Debug)] @@ -11973,9 +11972,9 @@ impl<'a, 't> TSTypeReferenceWithoutTypeName<'a, 't> { } #[inline] - pub fn type_parameters(self) -> &'t Option>> { + pub fn type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_TS_TYPE_REFERENCE_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_TS_TYPE_REFERENCE_TYPE_ARGUMENTS) as *const Option>>) } } @@ -11990,12 +11989,12 @@ impl<'a, 't> GetAddress for TSTypeReferenceWithoutTypeName<'a, 't> { #[repr(transparent)] #[derive(Clone, Copy, Debug)] -pub struct TSTypeReferenceWithoutTypeParameters<'a, 't>( +pub struct TSTypeReferenceWithoutTypeArguments<'a, 't>( pub(crate) *const TSTypeReference<'a>, pub(crate) PhantomData<&'t ()>, ); -impl<'a, 't> TSTypeReferenceWithoutTypeParameters<'a, 't> { +impl<'a, 't> TSTypeReferenceWithoutTypeArguments<'a, 't> { #[inline] pub fn span(self) -> &'t Span { unsafe { &*((self.0 as *const u8).add(OFFSET_TS_TYPE_REFERENCE_SPAN) as *const Span) } @@ -12010,7 +12009,7 @@ impl<'a, 't> TSTypeReferenceWithoutTypeParameters<'a, 't> { } } -impl<'a, 't> GetAddress for TSTypeReferenceWithoutTypeParameters<'a, 't> { +impl<'a, 't> GetAddress for TSTypeReferenceWithoutTypeArguments<'a, 't> { #[inline] fn address(&self) -> Address { Address::from_ptr(self.0) @@ -12478,8 +12477,8 @@ impl<'a, 't> GetAddress for TSTypeAliasDeclarationWithoutTypeAnnotation<'a, 't> pub(crate) const OFFSET_TS_CLASS_IMPLEMENTS_SPAN: usize = offset_of!(TSClassImplements, span); pub(crate) const OFFSET_TS_CLASS_IMPLEMENTS_EXPRESSION: usize = offset_of!(TSClassImplements, expression); -pub(crate) const OFFSET_TS_CLASS_IMPLEMENTS_TYPE_PARAMETERS: usize = - offset_of!(TSClassImplements, type_parameters); +pub(crate) const OFFSET_TS_CLASS_IMPLEMENTS_TYPE_ARGUMENTS: usize = + offset_of!(TSClassImplements, type_arguments); #[repr(transparent)] #[derive(Clone, Copy, Debug)] @@ -12495,9 +12494,9 @@ impl<'a, 't> TSClassImplementsWithoutExpression<'a, 't> { } #[inline] - pub fn type_parameters(self) -> &'t Option>> { + pub fn type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_TS_CLASS_IMPLEMENTS_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_TS_CLASS_IMPLEMENTS_TYPE_ARGUMENTS) as *const Option>>) } } @@ -12512,12 +12511,12 @@ impl<'a, 't> GetAddress for TSClassImplementsWithoutExpression<'a, 't> { #[repr(transparent)] #[derive(Clone, Copy, Debug)] -pub struct TSClassImplementsWithoutTypeParameters<'a, 't>( +pub struct TSClassImplementsWithoutTypeArguments<'a, 't>( pub(crate) *const TSClassImplements<'a>, pub(crate) PhantomData<&'t ()>, ); -impl<'a, 't> TSClassImplementsWithoutTypeParameters<'a, 't> { +impl<'a, 't> TSClassImplementsWithoutTypeArguments<'a, 't> { #[inline] pub fn span(self) -> &'t Span { unsafe { &*((self.0 as *const u8).add(OFFSET_TS_CLASS_IMPLEMENTS_SPAN) as *const Span) } @@ -12532,7 +12531,7 @@ impl<'a, 't> TSClassImplementsWithoutTypeParameters<'a, 't> { } } -impl<'a, 't> GetAddress for TSClassImplementsWithoutTypeParameters<'a, 't> { +impl<'a, 't> GetAddress for TSClassImplementsWithoutTypeArguments<'a, 't> { #[inline] fn address(&self) -> Address { Address::from_ptr(self.0) @@ -13822,8 +13821,8 @@ impl<'a, 't> GetAddress for TSIndexSignatureNameWithoutTypeAnnotation<'a, 't> { pub(crate) const OFFSET_TS_INTERFACE_HERITAGE_SPAN: usize = offset_of!(TSInterfaceHeritage, span); pub(crate) const OFFSET_TS_INTERFACE_HERITAGE_EXPRESSION: usize = offset_of!(TSInterfaceHeritage, expression); -pub(crate) const OFFSET_TS_INTERFACE_HERITAGE_TYPE_PARAMETERS: usize = - offset_of!(TSInterfaceHeritage, type_parameters); +pub(crate) const OFFSET_TS_INTERFACE_HERITAGE_TYPE_ARGUMENTS: usize = + offset_of!(TSInterfaceHeritage, type_arguments); #[repr(transparent)] #[derive(Clone, Copy, Debug)] @@ -13839,9 +13838,9 @@ impl<'a, 't> TSInterfaceHeritageWithoutExpression<'a, 't> { } #[inline] - pub fn type_parameters(self) -> &'t Option>> { + pub fn type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_TS_INTERFACE_HERITAGE_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_TS_INTERFACE_HERITAGE_TYPE_ARGUMENTS) as *const Option>>) } } @@ -13856,12 +13855,12 @@ impl<'a, 't> GetAddress for TSInterfaceHeritageWithoutExpression<'a, 't> { #[repr(transparent)] #[derive(Clone, Copy, Debug)] -pub struct TSInterfaceHeritageWithoutTypeParameters<'a, 't>( +pub struct TSInterfaceHeritageWithoutTypeArguments<'a, 't>( pub(crate) *const TSInterfaceHeritage<'a>, pub(crate) PhantomData<&'t ()>, ); -impl<'a, 't> TSInterfaceHeritageWithoutTypeParameters<'a, 't> { +impl<'a, 't> TSInterfaceHeritageWithoutTypeArguments<'a, 't> { #[inline] pub fn span(self) -> &'t Span { unsafe { &*((self.0 as *const u8).add(OFFSET_TS_INTERFACE_HERITAGE_SPAN) as *const Span) } @@ -13876,7 +13875,7 @@ impl<'a, 't> TSInterfaceHeritageWithoutTypeParameters<'a, 't> { } } -impl<'a, 't> GetAddress for TSInterfaceHeritageWithoutTypeParameters<'a, 't> { +impl<'a, 't> GetAddress for TSInterfaceHeritageWithoutTypeArguments<'a, 't> { #[inline] fn address(&self) -> Address { Address::from_ptr(self.0) @@ -14184,8 +14183,8 @@ impl<'a, 't> GetAddress for TSInferTypeWithoutTypeParameter<'a, 't> { pub(crate) const OFFSET_TS_TYPE_QUERY_SPAN: usize = offset_of!(TSTypeQuery, span); pub(crate) const OFFSET_TS_TYPE_QUERY_EXPR_NAME: usize = offset_of!(TSTypeQuery, expr_name); -pub(crate) const OFFSET_TS_TYPE_QUERY_TYPE_PARAMETERS: usize = - offset_of!(TSTypeQuery, type_parameters); +pub(crate) const OFFSET_TS_TYPE_QUERY_TYPE_ARGUMENTS: usize = + offset_of!(TSTypeQuery, type_arguments); #[repr(transparent)] #[derive(Clone, Copy, Debug)] @@ -14201,9 +14200,9 @@ impl<'a, 't> TSTypeQueryWithoutExprName<'a, 't> { } #[inline] - pub fn type_parameters(self) -> &'t Option>> { + pub fn type_arguments(self) -> &'t Option>> { unsafe { - &*((self.0 as *const u8).add(OFFSET_TS_TYPE_QUERY_TYPE_PARAMETERS) + &*((self.0 as *const u8).add(OFFSET_TS_TYPE_QUERY_TYPE_ARGUMENTS) as *const Option>>) } } @@ -14218,12 +14217,12 @@ impl<'a, 't> GetAddress for TSTypeQueryWithoutExprName<'a, 't> { #[repr(transparent)] #[derive(Clone, Copy, Debug)] -pub struct TSTypeQueryWithoutTypeParameters<'a, 't>( +pub struct TSTypeQueryWithoutTypeArguments<'a, 't>( pub(crate) *const TSTypeQuery<'a>, pub(crate) PhantomData<&'t ()>, ); -impl<'a, 't> TSTypeQueryWithoutTypeParameters<'a, 't> { +impl<'a, 't> TSTypeQueryWithoutTypeArguments<'a, 't> { #[inline] pub fn span(self) -> &'t Span { unsafe { &*((self.0 as *const u8).add(OFFSET_TS_TYPE_QUERY_SPAN) as *const Span) } @@ -14238,7 +14237,7 @@ impl<'a, 't> TSTypeQueryWithoutTypeParameters<'a, 't> { } } -impl<'a, 't> GetAddress for TSTypeQueryWithoutTypeParameters<'a, 't> { +impl<'a, 't> GetAddress for TSTypeQueryWithoutTypeArguments<'a, 't> { #[inline] fn address(&self) -> Address { Address::from_ptr(self.0) diff --git a/crates/oxc_traverse/src/generated/walk.rs b/crates/oxc_traverse/src/generated/walk.rs index ccd92ef3c1e72..ac49286335171 100644 --- a/crates/oxc_traverse/src/generated/walk.rs +++ b/crates/oxc_traverse/src/generated/walk.rs @@ -502,10 +502,10 @@ unsafe fn walk_tagged_template_expression<'a, Tr: Traverse<'a>>( ctx, ); if let Some(field) = &mut *((node as *mut u8) - .add(ancestor::OFFSET_TAGGED_TEMPLATE_EXPRESSION_TYPE_PARAMETERS) + .add(ancestor::OFFSET_TAGGED_TEMPLATE_EXPRESSION_TYPE_ARGUMENTS) as *mut Option>) { - ctx.retag_stack(AncestorType::TaggedTemplateExpressionTypeParameters); + ctx.retag_stack(AncestorType::TaggedTemplateExpressionTypeArguments); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(pop_token); @@ -632,10 +632,10 @@ unsafe fn walk_call_expression<'a, Tr: Traverse<'a>>( ctx, ); if let Some(field) = &mut *((node as *mut u8) - .add(ancestor::OFFSET_CALL_EXPRESSION_TYPE_PARAMETERS) + .add(ancestor::OFFSET_CALL_EXPRESSION_TYPE_ARGUMENTS) as *mut Option>) { - ctx.retag_stack(AncestorType::CallExpressionTypeParameters); + ctx.retag_stack(AncestorType::CallExpressionTypeArguments); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.retag_stack(AncestorType::CallExpressionArguments); @@ -669,10 +669,10 @@ unsafe fn walk_new_expression<'a, Tr: Traverse<'a>>( walk_argument(traverser, item as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8) - .add(ancestor::OFFSET_NEW_EXPRESSION_TYPE_PARAMETERS) + .add(ancestor::OFFSET_NEW_EXPRESSION_TYPE_ARGUMENTS) as *mut Option>) { - ctx.retag_stack(AncestorType::NewExpressionTypeParameters); + ctx.retag_stack(AncestorType::NewExpressionTypeArguments); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(pop_token); @@ -2502,10 +2502,10 @@ unsafe fn walk_class<'a, Tr: Traverse<'a>>( ctx.retag_stack(AncestorType::ClassSuperClass); walk_expression(traverser, field as *mut _, ctx); } - if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_CLASS_SUPER_TYPE_PARAMETERS) + if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_CLASS_SUPER_TYPE_ARGUMENTS) as *mut Option>) { - ctx.retag_stack(AncestorType::ClassSuperTypeParameters); + ctx.retag_stack(AncestorType::ClassSuperTypeArguments); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_CLASS_IMPLEMENTS) @@ -3232,10 +3232,10 @@ unsafe fn walk_jsx_opening_element<'a, Tr: Traverse<'a>>( walk_jsx_attribute_item(traverser, item as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8) - .add(ancestor::OFFSET_JSX_OPENING_ELEMENT_TYPE_PARAMETERS) + .add(ancestor::OFFSET_JSX_OPENING_ELEMENT_TYPE_ARGUMENTS) as *mut Option>) { - ctx.retag_stack(AncestorType::JSXOpeningElementTypeParameters); + ctx.retag_stack(AncestorType::JSXOpeningElementTypeArguments); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(pop_token); @@ -4393,10 +4393,10 @@ unsafe fn walk_ts_type_reference<'a, Tr: Traverse<'a>>( ctx, ); if let Some(field) = &mut *((node as *mut u8) - .add(ancestor::OFFSET_TS_TYPE_REFERENCE_TYPE_PARAMETERS) + .add(ancestor::OFFSET_TS_TYPE_REFERENCE_TYPE_ARGUMENTS) as *mut Option>) { - ctx.retag_stack(AncestorType::TSTypeReferenceTypeParameters); + ctx.retag_stack(AncestorType::TSTypeReferenceTypeArguments); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(pop_token); @@ -4567,10 +4567,10 @@ unsafe fn walk_ts_class_implements<'a, Tr: Traverse<'a>>( ctx, ); if let Some(field) = &mut *((node as *mut u8) - .add(ancestor::OFFSET_TS_CLASS_IMPLEMENTS_TYPE_PARAMETERS) + .add(ancestor::OFFSET_TS_CLASS_IMPLEMENTS_TYPE_ARGUMENTS) as *mut Option>) { - ctx.retag_stack(AncestorType::TSClassImplementsTypeParameters); + ctx.retag_stack(AncestorType::TSClassImplementsTypeArguments); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(pop_token); @@ -4889,10 +4889,10 @@ unsafe fn walk_ts_interface_heritage<'a, Tr: Traverse<'a>>( ctx, ); if let Some(field) = &mut *((node as *mut u8) - .add(ancestor::OFFSET_TS_INTERFACE_HERITAGE_TYPE_PARAMETERS) + .add(ancestor::OFFSET_TS_INTERFACE_HERITAGE_TYPE_ARGUMENTS) as *mut Option>) { - ctx.retag_stack(AncestorType::TSInterfaceHeritageTypeParameters); + ctx.retag_stack(AncestorType::TSInterfaceHeritageTypeArguments); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(pop_token); @@ -5088,11 +5088,10 @@ unsafe fn walk_ts_type_query<'a, Tr: Traverse<'a>>( (node as *mut u8).add(ancestor::OFFSET_TS_TYPE_QUERY_EXPR_NAME) as *mut TSTypeQueryExprName, ctx, ); - if let Some(field) = &mut *((node as *mut u8) - .add(ancestor::OFFSET_TS_TYPE_QUERY_TYPE_PARAMETERS) + if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_TS_TYPE_QUERY_TYPE_ARGUMENTS) as *mut Option>) { - ctx.retag_stack(AncestorType::TSTypeQueryTypeParameters); + ctx.retag_stack(AncestorType::TSTypeQueryTypeArguments); walk_ts_type_parameter_instantiation(traverser, (&mut **field) as *mut _, ctx); } ctx.pop_stack(pop_token); diff --git a/napi/parser/deserialize-js.js b/napi/parser/deserialize-js.js index b488ae26f5ce0..8eed1143399b7 100644 --- a/napi/parser/deserialize-js.js +++ b/napi/parser/deserialize-js.js @@ -1533,7 +1533,7 @@ function deserializeTSTypeReference(pos) { start: deserializeU32(pos), end: deserializeU32(pos + 4), typeName: deserializeTSTypeName(pos + 8), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), + typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), }; } @@ -1597,7 +1597,7 @@ function deserializeTSClassImplements(pos) { start: deserializeU32(pos), end: deserializeU32(pos + 4), expression: deserializeTSTypeName(pos + 8), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), + typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), }; } @@ -1703,7 +1703,7 @@ function deserializeTSInterfaceHeritage(pos) { start: deserializeU32(pos), end: deserializeU32(pos + 4), expression: deserializeExpression(pos + 8), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), + typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), }; } @@ -1765,7 +1765,7 @@ function deserializeTSTypeQuery(pos) { start: deserializeU32(pos), end: deserializeU32(pos + 4), exprName: deserializeTSTypeQueryExprName(pos + 8), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), + typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), }; } diff --git a/napi/parser/deserialize-ts.js b/napi/parser/deserialize-ts.js index 03b0e38987bf3..4d99d18e80384 100644 --- a/napi/parser/deserialize-ts.js +++ b/napi/parser/deserialize-ts.js @@ -144,7 +144,7 @@ function deserializeTaggedTemplateExpression(pos) { end: deserializeU32(pos + 4), tag: deserializeExpression(pos + 8), quasi: deserializeTemplateLiteral(pos + 24), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 96), + typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 96), }; } @@ -209,7 +209,7 @@ function deserializeCallExpression(pos) { callee: deserializeExpression(pos + 8), arguments: deserializeVecArgument(pos + 32), optional: deserializeBool(pos + 64), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), + typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), }; } @@ -220,7 +220,7 @@ function deserializeNewExpression(pos) { end: deserializeU32(pos + 4), callee: deserializeExpression(pos + 8), arguments: deserializeVecArgument(pos + 24), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 56), + typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 56), }; } @@ -853,7 +853,7 @@ function deserializeClass(pos) { body: deserializeBoxClassBody(pos + 144), decorators: deserializeVecDecorator(pos + 16), typeParameters: deserializeOptionBoxTSTypeParameterDeclaration(pos + 80), - superTypeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 104), + superTypeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 104), implements: deserializeOptionVecTSClassImplements(pos + 112), abstract: deserializeBool(pos + 152), declare: deserializeBool(pos + 153), @@ -1187,7 +1187,7 @@ function deserializeJSXOpeningElement(pos) { attributes: deserializeVecJSXAttributeItem(pos + 32), name: deserializeJSXElementName(pos + 16), selfClosing: deserializeBool(pos + 8), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 64), + typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 64), }; } @@ -1586,7 +1586,7 @@ function deserializeTSTypeReference(pos) { start: deserializeU32(pos), end: deserializeU32(pos + 4), typeName: deserializeTSTypeName(pos + 8), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), + typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), }; } @@ -1650,7 +1650,7 @@ function deserializeTSClassImplements(pos) { start: deserializeU32(pos), end: deserializeU32(pos + 4), expression: deserializeTSTypeName(pos + 8), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), + typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), }; } @@ -1756,7 +1756,7 @@ function deserializeTSInterfaceHeritage(pos) { start: deserializeU32(pos), end: deserializeU32(pos + 4), expression: deserializeExpression(pos + 8), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), + typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), }; } @@ -1818,7 +1818,7 @@ function deserializeTSTypeQuery(pos) { start: deserializeU32(pos), end: deserializeU32(pos + 4), exprName: deserializeTSTypeQueryExprName(pos + 8), - typeParameters: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), + typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 24), }; } diff --git a/npm/oxc-types/types.d.ts b/npm/oxc-types/types.d.ts index 327c05d83b76b..65ca29fa7cf92 100644 --- a/npm/oxc-types/types.d.ts +++ b/npm/oxc-types/types.d.ts @@ -113,7 +113,7 @@ export interface TaggedTemplateExpression extends Span { type: 'TaggedTemplateExpression'; tag: Expression; quasi: TemplateLiteral; - typeParameters: TSTypeParameterInstantiation | null; + typeArguments: TSTypeParameterInstantiation | null; } export interface TemplateElement extends Span { @@ -158,14 +158,14 @@ export interface CallExpression extends Span { callee: Expression; arguments: Array; optional: boolean; - typeParameters: TSTypeParameterInstantiation | null; + typeArguments: TSTypeParameterInstantiation | null; } export interface NewExpression extends Span { type: 'NewExpression'; callee: Expression; arguments: Array; - typeParameters: TSTypeParameterInstantiation | null; + typeArguments: TSTypeParameterInstantiation | null; } export interface MetaProperty extends Span { @@ -601,7 +601,7 @@ export interface Class extends Span { body: ClassBody; decorators: Array; typeParameters: TSTypeParameterDeclaration | null; - superTypeParameters: TSTypeParameterInstantiation | null; + superTypeArguments: TSTypeParameterInstantiation | null; implements: Array | null; abstract: boolean; declare: boolean; @@ -820,7 +820,7 @@ export interface JSXOpeningElement extends Span { attributes: Array; name: JSXElementName; selfClosing: boolean; - typeParameters: TSTypeParameterInstantiation | null; + typeArguments: TSTypeParameterInstantiation | null; } export interface JSXClosingElement extends Span { @@ -1110,7 +1110,7 @@ export interface TSBigIntKeyword extends Span { export interface TSTypeReference extends Span { type: 'TSTypeReference'; typeName: TSTypeName; - typeParameters: TSTypeParameterInstantiation | null; + typeArguments: TSTypeParameterInstantiation | null; } export type TSTypeName = IdentifierReference | TSQualifiedName; @@ -1154,7 +1154,7 @@ export type TSAccessibility = 'private' | 'protected' | 'public'; export interface TSClassImplements extends Span { type: 'TSClassImplements'; expression: TSTypeName; - typeParameters: TSTypeParameterInstantiation | null; + typeArguments: TSTypeParameterInstantiation | null; } export interface TSInterfaceDeclaration extends Span { @@ -1233,7 +1233,7 @@ export interface TSIndexSignatureName extends Span { export interface TSInterfaceHeritage extends Span { type: 'TSInterfaceHeritage'; expression: Expression; - typeParameters: TSTypeParameterInstantiation | null; + typeArguments: TSTypeParameterInstantiation | null; } export interface TSTypePredicate extends Span { @@ -1277,7 +1277,7 @@ export interface TSInferType extends Span { export interface TSTypeQuery extends Span { type: 'TSTypeQuery'; exprName: TSTypeQueryExprName; - typeParameters: TSTypeParameterInstantiation | null; + typeArguments: TSTypeParameterInstantiation | null; } export type TSTypeQueryExprName = TSImportType | TSTypeName; From 9da220e8ff791b0f405a9310ae0b8a6eeb22411c Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Mon, 17 Mar 2025 16:07:45 +0900 Subject: [PATCH 21/22] fix(ast/extree): fix `Class.implements` --- crates/oxc_ast/src/ast/js.rs | 1 + crates/oxc_ast/src/generated/derive_estree.rs | 2 +- crates/oxc_ast/src/serialize.rs | 20 +++++++++++++++++++ napi/parser/deserialize-ts.js | 3 ++- npm/oxc-types/types.d.ts | 2 +- 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/crates/oxc_ast/src/ast/js.rs b/crates/oxc_ast/src/ast/js.rs index ca4a2a27c6ee1..84b4329df403d 100644 --- a/crates/oxc_ast/src/ast/js.rs +++ b/crates/oxc_ast/src/ast/js.rs @@ -1899,6 +1899,7 @@ pub struct Class<'a> { /// // ^^^ /// ``` #[ts] + #[estree(via = ClassImplements)] pub implements: Option>>, pub body: Box<'a, ClassBody<'a>>, /// Whether the class is abstract diff --git a/crates/oxc_ast/src/generated/derive_estree.rs b/crates/oxc_ast/src/generated/derive_estree.rs index 3333b22589d98..b83267ee7c0d1 100644 --- a/crates/oxc_ast/src/generated/derive_estree.rs +++ b/crates/oxc_ast/src/generated/derive_estree.rs @@ -1450,7 +1450,7 @@ impl ESTree for Class<'_> { state.serialize_ts_field("decorators", &self.decorators); state.serialize_ts_field("typeParameters", &self.type_parameters); state.serialize_ts_field("superTypeArguments", &self.super_type_arguments); - state.serialize_ts_field("implements", &self.implements); + state.serialize_ts_field("implements", &crate::serialize::ClassImplements(self)); state.serialize_ts_field("abstract", &self.r#abstract); state.serialize_ts_field("declare", &self.declare); state.end(); diff --git a/crates/oxc_ast/src/serialize.rs b/crates/oxc_ast/src/serialize.rs index 47632e04162b9..a62d53384a06d 100644 --- a/crates/oxc_ast/src/serialize.rs +++ b/crates/oxc_ast/src/serialize.rs @@ -505,6 +505,26 @@ impl ESTree for ExportAllDeclarationWithClause<'_, '_> { } } +#[ast_meta] +#[estree( + ts_type = "Array", + raw_deser = " + const classImplements = DESER[Option>](POS_OFFSET.implements); + classImplements === null ? [] : classImplements + " +)] +pub struct ClassImplements<'a, 'b>(pub &'b Class<'a>); + +impl ESTree for ClassImplements<'_, '_> { + fn serialize(&self, serializer: S) { + if let Some(implements) = &self.0.implements { + implements.serialize(serializer); + } else { + [(); 0].serialize(serializer); + } + } +} + // -------------------- // JSX // -------------------- diff --git a/napi/parser/deserialize-ts.js b/napi/parser/deserialize-ts.js index 4d99d18e80384..3e213b0683cfd 100644 --- a/napi/parser/deserialize-ts.js +++ b/napi/parser/deserialize-ts.js @@ -844,6 +844,7 @@ function deserializeYieldExpression(pos) { } function deserializeClass(pos) { + const classImplements = deserializeOptionVecTSClassImplements(pos + 112); return { type: deserializeClassType(pos + 8), start: deserializeU32(pos), @@ -854,7 +855,7 @@ function deserializeClass(pos) { decorators: deserializeVecDecorator(pos + 16), typeParameters: deserializeOptionBoxTSTypeParameterDeclaration(pos + 80), superTypeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 104), - implements: deserializeOptionVecTSClassImplements(pos + 112), + implements: classImplements === null ? [] : classImplements, abstract: deserializeBool(pos + 152), declare: deserializeBool(pos + 153), }; diff --git a/npm/oxc-types/types.d.ts b/npm/oxc-types/types.d.ts index 65ca29fa7cf92..4e101e9d744de 100644 --- a/npm/oxc-types/types.d.ts +++ b/npm/oxc-types/types.d.ts @@ -602,7 +602,7 @@ export interface Class extends Span { decorators: Array; typeParameters: TSTypeParameterDeclaration | null; superTypeArguments: TSTypeParameterInstantiation | null; - implements: Array | null; + implements: Array; abstract: boolean; declare: boolean; } From 4628d1e7b14900e194608e865692aa9c07c3c154 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Mon, 17 Mar 2025 16:40:34 +0900 Subject: [PATCH 22/22] fix(ast/estree): fix `Class.id` --- crates/oxc_ast/src/ast/js.rs | 1 + crates/oxc_ast/src/generated/derive_estree.rs | 2 +- crates/oxc_ast/src/serialize.rs | 26 +++++++++++++++++++ .../coverage/snapshots/estree_typescript.snap | 18 +------------ 4 files changed, 29 insertions(+), 18 deletions(-) diff --git a/crates/oxc_ast/src/ast/js.rs b/crates/oxc_ast/src/ast/js.rs index 84b4329df403d..a16c4da7b7977 100644 --- a/crates/oxc_ast/src/ast/js.rs +++ b/crates/oxc_ast/src/ast/js.rs @@ -1869,6 +1869,7 @@ pub struct Class<'a> { #[ts] pub decorators: Vec<'a, Decorator<'a>>, /// Class identifier, AKA the name + #[estree(via = ClassId)] pub id: Option>, #[scope(enter_before)] #[ts] diff --git a/crates/oxc_ast/src/generated/derive_estree.rs b/crates/oxc_ast/src/generated/derive_estree.rs index b83267ee7c0d1..4fba6003d2bed 100644 --- a/crates/oxc_ast/src/generated/derive_estree.rs +++ b/crates/oxc_ast/src/generated/derive_estree.rs @@ -1444,7 +1444,7 @@ impl ESTree for Class<'_> { state.serialize_field("type", &self.r#type); state.serialize_field("start", &self.span.start); state.serialize_field("end", &self.span.end); - state.serialize_field("id", &self.id); + state.serialize_field("id", &crate::serialize::ClassId(self)); state.serialize_field("superClass", &self.super_class); state.serialize_field("body", &self.body); state.serialize_ts_field("decorators", &self.decorators); diff --git a/crates/oxc_ast/src/serialize.rs b/crates/oxc_ast/src/serialize.rs index a62d53384a06d..46a7c5b5e10bb 100644 --- a/crates/oxc_ast/src/serialize.rs +++ b/crates/oxc_ast/src/serialize.rs @@ -525,6 +525,32 @@ impl ESTree for ClassImplements<'_, '_> { } } +#[ast_meta] +#[estree( + // TODO: ts + ts_type = "BindingIdentifier | null", + raw_deser = "DESER[Option](POS_OFFSET.id)" +)] +pub struct ClassId<'a, 'b>(pub &'b Class<'a>); + +impl ESTree for ClassId<'_, '_> { + fn serialize(&self, serializer: S) { + if let Some(id) = &self.0.id { + let mut state = serializer.serialize_struct(); + state.serialize_field("type", &JsonSafeString("Identifier")); + state.serialize_field("start", &id.span.start); + state.serialize_field("end", &id.span.end); + state.serialize_field("name", &JsonSafeString(id.name.as_str())); + state.serialize_ts_field("decorators", &[(); 0]); + state.serialize_ts_field("optional", &false); + state.serialize_ts_field("typeAnnotation", &()); + state.end(); + } else { + ().serialize(serializer); + } + } +} + // -------------------- // JSX // -------------------- diff --git a/tasks/coverage/snapshots/estree_typescript.snap b/tasks/coverage/snapshots/estree_typescript.snap index 78aa7e66f143e..8dc6cc4cde832 100644 --- a/tasks/coverage/snapshots/estree_typescript.snap +++ b/tasks/coverage/snapshots/estree_typescript.snap @@ -2,7 +2,7 @@ commit: 15392346 estree_typescript Summary: AST Parsed : 10628/10725 (99.10%) -Positive Passed: 55/10725 (0.51%) +Positive Passed: 71/10725 (0.66%) Mismatch: tasks/coverage/typescript/tests/cases/compiler/2dArrays.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/APILibCheck.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/APISample_Watch.ts @@ -21,7 +21,6 @@ Mismatch: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration14.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration15.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration21.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration22.ts -Mismatch: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration24.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration25.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration8.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration9.ts @@ -634,7 +633,6 @@ Mismatch: tasks/coverage/typescript/tests/cases/compiler/classAccessorInitializa Mismatch: tasks/coverage/typescript/tests/cases/compiler/classAttributeInferenceTemplate.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/classBlockScoping.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/classCannotExtendVar.ts -Mismatch: tasks/coverage/typescript/tests/cases/compiler/classDeclarationBlockScoping1.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/classDeclarationBlockScoping2.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/classDeclarationCheckUsedBeforeDefinitionInItself.ts @@ -732,7 +730,6 @@ Mismatch: tasks/coverage/typescript/tests/cases/compiler/classVarianceCircularit Mismatch: tasks/coverage/typescript/tests/cases/compiler/classVarianceResolveCircularity1.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/classVarianceResolveCircularity2.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/classWithDuplicateIdentifier.ts -Mismatch: tasks/coverage/typescript/tests/cases/compiler/classWithEmptyTypeParameter.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/classWithMultipleBaseClasses.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/classWithOverloadImplementationOfWrongName.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/classWithOverloadImplementationOfWrongName2.ts @@ -1319,7 +1316,6 @@ Mismatch: tasks/coverage/typescript/tests/cases/compiler/declFileAliasUseBeforeD Mismatch: tasks/coverage/typescript/tests/cases/compiler/declFileAliasUseBeforeDeclaration2.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/declFileAmbientExternalModuleWithSingleExportedModule.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/declFileCallSignatures.ts -Mismatch: tasks/coverage/typescript/tests/cases/compiler/declFileClassExtendsNull.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/declFileClassWithIndexSignature.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/declFileClassWithStaticMethodReturningConstructor.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/declFileConstructSignatures.ts @@ -1637,7 +1633,6 @@ Mismatch: tasks/coverage/typescript/tests/cases/compiler/declarationEmitWithDefa Mismatch: tasks/coverage/typescript/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/declarationFileNoCrashOnExtraExportModifier.ts -Mismatch: tasks/coverage/typescript/tests/cases/compiler/declarationFileOverwriteError.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/declarationFilesGeneratingTypeReferences.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/declarationFilesWithTypeReferences1.ts @@ -4774,7 +4769,6 @@ Mismatch: tasks/coverage/typescript/tests/cases/compiler/primaryExpressionMods.t Mismatch: tasks/coverage/typescript/tests/cases/compiler/primitiveConstraints1.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/primitiveConstraints2.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/primitiveMembers.ts -Mismatch: tasks/coverage/typescript/tests/cases/compiler/primitiveTypeAsClassName.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/primitiveTypeAsInterfaceName.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/primitiveTypeAsInterfaceNameGeneric.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/primitiveTypeAsmoduleName.ts @@ -4908,8 +4902,6 @@ Mismatch: tasks/coverage/typescript/tests/cases/compiler/quotedAccessorName2.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/quotedFunctionName1.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/quotedFunctionName2.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/quotedModuleNameMustBeAmbient.ts -Mismatch: tasks/coverage/typescript/tests/cases/compiler/quotedPropertyName1.ts -Mismatch: tasks/coverage/typescript/tests/cases/compiler/quotedPropertyName2.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/quotedPropertyName3.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/raiseErrorOnParameterProperty.ts Mismatch: tasks/coverage/typescript/tests/cases/compiler/ramdaToolsNoInfinite.ts @@ -6483,8 +6475,6 @@ Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclara Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/classInsideBlock.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts -Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/classWithSemicolonClassElement1.ts -Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/classWithSemicolonClassElement2.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/declaredClassMergedwithSelf.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/mergeClassInterfaceAndModule.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/mergedClassInterface.ts @@ -6653,7 +6643,6 @@ Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/members/priv Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/members/privateNames/privateNameAccessorsAccess.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/members/privateNames/privateNameAccessorsCallExpression.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/members/privateNames/privateNameAccessorssDerivedClasses.ts -Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/members/privateNames/privateNameAmbientNoImplicitAny.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/members/privateNames/privateNameAndIndexSignature.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/classes/members/privateNames/privateNameAndObjectRestSpread.ts @@ -7336,8 +7325,6 @@ serde_json::from_str(oxc_json) error: number out of range at line 87 column 27 tasks/coverage/typescript/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteralES6.ts serde_json::from_str(oxc_json) error: number out of range at line 87 column 27 -Mismatch: tasks/coverage/typescript/tests/cases/conformance/es6/classDeclaration/classWithSemicolonClassElementES61.ts -Mismatch: tasks/coverage/typescript/tests/cases/conformance/es6/classDeclaration/classWithSemicolonClassElementES62.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationOverloadInES6.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorInES6.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithExtensionAndTypeArgumentInES6.ts @@ -9811,11 +9798,8 @@ Mismatch: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/C Mismatch: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration20.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration21.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration22.ts -Mismatch: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration23.ts -Mismatch: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration24.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration25.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration26.ts -Mismatch: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration7.d.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration7.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration8.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration9.ts