From 1269b230eea240d45593687209c997e65e6d4081 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Mon, 1 Jun 2026 11:54:35 -0500 Subject: [PATCH 01/16] fix(safe-nav): version-aware optional chaining for Angular v22+ (#317) Angular v22 changed the safe-navigation operator (`?.`) in template expressions to yield `undefined` via native optional chaining, gated by the `legacyOptionalChaining` compiler option. OXC unconditionally emitted the legacy `== null ? null` ternary, so v22+ projects got the wrong runtime value for any `?.` expression. Changes: - Add `legacyOptionalChaining` to `TransformOptions` (NAPI + Rust) and thread it through ingest into the compilation jobs. The effective default is derived from `angularVersion`: legacy for < v22, modern (native `?.`) for >= v22, and legacy when the version is unknown (matches Angular's conservative fallback). - Add an `optional` flag to the resolved IR read/call nodes (`ResolvedPropertyRead`/`ResolvedKeyedRead`/`ResolvedCall`) and pass it through reify so it renders as native `?.` / `?.[]` / `?.()`. - Rewrite `expand_safe_reads` to branch per node: legacy builds the `SafeTernary` (`== null ? null`); modern rewrites each safe access into the equivalent optional resolved read (no temporaries needed). - Support the `$safeNavigationMigration(...)` escape hatch: a wrapped subtree is forced back to legacy null semantics even on a modern target, and the wrapper is stripped. Two deviations from the issue text, both to match the reference compiler (angular/angular@2896c93cc1): - The modern form is native optional chaining (`ctx.user?.name`), not the `== null ? undefined` ternary the issue described. Both yield `undefined` at runtime; native `?.` matches Angular's emitted output. - The magic function shipped in v22 is `$safeNavigationMigration(...)`, not `$null(...)` (the commit message named `$null` but the code renamed it). Partial/linker output keeps legacy semantics for now; threading the facade field through partial emit is deferred (issue required-work #4). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/component/metadata.rs | 14 ++ .../src/component/transform.rs | 43 +++- .../oxc_angular_compiler/src/ir/expression.rs | 21 ++ .../src/pipeline/compilation.rs | 39 ++++ .../src/pipeline/conversion.rs | 1 + .../src/pipeline/ingest.rs | 20 +- .../src/pipeline/phases/expand_safe_reads.rs | 212 +++++++++++++++++- .../src/pipeline/phases/generate_variables.rs | 1 + .../pipeline/phases/reify/ir_expression.rs | 6 +- .../src/pipeline/phases/resolve_names.rs | 6 + .../pipeline/phases/track_fn_optimization.rs | 2 + .../src/pipeline/phases/track_variables.rs | 1 + .../pipeline/phases/variable_optimization.rs | 3 + .../tests/integration_test.rs | 77 +++++++ napi/angular-compiler/index.d.ts | 11 + napi/angular-compiler/src/lib.rs | 11 + 16 files changed, 449 insertions(+), 19 deletions(-) diff --git a/crates/oxc_angular_compiler/src/component/metadata.rs b/crates/oxc_angular_compiler/src/component/metadata.rs index e1177c90c..fdfe3d590 100644 --- a/crates/oxc_angular_compiler/src/component/metadata.rs +++ b/crates/oxc_angular_compiler/src/component/metadata.rs @@ -72,6 +72,20 @@ impl AngularVersion { self.major >= 22 } + /// Check if this version uses modern optional-chaining semantics (v22.0.0+). + /// + /// Angular v22 changed the safe-navigation operator (`?.`) in template + /// expressions to yield `undefined` (native optional chaining) instead of the + /// legacy `null`. Earlier versions default to the legacy `== null ? null` + /// expansion. Users can opt back into legacy behavior with the + /// `legacyOptionalChaining` compiler option, or per-expression by wrapping it + /// in the `$safeNavigationMigration(...)` magic function. + /// + /// See `angular/angular@2896c93cc1`. + pub fn supports_modern_optional_chaining(&self) -> bool { + self.major >= 22 + } + /// Check if this version's runtime supports chained query instructions /// (`ɵɵviewQuery(p1)(p2)`, `ɵɵcontentQuerySignal(...)(...)`). /// diff --git a/crates/oxc_angular_compiler/src/component/transform.rs b/crates/oxc_angular_compiler/src/component/transform.rs index 111f2ce31..b76b2fdaa 100644 --- a/crates/oxc_angular_compiler/src/component/transform.rs +++ b/crates/oxc_angular_compiler/src/component/transform.rs @@ -110,6 +110,17 @@ pub struct TransformOptions { /// When `None`, assumes latest Angular version (v19+ behavior). pub angular_version: Option, + /// Override for the `legacyOptionalChaining` Angular compiler option. + /// + /// Controls how the safe-navigation operator (`?.`) in template expressions is + /// emitted. When `Some(true)`, always uses the legacy `== null ? null` ternary; + /// when `Some(false)`, always emits native optional chaining (yielding + /// `undefined`). When `None`, the default is derived from `angular_version` + /// (legacy for < v22, modern for >= v22, legacy when the version is unknown). + /// + /// See `angular/angular@2896c93cc1`. + pub legacy_optional_chaining: Option, + // Component metadata overrides for template-only compilation. // These allow the build tool to pass component metadata when compiling // templates in isolation (e.g., for testing or compare tool). @@ -227,8 +238,9 @@ impl Default for TransformOptions { jit: false, hmr: false, advanced_optimizations: false, - i18n_use_external_ids: true, // Angular's JIT default - angular_version: None, // None means assume latest (v19+ behavior) + i18n_use_external_ids: true, // Angular's JIT default + angular_version: None, // None means assume latest (v19+ behavior) + legacy_optional_chaining: None, // None: derive default from angular_version // Metadata overrides default to None (use extracted/default values) selector: None, standalone: None, @@ -3764,6 +3776,7 @@ fn compile_component_full<'a>( pool_starting_index, // Pass Angular version for feature-gated instruction selection angular_version: options.angular_version, + legacy_optional_chaining: options.legacy_optional_chaining, }; let mut job = ingest_component_with_options( @@ -3827,6 +3840,7 @@ fn compile_component_full<'a>( metadata, template_pool_index, options.angular_version, + options.legacy_optional_chaining, ); // Extract the result and update pool index if host bindings were compiled @@ -4217,6 +4231,7 @@ pub fn compile_template_to_js_with_options<'a>( all_deferrable_deps_fn: None, pool_starting_index: 0, // Standalone template compilation starts from 0 angular_version: options.angular_version, + legacy_optional_chaining: options.legacy_optional_chaining, }; // Stage 3-5: Ingest and compile @@ -4271,6 +4286,7 @@ pub fn compile_template_to_js_with_options<'a>( options.selector.as_deref(), host_pool_starting_index, options.angular_version, + options.legacy_optional_chaining, ) { // Add host binding pool declarations (pure functions, etc.) for decl in host_result.declarations { @@ -4390,6 +4406,7 @@ pub fn compile_template_for_hmr<'a>( all_deferrable_deps_fn: None, pool_starting_index: 0, // HMR template compilation starts from 0 angular_version: options.angular_version, + legacy_optional_chaining: options.legacy_optional_chaining, }; // Stage 3-5: Ingest and compile @@ -4535,6 +4552,7 @@ fn compile_component_host_bindings<'a>( metadata: &ComponentMetadata<'a>, pool_starting_index: u32, angular_version: Option, + legacy_optional_chaining: Option, ) -> Option> { let host = metadata.host.as_ref()?; @@ -4558,8 +4576,13 @@ fn compile_component_host_bindings<'a>( // Ingest and compile the host bindings with the pool starting index // This ensures constant names continue from where template compilation left off - let mut job = - ingest_host_binding_with_version(allocator, input, pool_starting_index, angular_version); + let mut job = ingest_host_binding_with_version( + allocator, + input, + pool_starting_index, + angular_version, + legacy_optional_chaining, + ); let result = compile_host_bindings(&mut job); // Get the next pool index after host binding compilation @@ -4883,6 +4906,7 @@ fn compile_host_bindings_from_input<'a>( selector: Option<&str>, pool_starting_index: u32, angular_version: Option, + legacy_optional_chaining: Option, ) -> Option> { use oxc_allocator::FromIn; @@ -4908,8 +4932,13 @@ fn compile_host_bindings_from_input<'a>( // Convert to HostBindingInput and compile let input = convert_host_metadata_to_input(allocator, &host, component_name_atom, component_selector); - let mut job = - ingest_host_binding_with_version(allocator, input, pool_starting_index, angular_version); + let mut job = ingest_host_binding_with_version( + allocator, + input, + pool_starting_index, + angular_version, + legacy_optional_chaining, + ); let result = compile_host_bindings(&mut job); Some(result) @@ -4945,6 +4974,7 @@ pub fn compile_host_bindings_for_linker( selector, pool_starting_index, None, // Linker always targets latest Angular version + None, // legacyOptionalChaining: derive from (absent) version )?; let emitter = JsEmitter::new(); @@ -5064,6 +5094,7 @@ pub fn compile_template_for_linker<'a>( all_deferrable_deps_fn: None, pool_starting_index: 0, angular_version: None, + legacy_optional_chaining: None, }; let component_name_atom = Ident::from_in(component_name, allocator); diff --git a/crates/oxc_angular_compiler/src/ir/expression.rs b/crates/oxc_angular_compiler/src/ir/expression.rs index e5fc56e16..926060a21 100644 --- a/crates/oxc_angular_compiler/src/ir/expression.rs +++ b/crates/oxc_angular_compiler/src/ir/expression.rs @@ -592,6 +592,7 @@ impl<'a> IrExpression<'a> { ResolvedPropertyReadExpr { receiver: Box::new_in(e.receiver.clone_in(allocator), allocator), name: e.name.clone(), + optional: e.optional, source_span: e.source_span, }, allocator, @@ -615,6 +616,7 @@ impl<'a> IrExpression<'a> { ResolvedCallExpr { receiver: Box::new_in(e.receiver.clone_in(allocator), allocator), args, + optional: e.optional, source_span: e.source_span, }, allocator, @@ -624,6 +626,7 @@ impl<'a> IrExpression<'a> { ResolvedKeyedReadExpr { receiver: Box::new_in(e.receiver.clone_in(allocator), allocator), key: Box::new_in(e.key.clone_in(allocator), allocator), + optional: e.optional, source_span: e.source_span, }, allocator, @@ -923,6 +926,12 @@ pub struct ResolvedPropertyReadExpr<'a> { pub receiver: Box<'a, IrExpression<'a>>, /// Property name to read. pub name: Ident<'a>, + /// Whether to read via native optional chaining (`receiver?.name`). + /// + /// Set to `true` when a safe property read (`a?.b`) is expanded under modern + /// (Angular v22+) optional-chaining semantics, where `?.` yields `undefined`. + /// Legacy reads and plain (non-safe) reads leave this `false`. + pub optional: bool, /// Source span. pub source_span: Option, } @@ -955,6 +964,12 @@ pub struct ResolvedCallExpr<'a> { pub receiver: Box<'a, IrExpression<'a>>, /// The call arguments (resolved or original). pub args: Vec<'a, IrExpression<'a>>, + /// Whether to invoke via native optional chaining (`receiver?.()`). + /// + /// Set to `true` when a safe call (`a?.()`) is expanded under modern + /// (Angular v22+) optional-chaining semantics. Legacy and plain calls + /// leave this `false`. + pub optional: bool, /// Source span. pub source_span: Option, } @@ -970,6 +985,12 @@ pub struct ResolvedKeyedReadExpr<'a> { pub receiver: Box<'a, IrExpression<'a>>, /// The key expression (original, e.g., a number or expression). pub key: Box<'a, IrExpression<'a>>, + /// Whether to read via native optional chaining (`receiver?.[key]`). + /// + /// Set to `true` when a safe keyed read (`a?.[k]`) is expanded under modern + /// (Angular v22+) optional-chaining semantics. Legacy and plain keyed reads + /// leave this `false`. + pub optional: bool, /// Source span. pub source_span: Option, } diff --git a/crates/oxc_angular_compiler/src/pipeline/compilation.rs b/crates/oxc_angular_compiler/src/pipeline/compilation.rs index 9978ca4ec..12e0c625e 100644 --- a/crates/oxc_angular_compiler/src/pipeline/compilation.rs +++ b/crates/oxc_angular_compiler/src/pipeline/compilation.rs @@ -191,6 +191,14 @@ pub struct ComponentCompilationJob<'a> { /// `ɵɵconditionalCreate`/`ɵɵconditionalBranchCreate` for `@if`/`@switch` blocks. /// When `None`, assumes latest Angular version (v20+ behavior). pub angular_version: Option, + /// Explicit override for the `legacyOptionalChaining` compiler option. + /// + /// When `Some(true)`, safe navigation (`?.`) always expands to the legacy + /// `== null ? null` ternary. When `Some(false)`, it always emits native + /// optional chaining (`?.`, yielding `undefined`). When `None`, the default + /// is derived from `angular_version` (legacy for < v22, modern for >= v22, + /// legacy when the version is unknown). See `legacy_optional_chaining()`. + pub legacy_optional_chaining: Option, /// Diagnostics collected during compilation. pub diagnostics: std::vec::Vec, } @@ -241,6 +249,7 @@ impl<'a> ComponentCompilationJob<'a> { all_deferrable_deps_fn: None, content_selectors: None, angular_version: None, + legacy_optional_chaining: None, diagnostics: std::vec::Vec::new(), } } @@ -279,6 +288,21 @@ impl<'a> ComponentCompilationJob<'a> { self.angular_version.map_or(true, |v: AngularVersion| v.supports_dom_property()) } + /// Resolve whether safe navigation (`?.`) should use legacy null semantics. + /// + /// Returns `true` when `?.` must expand to the legacy `== null ? null` ternary, + /// `false` when it should emit native optional chaining (yielding `undefined`). + /// + /// An explicit `legacy_optional_chaining` override wins. Otherwise the default + /// follows the Angular version: legacy for < v22, modern for >= v22, and legacy + /// when the version is unknown (the safe, conservative fallback Angular itself + /// uses for partial-compiled libraries targeting older runtimes). + pub fn legacy_optional_chaining(&self) -> bool { + self.legacy_optional_chaining.unwrap_or_else(|| { + self.angular_version.map_or(true, |v| !v.supports_modern_optional_chaining()) + }) + } + /// Allocates a new cross-reference ID. pub fn allocate_xref_id(&mut self) -> XrefId { let id = XrefId::new(self.next_xref_id); @@ -621,6 +645,11 @@ pub struct HostBindingCompilationJob<'a> { pub diagnostics: std::vec::Vec, /// Angular version for version-gated instruction emission. pub angular_version: Option, + /// Explicit override for the `legacyOptionalChaining` compiler option. + /// + /// See [`ComponentCompilationJob::legacy_optional_chaining`] for the resolution + /// rules; `None` derives the default from `angular_version`. + pub legacy_optional_chaining: Option, } impl<'a> HostBindingCompilationJob<'a> { @@ -667,6 +696,7 @@ impl<'a> HostBindingCompilationJob<'a> { fn_suffix: Ident::from("HostBindings"), diagnostics: std::vec::Vec::new(), angular_version: None, + legacy_optional_chaining: None, } } @@ -685,6 +715,15 @@ impl<'a> HostBindingCompilationJob<'a> { self.angular_version.map_or(true, |v| v.supports_dom_property()) } + /// Resolve whether safe navigation (`?.`) should use legacy null semantics. + /// + /// See [`ComponentCompilationJob::legacy_optional_chaining`] for the rules. + pub fn legacy_optional_chaining(&self) -> bool { + self.legacy_optional_chaining.unwrap_or_else(|| { + self.angular_version.map_or(true, |v| !v.supports_modern_optional_chaining()) + }) + } + /// Allocates a new cross-reference ID. pub fn allocate_xref_id(&mut self) -> XrefId { let id = XrefId::new(self.next_xref_id); diff --git a/crates/oxc_angular_compiler/src/pipeline/conversion.rs b/crates/oxc_angular_compiler/src/pipeline/conversion.rs index 0ddd0240e..2a99c8ad0 100644 --- a/crates/oxc_angular_compiler/src/pipeline/conversion.rs +++ b/crates/oxc_angular_compiler/src/pipeline/conversion.rs @@ -345,6 +345,7 @@ pub fn convert_ast<'a>( allocator, ), name: pr.name.clone(), + optional: false, source_span: convert_source_span(pr.source_span), }, allocator, diff --git a/crates/oxc_angular_compiler/src/pipeline/ingest.rs b/crates/oxc_angular_compiler/src/pipeline/ingest.rs index efae25b02..17ffc12c6 100644 --- a/crates/oxc_angular_compiler/src/pipeline/ingest.rs +++ b/crates/oxc_angular_compiler/src/pipeline/ingest.rs @@ -122,6 +122,13 @@ pub struct IngestOptions<'a> { /// `ɵɵconditionalCreate`/`ɵɵconditionalBranchCreate` for `@if`/`@switch` blocks. /// When `None`, assumes latest Angular version (v20+ behavior). pub angular_version: Option, + + /// Explicit override for the `legacyOptionalChaining` compiler option. + /// + /// When `None`, the safe-navigation default is derived from `angular_version` + /// (legacy `null` for < v22, native optional chaining for >= v22, legacy when + /// the version is unknown). + pub legacy_optional_chaining: Option, } impl Default for IngestOptions<'_> { @@ -137,6 +144,7 @@ impl Default for IngestOptions<'_> { all_deferrable_deps_fn: None, pool_starting_index: 0, angular_version: None, + legacy_optional_chaining: None, } } } @@ -432,6 +440,7 @@ fn convert_ast_to_ir<'a>( allocator, ), name: prop.name, + optional: false, source_span: Some(prop.source_span.to_span()), }, allocator, @@ -447,6 +456,7 @@ fn convert_ast_to_ir<'a>( ResolvedPropertyReadExpr { receiver, name: prop.name, + optional: false, source_span: Some(prop.source_span.to_span()), }, allocator, @@ -467,6 +477,7 @@ fn convert_ast_to_ir<'a>( ResolvedKeyedReadExpr { receiver, key, + optional: false, source_span: Some(keyed.source_span.to_span()), }, allocator, @@ -490,6 +501,7 @@ fn convert_ast_to_ir<'a>( ResolvedCallExpr { receiver, args, + optional: false, source_span: Some(call.source_span.to_span()), }, allocator, @@ -793,6 +805,7 @@ pub fn ingest_component_with_options<'a>( // Set Angular version for feature-gated instruction selection job.angular_version = options.angular_version; + job.legacy_optional_chaining = options.legacy_optional_chaining; let root_xref = job.root.xref; @@ -3819,6 +3832,7 @@ fn host_convert_ast_to_ir<'a>( ResolvedPropertyReadExpr { receiver, name: prop.name, + optional: false, source_span: Some(prop.source_span.to_span()), }, allocator, @@ -3838,6 +3852,7 @@ fn host_convert_ast_to_ir<'a>( ResolvedKeyedReadExpr { receiver, key, + optional: false, source_span: Some(keyed.source_span.to_span()), }, allocator, @@ -3860,6 +3875,7 @@ fn host_convert_ast_to_ir<'a>( ResolvedCallExpr { receiver, args, + optional: false, source_span: Some(call.source_span.to_span()), }, allocator, @@ -3994,7 +4010,7 @@ pub fn ingest_host_binding<'a>( input: HostBindingInput<'a>, pool_starting_index: u32, ) -> HostBindingCompilationJob<'a> { - ingest_host_binding_with_version(allocator, input, pool_starting_index, None) + ingest_host_binding_with_version(allocator, input, pool_starting_index, None, None) } /// Ingest host bindings into a `HostBindingCompilationJob` with a specific Angular version. @@ -4003,6 +4019,7 @@ pub fn ingest_host_binding_with_version<'a>( input: HostBindingInput<'a>, pool_starting_index: u32, angular_version: Option, + legacy_optional_chaining: Option, ) -> HostBindingCompilationJob<'a> { let mut job = HostBindingCompilationJob::with_pool_starting_index( allocator, @@ -4011,6 +4028,7 @@ pub fn ingest_host_binding_with_version<'a>( pool_starting_index, ); job.angular_version = angular_version; + job.legacy_optional_chaining = legacy_optional_chaining; // Ingest host properties for property in input.properties { diff --git a/crates/oxc_angular_compiler/src/pipeline/phases/expand_safe_reads.rs b/crates/oxc_angular_compiler/src/pipeline/phases/expand_safe_reads.rs index 18d4f653c..2b211041d 100644 --- a/crates/oxc_angular_compiler/src/pipeline/phases/expand_safe_reads.rs +++ b/crates/oxc_angular_compiler/src/pipeline/phases/expand_safe_reads.rs @@ -5,9 +5,23 @@ //! finds all unresolved safe read expressions and converts them into the appropriate output AST //! reads, guarded by null checks. //! +//! ## Optional-chaining semantics +//! +//! Since Angular v22, safe reads default to **native optional chaining** (`a?.b`), +//! which yields `undefined`. Earlier versions (and projects that opt in via the +//! `legacyOptionalChaining` compiler option) use the **legacy** `== null ? null` +//! expansion, which yields `null`. The choice per compilation is resolved by +//! [`ComponentCompilationJob::legacy_optional_chaining`]. +//! +//! A single expression can opt back into legacy semantics on a modern target by +//! wrapping it in the `$safeNavigationMigration(...)` magic function — this phase +//! detects that wrapper, forces the legacy expansion on the wrapped subtree, and +//! strips the wrapper. Mirrors Angular's `removeSafeNavigationMigration` + +//! `expandSafeReads` phases (`angular/angular@2896c93cc1`). +//! //! ## Algorithm //! -//! This phase performs two transformations: +//! **Legacy** mode performs two transformations: //! //! 1. **Safe Transform**: Converts safe access expressions to `SafeTernaryExpr` //! - `a?.b` → `SafeTernaryExpr { guard: a, expr: a.b }` @@ -17,6 +31,12 @@ //! 2. **Ternary Transform**: Converts `SafeTernaryExpr` to `ConditionalExpr` //! - `SafeTernaryExpr { guard, expr }` → `(guard == null ? null : expr)` //! +//! **Modern** mode instead rewrites each safe access into the equivalent resolved +//! read flagged as optional, which reifies to native `?.`: +//! - `a?.b` → `ResolvedPropertyRead { receiver: a, name: b, optional: true }` +//! - `a?.[k]` → `ResolvedKeyedRead { receiver: a, key: k, optional: true }` +//! - `a?.()` → `ResolvedCall { receiver: a, optional: true }` +//! //! ## Temporary Variables //! //! When the guard expression has side effects (e.g., function calls), a temporary @@ -54,7 +74,8 @@ use oxc_str::Ident; use crate::ir::expression::{ AssignTemporaryExpr, IrExpression, ReadTemporaryExpr, ResolvedCallExpr, ResolvedKeyedReadExpr, ResolvedPropertyReadExpr, SafeTernaryExpr, VisitorContextFlag, - transform_expressions_in_create_op, transform_expressions_in_update_op, + transform_expressions_in_create_op, transform_expressions_in_expression, + transform_expressions_in_update_op, }; use crate::ir::ops::XrefId; use crate::pipeline::compilation::{ComponentCompilationJob, HostBindingCompilationJob}; @@ -95,6 +116,10 @@ impl<'a> SafeTransformContext<'a> { pub fn expand_safe_reads(job: &mut ComponentCompilationJob<'_>) { let allocator = job.allocator; + // Resolve whether `?.` uses legacy (`== null ? null`) or modern (native `?.`) + // semantics for this compilation. Read before borrowing views mutably. + let legacy = job.legacy_optional_chaining(); + // Get the current xref counter value - we'll track allocations ourselves // and sync back at the end let starting_xref = job.allocate_xref_id().0; @@ -104,12 +129,35 @@ pub fn expand_safe_reads(job: &mut ComponentCompilationJob<'_>) { for view in job.all_views_mut() { let ctx = SafeTransformContext { allocator, next_xref: xref_counter.clone() }; - // Transform safe access expressions to SafeTernary + // Pass 1: resolve `$safeNavigationMigration(...)` markers. This forces the + // legacy expansion on the wrapped subtree and strips the wrapper. Runs in + // both modes (the wrapper must always be removed so it never reifies as a + // real call). + for op in view.create.iter_mut() { + transform_expressions_in_create_op( + op, + &|expr, _flags| { + resolve_safe_navigation_migration(expr, &ctx); + }, + VisitorContextFlag::NONE, + ); + } + for op in view.update.iter_mut() { + transform_expressions_in_update_op( + op, + &|expr, _flags| { + resolve_safe_navigation_migration(expr, &ctx); + }, + VisitorContextFlag::NONE, + ); + } + + // Pass 2: expand the remaining safe access expressions per the resolved mode. for op in view.create.iter_mut() { transform_expressions_in_create_op( op, &|expr, _flags| { - safe_transform(expr, &ctx); + expand_safe_access(expr, &ctx, legacy); }, VisitorContextFlag::NONE, ); @@ -118,7 +166,7 @@ pub fn expand_safe_reads(job: &mut ComponentCompilationJob<'_>) { transform_expressions_in_update_op( op, &|expr, _flags| { - safe_transform(expr, &ctx); + expand_safe_access(expr, &ctx, legacy); }, VisitorContextFlag::NONE, ); @@ -126,6 +174,121 @@ pub fn expand_safe_reads(job: &mut ComponentCompilationJob<'_>) { } } +/// Dispatch a single node to the legacy or modern safe-read expansion. +fn expand_safe_access<'a>( + expr: &mut IrExpression<'a>, + ctx: &SafeTransformContext<'a>, + legacy: bool, +) { + if legacy { + safe_transform(expr, ctx); + } else { + safe_transform_modern(expr, ctx); + } +} + +/// Rewrites `$safeNavigationMigration(arg)` into `arg`, expanding any safe reads +/// inside `arg` with legacy (`== null ? null`) semantics. +/// +/// After name resolution the wrapper appears as a `ResolvedCall` whose receiver is +/// a `ResolvedPropertyRead` of the magic name `$safeNavigationMigration` on the +/// component context. The wrapped argument's receivers are already resolved at this +/// point, so it is safe to run the legacy expansion on the detached subtree here. +/// +/// Mirrors Angular's `removeSafeNavigationMigration` phase combined with the +/// `InSafeNavigationMigration` flag handling in `expandSafeReads`. +fn resolve_safe_navigation_migration<'a>( + expr: &mut IrExpression<'a>, + ctx: &SafeTransformContext<'a>, +) { + let allocator = ctx.allocator; + + let is_marker = match expr { + IrExpression::ResolvedCall(call) => { + call.args.len() == 1 + && matches!( + call.receiver.as_ref(), + IrExpression::ResolvedPropertyRead(p) + if p.name.as_str() == "$safeNavigationMigration" + ) + } + _ => false, + }; + if !is_marker { + return; + } + + let IrExpression::ResolvedCall(call) = expr else { return }; + let mut arg = std::mem::replace(&mut call.args[0], make_placeholder(allocator)); + + // Force legacy null semantics on the wrapped subtree. + transform_expressions_in_expression( + &mut arg, + &|e: &mut IrExpression<'a>, _flags| { + safe_transform(e, ctx); + }, + VisitorContextFlag::NONE, + ); + + *expr = arg; +} + +/// Modern (Angular v22+) safe-read expansion: rewrite each safe access into the +/// equivalent resolved read flagged as optional, which reifies to native `?.`. +/// +/// Unlike the legacy expansion this needs no temporaries or ternary restructuring: +/// each safe node becomes optional independently, and the post-order visitor has +/// already converted any nested safe receivers. +fn safe_transform_modern<'a>(expr: &mut IrExpression<'a>, ctx: &SafeTransformContext<'a>) { + let allocator = ctx.allocator; + + match expr { + IrExpression::SafePropertyRead(p) => { + let receiver = std::mem::replace(p.receiver.as_mut(), make_placeholder(allocator)); + let name = p.name.clone(); + let source_span = p.source_span; + *expr = IrExpression::ResolvedPropertyRead(ArenaBox::new_in( + ResolvedPropertyReadExpr { + receiver: ArenaBox::new_in(receiver, allocator), + name, + optional: true, + source_span, + }, + allocator, + )); + } + IrExpression::SafeKeyedRead(k) => { + let receiver = std::mem::replace(k.receiver.as_mut(), make_placeholder(allocator)); + let key = std::mem::replace(k.index.as_mut(), make_placeholder(allocator)); + let source_span = k.source_span; + *expr = IrExpression::ResolvedKeyedRead(ArenaBox::new_in( + ResolvedKeyedReadExpr { + receiver: ArenaBox::new_in(receiver, allocator), + key: ArenaBox::new_in(key, allocator), + optional: true, + source_span, + }, + allocator, + )); + } + IrExpression::SafeInvokeFunction(c) => { + let receiver = std::mem::replace(c.receiver.as_mut(), make_placeholder(allocator)); + let args = std::mem::replace(&mut c.args, ArenaVec::new_in(allocator)); + let source_span = c.source_span; + *expr = IrExpression::ResolvedCall(ArenaBox::new_in( + ResolvedCallExpr { + receiver: ArenaBox::new_in(receiver, allocator), + args, + optional: true, + source_span, + }, + allocator, + )); + } + _ => {} + } +} + /// Checks if an IR expression requires a temporary variable to avoid re-evaluation. /// /// Returns true for expressions with side effects (function calls, pipe bindings), @@ -402,6 +565,9 @@ fn create_access_expr<'a>( ResolvedPropertyReadExpr { receiver: ArenaBox::new_in(receiver, allocator), name, + // Legacy expansion produces a plain read inside the `== null ? null` + // ternary, not native optional chaining. + optional: false, source_span, }, allocator, @@ -412,13 +578,19 @@ fn create_access_expr<'a>( ResolvedKeyedReadExpr { receiver: ArenaBox::new_in(receiver, allocator), key: ArenaBox::new_in(key, allocator), + optional: false, source_span, }, allocator, )) } AccessInfo::Call { args, source_span } => IrExpression::ResolvedCall(ArenaBox::new_in( - ResolvedCallExpr { receiver: ArenaBox::new_in(receiver, allocator), args, source_span }, + ResolvedCallExpr { + receiver: ArenaBox::new_in(receiver, allocator), + args, + optional: false, + source_span, + }, allocator, )), } @@ -559,17 +731,39 @@ fn safe_transform<'a>(expr: &mut IrExpression<'a>, ctx: &SafeTransformContext<'a pub fn expand_safe_reads_for_host(job: &mut HostBindingCompilationJob<'_>) { let allocator = job.allocator; + let legacy = job.legacy_optional_chaining(); + // Get the current xref counter value let starting_xref = job.allocate_xref_id().0; let xref_counter = RefCell::new(starting_xref); let ctx = SafeTransformContext { allocator, next_xref: xref_counter }; - // Transform safe access expressions to SafeTernary + // Pass 1: resolve `$safeNavigationMigration(...)` markers. + for op in job.root.create.iter_mut() { + transform_expressions_in_create_op( + op, + &|expr, _flags| { + resolve_safe_navigation_migration(expr, &ctx); + }, + VisitorContextFlag::NONE, + ); + } + for op in job.root.update.iter_mut() { + transform_expressions_in_update_op( + op, + &|expr, _flags| { + resolve_safe_navigation_migration(expr, &ctx); + }, + VisitorContextFlag::NONE, + ); + } + + // Pass 2: expand the remaining safe access expressions per the resolved mode. for op in job.root.create.iter_mut() { transform_expressions_in_create_op( op, &|expr, _flags| { - safe_transform(expr, &ctx); + expand_safe_access(expr, &ctx, legacy); }, VisitorContextFlag::NONE, ); @@ -578,7 +772,7 @@ pub fn expand_safe_reads_for_host(job: &mut HostBindingCompilationJob<'_>) { transform_expressions_in_update_op( op, &|expr, _flags| { - safe_transform(expr, &ctx); + expand_safe_access(expr, &ctx, legacy); }, VisitorContextFlag::NONE, ); diff --git a/crates/oxc_angular_compiler/src/pipeline/phases/generate_variables.rs b/crates/oxc_angular_compiler/src/pipeline/phases/generate_variables.rs index c68147544..28743ed01 100644 --- a/crates/oxc_angular_compiler/src/pipeline/phases/generate_variables.rs +++ b/crates/oxc_angular_compiler/src/pipeline/phases/generate_variables.rs @@ -717,6 +717,7 @@ fn create_context_read_variable<'a>( ResolvedPropertyReadExpr { receiver: Box::new_in(context_expr, allocator), name: context_value, + optional: false, source_span: None, }, allocator, diff --git a/crates/oxc_angular_compiler/src/pipeline/phases/reify/ir_expression.rs b/crates/oxc_angular_compiler/src/pipeline/phases/reify/ir_expression.rs index 9b4d26ba0..17e32fcb2 100644 --- a/crates/oxc_angular_compiler/src/pipeline/phases/reify/ir_expression.rs +++ b/crates/oxc_angular_compiler/src/pipeline/phases/reify/ir_expression.rs @@ -493,7 +493,7 @@ pub fn convert_ir_expression<'a>( ReadPropExpr { receiver: Box::new_in(receiver, allocator), name: resolved.name.clone(), - optional: false, + optional: resolved.optional, source_span: resolved.source_span, }, allocator, @@ -571,7 +571,7 @@ pub fn convert_ir_expression<'a>( fn_expr: Box::new_in(receiver, allocator), args, pure: false, - optional: false, + optional: resolved.optional, source_span: resolved.source_span, }, allocator, @@ -589,7 +589,7 @@ pub fn convert_ir_expression<'a>( ReadKeyExpr { receiver: Box::new_in(receiver, allocator), index: Box::new_in(index, allocator), - optional: false, + optional: resolved.optional, source_span: resolved.source_span, }, allocator, diff --git a/crates/oxc_angular_compiler/src/pipeline/phases/resolve_names.rs b/crates/oxc_angular_compiler/src/pipeline/phases/resolve_names.rs index 84f618d1a..394927a40 100644 --- a/crates/oxc_angular_compiler/src/pipeline/phases/resolve_names.rs +++ b/crates/oxc_angular_compiler/src/pipeline/phases/resolve_names.rs @@ -428,6 +428,7 @@ fn resolve_expression<'a>( allocator, ), name: lexical.name.clone(), + optional: false, source_span: lexical.source_span, }, allocator, @@ -519,6 +520,7 @@ fn resolve_expression<'a>( allocator, ), name: name.clone(), + optional: false, source_span, }, allocator, @@ -937,6 +939,7 @@ fn resolve_angular_expression<'a>( allocator, ), name: name.clone(), + optional: false, source_span, }, allocator, @@ -952,6 +955,7 @@ fn resolve_angular_expression<'a>( ResolvedPropertyReadExpr { receiver: Box::new_in(resolved_receiver, allocator), name: prop_read.name.clone(), + optional: false, source_span: Some(prop_read.source_span.to_span()), }, allocator, @@ -1009,6 +1013,7 @@ fn resolve_angular_expression<'a>( ResolvedCallExpr { receiver: Box::new_in(receiver, allocator), args: resolved_args, + optional: false, source_span: Some(call.source_span.to_span()), }, allocator, @@ -1044,6 +1049,7 @@ fn resolve_angular_expression<'a>( ResolvedKeyedReadExpr { receiver: Box::new_in(receiver, allocator), key: Box::new_in(key, allocator), + optional: false, source_span: Some(keyed.source_span.to_span()), }, allocator, diff --git a/crates/oxc_angular_compiler/src/pipeline/phases/track_fn_optimization.rs b/crates/oxc_angular_compiler/src/pipeline/phases/track_fn_optimization.rs index f1bff218d..740d6ad8f 100644 --- a/crates/oxc_angular_compiler/src/pipeline/phases/track_fn_optimization.rs +++ b/crates/oxc_angular_compiler/src/pipeline/phases/track_fn_optimization.rs @@ -318,6 +318,7 @@ mod tests { ResolvedPropertyReadExpr { receiver: oxc_allocator::Box::new_in(ctx, alloc), name: Ident::from(method_name), + optional: false, source_span: None, }, alloc, @@ -335,6 +336,7 @@ mod tests { ResolvedCallExpr { receiver: oxc_allocator::Box::new_in(prop_read, alloc), args, + optional: false, source_span: None, }, alloc, diff --git a/crates/oxc_angular_compiler/src/pipeline/phases/track_variables.rs b/crates/oxc_angular_compiler/src/pipeline/phases/track_variables.rs index e9e24e440..6c0ce8382 100644 --- a/crates/oxc_angular_compiler/src/pipeline/phases/track_variables.rs +++ b/crates/oxc_angular_compiler/src/pipeline/phases/track_variables.rs @@ -219,6 +219,7 @@ fn transform_angular_expression_for_track<'a>( ResolvedPropertyReadExpr { receiver: Box::new_in(transformed_receiver, allocator), name: prop_read.name.clone(), + optional: false, source_span: None, }, allocator, diff --git a/crates/oxc_angular_compiler/src/pipeline/phases/variable_optimization.rs b/crates/oxc_angular_compiler/src/pipeline/phases/variable_optimization.rs index 21dcf89b6..6a8ac3328 100644 --- a/crates/oxc_angular_compiler/src/pipeline/phases/variable_optimization.rs +++ b/crates/oxc_angular_compiler/src/pipeline/phases/variable_optimization.rs @@ -3501,6 +3501,7 @@ where allocator, ), name: rpr.name.clone(), + optional: rpr.optional, source_span: rpr.source_span, }, allocator, @@ -3537,6 +3538,7 @@ where allocator, ), args, + optional: rc.optional, source_span: rc.source_span, }, allocator, @@ -3554,6 +3556,7 @@ where transform_expression(&rkr.key, allocator, transform), allocator, ), + optional: rkr.optional, source_span: rkr.source_span, }, allocator, diff --git a/crates/oxc_angular_compiler/tests/integration_test.rs b/crates/oxc_angular_compiler/tests/integration_test.rs index 7047820e7..74609b91e 100644 --- a/crates/oxc_angular_compiler/tests/integration_test.rs +++ b/crates/oxc_angular_compiler/tests/integration_test.rs @@ -2038,6 +2038,83 @@ fn test_pipe_in_binary_with_safe_property_read() { insta::assert_snapshot!("pipe_in_binary_with_safe_property_read", js); } +// ---------------------------------------------------------------------------- +// legacyOptionalChaining (Angular v22+): native `?.` vs legacy `== null ? null` +// See issue #317 and angular/angular@2896c93cc1. +// ---------------------------------------------------------------------------- + +#[test] +fn test_safe_navigation_modern_interpolation_v22() { + // Angular v22+ emits native optional chaining, which yields `undefined`. + let js = compile_template_to_js_with_version( + r"
{{user?.name}}
", + "TestComponent", + Some(AngularVersion::new(22, 0, 0)), + ); + assert!(js.contains("ctx.user?.name"), "expected native optional chaining, got:\n{js}"); + assert!(!js.contains("== null"), "modern mode must not emit the legacy null ternary:\n{js}"); +} + +#[test] +fn test_safe_navigation_modern_chain_v22() { + let js = compile_template_to_js_with_version( + r"
{{user?.address?.city}}
", + "TestComponent", + Some(AngularVersion::new(22, 0, 0)), + ); + assert!(js.contains("ctx.user?.address?.city"), "expected chained native `?.`, got:\n{js}"); +} + +#[test] +fn test_safe_navigation_modern_mixed_chain_v22() { + // Only the safe steps become optional; the plain `.b` stays a normal read. + let js = compile_template_to_js_with_version( + r"
{{a?.b.c?.d}}
", + "TestComponent", + Some(AngularVersion::new(22, 0, 0)), + ); + assert!(js.contains("ctx.a?.b.c?.d"), "expected mixed optional/plain chain, got:\n{js}"); +} + +#[test] +fn test_safe_call_modern_v22() { + let js = compile_template_to_js_with_version( + r"
{{getData?.()}}
", + "TestComponent", + Some(AngularVersion::new(22, 0, 0)), + ); + assert!(js.contains("ctx.getData?.()"), "expected native optional call, got:\n{js}"); +} + +#[test] +fn test_safe_navigation_legacy_on_v21() { + // Pre-v22 keeps the legacy `== null ? null` expansion. + let js = compile_template_to_js_with_version( + r"
{{user?.name}}
", + "TestComponent", + Some(AngularVersion::new(21, 0, 0)), + ); + assert!(js.contains("== null"), "v21 must use the legacy null ternary, got:\n{js}"); + assert!(!js.contains("ctx.user?.name"), "v21 must not emit native optional chaining:\n{js}"); +} + +#[test] +fn test_safe_navigation_migration_forces_legacy_on_v22() { + // The `$safeNavigationMigration(...)` magic function opts a subtree back into + // legacy null semantics even on a modern (v22) target, and is stripped from + // the output. + let js = compile_template_to_js_with_version( + r"
{{ $safeNavigationMigration(user?.name) }}
", + "TestComponent", + Some(AngularVersion::new(22, 0, 0)), + ); + assert!(js.contains("== null"), "wrapped subtree must use the legacy null ternary, got:\n{js}"); + assert!( + !js.contains("$safeNavigationMigration"), + "the migration wrapper must be stripped from the output:\n{js}" + ); +} + // ============================================================================ // Event Modifier Tests // ============================================================================ diff --git a/napi/angular-compiler/index.d.ts b/napi/angular-compiler/index.d.ts index 5e13671d3..97a18ff1f 100644 --- a/napi/angular-compiler/index.d.ts +++ b/napi/angular-compiler/index.d.ts @@ -768,6 +768,17 @@ export interface TransformOptions { * When not set, assumes latest Angular version (v19+ behavior). */ angularVersion?: AngularVersion + /** + * Override for the `legacyOptionalChaining` Angular compiler option + * (`angularCompilerOptions.legacyOptionalChaining` in `tsconfig.json`). + * + * Controls the safe-navigation operator (`?.`) in template expressions. + * When `true`, always emits the legacy `== null ? null` form; when `false`, + * emits native optional chaining (yielding `undefined`). When unset, the + * default is derived from `angularVersion` (legacy for < v22, modern for + * >= v22, legacy when the version is unknown). + */ + legacyOptionalChaining?: boolean /** The CSS selector that identifies this component in a template. */ selector?: string /** diff --git a/napi/angular-compiler/src/lib.rs b/napi/angular-compiler/src/lib.rs index eb06ffa8c..e658a9e2c 100644 --- a/napi/angular-compiler/src/lib.rs +++ b/napi/angular-compiler/src/lib.rs @@ -138,6 +138,16 @@ pub struct TransformOptions { /// When not set, assumes latest Angular version (v19+ behavior). pub angular_version: Option, + /// Override for the `legacyOptionalChaining` Angular compiler option + /// (`angularCompilerOptions.legacyOptionalChaining` in `tsconfig.json`). + /// + /// Controls the safe-navigation operator (`?.`) in template expressions. + /// When `true`, always emits the legacy `== null ? null` form; when `false`, + /// emits native optional chaining (yielding `undefined`). When unset, the + /// default is derived from `angularVersion` (legacy for < v22, modern for + /// >= v22, legacy when the version is unknown). + pub legacy_optional_chaining: Option, + // Component metadata fields for full compilation testing // These mirror Angular's @Component decorator options. /// The CSS selector that identifies this component in a template. @@ -229,6 +239,7 @@ impl From for RustTransformOptions { advanced_optimizations: options.advanced_optimizations.unwrap_or(false), i18n_use_external_ids: options.i18n_use_external_ids.unwrap_or(true), angular_version: options.angular_version.map(Into::into), + legacy_optional_chaining: options.legacy_optional_chaining, // Component metadata overrides selector: options.selector, standalone: options.standalone, From b5b0eb0e66e3bd8e490b2d38e15786fcc59e683f Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Mon, 1 Jun 2026 13:49:40 -0500 Subject: [PATCH 02/16] chore(conformance): bump angular submodule to v22.0.0-rc.2 Move the conformance submodule from v21.2.2 to v22.0.0-rc.2 and regenerate the extracted fixtures + snapshot against the v22 specs. Pass rate is 1235/1264 (97.7%); the 29 new failures are genuine v22 feature/behavior additions not yet implemented in OXC, tracked as follow-up: the `in` expression operator, `@switch` exhaustive `@default never`, `@defer` `idle(timeout)`, `data-*` binding prefixes, `@let` source spans, and several ShadowCss `:host`/comment cases. Fixture hygiene fixed along the way: - store `file_path` repo-relative instead of an absolute home dir - restore the trailing newline on generated fixtures - drop orphaned shadow_css_polyfills_spec.json (spec removed in v22) Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/angular_conformance/README.md | 2 +- .../compiler_facade_interface_spec.json | 2 +- .../fixtures/expression_parser_ast_spec.json | 2 +- .../expression_parser_lexer_spec.json | 2 +- .../expression_parser_parser_spec.json | 39 +- .../expression_parser_serializer_spec.json | 2 +- .../fixtures/i18n_digest_spec.json | 2 +- .../fixtures/i18n_extractor_merger_spec.json | 6 +- .../fixtures/i18n_i18n_ast_spec.json | 2 +- .../fixtures/i18n_i18n_html_parser_spec.json | 2 +- .../fixtures/i18n_i18n_parser_spec.json | 2 +- .../i18n_integration_xliff2_spec.json | 2 +- .../fixtures/i18n_integration_xliff_spec.json | 2 +- .../i18n_integration_xmb_xtb_spec.json | 2 +- .../fixtures/i18n_message_bundle_spec.json | 2 +- .../i18n_serializers_i18n_ast_spec.json | 2 +- .../i18n_serializers_placeholder_spec.json | 2 +- .../i18n_serializers_xliff2_spec.json | 2 +- .../fixtures/i18n_serializers_xliff_spec.json | 2 +- .../fixtures/i18n_serializers_xmb_spec.json | 2 +- .../i18n_serializers_xml_helper_spec.json | 2 +- .../fixtures/i18n_serializers_xtb_spec.json | 2 +- .../i18n_translation_bundle_spec.json | 2 +- .../i18n_whitespace_sensitivity_spec.json | 2 +- .../fixtures/integration_spec.json | 2 +- .../ml_parser_ast_serializer_spec.json | 22 +- .../fixtures/ml_parser_html_parser_spec.json | 1409 +++- .../ml_parser_html_whitespaces_spec.json | 388 +- .../ml_parser_inline_comment_spec.json | 57 + .../fixtures/ml_parser_lexer_spec.json | 6249 +++++++++++++---- ...utput_abstract_emitter_node_only_spec.json | 20 +- .../output_abstract_emitter_spec.json | 12 +- .../fixtures/output_output_jit_spec.json | 2 +- .../fixtures/output_source_map_spec.json | 2 +- .../render3_r3_ast_absolute_span_spec.json | 372 +- .../fixtures/render3_r3_ast_spans_spec.json | 1044 ++- .../fixtures/render3_r3_ast_visitor_spec.json | 17 + .../render3_r3_template_transform_spec.json | 3154 +++++++-- .../fixtures/render3_style_parser_spec.json | 61 +- .../fixtures/render3_view_binding_spec.json | 48 +- .../fixtures/render3_view_i18n_spec.json | 2 +- ...der3_view_parse_template_options_spec.json | 2 +- ...hema_dom_element_schema_registry_spec.json | 28 +- .../schema_trusted_types_sinks_spec.json | 2 +- .../fixtures/selector_selector_spec.json | 2 +- .../fixtures/shadow_css_at_rules_spec.json | 2 +- ...shadow_css_host_and_host_context_spec.json | 56 +- .../fixtures/shadow_css_keyframes_spec.json | 7 +- .../fixtures/shadow_css_ng_deep_spec.json | 2 +- .../fixtures/shadow_css_polyfills_spec.json | 32 - .../shadow_css_process_rules_spec.json | 2 +- .../shadow_css_repeat_groups_spec.json | 2 +- .../fixtures/shadow_css_shadow_css_spec.json | 43 +- .../fixtures/style_url_resolver_spec.json | 2 +- .../fixtures/util_spec.json | 2 +- .../snapshots/angular.snap.md | 598 +- .../angular_conformance/src/extractor/mod.rs | 14 +- crates/angular_conformance/src/runner.rs | 2 +- crates/oxc_angular_compiler/angular | 2 +- 59 files changed, 11267 insertions(+), 2483 deletions(-) create mode 100644 crates/angular_conformance/fixtures/ml_parser_inline_comment_spec.json create mode 100644 crates/angular_conformance/fixtures/render3_r3_ast_visitor_spec.json delete mode 100644 crates/angular_conformance/fixtures/shadow_css_polyfills_spec.json diff --git a/crates/angular_conformance/README.md b/crates/angular_conformance/README.md index e255c61b6..736bc970f 100644 --- a/crates/angular_conformance/README.md +++ b/crates/angular_conformance/README.md @@ -4,7 +4,7 @@ A conformance testing framework that validates the oxc Angular compiler implemen ## Overview -This crate extracts test cases from Angular's TypeScript spec files and runs them against the Rust implementation to ensure compatibility. Currently maintains **100% pass rate** across 1,252 extracted test assertions. +This crate extracts test cases from Angular's TypeScript spec files and runs them against the Rust implementation to ensure compatibility. Against Angular **v22.0.0-rc.2** it currently passes **1,235 / 1,264 (97.7%)** extracted test assertions; the remaining 29 track v22 features not yet implemented (the `in` operator, `@switch` exhaustive `@default never`, `@defer` `idle(timeout)`, `data-*` binding prefixes, `@let` spans, and several ShadowCss cases). ## Architecture diff --git a/crates/angular_conformance/fixtures/compiler_facade_interface_spec.json b/crates/angular_conformance/fixtures/compiler_facade_interface_spec.json index 581ec8324..cfaecf2ac 100644 --- a/crates/angular_conformance/fixtures/compiler_facade_interface_spec.json +++ b/crates/angular_conformance/fixtures/compiler_facade_interface_spec.json @@ -1,5 +1,5 @@ { "name": "compiler_facade_interface_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/compiler_facade_interface_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/compiler_facade_interface_spec.ts", "test_groups": [] } diff --git a/crates/angular_conformance/fixtures/expression_parser_ast_spec.json b/crates/angular_conformance/fixtures/expression_parser_ast_spec.json index 4af87fa72..3d1398039 100644 --- a/crates/angular_conformance/fixtures/expression_parser_ast_spec.json +++ b/crates/angular_conformance/fixtures/expression_parser_ast_spec.json @@ -1,6 +1,6 @@ { "name": "ast_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/expression_parser/ast_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/expression_parser/ast_spec.ts", "test_groups": [ { "name": "RecursiveAstVisitor", diff --git a/crates/angular_conformance/fixtures/expression_parser_lexer_spec.json b/crates/angular_conformance/fixtures/expression_parser_lexer_spec.json index 9dbe2a637..800f28615 100644 --- a/crates/angular_conformance/fixtures/expression_parser_lexer_spec.json +++ b/crates/angular_conformance/fixtures/expression_parser_lexer_spec.json @@ -1,6 +1,6 @@ { "name": "lexer_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/expression_parser/lexer_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/expression_parser/lexer_spec.ts", "test_groups": [ { "name": "lexer", diff --git a/crates/angular_conformance/fixtures/expression_parser_parser_spec.json b/crates/angular_conformance/fixtures/expression_parser_parser_spec.json index 29d3ea7a3..3045d33f6 100644 --- a/crates/angular_conformance/fixtures/expression_parser_parser_spec.json +++ b/crates/angular_conformance/fixtures/expression_parser_parser_spec.json @@ -1,6 +1,6 @@ { "name": "parser_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/expression_parser/parser_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/expression_parser/parser_spec.ts", "test_groups": [ { "name": "parser", @@ -1474,6 +1474,32 @@ "type": "CheckAction", "input": "('key' in obj) && true", "expected": "(\"key\" in obj) && true" + }, + { + "type": "CheckAction", + "input": "'in' in {in: foo}", + "expected": "\"in\" in {in: foo}" + } + ] + }, + { + "name": "should throw on invalid in expressions", + "path": "parser/parseAction/should throw on invalid in expressions", + "assertions": [ + { + "type": "ExpectActionError", + "input": "in", + "error_contains": "Unexpected token in" + }, + { + "type": "ExpectActionError", + "input": "in foo", + "error_contains": "Unexpected token in" + }, + { + "type": "ExpectActionError", + "input": "'foo' in", + "error_contains": "Unexpected end of expression: 'foo' in at the end of the expression ['foo' in]" } ] }, @@ -2074,17 +2100,6 @@ } ] }, - { - "name": "should report missing comma between arrow function parameters", - "path": "parser/parseBinding/arrow functions/arrow function validations/should report missing comma between arrow function parameters", - "assertions": [ - { - "type": "ExpectBindingError", - "input": "(a b) => a + b", - "error_contains": "Missing expected ," - } - ] - }, { "name": "should report an error inside the arrow function expression", "path": "parser/parseBinding/arrow functions/arrow function validations/should report an error inside the arrow function expression", diff --git a/crates/angular_conformance/fixtures/expression_parser_serializer_spec.json b/crates/angular_conformance/fixtures/expression_parser_serializer_spec.json index ac501d75e..609823cf9 100644 --- a/crates/angular_conformance/fixtures/expression_parser_serializer_spec.json +++ b/crates/angular_conformance/fixtures/expression_parser_serializer_spec.json @@ -1,6 +1,6 @@ { "name": "serializer_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/expression_parser/serializer_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/expression_parser/serializer_spec.ts", "test_groups": [ { "name": "serializer", diff --git a/crates/angular_conformance/fixtures/i18n_digest_spec.json b/crates/angular_conformance/fixtures/i18n_digest_spec.json index 05d859c67..fa0e734a3 100644 --- a/crates/angular_conformance/fixtures/i18n_digest_spec.json +++ b/crates/angular_conformance/fixtures/i18n_digest_spec.json @@ -1,6 +1,6 @@ { "name": "digest_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/digest_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/digest_spec.ts", "test_groups": [ { "name": "digest", diff --git a/crates/angular_conformance/fixtures/i18n_extractor_merger_spec.json b/crates/angular_conformance/fixtures/i18n_extractor_merger_spec.json index a44b45078..242da7a4f 100644 --- a/crates/angular_conformance/fixtures/i18n_extractor_merger_spec.json +++ b/crates/angular_conformance/fixtures/i18n_extractor_merger_spec.json @@ -1,6 +1,6 @@ { "name": "extractor_merger_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/extractor_merger_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/extractor_merger_spec.ts", "test_groups": [ { "name": "Extractor", @@ -153,8 +153,8 @@ "assertions": [] }, { - "name": "should ignore implicit elements in non translatable ICU messages", - "path": "Extractor/ICU messages/should ignore implicit elements in non translatable ICU messages", + "name": "should ignore implicit elements in non translatable ICU messages 2", + "path": "Extractor/ICU messages/should ignore implicit elements in non translatable ICU messages 2", "assertions": [] } ] diff --git a/crates/angular_conformance/fixtures/i18n_i18n_ast_spec.json b/crates/angular_conformance/fixtures/i18n_i18n_ast_spec.json index 818089368..3b4d43882 100644 --- a/crates/angular_conformance/fixtures/i18n_i18n_ast_spec.json +++ b/crates/angular_conformance/fixtures/i18n_i18n_ast_spec.json @@ -1,6 +1,6 @@ { "name": "i18n_ast_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/i18n_ast_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/i18n_ast_spec.ts", "test_groups": [ { "name": "Message", diff --git a/crates/angular_conformance/fixtures/i18n_i18n_html_parser_spec.json b/crates/angular_conformance/fixtures/i18n_i18n_html_parser_spec.json index c2d406a0f..45b92d79c 100644 --- a/crates/angular_conformance/fixtures/i18n_i18n_html_parser_spec.json +++ b/crates/angular_conformance/fixtures/i18n_i18n_html_parser_spec.json @@ -1,6 +1,6 @@ { "name": "i18n_html_parser_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/i18n_html_parser_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/i18n_html_parser_spec.ts", "test_groups": [ { "name": "I18N html parser", diff --git a/crates/angular_conformance/fixtures/i18n_i18n_parser_spec.json b/crates/angular_conformance/fixtures/i18n_i18n_parser_spec.json index eb1a7575f..e8745b0a0 100644 --- a/crates/angular_conformance/fixtures/i18n_i18n_parser_spec.json +++ b/crates/angular_conformance/fixtures/i18n_i18n_parser_spec.json @@ -1,6 +1,6 @@ { "name": "i18n_parser_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/i18n_parser_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/i18n_parser_spec.ts", "test_groups": [ { "name": "I18nParser", diff --git a/crates/angular_conformance/fixtures/i18n_integration_xliff2_spec.json b/crates/angular_conformance/fixtures/i18n_integration_xliff2_spec.json index 0355e11dc..b42afd958 100644 --- a/crates/angular_conformance/fixtures/i18n_integration_xliff2_spec.json +++ b/crates/angular_conformance/fixtures/i18n_integration_xliff2_spec.json @@ -1,5 +1,5 @@ { "name": "integration_xliff2_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/integration_xliff2_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/integration_xliff2_spec.ts", "test_groups": [] } diff --git a/crates/angular_conformance/fixtures/i18n_integration_xliff_spec.json b/crates/angular_conformance/fixtures/i18n_integration_xliff_spec.json index 08aa18a4c..785927a86 100644 --- a/crates/angular_conformance/fixtures/i18n_integration_xliff_spec.json +++ b/crates/angular_conformance/fixtures/i18n_integration_xliff_spec.json @@ -1,5 +1,5 @@ { "name": "integration_xliff_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/integration_xliff_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/integration_xliff_spec.ts", "test_groups": [] } diff --git a/crates/angular_conformance/fixtures/i18n_integration_xmb_xtb_spec.json b/crates/angular_conformance/fixtures/i18n_integration_xmb_xtb_spec.json index c666a5ebe..1547eeb07 100644 --- a/crates/angular_conformance/fixtures/i18n_integration_xmb_xtb_spec.json +++ b/crates/angular_conformance/fixtures/i18n_integration_xmb_xtb_spec.json @@ -1,5 +1,5 @@ { "name": "integration_xmb_xtb_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/integration_xmb_xtb_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/integration_xmb_xtb_spec.ts", "test_groups": [] } diff --git a/crates/angular_conformance/fixtures/i18n_message_bundle_spec.json b/crates/angular_conformance/fixtures/i18n_message_bundle_spec.json index f71ab7303..6579d602f 100644 --- a/crates/angular_conformance/fixtures/i18n_message_bundle_spec.json +++ b/crates/angular_conformance/fixtures/i18n_message_bundle_spec.json @@ -1,6 +1,6 @@ { "name": "message_bundle_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/message_bundle_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/message_bundle_spec.ts", "test_groups": [ { "name": "MessageBundle", diff --git a/crates/angular_conformance/fixtures/i18n_serializers_i18n_ast_spec.json b/crates/angular_conformance/fixtures/i18n_serializers_i18n_ast_spec.json index 086c1dd80..69e11ab00 100644 --- a/crates/angular_conformance/fixtures/i18n_serializers_i18n_ast_spec.json +++ b/crates/angular_conformance/fixtures/i18n_serializers_i18n_ast_spec.json @@ -1,6 +1,6 @@ { "name": "i18n_ast_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/i18n_ast_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/i18n_ast_spec.ts", "test_groups": [ { "name": "i18n AST", diff --git a/crates/angular_conformance/fixtures/i18n_serializers_placeholder_spec.json b/crates/angular_conformance/fixtures/i18n_serializers_placeholder_spec.json index f09cdf163..afdca773a 100644 --- a/crates/angular_conformance/fixtures/i18n_serializers_placeholder_spec.json +++ b/crates/angular_conformance/fixtures/i18n_serializers_placeholder_spec.json @@ -1,6 +1,6 @@ { "name": "placeholder_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/placeholder_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/placeholder_spec.ts", "test_groups": [ { "name": "PlaceholderRegistry", diff --git a/crates/angular_conformance/fixtures/i18n_serializers_xliff2_spec.json b/crates/angular_conformance/fixtures/i18n_serializers_xliff2_spec.json index b284b7571..2b8d630d4 100644 --- a/crates/angular_conformance/fixtures/i18n_serializers_xliff2_spec.json +++ b/crates/angular_conformance/fixtures/i18n_serializers_xliff2_spec.json @@ -1,6 +1,6 @@ { "name": "xliff2_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/xliff2_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/xliff2_spec.ts", "test_groups": [ { "name": "XLIFF 2.0 serializer", diff --git a/crates/angular_conformance/fixtures/i18n_serializers_xliff_spec.json b/crates/angular_conformance/fixtures/i18n_serializers_xliff_spec.json index 07e541405..7f26539d5 100644 --- a/crates/angular_conformance/fixtures/i18n_serializers_xliff_spec.json +++ b/crates/angular_conformance/fixtures/i18n_serializers_xliff_spec.json @@ -1,6 +1,6 @@ { "name": "xliff_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/xliff_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/xliff_spec.ts", "test_groups": [ { "name": "XLIFF serializer", diff --git a/crates/angular_conformance/fixtures/i18n_serializers_xmb_spec.json b/crates/angular_conformance/fixtures/i18n_serializers_xmb_spec.json index 4b8dfa494..00aded913 100644 --- a/crates/angular_conformance/fixtures/i18n_serializers_xmb_spec.json +++ b/crates/angular_conformance/fixtures/i18n_serializers_xmb_spec.json @@ -1,6 +1,6 @@ { "name": "xmb_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/xmb_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/xmb_spec.ts", "test_groups": [ { "name": "XMB serializer", diff --git a/crates/angular_conformance/fixtures/i18n_serializers_xml_helper_spec.json b/crates/angular_conformance/fixtures/i18n_serializers_xml_helper_spec.json index 2e502b051..a6a84107b 100644 --- a/crates/angular_conformance/fixtures/i18n_serializers_xml_helper_spec.json +++ b/crates/angular_conformance/fixtures/i18n_serializers_xml_helper_spec.json @@ -1,6 +1,6 @@ { "name": "xml_helper_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/xml_helper_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/xml_helper_spec.ts", "test_groups": [ { "name": "XML helper", diff --git a/crates/angular_conformance/fixtures/i18n_serializers_xtb_spec.json b/crates/angular_conformance/fixtures/i18n_serializers_xtb_spec.json index 91aed981f..1490c78c7 100644 --- a/crates/angular_conformance/fixtures/i18n_serializers_xtb_spec.json +++ b/crates/angular_conformance/fixtures/i18n_serializers_xtb_spec.json @@ -1,6 +1,6 @@ { "name": "xtb_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/xtb_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/serializers/xtb_spec.ts", "test_groups": [ { "name": "XTB serializer", diff --git a/crates/angular_conformance/fixtures/i18n_translation_bundle_spec.json b/crates/angular_conformance/fixtures/i18n_translation_bundle_spec.json index 0e9fbace6..0966156a2 100644 --- a/crates/angular_conformance/fixtures/i18n_translation_bundle_spec.json +++ b/crates/angular_conformance/fixtures/i18n_translation_bundle_spec.json @@ -1,6 +1,6 @@ { "name": "translation_bundle_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/translation_bundle_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/translation_bundle_spec.ts", "test_groups": [ { "name": "TranslationBundle", diff --git a/crates/angular_conformance/fixtures/i18n_whitespace_sensitivity_spec.json b/crates/angular_conformance/fixtures/i18n_whitespace_sensitivity_spec.json index cdb8b6ef3..15cdb22dd 100644 --- a/crates/angular_conformance/fixtures/i18n_whitespace_sensitivity_spec.json +++ b/crates/angular_conformance/fixtures/i18n_whitespace_sensitivity_spec.json @@ -1,6 +1,6 @@ { "name": "whitespace_sensitivity_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/whitespace_sensitivity_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/i18n/whitespace_sensitivity_spec.ts", "test_groups": [ { "name": "i18nPreserveWhitespaceForLegacyExtraction", diff --git a/crates/angular_conformance/fixtures/integration_spec.json b/crates/angular_conformance/fixtures/integration_spec.json index d23da8112..a96e23801 100644 --- a/crates/angular_conformance/fixtures/integration_spec.json +++ b/crates/angular_conformance/fixtures/integration_spec.json @@ -1,6 +1,6 @@ { "name": "integration_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/integration_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/integration_spec.ts", "test_groups": [ { "name": "integration tests", diff --git a/crates/angular_conformance/fixtures/ml_parser_ast_serializer_spec.json b/crates/angular_conformance/fixtures/ml_parser_ast_serializer_spec.json index 8cf0a1423..f576ba370 100644 --- a/crates/angular_conformance/fixtures/ml_parser_ast_serializer_spec.json +++ b/crates/angular_conformance/fixtures/ml_parser_ast_serializer_spec.json @@ -1,6 +1,6 @@ { "name": "ast_serializer_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/ml_parser/ast_serializer_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/ml_parser/ast_serializer_spec.ts", "test_groups": [ { "name": "Node serializer", @@ -13,7 +13,9 @@ { "type": "SerializeNodes", "input": "

", - "expected": ["

"] + "expected": [ + "

" + ] } ] }, @@ -24,7 +26,9 @@ { "type": "SerializeNodes", "input": "

", - "expected": ["

"] + "expected": [ + "

" + ] } ] }, @@ -35,7 +39,9 @@ { "type": "SerializeNodes", "input": "some text", - "expected": ["some text"] + "expected": [ + "some text" + ] } ] }, @@ -46,7 +52,9 @@ { "type": "SerializeNodes", "input": "{number, plural, =0 {none} =1 {one} other {many}}", - "expected": ["{number, plural, =0 {none} =1 {one} other {many}}"] + "expected": [ + "{number, plural, =0 {none} =1 {one} other {many}}" + ] } ] }, @@ -57,7 +65,9 @@ { "type": "SerializeNodes", "input": "", - "expected": [""] + "expected": [ + "" + ] } ] }, diff --git a/crates/angular_conformance/fixtures/ml_parser_html_parser_spec.json b/crates/angular_conformance/fixtures/ml_parser_html_parser_spec.json index 3a8800645..7646e2425 100644 --- a/crates/angular_conformance/fixtures/ml_parser_html_parser_spec.json +++ b/crates/angular_conformance/fixtures/ml_parser_html_parser_spec.json @@ -1,6 +1,6 @@ { "name": "html_parser_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/ml_parser/html_parser_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/ml_parser/html_parser_spec.ts", "test_groups": [ { "name": "HtmlParser", @@ -19,7 +19,16 @@ { "type": "HumanizeDom", "input": "a", - "expected": [["html.Text", "a", 0.0, ["a"]]] + "expected": [ + [ + "html.Text", + "a", + 0.0, + [ + "a" + ] + ] + ] } ] }, @@ -31,8 +40,19 @@ "type": "HumanizeDom", "input": "
a
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Text", "a", 1.0, ["a"]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Text", + "a", + 1.0, + [ + "a" + ] + ] ] } ] @@ -45,8 +65,19 @@ "type": "HumanizeDom", "input": "a", "expected": [ - ["html.Element", "ng-template", 0.0], - ["html.Text", "a", 1.0, ["a"]] + [ + "html.Element", + "ng-template", + 0.0 + ], + [ + "html.Text", + "a", + 1.0, + [ + "a" + ] + ] ] } ] @@ -58,7 +89,16 @@ { "type": "HumanizeDom", "input": "", - "expected": [["html.Text", "text", 0.0, ["text"]]] + "expected": [ + [ + "html.Text", + "text", + 0.0, + [ + "text" + ] + ] + ] } ] }, @@ -70,8 +110,26 @@ "type": "HumanizeDom", "input": "
🛈
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Text", "🛈", 1.0, [""], ["🛈", "🛈"], [""]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Text", + "🛈", + 1.0, + [ + "" + ], + [ + "🛈", + "🛈" + ], + [ + "" + ] + ] ] } ] @@ -84,8 +142,84 @@ "type": "HumanizeDom", "input": "
🛈
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Text", "🛈", 1.0, [""], ["🛈", "🛈"], [""]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Text", + "🛈", + 1.0, + [ + "" + ], + [ + "🛈", + "🛈" + ], + [ + "" + ] + ] + ] + } + ] + }, + { + "name": "should parse named HTML entities containing digits", + "path": "HtmlParser/parse/text nodes/should parse named HTML entities containing digits", + "assertions": [ + { + "type": "HumanizeDom", + "input": "
¹
", + "expected": [ + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Text", + "¹", + 1.0, + [ + "" + ], + [ + "¹", + "¹" + ], + [ + "" + ] + ] + ] + }, + { + "type": "HumanizeDom", + "input": "
½
", + "expected": [ + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Text", + "½", + 1.0, + [ + "" + ], + [ + "½", + "½" + ], + [ + "" + ] + ] ] } ] @@ -108,7 +242,13 @@ { "type": "HumanizeDom", "input": "
", - "expected": [["html.Element", "div", 0.0]] + "expected": [ + [ + "html.Element", + "div", + 0.0 + ] + ] } ] }, @@ -120,8 +260,16 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Element", "span", 1.0] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Element", + "span", + 1.0 + ] ] } ] @@ -134,8 +282,16 @@ "type": "HumanizeDom", "input": "", "expected": [ - ["html.Element", "ng-template", 0.0], - ["html.Element", "span", 1.0] + [ + "html.Element", + "ng-template", + 0.0 + ], + [ + "html.Element", + "span", + 1.0 + ] ] } ] @@ -148,9 +304,27 @@ "type": "HumanizeDom", "input": "", "expected": [ - ["html.Element", "link", 0.0], - ["html.Attribute", "rel", "author license", ["author license"]], - ["html.Attribute", "href", "/about", ["/about"]] + [ + "html.Element", + "link", + 0.0 + ], + [ + "html.Attribute", + "rel", + "author license", + [ + "author license" + ] + ], + [ + "html.Attribute", + "href", + "/about", + [ + "/about" + ] + ] ] } ] @@ -173,10 +347,32 @@ "type": "HumanizeDom", "input": "

before
after

", "expected": [ - ["html.Element", "p", 0.0], - ["html.Text", "before", 1.0, ["before"]], - ["html.Element", "br", 1.0], - ["html.Text", "after", 1.0, ["after"]] + [ + "html.Element", + "p", + 0.0 + ], + [ + "html.Text", + "before", + 1.0, + [ + "before" + ] + ], + [ + "html.Element", + "br", + 1.0 + ], + [ + "html.Text", + "after", + 1.0, + [ + "after" + ] + ] ] } ] @@ -189,11 +385,37 @@ "type": "HumanizeDom", "input": "

1

2

", "expected": [ - ["html.Element", "div", 0.0], - ["html.Element", "p", 1.0], - ["html.Text", "1", 2.0, ["1"]], - ["html.Element", "p", 1.0], - ["html.Text", "2", 2.0, ["2"]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Element", + "p", + 1.0 + ], + [ + "html.Text", + "1", + 2.0, + [ + "1" + ] + ], + [ + "html.Element", + "p", + 1.0 + ], + [ + "html.Text", + "2", + 2.0, + [ + "2" + ] + ] ] } ] @@ -206,10 +428,26 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "ul", 0.0], - ["html.Element", "li", 1.0], - ["html.Element", "ul", 2.0], - ["html.Element", "li", 3.0] + [ + "html.Element", + "ul", + 0.0 + ], + [ + "html.Element", + "li", + 1.0 + ], + [ + "html.Element", + "ul", + 2.0 + ], + [ + "html.Element", + "li", + 3.0 + ] ] } ] @@ -222,8 +460,16 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Element", "tr", 1.0] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Element", + "tr", + 1.0 + ] ] } ] @@ -235,7 +481,13 @@ { "type": "HumanizeDom", "input": "", - "expected": [["html.Element", ":myns:div", 0.0]] + "expected": [ + [ + "html.Element", + ":myns:div", + 0.0 + ] + ] } ] }, @@ -246,7 +498,13 @@ { "type": "HumanizeDom", "input": "", - "expected": [["html.Element", ":svg:svg", 0.0]] + "expected": [ + [ + "html.Element", + ":svg:svg", + 0.0 + ] + ] } ] }, @@ -258,8 +516,16 @@ "type": "HumanizeDom", "input": "

", "expected": [ - ["html.Element", ":myns:div", 0.0], - ["html.Element", ":myns:p", 1.0] + [ + "html.Element", + ":myns:div", + 0.0 + ], + [ + "html.Element", + ":myns:p", + 1.0 + ] ] } ] @@ -276,7 +542,14 @@ { "type": "HumanizeDom", "input": "", - "expected": [["html.Element", "input", 0.0, "#selfClosing"]] + "expected": [ + [ + "html.Element", + "input", + 0.0, + "#selfClosing" + ] + ] } ] }, @@ -287,7 +560,14 @@ { "type": "HumanizeDom", "input": "", - "expected": [["html.Element", ":math:math", 0.0, "#selfClosing"]] + "expected": [ + [ + "html.Element", + ":math:math", + 0.0, + "#selfClosing" + ] + ] } ] }, @@ -299,13 +579,50 @@ "type": "HumanizeDom", "input": "

\n

\n\n
\n\n", "expected": [ - ["html.Element", "p", 0.0], - ["html.Text", "\n", 1.0, ["\n"]], - ["html.Element", "textarea", 0.0], - ["html.Element", "pre", 0.0], - ["html.Text", "\n", 1.0, ["\n"]], - ["html.Element", "listing", 0.0], - ["html.Text", "\n", 1.0, ["\n"]] + [ + "html.Element", + "p", + 0.0 + ], + [ + "html.Text", + "\n", + 1.0, + [ + "\n" + ] + ], + [ + "html.Element", + "textarea", + 0.0 + ], + [ + "html.Element", + "pre", + 0.0 + ], + [ + "html.Text", + "\n", + 1.0, + [ + "\n" + ] + ], + [ + "html.Element", + "listing", + 0.0 + ], + [ + "html.Text", + "\n", + 1.0, + [ + "\n" + ] + ] ] } ] @@ -322,7 +639,13 @@ { "type": "HumanizeDom", "input": "", - "expected": [["html.Element", "constructor", 0.0]] + "expected": [ + [ + "html.Element", + "constructor", + 0.0 + ] + ] } ] } @@ -343,8 +666,19 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Attribute", "animate.enter", "foo", ["foo"]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Attribute", + "animate.enter", + "foo", + [ + "foo" + ] + ] ] } ] @@ -357,8 +691,19 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Attribute", "animate.leave", "bar", ["bar"]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Attribute", + "animate.leave", + "bar", + [ + "bar" + ] + ] ] } ] @@ -371,8 +716,19 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Attribute", "animateAbc", "bar", ["bar"]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Attribute", + "animateAbc", + "bar", + [ + "bar" + ] + ] ] } ] @@ -385,9 +741,27 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Attribute", "animate.enter", "foo", ["foo"]], - ["html.Attribute", "animate.leave", "bar", ["bar"]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Attribute", + "animate.enter", + "foo", + [ + "foo" + ] + ], + [ + "html.Attribute", + "animate.leave", + "bar", + [ + "bar" + ] + ] ] } ] @@ -400,8 +774,19 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Attribute", "[animate.enter]", "'foo'", ["'foo'"]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Attribute", + "[animate.enter]", + "'foo'", + [ + "'foo'" + ] + ] ] } ] @@ -414,12 +799,18 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], + [ + "html.Element", + "div", + 0.0 + ], [ "html.Attribute", "[animate.leave]", "['bar', 'baz']", - ["['bar', 'baz']"] + [ + "['bar', 'baz']" + ] ] ] } @@ -433,12 +824,18 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], + [ + "html.Element", + "div", + 0.0 + ], [ "html.Attribute", "(animate.enter)", "onAnimation($event)", - ["onAnimation($event)"] + [ + "onAnimation($event)" + ] ] ] } @@ -452,12 +849,18 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], + [ + "html.Element", + "div", + 0.0 + ], [ "html.Attribute", "(animate.leave)", "onAnimation($event)", - ["onAnimation($event)"] + [ + "onAnimation($event)" + ] ] ] } @@ -471,8 +874,19 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Attribute", "(animateXYZ)", "onAnimation()", ["onAnimation()"]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Attribute", + "(animateXYZ)", + "onAnimation()", + [ + "onAnimation()" + ] + ] ] } ] @@ -485,13 +899,26 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Attribute", "[animate.enter]", "'foo'", ["'foo'"]], + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Attribute", + "[animate.enter]", + "'foo'", + [ + "'foo'" + ] + ], [ "html.Attribute", "(animate.leave)", "onAnimation($event)", - ["onAnimation($event)"] + [ + "onAnimation($event)" + ] ] ] } @@ -509,9 +936,27 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Attribute", "kEy", "v", ["v"]], - ["html.Attribute", "key2", "v2", ["v2"]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Attribute", + "kEy", + "v", + [ + "v" + ] + ], + [ + "html.Attribute", + "key2", + "v2", + [ + "v2" + ] + ] ] } ] @@ -524,14 +969,26 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], + [ + "html.Element", + "div", + 0.0 + ], [ "html.Attribute", "foo", "1{{message}}2", - ["1"], - ["{{", "message", "}}"], - ["2"] + [ + "1" + ], + [ + "{{", + "message", + "}}" + ], + [ + "2" + ] ] ] } @@ -545,14 +1002,26 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], + [ + "html.Element", + "div", + 0.0 + ], [ "html.Attribute", "foo", "{{message}}", - [""], - ["{{", "message", "}}"], - [""] + [ + "" + ], + [ + "{{", + "message", + "}}" + ], + [ + "" + ] ] ] } @@ -571,8 +1040,26 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Attribute", "foo", "&", [""], ["&", "&"], [""]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Attribute", + "foo", + "&", + [ + "" + ], + [ + "&", + "&" + ], + [ + "" + ] + ] ] } ] @@ -585,8 +1072,26 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Attribute", "foo", "🛈", [""], ["🛈", "🛈"], [""]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Attribute", + "foo", + "🛈", + [ + "" + ], + [ + "🛈", + "🛈" + ], + [ + "" + ] + ] ] } ] @@ -599,38 +1104,30 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Attribute", "foo", "🛈", [""], ["🛈", "🛈"], [""]] - ] - } - ] - }, - { - "name": "should parse attributes containing unquoted interpolation", - "path": "HtmlParser/parse/attributes/should parse attributes containing unquoted interpolation", - "assertions": [ - { - "type": "HumanizeDom", - "input": "
", - "expected": [ - ["html.Element", "div", 0.0], + [ + "html.Element", + "div", + 0.0 + ], [ "html.Attribute", "foo", - "{{message}}", - [""], - ["{{", "message", "}}"], - [""] + "🛈", + [ + "" + ], + [ + "🛈", + "🛈" + ], + [ + "" + ] ] ] } ] }, - { - "name": "should parse bound inputs with expressions containing newlines", - "path": "HtmlParser/parse/attributes/should parse bound inputs with expressions containing newlines", - "assertions": [] - }, { "name": "should decode HTML entities in interpolated attributes", "path": "HtmlParser/parse/attributes/should decode HTML entities in interpolated attributes", @@ -651,9 +1148,17 @@ "html.Attribute", "foo", "{{&}}", - [""], - ["{{", "&", "}}"], - [""], + [ + "" + ], + [ + "{{", + "&", + "}}" + ], + [ + "" + ], "foo=\"{{&}}\"" ] ], @@ -674,8 +1179,16 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Element", "div", 0.0], - ["html.Attribute", "k", ""] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Attribute", + "k", + "" + ] ] } ] @@ -688,8 +1201,19 @@ "type": "HumanizeDom", "input": "", "expected": [ - ["html.Element", ":svg:svg", 0.0], - ["html.Attribute", "viewBox", "0", ["0"]] + [ + "html.Element", + ":svg:svg", + 0.0 + ], + [ + "html.Attribute", + "viewBox", + "0", + [ + "0" + ] + ] ] } ] @@ -702,8 +1226,19 @@ "type": "HumanizeDom", "input": "", "expected": [ - ["html.Element", "ng-template", 0.0], - ["html.Attribute", "k", "v", ["v"]] + [ + "html.Element", + "ng-template", + 0.0 + ], + [ + "html.Attribute", + "k", + "v", + [ + "v" + ] + ] ] } ] @@ -716,8 +1251,20 @@ "type": "HumanizeDom", "input": "", "expected": [ - ["html.Element", ":svg:use", 0.0, "#selfClosing"], - ["html.Attribute", ":xlink:href", "Port", ["Port"]] + [ + "html.Element", + ":svg:use", + 0.0, + "#selfClosing" + ], + [ + "html.Attribute", + ":xlink:href", + "Port", + [ + "Port" + ] + ] ] } ] @@ -746,8 +1293,16 @@ "type": "HumanizeDom", "input": "
", "expected": [ - ["html.Comment", "comment", 0.0], - ["html.Element", "div", 0.0] + [ + "html.Comment", + "comment", + 0.0 + ], + [ + "html.Element", + "div", + 0.0 + ] ] } ] @@ -759,7 +1314,13 @@ { "type": "HumanizeDom", "input": "", - "expected": [["html.Comment", "line 1 \n line 2", 0.0]] + "expected": [ + [ + "html.Comment", + "line 1 \n line 2", + 0.0 + ] + ] } ] } @@ -770,8 +1331,8 @@ "groups": [], "tests": [ { - "name": "should parse out expansion forms", - "path": "HtmlParser/parse/expansion forms/should parse out expansion forms", + "name": "should parse out expansion forms (with multiple cases)", + "path": "HtmlParser/parse/expansion forms/should parse out expansion forms (with multiple cases)", "assertions": [] }, { @@ -790,8 +1351,8 @@ "assertions": [] }, { - "name": "should not normalize line-endings in ICU expressions in external templates when `i18nNormalizeLineEndingsInICUs` is not set", - "path": "HtmlParser/parse/expansion forms/should not normalize line-endings in ICU expressions in external templates when `i18nNormalizeLineEndingsInICUs` is not set", + "name": "should not normalize line-endings in ICU expressions in external templates when `i18nNormalizeLineEndingsInICUs` is not set (escapedString:false)", + "path": "HtmlParser/parse/expansion forms/should not normalize line-endings in ICU expressions in external templates when `i18nNormalizeLineEndingsInICUs` is not set (escapedString:false)", "assertions": [] }, { @@ -863,10 +1424,27 @@ "type": "HumanizeDom", "input": "@defer (a b; c d){hello}", "expected": [ - ["html.Block", "defer", 0.0], - ["html.BlockParameter", "a b"], - ["html.BlockParameter", "c d"], - ["html.Text", "hello", 1.0, ["hello"]] + [ + "html.Block", + "defer", + 0.0 + ], + [ + "html.BlockParameter", + "a b" + ], + [ + "html.BlockParameter", + "c d" + ], + [ + "html.Text", + "hello", + 1.0, + [ + "hello" + ] + ] ] } ] @@ -879,8 +1457,17 @@ "type": "HumanizeDom", "input": "@defer {}", "expected": [ - ["html.Block", "defer", 0.0], - ["html.Element", "my-cmp", 1.0, "#selfClosing"] + [ + "html.Block", + "defer", + 0.0 + ], + [ + "html.Element", + "my-cmp", + 1.0, + "#selfClosing" + ] ] } ] @@ -903,10 +1490,26 @@ "type": "HumanizeDom", "input": "@if (cond) {}", "expected": [ - ["html.Element", ":svg:svg", 0.0], - ["html.Block", "if", 1.0], - ["html.BlockParameter", "cond"], - ["html.Element", ":svg:circle", 2.0, "#selfClosing"] + [ + "html.Element", + ":svg:svg", + 0.0 + ], + [ + "html.Block", + "if", + 1.0 + ], + [ + "html.BlockParameter", + "cond" + ], + [ + "html.Element", + ":svg:circle", + 2.0, + "#selfClosing" + ] ] } ] @@ -918,7 +1521,13 @@ { "type": "HumanizeDom", "input": "@defer{}", - "expected": [["html.Block", "defer", 0.0]] + "expected": [ + [ + "html.Block", + "defer", + 0.0 + ] + ] } ] }, @@ -930,8 +1539,16 @@ "type": "HumanizeDom", "input": "@defer {
}", "expected": [ - ["html.Block", "defer", 0.0], - ["html.Element", "br", 1.0] + [ + "html.Block", + "defer", + 0.0 + ], + [ + "html.Element", + "br", + 1.0 + ] ] } ] @@ -944,15 +1561,54 @@ "type": "HumanizeDom", "input": "@switch (expr) {@case ('foo') @case ('bar') { }}", "expected": [ - ["html.Block", "switch", 0.0], - ["html.BlockParameter", "expr"], - ["html.Block", "case", 1.0], - ["html.BlockParameter", "'foo'"], - ["html.Block", "case", 1.0], - ["html.BlockParameter", "'bar'"], - ["html.Text", " ", 2.0, [" "]], - ["html.Element", "input", 2.0], - ["html.Text", " ", 2.0, [" "]] + [ + "html.Block", + "switch", + 0.0 + ], + [ + "html.BlockParameter", + "expr" + ], + [ + "html.Block", + "case", + 1.0 + ], + [ + "html.BlockParameter", + "'foo'" + ], + [ + "html.Block", + "case", + 1.0 + ], + [ + "html.BlockParameter", + "'bar'" + ], + [ + "html.Text", + " ", + 2.0, + [ + " " + ] + ], + [ + "html.Element", + "input", + 2.0 + ], + [ + "html.Text", + " ", + 2.0, + [ + " " + ] + ] ] } ] @@ -965,18 +1621,117 @@ "type": "HumanizeDom", "input": "@switch (expr) {@case ('foo') {} @case ('bar') {bar} @case('baz') { baz }}", "expected": [ - ["html.Block", "switch", 0.0], - ["html.BlockParameter", "expr"], - ["html.Block", "case", 1.0], - ["html.BlockParameter", "'foo'"], - ["html.Text", " ", 1.0, [" "]], - ["html.Block", "case", 1.0], - ["html.BlockParameter", "'bar'"], - ["html.Text", "bar", 2.0, ["bar"]], - ["html.Text", " ", 1.0, [" "]], - ["html.Block", "case", 1.0], - ["html.BlockParameter", "'baz'"], - ["html.Text", " baz ", 2.0, [" baz "]] + [ + "html.Block", + "switch", + 0.0 + ], + [ + "html.BlockParameter", + "expr" + ], + [ + "html.Block", + "case", + 1.0 + ], + [ + "html.BlockParameter", + "'foo'" + ], + [ + "html.Text", + " ", + 1.0, + [ + " " + ] + ], + [ + "html.Block", + "case", + 1.0 + ], + [ + "html.BlockParameter", + "'bar'" + ], + [ + "html.Text", + "bar", + 2.0, + [ + "bar" + ] + ], + [ + "html.Text", + " ", + 1.0, + [ + " " + ] + ], + [ + "html.Block", + "case", + 1.0 + ], + [ + "html.BlockParameter", + "'baz'" + ], + [ + "html.Text", + " baz ", + 2.0, + [ + " baz " + ] + ] + ] + } + ] + }, + { + "name": "should parse exhaustive default checks in a switch block", + "path": "HtmlParser/parse/blocks/should parse exhaustive default checks in a switch block", + "assertions": [ + { + "type": "HumanizeDom", + "input": "@switch (expr) {@case ('foo') {} @default never;}", + "expected": [ + [ + "html.Block", + "switch", + 0.0 + ], + [ + "html.BlockParameter", + "expr" + ], + [ + "html.Block", + "case", + 1.0 + ], + [ + "html.BlockParameter", + "'foo'" + ], + [ + "html.Text", + " ", + 1.0, + [ + " " + ] + ], + [ + "html.Block", + "default never", + 1.0 + ] ] } ] @@ -989,9 +1744,24 @@ "type": "HumanizeDom", "input": "@defer {hello}", "expected": [ - ["html.Element", "img", 0.0], - ["html.Block", "defer", 0.0], - ["html.Text", "hello", 1.0, ["hello"]] + [ + "html.Element", + "img", + 0.0 + ], + [ + "html.Block", + "defer", + 0.0 + ], + [ + "html.Text", + "hello", + 1.0, + [ + "hello" + ] + ] ] } ] @@ -1032,8 +1802,8 @@ "assertions": [] }, { - "name": "should parse an incomplete block with no parameters", - "path": "HtmlParser/parse/blocks/should parse an incomplete block with no parameters", + "name": "should parse an incomplete block with no body", + "path": "HtmlParser/parse/blocks/should parse an incomplete block with no body", "assertions": [] } ] @@ -1049,7 +1819,13 @@ { "type": "HumanizeDom", "input": "@let foo = 123;", - "expected": [["html.LetDeclaration", "foo", "123"]] + "expected": [ + [ + "html.LetDeclaration", + "foo", + "123" + ] + ] } ] }, @@ -1061,10 +1837,25 @@ "type": "HumanizeDom", "input": "@defer {@if (true) {@let foo = 123;}}", "expected": [ - ["html.Block", "defer", 0.0], - ["html.Block", "if", 1.0], - ["html.BlockParameter", "true"], - ["html.LetDeclaration", "foo", "123"] + [ + "html.Block", + "defer", + 0.0 + ], + [ + "html.Block", + "if", + 1.0 + ], + [ + "html.BlockParameter", + "true" + ], + [ + "html.LetDeclaration", + "foo", + "123" + ] ] } ] @@ -1081,7 +1872,7 @@ "html.LetDeclaration", "foo", "123 + 456", - "@let foo = 123 + 456", + "@let foo = 123 + 456;", "foo", "123 + 456" ] @@ -1324,11 +2115,48 @@ "
", "
" ], - ["html.Attribute", "[prop]", "v1", ["v1"], "[prop]=\"v1\""], - ["html.Attribute", "(e)", "do()", ["do()"], "(e)=\"do()\""], - ["html.Attribute", "attr", "v2", ["v2"], "attr=\"v2\""], - ["html.Attribute", "noValue", "", "noValue"], - ["html.Text", "\na\n", 1.0, ["\na\n"], "\na\n"] + [ + "html.Attribute", + "[prop]", + "v1", + [ + "v1" + ], + "[prop]=\"v1\"" + ], + [ + "html.Attribute", + "(e)", + "do()", + [ + "do()" + ], + "(e)=\"do()\"" + ], + [ + "html.Attribute", + "attr", + "v2", + [ + "v2" + ], + "attr=\"v2\"" + ], + [ + "html.Attribute", + "noValue", + "", + "noValue" + ], + [ + "html.Text", + "\na\n", + 1.0, + [ + "\na\n" + ], + "\na\n" + ] ], "options": null } @@ -1369,9 +2197,17 @@ "html.Text", " pre {{ value }} post ", 1.0, - [" pre "], - ["{{", " value ", "}}"], - [" post "], + [ + " pre " + ], + [ + "{{", + " value ", + "}}" + ], + [ + " post " + ], " pre {{ value }} post " ] ], @@ -1387,8 +2223,22 @@ "type": "HumanizeDomSourceSpans", "input": "

", "expected": [ - ["html.Element", "div", 0.0, "

", "
", "
"], - ["html.Element", "br", 1.0, "
", "
", null] + [ + "html.Element", + "div", + 0.0, + "

", + "
", + "
" + ], + [ + "html.Element", + "br", + 1.0, + "
", + "
", + null + ] ], "options": null } @@ -1402,9 +2252,30 @@ "type": "HumanizeDomSourceSpans", "input": "


", "expected": [ - ["html.Element", "div", 0.0, "


", "
", "
"], - ["html.Element", "br", 1.0, "
", "
", null], - ["html.Element", "hr", 1.0, "
", "
", null] + [ + "html.Element", + "div", + 0.0, + "


", + "
", + "
" + ], + [ + "html.Element", + "br", + 1.0, + "
", + "
", + null + ], + [ + "html.Element", + "hr", + 1.0, + "
", + "
", + null + ] ], "options": null } @@ -1417,7 +2288,16 @@ { "type": "HumanizeDomSourceSpans", "input": "
", - "expected": [["html.Element", "br", 0.0, "
", "
", null]], + "expected": [ + [ + "html.Element", + "br", + 0.0, + "
", + "
", + null + ] + ], "options": null } ] @@ -1430,7 +2310,15 @@ "type": "HumanizeDomSourceSpans", "input": "
", "expected": [ - ["html.Element", "br", 0.0, "
", "#selfClosing", "
", "
"] + [ + "html.Element", + "br", + 0.0, + "
", + "#selfClosing", + "
", + "
" + ] ], "options": null } @@ -1444,8 +2332,23 @@ "type": "HumanizeDomSourceSpans", "input": "

", "expected": [ - ["html.Element", "div", 0.0, "

", "
", "
"], - ["html.Element", "br", 1.0, "
", "#selfClosing", "
", "
"] + [ + "html.Element", + "div", + 0.0, + "

", + "
", + "
" + ], + [ + "html.Element", + "br", + 1.0, + "
", + "#selfClosing", + "
", + "
" + ] ], "options": null } @@ -1468,13 +2371,51 @@ "", "" ], - ["html.Attribute", "type", "text", ["text"], "type=\"text\""], - ["html.Text", "\n\n\n ", 0.0, ["\n\n\n "], "", "\n\n\n "], - ["html.Element", "span", 0.0, "\n", "", ""], - ["html.Text", "\n", 1.0, ["\n"], "", "\n"] + [ + "html.Attribute", + "type", + "text", + [ + "text" + ], + "type=\"text\"" + ], + [ + "html.Text", + "\n\n\n ", + 0.0, + [ + "\n\n\n " + ], + "", + "\n\n\n " + ], + [ + "html.Element", + "span", + 0.0, + "\n", + "", + "" + ], + [ + "html.Text", + "\n", + 1.0, + [ + "\n" + ], + "", + "\n" + ] ], "options": { - "leading_trivia_chars": [" ", "\n", "\r", "\t"] + "leading_trivia_chars": [ + " ", + "\n", + "\r", + "\t" + ] } } ] @@ -1487,8 +2428,22 @@ "type": "HumanizeDomSourceSpans", "input": "

", "expected": [ - ["html.Element", "div", 0.0, "

", "
", "
"], - ["html.Element", "p", 1.0, "

", "

", null] + [ + "html.Element", + "div", + 0.0, + "

", + "
", + "
" + ], + [ + "html.Element", + "p", + 1.0, + "

", + "

", + null + ] ], "options": null }, @@ -1496,11 +2451,48 @@ "type": "HumanizeDomSourceSpans", "input": "

  • A
  • B
  • ", "expected": [ - ["html.Element", "div", 0.0, "
  • A
  • B
  • ", "
    ", "
    "], - ["html.Element", "li", 1.0, "
  • ", "
  • ", null], - ["html.Text", "A", 2.0, ["A"], "A"], - ["html.Element", "li", 1.0, "
  • ", "
  • ", null], - ["html.Text", "B", 2.0, ["B"], "B"] + [ + "html.Element", + "div", + 0.0, + "
  • A
  • B", + "
    ", + "
    " + ], + [ + "html.Element", + "li", + 1.0, + "
  • ", + "
  • ", + null + ], + [ + "html.Text", + "A", + 2.0, + [ + "A" + ], + "A" + ], + [ + "html.Element", + "li", + 1.0, + "
  • ", + "
  • ", + null + ], + [ + "html.Text", + "B", + 2.0, + [ + "B" + ], + "B" + ] ], "options": null } @@ -1522,8 +2514,19 @@ "
    ", "
    " ], - ["html.Expansion", "count", "plural", 1.0, "{count, plural, =0 {msg}}"], - ["html.ExpansionCase", "=0", 2.0, "=0 {msg}"] + [ + "html.Expansion", + "count", + "plural", + 1.0, + "{count, plural, =0 {msg}}" + ], + [ + "html.ExpansionCase", + "=0", + 2.0, + "=0 {msg}" + ] ], "options": null } diff --git a/crates/angular_conformance/fixtures/ml_parser_html_whitespaces_spec.json b/crates/angular_conformance/fixtures/ml_parser_html_whitespaces_spec.json index 90e5919eb..a606da756 100644 --- a/crates/angular_conformance/fixtures/ml_parser_html_whitespaces_spec.json +++ b/crates/angular_conformance/fixtures/ml_parser_html_whitespaces_spec.json @@ -1,6 +1,6 @@ { "name": "html_whitespaces_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/ml_parser/html_whitespaces_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/ml_parser/html_whitespaces_spec.ts", "test_groups": [ { "name": "removeWhitespaces", @@ -44,10 +44,26 @@ "type": "ParseAndRemoveWhitespace", "input": "

    \t
    \n
    ", "expected": [ - ["html.Element", "br", 0.0], - ["html.Element", "br", 0.0], - ["html.Element", "br", 0.0], - ["html.Element", "br", 0.0] + [ + "html.Element", + "br", + 0.0 + ], + [ + "html.Element", + "br", + 0.0 + ], + [ + "html.Element", + "br", + 0.0 + ], + [ + "html.Element", + "br", + 0.0 + ] ], "options": null } @@ -61,8 +77,16 @@ "type": "ParseAndRemoveWhitespace", "input": "
    ", "expected": [ - ["html.Element", "div", 0.0], - ["html.Element", "span", 1.0] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Element", + "span", + 1.0 + ] ], "options": null } @@ -75,7 +99,13 @@ { "type": "ParseAndRemoveWhitespace", "input": "
    \t", - "expected": [["html.Element", "br", 0.0]], + "expected": [ + [ + "html.Element", + "br", + 0.0 + ] + ], "options": null } ] @@ -88,12 +118,52 @@ "type": "ParseAndRemoveWhitespace", "input": "
    foo&ngsp;bar
    ", "expected": [ - ["html.Element", "div", 0.0], - ["html.Element", "span", 1.0], - ["html.Text", "foo", 2.0, ["foo"]], - ["html.Text", " ", 1.0, [""], ["NGSP_UNICODE", "&ngsp;"], [""]], - ["html.Element", "span", 1.0], - ["html.Text", "bar", 2.0, ["bar"]] + [ + "html.Element", + "div", + 0.0 + ], + [ + "html.Element", + "span", + 1.0 + ], + [ + "html.Text", + "foo", + 2.0, + [ + "foo" + ] + ], + [ + "html.Text", + " ", + 1.0, + [ + "" + ], + [ + "NGSP_UNICODE", + "&ngsp;" + ], + [ + "" + ] + ], + [ + "html.Element", + "span", + 1.0 + ], + [ + "html.Text", + "bar", + 2.0, + [ + "bar" + ] + ] ], "options": null } @@ -106,13 +176,31 @@ { "type": "ParseAndRemoveWhitespace", "input": "\n\n\nfoo\t\t\t", - "expected": [["html.Text", " foo ", 0.0, [" foo "]]], + "expected": [ + [ + "html.Text", + " foo ", + 0.0, + [ + " foo " + ] + ] + ], "options": null }, { "type": "ParseAndRemoveWhitespace", "input": " \n foo \t ", - "expected": [["html.Text", " foo ", 0.0, [" foo "]]], + "expected": [ + [ + "html.Text", + " foo ", + 0.0, + [ + " foo " + ] + ] + ], "options": null } ] @@ -129,7 +217,23 @@ { "type": "ParseAndRemoveWhitespace", "input": " ", - "expected": [["html.Text", " ", 0.0, [""], [" ", " "], [""]]], + "expected": [ + [ + "html.Text", + " ", + 0.0, + [ + "" + ], + [ + " ", + " " + ], + [ + "" + ] + ] + ], "options": null } ] @@ -146,15 +250,37 @@ "html.Text", "  foo  ", 0.0, - [""], - [" ", " "], - [""], - [" ", " "], - ["foo"], - [" ", " "], - [""], - [" ", " "], - [""] + [ + "" + ], + [ + " ", + " " + ], + [ + "" + ], + [ + " ", + " " + ], + [ + "foo" + ], + [ + " ", + " " + ], + [ + "" + ], + [ + " ", + " " + ], + [ + "" + ] ] ], "options": null @@ -168,13 +294,31 @@ { "type": "ParseAndRemoveWhitespace", "input": "\nfoo", - "expected": [["html.Text", "\nfoo", 0.0, ["\nfoo"]]], + "expected": [ + [ + "html.Text", + "\nfoo", + 0.0, + [ + "\nfoo" + ] + ] + ], "options": null }, { "type": "ParseAndRemoveWhitespace", "input": "\tfoo", - "expected": [["html.Text", "\tfoo", 0.0, ["\tfoo"]]], + "expected": [ + [ + "html.Text", + "\tfoo", + 0.0, + [ + "\tfoo" + ] + ] + ], "options": null } ] @@ -191,11 +335,25 @@ "html.Text", "{{fooExp}} {{barExp}}", 0.0, - [""], - ["{{", "fooExp", "}}"], - [" "], - ["{{", "barExp", "}}"], - [""] + [ + "" + ], + [ + "{{", + "fooExp", + "}}" + ], + [ + " " + ], + [ + "{{", + "barExp", + "}}" + ], + [ + "" + ] ] ], "options": null @@ -208,11 +366,25 @@ "html.Text", "{{fooExp}}\t{{barExp}}", 0.0, - [""], - ["{{", "fooExp", "}}"], - ["\t"], - ["{{", "barExp", "}}"], - [""] + [ + "" + ], + [ + "{{", + "fooExp", + "}}" + ], + [ + "\t" + ], + [ + "{{", + "barExp", + "}}" + ], + [ + "" + ] ] ], "options": null @@ -225,11 +397,25 @@ "html.Text", "{{fooExp}}\n{{barExp}}", 0.0, - [""], - ["{{", "fooExp", "}}"], - ["\n"], - ["{{", "barExp", "}}"], - [""] + [ + "" + ], + [ + "{{", + "fooExp", + "}}" + ], + [ + "\n" + ], + [ + "{{", + "barExp", + "}}" + ], + [ + "" + ] ] ], "options": null @@ -243,7 +429,24 @@ { "type": "ParseAndRemoveWhitespace", "input": " {{exp}} ", - "expected": [["html.Text", " {{exp}} ", 0.0, [" "], ["{{", "exp", "}}"], [" "]]], + "expected": [ + [ + "html.Text", + " {{exp}} ", + 0.0, + [ + " " + ], + [ + "{{", + "exp", + "}}" + ], + [ + " " + ] + ] + ], "options": null } ] @@ -256,11 +459,38 @@ "type": "ParseAndRemoveWhitespace", "input": " {a, b, =4 {c}} ", "expected": [ - ["html.Element", "span", 0.0], - ["html.Text", " ", 1.0, [" "]], - ["html.Expansion", "a", "b", 1.0], - ["html.ExpansionCase", "=4", 2.0], - ["html.Text", " ", 1.0, [" "]] + [ + "html.Element", + "span", + 0.0 + ], + [ + "html.Text", + " ", + 1.0, + [ + " " + ] + ], + [ + "html.Expansion", + "a", + "b", + 1.0 + ], + [ + "html.ExpansionCase", + "=4", + 2.0 + ], + [ + "html.Text", + " ", + 1.0, + [ + " " + ] + ] ], "options": { "tokenize_expansion_forms": true, @@ -281,12 +511,45 @@ "type": "ParseAndRemoveWhitespace", "input": "
    foo\nbar
    ", "expected": [ - ["html.Element", "pre", 0.0], - ["html.Element", "strong", 1.0], - ["html.Text", "foo", 2.0, ["foo"]], - ["html.Text", "\n", 1.0, ["\n"]], - ["html.Element", "strong", 1.0], - ["html.Text", "bar", 2.0, ["bar"]] + [ + "html.Element", + "pre", + 0.0 + ], + [ + "html.Element", + "strong", + 1.0 + ], + [ + "html.Text", + "foo", + 2.0, + [ + "foo" + ] + ], + [ + "html.Text", + "\n", + 1.0, + [ + "\n" + ] + ], + [ + "html.Element", + "strong", + 1.0 + ], + [ + "html.Text", + "bar", + 2.0, + [ + "bar" + ] + ] ], "options": null } @@ -300,8 +563,19 @@ "type": "ParseAndRemoveWhitespace", "input": "", "expected": [ - ["html.Element", "textarea", 0.0], - ["html.Text", "foo\n\n bar", 1.0, ["foo\n\n bar"]] + [ + "html.Element", + "textarea", + 0.0 + ], + [ + "html.Text", + "foo\n\n bar", + 1.0, + [ + "foo\n\n bar" + ] + ] ], "options": null } diff --git a/crates/angular_conformance/fixtures/ml_parser_inline_comment_spec.json b/crates/angular_conformance/fixtures/ml_parser_inline_comment_spec.json new file mode 100644 index 000000000..9bb14e721 --- /dev/null +++ b/crates/angular_conformance/fixtures/ml_parser_inline_comment_spec.json @@ -0,0 +1,57 @@ +{ + "name": "inline_comment_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/ml_parser/inline_comment_spec.ts", + "test_groups": [ + { + "name": "Inline comments in attributes", + "groups": [], + "tests": [ + { + "name": "should ignore single line comments between attributes", + "path": "Inline comments in attributes/should ignore single line comments between attributes", + "assertions": [] + }, + { + "name": "should ignore single line comments between inputs and outputs", + "path": "Inline comments in attributes/should ignore single line comments between inputs and outputs", + "assertions": [] + }, + { + "name": "should ignore single line comments at the end of tag", + "path": "Inline comments in attributes/should ignore single line comments at the end of tag", + "assertions": [] + }, + { + "name": "should handle commented out attribute", + "path": "Inline comments in attributes/should handle commented out attribute", + "assertions": [] + }, + { + "name": "should comment an attribute with a // on a new line", + "path": "Inline comments in attributes/should comment an attribute with a // on a new line", + "assertions": [] + }, + { + "name": "should ignore multi-line comments between attributes", + "path": "Inline comments in attributes/should ignore multi-line comments between attributes", + "assertions": [] + }, + { + "name": "should ignore multi-line comments at the end of tag", + "path": "Inline comments in attributes/should ignore multi-line comments at the end of tag", + "assertions": [] + }, + { + "name": "should handle * inside multi-line comments", + "path": "Inline comments in attributes/should handle * inside multi-line comments", + "assertions": [] + }, + { + "name": "should maintain correct source spans with comments", + "path": "Inline comments in attributes/should maintain correct source spans with comments", + "assertions": [] + } + ] + } + ] +} diff --git a/crates/angular_conformance/fixtures/ml_parser_lexer_spec.json b/crates/angular_conformance/fixtures/ml_parser_lexer_spec.json index e31eb2f97..05a4c7dd3 100644 --- a/crates/angular_conformance/fixtures/ml_parser_lexer_spec.json +++ b/crates/angular_conformance/fixtures/ml_parser_lexer_spec.json @@ -1,6 +1,6 @@ { "name": "lexer_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/ml_parser/lexer_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/ml_parser/lexer_spec.ts", "test_groups": [ { "name": "HtmlLexer", @@ -18,11 +18,26 @@ "input": "a", "test_type": "HumanizeLineColumn", "expected": [ - ["TokenType.TAG_OPEN_START", "0:0"], - ["TokenType.TAG_OPEN_END", "0:2"], - ["TokenType.TEXT", "0:3"], - ["TokenType.TAG_CLOSE", "0:4"], - ["TokenType.EOF", "0:8"] + [ + "TokenType.TAG_OPEN_START", + "0:0" + ], + [ + "TokenType.TAG_OPEN_END", + "0:2" + ], + [ + "TokenType.TEXT", + "0:3" + ], + [ + "TokenType.TAG_CLOSE", + "0:4" + ], + [ + "TokenType.EOF", + "0:8" + ] ], "options": null } @@ -37,11 +52,26 @@ "input": "\na", "test_type": "HumanizeLineColumn", "expected": [ - ["TokenType.TAG_OPEN_START", "0:0"], - ["TokenType.TAG_OPEN_END", "0:2"], - ["TokenType.TEXT", "0:3"], - ["TokenType.TAG_CLOSE", "1:1"], - ["TokenType.EOF", "1:5"] + [ + "TokenType.TAG_OPEN_START", + "0:0" + ], + [ + "TokenType.TAG_OPEN_END", + "0:2" + ], + [ + "TokenType.TEXT", + "0:3" + ], + [ + "TokenType.TAG_CLOSE", + "1:1" + ], + [ + "TokenType.EOF", + "1:5" + ] ], "options": null } @@ -56,11 +86,26 @@ "input": "\na", "test_type": "HumanizeLineColumn", "expected": [ - ["TokenType.TAG_OPEN_START", "0:0"], - ["TokenType.TAG_OPEN_END", "1:0"], - ["TokenType.TEXT", "1:1"], - ["TokenType.TAG_CLOSE", "2:1"], - ["TokenType.EOF", "2:5"] + [ + "TokenType.TAG_OPEN_START", + "0:0" + ], + [ + "TokenType.TAG_OPEN_END", + "1:0" + ], + [ + "TokenType.TEXT", + "1:1" + ], + [ + "TokenType.TAG_CLOSE", + "2:1" + ], + [ + "TokenType.EOF", + "2:5" + ] ], "options": null } @@ -75,11 +120,26 @@ "input": "\r\na\r", "test_type": "HumanizeLineColumn", "expected": [ - ["TokenType.TAG_OPEN_START", "0:0"], - ["TokenType.TAG_OPEN_END", "1:0"], - ["TokenType.TEXT", "1:1"], - ["TokenType.TAG_CLOSE", "2:1"], - ["TokenType.EOF", "2:5"] + [ + "TokenType.TAG_OPEN_START", + "0:0" + ], + [ + "TokenType.TAG_OPEN_END", + "1:0" + ], + [ + "TokenType.TEXT", + "1:1" + ], + [ + "TokenType.TAG_CLOSE", + "2:1" + ], + [ + "TokenType.EOF", + "2:5" + ] ], "options": null } @@ -94,18 +154,42 @@ "input": "\n \t a", "test_type": "HumanizeFullStart", "expected": [ - ["TokenType.TAG_OPEN_START", "0:0", "0:0"], - ["TokenType.TAG_OPEN_END", "0:2", "0:2"], - ["TokenType.TEXT", "1:3", "0:3"], - ["TokenType.TAG_CLOSE", "1:4", "1:4"], - ["TokenType.EOF", "1:8", "1:8"] + [ + "TokenType.TAG_OPEN_START", + "0:0", + "0:0" + ], + [ + "TokenType.TAG_OPEN_END", + "0:2", + "0:2" + ], + [ + "TokenType.TEXT", + "1:3", + "0:3" + ], + [ + "TokenType.TAG_CLOSE", + "1:4", + "1:4" + ], + [ + "TokenType.EOF", + "1:8", + "1:8" + ] ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, "escaped_string": false, "tokenize_blocks": null, - "leading_trivia_chars": ["\n", " ", "\t"], + "leading_trivia_chars": [ + "\n", + " ", + "\t" + ], "range": null } } @@ -126,8 +210,14 @@ "input": "pre 1\npre 2\npre 3 `line 1\nline 2\nline 3` post 1\n post 2\n post 3", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.TEXT", "line 1\nline 2\nline 3"], - ["TokenType.EOF", ""] + [ + "TokenType.TEXT", + "line 1\nline 2\nline 3" + ], + [ + "TokenType.EOF", + "" + ] ], "options": { "tokenize_expansion_forms": false, @@ -154,8 +244,14 @@ "input": "pre 1\npre 2\npre 3 `line 1\nline 2\nline 3` post 1\n post 2\n post 3", "test_type": "HumanizeLineColumn", "expected": [ - ["TokenType.TEXT", "2:7"], - ["TokenType.EOF", "4:6"] + [ + "TokenType.TEXT", + "2:7" + ], + [ + "TokenType.EOF", + "4:6" + ] ], "options": { "tokenize_expansion_forms": false, @@ -188,10 +284,19 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.COMMENT_START"], - ["TokenType.RAW_TEXT", "t\ne\ns\nt"], - ["TokenType.COMMENT_END"], - ["TokenType.EOF"] + [ + "TokenType.COMMENT_START" + ], + [ + "TokenType.RAW_TEXT", + "t\ne\ns\nt" + ], + [ + "TokenType.COMMENT_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -206,10 +311,22 @@ "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.COMMENT_START", ""], - ["TokenType.EOF", ""] + [ + "TokenType.COMMENT_START", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -223,7 +340,12 @@ "type": "HtmlLexerTest", "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.COMMENT_START", ""], - ["TokenType.EOF", ""] + [ + "TokenType.COMMENT_START", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -268,10 +407,22 @@ "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.COMMENT_START", ""], - ["TokenType.EOF", ""] + [ + "TokenType.COMMENT_START", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -291,7 +442,15 @@ "type": "HtmlLexerTest", "input": "", "test_type": "HumanizeParts", - "expected": [["TokenType.DOC_TYPE", "DOCTYPE html"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.DOC_TYPE", + "DOCTYPE html" + ], + [ + "TokenType.EOF" + ] + ], "options": null } ] @@ -305,8 +464,14 @@ "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.DOC_TYPE", ""], - ["TokenType.EOF", ""] + [ + "TokenType.DOC_TYPE", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -320,7 +485,12 @@ "type": "HtmlLexerTest", "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.CDATA_START"], - ["TokenType.RAW_TEXT", "t\ne\ns\nt"], - ["TokenType.CDATA_END"], - ["TokenType.EOF"] + [ + "TokenType.CDATA_START" + ], + [ + "TokenType.RAW_TEXT", + "t\ne\ns\nt" + ], + [ + "TokenType.CDATA_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -358,10 +537,22 @@ "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.CDATA_START", ""], - ["TokenType.EOF", ""] + [ + "TokenType.CDATA_START", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -375,7 +566,12 @@ "type": "HtmlLexerTest", "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.INCOMPLETE_TAG_OPEN", ""], - ["TokenType.INCOMPLETE_TAG_OPEN", ""], - ["TokenType.EOF", ""] + [ + "TokenType.INCOMPLETE_TAG_OPEN", + "" + ], + [ + "TokenType.INCOMPLETE_TAG_OPEN", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -447,16 +672,46 @@ "input": "
    ", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.INCOMPLETE_TAG_OPEN", ""], - ["TokenType.TAG_CLOSE", ""], - ["TokenType.EOF", ""] + [ + "TokenType.INCOMPLETE_TAG_OPEN", + "" + ], + [ + "TokenType.TAG_CLOSE", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -471,12 +726,30 @@ "input": "
    ", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.INCOMPLETE_TAG_OPEN", ""], - ["TokenType.TAG_CLOSE", ""], - ["TokenType.EOF", ""] + [ + "TokenType.INCOMPLETE_TAG_OPEN", + "" + ], + [ + "TokenType.TAG_CLOSE", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -497,11 +770,28 @@ "input": "hello", "test_type": "HumanizeParts", "expected": [ - ["TokenType.COMPONENT_OPEN_START", "MyComp", "", ""], - ["TokenType.COMPONENT_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.COMPONENT_CLOSE", "MyComp", "", ""], - ["TokenType.EOF"] + [ + "TokenType.COMPONENT_OPEN_START", + "MyComp", + "", + "" + ], + [ + "TokenType.COMPONENT_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.COMPONENT_CLOSE", + "MyComp", + "", + "" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -516,11 +806,28 @@ "input": "hello", "test_type": "HumanizeParts", "expected": [ - ["TokenType.COMPONENT_OPEN_START", "MyComp", "", "button"], - ["TokenType.COMPONENT_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.COMPONENT_CLOSE", "MyComp", "", "button"], - ["TokenType.EOF"] + [ + "TokenType.COMPONENT_OPEN_START", + "MyComp", + "", + "button" + ], + [ + "TokenType.COMPONENT_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.COMPONENT_CLOSE", + "MyComp", + "", + "button" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -535,11 +842,28 @@ "input": "hello", "test_type": "HumanizeParts", "expected": [ - ["TokenType.COMPONENT_OPEN_START", "MyComp", "svg", "title"], - ["TokenType.COMPONENT_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.COMPONENT_CLOSE", "MyComp", "svg", "title"], - ["TokenType.EOF"] + [ + "TokenType.COMPONENT_OPEN_START", + "MyComp", + "svg", + "title" + ], + [ + "TokenType.COMPONENT_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.COMPONENT_CLOSE", + "MyComp", + "svg", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -554,9 +878,18 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.COMPONENT_OPEN_START", "MyComp", "", ""], - ["TokenType.COMPONENT_OPEN_END_VOID"], - ["TokenType.EOF"] + [ + "TokenType.COMPONENT_OPEN_START", + "MyComp", + "", + "" + ], + [ + "TokenType.COMPONENT_OPEN_END_VOID" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -571,11 +904,26 @@ "input": "hello", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.COMPONENT_OPEN_START", ""], - ["TokenType.TEXT", "hello"], - ["TokenType.COMPONENT_CLOSE", ""], - ["TokenType.EOF", ""] + [ + "TokenType.COMPONENT_OPEN_START", + "" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.COMPONENT_CLOSE", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -590,16 +938,50 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_COMPONENT_OPEN", "MyComp", "", "span"], - ["TokenType.ATTR_NAME", "", "class"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "hi"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_NAME", "", "sty"], - ["TokenType.TAG_OPEN_START", "", "span"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_CLOSE", "", "span"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_COMPONENT_OPEN", + "MyComp", + "", + "span" + ], + [ + "TokenType.ATTR_NAME", + "", + "class" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "hi" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_NAME", + "", + "sty" + ], + [ + "TokenType.TAG_OPEN_START", + "", + "span" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_CLOSE", + "", + "span" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -614,11 +996,28 @@ "input": "t\ne\rs\r\nt", "test_type": "HumanizeParts", "expected": [ - ["TokenType.COMPONENT_OPEN_START", "MyComp", "", "script"], - ["TokenType.COMPONENT_OPEN_END"], - ["TokenType.RAW_TEXT", "t\ne\ns\nt"], - ["TokenType.COMPONENT_CLOSE", "MyComp", "", "script"], - ["TokenType.EOF"] + [ + "TokenType.COMPONENT_OPEN_START", + "MyComp", + "", + "script" + ], + [ + "TokenType.COMPONENT_OPEN_END" + ], + [ + "TokenType.RAW_TEXT", + "t\ne\ns\nt" + ], + [ + "TokenType.COMPONENT_CLOSE", + "MyComp", + "", + "script" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -633,11 +1032,28 @@ "input": "t\ne\rs\r\nt", "test_type": "HumanizeParts", "expected": [ - ["TokenType.COMPONENT_OPEN_START", "MyComp", "", "title"], - ["TokenType.COMPONENT_OPEN_END"], - ["TokenType.ESCAPABLE_RAW_TEXT", "t\ne\ns\nt"], - ["TokenType.COMPONENT_CLOSE", "MyComp", "", "title"], - ["TokenType.EOF"] + [ + "TokenType.COMPONENT_OPEN_START", + "MyComp", + "", + "title" + ], + [ + "TokenType.COMPONENT_OPEN_END" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "t\ne\ns\nt" + ], + [ + "TokenType.COMPONENT_CLOSE", + "MyComp", + "", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -658,11 +1074,26 @@ "input": "
    ", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "div"], - ["TokenType.DIRECTIVE_NAME", "MyDir"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_CLOSE", "", "div"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "div" + ], + [ + "TokenType.DIRECTIVE_NAME", + "MyDir" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_CLOSE", + "", + "div" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -677,13 +1108,32 @@ "input": "
    ", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "div"], - ["TokenType.DIRECTIVE_NAME", "MyDir"], - ["TokenType.DIRECTIVE_OPEN"], - ["TokenType.DIRECTIVE_CLOSE"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_CLOSE", "", "div"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "div" + ], + [ + "TokenType.DIRECTIVE_NAME", + "MyDir" + ], + [ + "TokenType.DIRECTIVE_OPEN" + ], + [ + "TokenType.DIRECTIVE_CLOSE" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_CLOSE", + "", + "div" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -698,14 +1148,37 @@ "input": "
    ", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "div"], - ["TokenType.DIRECTIVE_NAME", "MyDir"], - ["TokenType.DIRECTIVE_OPEN"], - ["TokenType.ATTR_NAME", "", "foo"], - ["TokenType.DIRECTIVE_CLOSE"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_CLOSE", "", "div"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "div" + ], + [ + "TokenType.DIRECTIVE_NAME", + "MyDir" + ], + [ + "TokenType.DIRECTIVE_OPEN" + ], + [ + "TokenType.ATTR_NAME", + "", + "foo" + ], + [ + "TokenType.DIRECTIVE_CLOSE" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_CLOSE", + "", + "div" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -730,11 +1203,26 @@ "input": "
    @MyDir()
    ", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "div"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", "@MyDir()"], - ["TokenType.TAG_CLOSE", "", "div"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "div" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + "@MyDir()" + ], + [ + "TokenType.TAG_CLOSE", + "", + "div" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -749,18 +1237,43 @@ "input": "
    ", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "div"], - ["TokenType.ATTR_NAME", "", "hello"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "@MyDir"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_CLOSE", "", "div"], - ["TokenType.EOF"] - ], - "options": null - } - ] + [ + "TokenType.TAG_OPEN_START", + "", + "div" + ], + [ + "TokenType.ATTR_NAME", + "", + "hello" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "@MyDir" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_CLOSE", + "", + "div" + ], + [ + "TokenType.EOF" + ] + ], + "options": null + } + ] }, { "name": "should produce spans for directives", @@ -787,11 +1300,26 @@ "input": "t\ne\rs\r\nt", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.ESCAPABLE_RAW_TEXT", "t\ne\ns\nt"], - ["TokenType.TAG_CLOSE", "", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "t\ne\ns\nt" + ], + [ + "TokenType.TAG_CLOSE", + "", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -806,13 +1334,35 @@ "input": "&", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.ESCAPABLE_RAW_TEXT", ""], - ["TokenType.ENCODED_ENTITY", "&", "&"], - ["TokenType.ESCAPABLE_RAW_TEXT", ""], - ["TokenType.TAG_CLOSE", "", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "" + ], + [ + "TokenType.ENCODED_ENTITY", + "&", + "&" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "" + ], + [ + "TokenType.TAG_CLOSE", + "", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -827,11 +1377,26 @@ "input": "a<div>", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.ESCAPABLE_RAW_TEXT", "a
    "], - ["TokenType.TAG_CLOSE", "", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "a
    " + ], + [ + "TokenType.TAG_CLOSE", + "", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -846,11 +1411,26 @@ "input": "a</test>", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.ESCAPABLE_RAW_TEXT", "a"], - ["TokenType.TAG_CLOSE", "", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "a" + ], + [ + "TokenType.TAG_CLOSE", + "", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -865,11 +1445,26 @@ "input": "a", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.TAG_OPEN_START", ""], - ["TokenType.ESCAPABLE_RAW_TEXT", "a"], - ["TokenType.TAG_CLOSE", ""], - ["TokenType.EOF", ""] + [ + "TokenType.TAG_OPEN_START", + "" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "a" + ], + [ + "TokenType.TAG_CLOSE", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -890,11 +1485,26 @@ "input": "test", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "svg", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", "test"], - ["TokenType.TAG_CLOSE", "svg", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "svg", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + "test" + ], + [ + "TokenType.TAG_CLOSE", + "svg", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -909,14 +1519,39 @@ "input": "test", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "svg", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_OPEN_START", "", "f"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", "test"], - ["TokenType.TAG_CLOSE", "", "f"], - ["TokenType.TAG_CLOSE", "svg", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "svg", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_OPEN_START", + "", + "f" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + "test" + ], + [ + "TokenType.TAG_CLOSE", + "", + "f" + ], + [ + "TokenType.TAG_CLOSE", + "svg", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -961,8 +1596,8 @@ "assertions": [] }, { - "name": "should not normalize line-endings in ICU expressions when `i18nNormalizeLineEndingsInICUs` is not defined", - "path": "HtmlLexer/open tags/expansion forms/[line ending normalization/{escapedString: false}/should not normalize line-endings in ICU expressions when `i18nNormalizeLineEndingsInICUs` is not defined", + "name": "should not normalize line-endings in ICU expressions when `i18nNormalizeLineEndingsInICUs` is not defined (escapedString:false)", + "path": "HtmlLexer/open tags/expansion forms/[line ending normalization/{escapedString: false}/should not normalize line-endings in ICU expressions when `i18nNormalizeLineEndingsInICUs` is not defined (escapedString:false)", "assertions": [] }, { @@ -986,23 +1621,65 @@ "input": "{one.two, three, =4 {four} =5 {five} foo {bar} }", "test_type": "HumanizeParts", "expected": [ - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "one.two"], - ["TokenType.RAW_TEXT", "three"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "four"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_CASE_VALUE", "=5"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "five"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_CASE_VALUE", "foo"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "bar"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.EOF"] + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "one.two" + ], + [ + "TokenType.RAW_TEXT", + "three" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "four" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=5" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "five" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "foo" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "bar" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -1024,17 +1701,45 @@ "input": "before{one.two, three, =4 {four}}after", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "before"], - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "one.two"], - ["TokenType.RAW_TEXT", "three"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "four"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.TEXT", "after"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "before" + ], + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "one.two" + ], + [ + "TokenType.RAW_TEXT", + "three" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "four" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.TEXT", + "after" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -1056,21 +1761,63 @@ "input": "
    {a, b, =4 {c}}
    ", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "div"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_OPEN_START", "", "span"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "a"], - ["TokenType.RAW_TEXT", "b"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "c"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.TAG_CLOSE", "", "span"], - ["TokenType.TAG_CLOSE", "", "div"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "div" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_OPEN_START", + "", + "span" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "a" + ], + [ + "TokenType.RAW_TEXT", + "b" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "c" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.TAG_CLOSE", + "", + "span" + ], + [ + "TokenType.TAG_CLOSE", + "", + "div" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -1092,23 +1839,71 @@ "input": "
    {a, b, =4 {c}}
    ", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "div"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_OPEN_START", "", "span"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", " "], - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "a"], - ["TokenType.RAW_TEXT", "b"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "c"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.TEXT", " "], - ["TokenType.TAG_CLOSE", "", "span"], - ["TokenType.TAG_CLOSE", "", "div"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "div" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_OPEN_START", + "", + "span" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + " " + ], + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "a" + ], + [ + "TokenType.RAW_TEXT", + "b" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "c" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.TEXT", + " " + ], + [ + "TokenType.TAG_CLOSE", + "", + "span" + ], + [ + "TokenType.TAG_CLOSE", + "", + "div" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -1130,19 +1925,54 @@ "input": "{one.two, three, =4 {four a}}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "one.two"], - ["TokenType.RAW_TEXT", "three"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "four "], - ["TokenType.TAG_OPEN_START", "", "b"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", "a"], - ["TokenType.TAG_CLOSE", "", "b"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.EOF"] + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "one.two" + ], + [ + "TokenType.RAW_TEXT", + "three" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "four " + ], + [ + "TokenType.TAG_OPEN_START", + "", + "b" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + "a" + ], + [ + "TokenType.TAG_CLOSE", + "", + "b" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -1164,17 +1994,47 @@ "input": "{one.two, three, =4 {four {{a}}}}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "one.two"], - ["TokenType.RAW_TEXT", "three"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "four "], - ["TokenType.INTERPOLATION", "{{", "a", "}}"], - ["TokenType.TEXT", ""], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.EOF"] + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "one.two" + ], + [ + "TokenType.RAW_TEXT", + "three" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "four " + ], + [ + "TokenType.INTERPOLATION", + "{{", + "a", + "}}" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -1196,23 +2056,65 @@ "input": "{one.two, three, =4 { {xx, yy, =x {one}} }}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "one.two"], - ["TokenType.RAW_TEXT", "three"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "xx"], - ["TokenType.RAW_TEXT", "yy"], - ["TokenType.EXPANSION_CASE_VALUE", "=x"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "one"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.TEXT", " "], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.EOF"] + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "one.two" + ], + [ + "TokenType.RAW_TEXT", + "three" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "xx" + ], + [ + "TokenType.RAW_TEXT", + "yy" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=x" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "one" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.TEXT", + " " + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -1301,11 +2203,26 @@ "input": "

    İ

    ", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.TAG_OPEN_START", ""], - ["TokenType.TEXT", "İ"], - ["TokenType.TAG_CLOSE", "

    "], - ["TokenType.EOF", ""] + [ + "TokenType.TAG_OPEN_START", + "" + ], + [ + "TokenType.TEXT", + "İ" + ], + [ + "TokenType.TAG_CLOSE", + "

    " + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -1325,7 +2242,15 @@ "type": "HtmlLexerTest", "input": "\\' \\' \\'", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "' ' '"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "' ' '" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1339,7 +2264,15 @@ "type": "HtmlLexerTest", "input": "\\\" \\\" \\\"", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\" \" \""], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\" \" \"" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1353,7 +2286,15 @@ "type": "HtmlLexerTest", "input": "\\` \\` \\`", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "` ` `"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "` ` `" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1367,7 +2308,15 @@ "type": "HtmlLexerTest", "input": "\\\\ \\\\ \\\\", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\\ \\ \\"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\\ \\ \\" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1381,7 +2330,15 @@ "type": "HtmlLexerTest", "input": "\\n \\n \\n", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\n \n \n"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\n \n \n" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1396,10 +2353,23 @@ "input": "\\r{{\\r}}\\r", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "\n"], - ["TokenType.INTERPOLATION", "{{", "\n", "}}"], - ["TokenType.TEXT", "\n"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "\n" + ], + [ + "TokenType.INTERPOLATION", + "{{", + "\n", + "}}" + ], + [ + "TokenType.TEXT", + "\n" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -1414,7 +2384,15 @@ "type": "HtmlLexerTest", "input": "\\v \\v \\v", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\u000b \u000b \u000b"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\u000b \u000b \u000b" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1428,7 +2406,15 @@ "type": "HtmlLexerTest", "input": "\\t \\t \\t", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\t \t \t"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\t \t \t" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1442,7 +2428,15 @@ "type": "HtmlLexerTest", "input": "\\b \\b \\b", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\b \b \b"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\b \b \b" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1456,7 +2450,15 @@ "type": "HtmlLexerTest", "input": "\\f \\f \\f", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\f \f \f"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\f \f \f" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1471,8 +2473,13 @@ "input": "\\' \\\" \\` \\\\ \\n \\r \\v \\t \\b \\f", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "' \" ` \\ \n \n \u000b \t \b \f"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "' \" ` \\ \n \n \u000b \t \b \f" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -1493,7 +2500,11 @@ "type": "HtmlLexerTest", "input": "\\0", "test_type": "HumanizeParts", - "expected": [["TokenType.EOF"]], + "expected": [ + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1507,7 +2518,11 @@ "type": "HtmlLexerTest", "input": "\\09", "test_type": "HumanizeParts", - "expected": [["TokenType.EOF"]], + "expected": [ + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1528,8 +2543,13 @@ "input": "\\001 \\01 \\1 \\12 \\223 \\19 \\2234 \\999", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "\u0001 \u0001 \u0001 \n “ \u00019 “4 999"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "\u0001 \u0001 \u0001 \n “ \u00019 “4 999" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -1550,7 +2570,15 @@ "type": "HtmlLexerTest", "input": "\\x12 \\x4F \\xDC", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\u0012 O Ü"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\u0012 O Ü" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1570,7 +2598,12 @@ "type": "HtmlLexerTest", "input": "\\xGG", "test_type": "HumanizeErrors", - "expected": [["Invalid hexadecimal escape sequence", "0:2"]], + "expected": [ + [ + "Invalid hexadecimal escape sequence", + "0:2" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1584,7 +2617,12 @@ "type": "HtmlLexerTest", "input": "abc \\x xyz", "test_type": "HumanizeErrors", - "expected": [["Invalid hexadecimal escape sequence", "0:6"]], + "expected": [ + [ + "Invalid hexadecimal escape sequence", + "0:6" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1598,7 +2636,12 @@ "type": "HtmlLexerTest", "input": "abc\\x", "test_type": "HumanizeErrors", - "expected": [["Unexpected character \"EOF\"", "0:5"]], + "expected": [ + [ + "Unexpected character \"EOF\"", + "0:5" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1618,7 +2661,15 @@ "type": "HtmlLexerTest", "input": "\\u0123 \\uABCD", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "ģ ꯍ"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "ģ ꯍ" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1638,7 +2689,12 @@ "type": "HtmlLexerTest", "input": "\\uGGGG", "test_type": "HumanizeErrors", - "expected": [["Invalid hexadecimal escape sequence", "0:2"]], + "expected": [ + [ + "Invalid hexadecimal escape sequence", + "0:2" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1658,7 +2714,15 @@ "type": "HtmlLexerTest", "input": "\\u{01} \\u{ABC} \\u{1234} \\u{123AB}", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\u0001 ઼ ሴ 𒎫"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\u0001 ઼ ሴ 𒎫" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1678,7 +2742,12 @@ "type": "HtmlLexerTest", "input": "\\u{GG}", "test_type": "HumanizeErrors", - "expected": [["Invalid hexadecimal escape sequence", "0:3"]], + "expected": [ + [ + "Invalid hexadecimal escape sequence", + "0:3" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1698,7 +2767,15 @@ "type": "HtmlLexerTest", "input": "abc\\\ndef", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "abcdef"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "abcdef" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1712,7 +2789,15 @@ "type": "HtmlLexerTest", "input": "\\\nx\\\ny\\\n", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "xy"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "xy" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1732,7 +2817,15 @@ "type": "HtmlLexerTest", "input": "a g ~", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "a g ~"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "a g ~" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -1753,8 +2846,13 @@ "input": "abc\ndef\\nghi\\tjkl\\`\\'\\\"mno", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "abc\ndef\nghi\tjkl`'\"mno"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "abc\ndef\nghi\tjkl`'\"mno" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -1776,11 +2874,26 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "script"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.RAW_TEXT", "abc\ndef\nghi\tjkl`'\"mno"], - ["TokenType.TAG_CLOSE", "", "script"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "script" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.RAW_TEXT", + "abc\ndef\nghi\tjkl`'\"mno" + ], + [ + "TokenType.TAG_CLOSE", + "", + "script" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -1802,11 +2915,26 @@ "input": "abc\ndef\\nghi\\tjkl\\`\\'\\\"mno", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.ESCAPABLE_RAW_TEXT", "abc\ndef\nghi\tjkl`'\"mno"], - ["TokenType.TAG_CLOSE", "", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "abc\ndef\nghi\tjkl`'\"mno" + ], + [ + "TokenType.TAG_CLOSE", + "", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -1828,17 +2956,51 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "b"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_NAME", "", "c"], - ["TokenType.ATTR_QUOTE", "'"], - ["TokenType.ATTR_VALUE_TEXT", "d"], - ["TokenType.ATTR_QUOTE", "'"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "b" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_NAME", + "", + "c" + ], + [ + "TokenType.ATTR_QUOTE", + "'" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "d" + ], + [ + "TokenType.ATTR_QUOTE", + "'" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -1899,9 +3061,17 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "test"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "test" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -1916,9 +3086,17 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "ns1", "test"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "ns1", + "test" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -1933,9 +3111,17 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "test"], - ["TokenType.TAG_OPEN_END_VOID"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "test" + ], + [ + "TokenType.TAG_OPEN_END_VOID" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -1950,9 +3136,17 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "test"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "test" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -1967,9 +3161,18 @@ "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.TAG_OPEN_START", ""], - ["TokenType.EOF", ""] + [ + "TokenType.TAG_OPEN_START", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -1990,10 +3193,20 @@ "input": "@let foo = 123 + 456;", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "123 + 456"], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "123 + 456" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2097,10 +3310,20 @@ "input": "@let foo = \n123 + \n 456 + \n789\n;", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "123 + \n 456 + \n789\n"], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "123 + \n 456 + \n789\n" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2115,13 +3338,30 @@ "input": "@defer {@let foo = 123 + 456;}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "defer"], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "123 + 456"], - ["TokenType.LET_END"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "defer" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "123 + 456" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2136,10 +3376,20 @@ "input": "@let foo = 'a; b';", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "'a; b'"], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "'a; b'" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2148,10 +3398,20 @@ "input": "@let foo = \"';'\";", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "\"';'\""], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "\"';'\"" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2176,10 +3436,20 @@ "input": "@let foo = [1, 2, 3];", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "[1, 2, 3]"], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "[1, 2, 3]" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2188,10 +3458,20 @@ "input": "@let foo = [0, [foo[1]], 3];", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "[0, [foo[1]], 3]"], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "[0, [foo[1]], 3]" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2206,10 +3486,20 @@ "input": "@let foo = {a: 1, b: {c: something + 2}};", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "{a: 1, b: {c: something + 2}}"], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "{a: 1, b: {c: something + 2}}" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2218,10 +3508,20 @@ "input": "@let foo = {};", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "{}"], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "{}" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2230,10 +3530,20 @@ "input": "@let foo = {foo: \";\"};", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "{foo: \";\"}"], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "{foo: \";\"}" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2252,7 +3562,12 @@ "type": "HtmlLexerTest", "input": "@let foo = \";", "test_type": "HumanizeErrors", - "expected": [["Unexpected character \"EOF\"", "0:13"]], + "expected": [ + [ + "Unexpected character \"EOF\"", + "0:13" + ] + ], "options": null }, { @@ -2260,10 +3575,20 @@ "input": "@let foo = {a: 1,;", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "{a: 1,"], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "{a: 1," + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2272,10 +3597,20 @@ "input": "@let foo = [1, ;", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "[1, "], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "[1, " + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2284,10 +3619,20 @@ "input": "@let foo = fn(;", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", "fn("], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "fn(" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2302,10 +3647,20 @@ "input": "@let foo =;", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "foo"], - ["TokenType.LET_VALUE", ""], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "foo" + ], + [ + "TokenType.LET_VALUE", + "" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2320,9 +3675,17 @@ "input": "@letFoo = 123;", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_LET", "@let"], - ["TokenType.TEXT", "Foo = 123;"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_LET", + "@let" + ], + [ + "TokenType.TEXT", + "Foo = 123;" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2337,9 +3700,17 @@ "input": "@let foo\\bar = 123;", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_LET", "foo"], - ["TokenType.TEXT", "\\bar = 123;"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_LET", + "foo" + ], + [ + "TokenType.TEXT", + "\\bar = 123;" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2348,9 +3719,17 @@ "input": "@let #foo = 123;", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_LET", ""], - ["TokenType.TEXT", "#foo = 123;"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_LET", + "" + ], + [ + "TokenType.TEXT", + "#foo = 123;" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2359,9 +3738,17 @@ "input": "@let foo\nbar = 123;", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_LET", "foo"], - ["TokenType.TEXT", "bar = 123;"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_LET", + "foo" + ], + [ + "TokenType.TEXT", + "bar = 123;" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2376,10 +3763,20 @@ "input": "@let a123 = foo;", "test_type": "HumanizeParts", "expected": [ - ["TokenType.LET_START", "a123"], - ["TokenType.LET_VALUE", "foo"], - ["TokenType.LET_END"], - ["TokenType.EOF"] + [ + "TokenType.LET_START", + "a123" + ], + [ + "TokenType.LET_VALUE", + "foo" + ], + [ + "TokenType.LET_END" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2388,9 +3785,17 @@ "input": "@let 123a = 123;", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_LET", ""], - ["TokenType.TEXT", "123a = 123;"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_LET", + "" + ], + [ + "TokenType.TEXT", + "123a = 123;" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2405,9 +3810,17 @@ "input": "@let foo = 123 + 456", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_LET", "foo"], - ["TokenType.LET_VALUE", "123 + 456"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_LET", + "foo" + ], + [ + "TokenType.LET_VALUE", + "123 + 456" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2416,9 +3829,17 @@ "input": "@let foo = 123 + 456 ", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_LET", "foo"], - ["TokenType.LET_VALUE", "123 + 456 "], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_LET", + "foo" + ], + [ + "TokenType.LET_VALUE", + "123 + 456 " + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2427,9 +3848,17 @@ "input": "@let foo = 123, bar = 456", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_LET", "foo"], - ["TokenType.LET_VALUE", "123, bar = 456"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_LET", + "foo" + ], + [ + "TokenType.LET_VALUE", + "123, bar = 456" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2444,10 +3873,23 @@ "input": "{{ @let foo = 123; }}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", ""], - ["TokenType.INTERPOLATION", "{{", " @let foo = 123; ", "}}"], - ["TokenType.TEXT", ""], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.INTERPOLATION", + "{{", + " @let foo = 123; ", + "}}" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2468,10 +3910,22 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2486,27 +3940,98 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", ""], - ["TokenType.ATTR_VALUE_INTERPOLATION", "{{", "v", "}}"], - ["TokenType.ATTR_VALUE_TEXT", ""], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_NAME", "", "b"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "s"], - ["TokenType.ATTR_VALUE_INTERPOLATION", "{{", "m", "}}"], - ["TokenType.ATTR_VALUE_TEXT", "e"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_NAME", "", "c"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "s"], - ["TokenType.ATTR_VALUE_INTERPOLATION", "{{", "m//c", "}}"], - ["TokenType.ATTR_VALUE_TEXT", "e"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "" + ], + [ + "TokenType.ATTR_VALUE_INTERPOLATION", + "{{", + "v", + "}}" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_NAME", + "", + "b" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "s" + ], + [ + "TokenType.ATTR_VALUE_INTERPOLATION", + "{{", + "m", + "}}" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "e" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_NAME", + "", + "c" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "s" + ], + [ + "TokenType.ATTR_VALUE_INTERPOLATION", + "{{", + "m//c", + "}}" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "e" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2521,15 +4046,43 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", ""], - ["TokenType.ATTR_VALUE_INTERPOLATION", "{{", " a \\\" ' b "], - ["TokenType.ATTR_VALUE_TEXT", ""], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "" + ], + [ + "TokenType.ATTR_VALUE_INTERPOLATION", + "{{", + " a \\\" ' b " + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2538,15 +4091,43 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "'"], - ["TokenType.ATTR_VALUE_TEXT", ""], - ["TokenType.ATTR_VALUE_INTERPOLATION", "{{", " a \" \\' b "], - ["TokenType.ATTR_VALUE_TEXT", ""], - ["TokenType.ATTR_QUOTE", "'"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "'" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "" + ], + [ + "TokenType.ATTR_VALUE_INTERPOLATION", + "{{", + " a \" \\' b " + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "" + ], + [ + "TokenType.ATTR_QUOTE", + "'" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2561,10 +4142,22 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "ns1", "a"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "ns1", + "a" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2579,10 +4172,22 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "(ns1:a)"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "(ns1:a)" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2597,13 +4202,34 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "'"], - ["TokenType.ATTR_VALUE_TEXT", "b"], - ["TokenType.ATTR_QUOTE", "'"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "'" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "b" + ], + [ + "TokenType.ATTR_QUOTE", + "'" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2618,13 +4244,34 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "b"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "b" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2639,11 +4286,26 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_VALUE_TEXT", "b"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "b" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2658,13 +4320,36 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "a"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_VALUE_TEXT", ""], - ["TokenType.ATTR_VALUE_INTERPOLATION", "{{", "link.text", "}}"], - ["TokenType.ATTR_VALUE_TEXT", ""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "a" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "" + ], + [ + "TokenType.ATTR_VALUE_INTERPOLATION", + "{{", + "link.text", + "}}" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2679,16 +4364,34 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "app-component"], - ["TokenType.ATTR_NAME", "", "[attr]"], - ["TokenType.ATTR_QUOTE", "\""], + [ + "TokenType.TAG_OPEN_START", + "", + "app-component" + ], + [ + "TokenType.ATTR_NAME", + "", + "[attr]" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], [ "TokenType.ATTR_VALUE_TEXT", "[\n {text: 'some text',url:'//www.google.com'},\n {text:'other text',url:'//www.google.com'}]" ], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2703,37 +4406,34 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", ""], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] - ], - "options": null - } - ] - }, - { - "name": "should parse bound inputs with expressions containing newlines", - "path": "HtmlLexer/attributes/should parse bound inputs with expressions containing newlines", - "assertions": [ - { - "type": "HtmlLexerTest", - "input": "", - "test_type": "HumanizeParts", - "expected": [ - ["TokenType.TAG_OPEN_START", "", "app-component"], - ["TokenType.ATTR_NAME", "", "[attr]"], - ["TokenType.ATTR_QUOTE", "\""], + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], [ "TokenType.ATTR_VALUE_TEXT", - "[\n {text: 'some text',url:'//www.google.com'},\n {text:'other text',url:'//www.google.com'}]" + "" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" ], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2748,11 +4448,26 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_VALUE_TEXT", "b"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "b" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2767,17 +4482,52 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", ""], - ["TokenType.ENCODED_ENTITY", "A", "A"], - ["TokenType.ATTR_VALUE_TEXT", ""], - ["TokenType.ENCODED_ENTITY", "A", "A"], - ["TokenType.ATTR_VALUE_TEXT", ""], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "" + ], + [ + "TokenType.ENCODED_ENTITY", + "A", + "A" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "" + ], + [ + "TokenType.ENCODED_ENTITY", + "A", + "A" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2792,17 +4542,51 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "&"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_NAME", "", "b"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "c&&d"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "&" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_NAME", + "", + "b" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "c&&d" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2817,13 +4601,34 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "b && c &"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "b && c &" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2838,13 +4643,34 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "'"], - ["TokenType.ATTR_VALUE_TEXT", "t\ne\ns\nt"], - ["TokenType.ATTR_QUOTE", "'"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "'" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "t\ne\ns\nt" + ], + [ + "TokenType.ATTR_QUOTE", + "'" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2859,11 +4685,26 @@ "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.TAG_OPEN_START", ""], - ["TokenType.EOF", ""] + [ + "TokenType.TAG_OPEN_START", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -2877,7 +4718,12 @@ "type": "HtmlLexerTest", "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "foo"], - ["TokenType.ATTR_NAME", "", "[class.data-[size='large']:p-8]"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "expr"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END_VOID"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "foo" + ], + [ + "TokenType.ATTR_NAME", + "", + "[class.data-[size='large']:p-8]" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "expr" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END_VOID" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2949,10 +4863,22 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "foo"], - ["TokenType.ATTR_NAME", "", "[class.data-[size='large']:p-8]"], - ["TokenType.TAG_OPEN_END_VOID"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "foo" + ], + [ + "TokenType.ATTR_NAME", + "", + "[class.data-[size='large']:p-8]" + ], + [ + "TokenType.TAG_OPEN_END_VOID" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2961,13 +4887,34 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "foo"], - ["TokenType.ATTR_NAME", "", "[class.data-[size='hello white space']]"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "expr"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END_VOID"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "foo" + ], + [ + "TokenType.ATTR_NAME", + "", + "[class.data-[size='hello white space']]" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "expr" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END_VOID" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -2982,13 +4929,34 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "foo"], - ["TokenType.ATTR_NAME", "", "[class.a]b]c]"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "expr"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END_VOID"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "foo" + ], + [ + "TokenType.ATTR_NAME", + "", + "[class.a]b]c]" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "expr" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END_VOID" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -2997,10 +4965,22 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "foo"], - ["TokenType.ATTR_NAME", "", "[class.a[]][[]]b]][c]"], - ["TokenType.TAG_OPEN_END_VOID"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "foo" + ], + [ + "TokenType.ATTR_NAME", + "", + "[class.a[]][[]]b]][c]" + ], + [ + "TokenType.TAG_OPEN_END_VOID" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3015,11 +4995,28 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_TAG_OPEN", "", "foo"], - ["TokenType.ATTR_NAME", "", "[class.text-"], - ["TokenType.ATTR_NAME", "", "primary"], - ["TokenType.TEXT", "80]=\"expr\"/>"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_TAG_OPEN", + "", + "foo" + ], + [ + "TokenType.ATTR_NAME", + "", + "[class.text-" + ], + [ + "TokenType.ATTR_NAME", + "", + "primary" + ], + [ + "TokenType.TEXT", + "80]=\"expr\"/>" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3039,7 +5036,16 @@ "type": "HtmlLexerTest", "input": "", "test_type": "HumanizeParts", - "expected": [["TokenType.TAG_CLOSE", "", "test"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TAG_CLOSE", + "", + "test" + ], + [ + "TokenType.EOF" + ] + ], "options": null } ] @@ -3052,7 +5058,16 @@ "type": "HtmlLexerTest", "input": "", "test_type": "HumanizeParts", - "expected": [["TokenType.TAG_CLOSE", "ns1", "test"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TAG_CLOSE", + "ns1", + "test" + ], + [ + "TokenType.EOF" + ] + ], "options": null } ] @@ -3065,7 +5080,16 @@ "type": "HtmlLexerTest", "input": "", "test_type": "HumanizeParts", - "expected": [["TokenType.TAG_CLOSE", "", "test"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TAG_CLOSE", + "", + "test" + ], + [ + "TokenType.EOF" + ] + ], "options": null } ] @@ -3079,8 +5103,14 @@ "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.TAG_CLOSE", ""], - ["TokenType.EOF", ""] + [ + "TokenType.TAG_CLOSE", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -3094,7 +5124,12 @@ "type": "HtmlLexerTest", "input": "a", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.TAG_OPEN_START", ""], - ["TokenType.TEXT", "a"], - ["TokenType.INCOMPLETE_TAG_OPEN", ""], - ["TokenType.EOF", ""] + [ + "TokenType.TAG_OPEN_START", + "" + ], + [ + "TokenType.TEXT", + "a" + ], + [ + "TokenType.INCOMPLETE_TAG_OPEN", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null }, @@ -3498,7 +5871,15 @@ "type": "HtmlLexerTest", "input": "< a>", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "< a>"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "< a>" + ], + [ + "TokenType.EOF" + ] + ], "options": null } ] @@ -3512,17 +5893,50 @@ "input": "{{ a d }}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", ""], - ["TokenType.INTERPOLATION", "{{", " a "], - ["TokenType.TEXT", ""], - ["TokenType.TAG_OPEN_START", "", "b"], - ["TokenType.ATTR_NAME", "", "&&"], - ["TokenType.ATTR_NAME", "", "c"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", " d "], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.INTERPOLATION", + "{{", + " a " + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.TAG_OPEN_START", + "", + "b" + ], + [ + "TokenType.ATTR_NAME", + "", + "&&" + ], + [ + "TokenType.ATTR_NAME", + "", + "c" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + " d " + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3537,14 +5951,35 @@ "input": "{{ a }}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", ""], - ["TokenType.INTERPOLATION", "{{", " a }"], - ["TokenType.TEXT", ""], - ["TokenType.COMMENT_START"], - ["TokenType.RAW_TEXT", ""], - ["TokenType.COMMENT_END"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.INTERPOLATION", + "{{", + " a }" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.COMMENT_START" + ], + [ + "TokenType.RAW_TEXT", + "" + ], + [ + "TokenType.COMMENT_END" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3559,13 +5994,35 @@ "input": "

    {{ a

    ", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "p"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", ""], - ["TokenType.INTERPOLATION", "{{", " a "], - ["TokenType.TEXT", ""], - ["TokenType.TAG_CLOSE", "", "p"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "p" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.INTERPOLATION", + "{{", + " a " + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.TAG_CLOSE", + "", + "p" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3580,14 +6037,35 @@ "input": "{{ a }}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", ""], - ["TokenType.INTERPOLATION", "{{", " a }"], - ["TokenType.TEXT", ""], - ["TokenType.CDATA_START"], - ["TokenType.RAW_TEXT", ""], - ["TokenType.CDATA_END"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.INTERPOLATION", + "{{", + " a }" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.CDATA_START" + ], + [ + "TokenType.RAW_TEXT", + "" + ], + [ + "TokenType.CDATA_END" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3602,13 +6080,36 @@ "input": "{{'<={'}}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "code"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", ""], - ["TokenType.INTERPOLATION", "{{", "'<={'", "}}"], - ["TokenType.TEXT", ""], - ["TokenType.TAG_CLOSE", "", "code"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "code" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.INTERPOLATION", + "{{", + "'<={'", + "}}" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.TAG_CLOSE", + "", + "code" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -3630,9 +6131,18 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_TAG_OPEN", "", "t"], - ["TokenType.TEXT", "\">"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_TAG_OPEN", + "", + "t" + ], + [ + "TokenType.TEXT", + "\">" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -3641,9 +6151,18 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_TAG_OPEN", "", "t"], - ["TokenType.TEXT", "'>"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_TAG_OPEN", + "", + "t" + ], + [ + "TokenType.TEXT", + "'>" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3658,13 +6177,35 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_TAG_OPEN", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "b"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TEXT", "\">"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_TAG_OPEN", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "b" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TEXT", + "\">" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -3673,13 +6214,35 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_TAG_OPEN", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "'"], - ["TokenType.ATTR_VALUE_TEXT", "b"], - ["TokenType.ATTR_QUOTE", "'"], - ["TokenType.TEXT", "'>"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_TAG_OPEN", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "'" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "b" + ], + [ + "TokenType.ATTR_QUOTE", + "'" + ], + [ + "TokenType.TEXT", + "'>" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3694,10 +6257,23 @@ "input": "{{ \"{\" }}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", ""], - ["TokenType.INTERPOLATION", "{{", " \"{\" ", "}}"], - ["TokenType.TEXT", ""], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.INTERPOLATION", + "{{", + " \"{\" ", + "}}" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3712,10 +6288,23 @@ "input": "{{ \"{{\" }}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", ""], - ["TokenType.INTERPOLATION", "{{", " \"{{\" ", "}}"], - ["TokenType.TEXT", ""], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.INTERPOLATION", + "{{", + " \"{{\" ", + "}}" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3730,10 +6319,22 @@ "input": "{{ \"{{a}}' }}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", ""], - ["TokenType.INTERPOLATION", "{{", " \"{{a}}' }}"], - ["TokenType.TEXT", ""], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.INTERPOLATION", + "{{", + " \"{{a}}' }}" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3748,11 +6349,26 @@ "input": "{a, b, =4 {c}}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "span"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", "{a, b, =4 {c}}"], - ["TokenType.TAG_CLOSE", "", "span"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "span" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + "{a, b, =4 {c}}" + ], + [ + "TokenType.TAG_CLOSE", + "", + "span" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -3780,11 +6396,26 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "script"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.RAW_TEXT", "t\ne\ns\nt"], - ["TokenType.TAG_CLOSE", "", "script"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "script" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.RAW_TEXT", + "t\ne\ns\nt" + ], + [ + "TokenType.TAG_CLOSE", + "", + "script" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3799,11 +6430,26 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "script"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.RAW_TEXT", "&"], - ["TokenType.TAG_CLOSE", "", "script"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "script" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.RAW_TEXT", + "&" + ], + [ + "TokenType.TAG_CLOSE", + "", + "script" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3818,11 +6464,26 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "script"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.RAW_TEXT", "a
    "], - ["TokenType.TAG_CLOSE", "", "script"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "script" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.RAW_TEXT", + "a
    " + ], + [ + "TokenType.TAG_CLOSE", + "", + "script" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3837,11 +6498,26 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "script"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.RAW_TEXT", "a"], - ["TokenType.TAG_CLOSE", "", "script"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "script" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.RAW_TEXT", + "a" + ], + [ + "TokenType.TAG_CLOSE", + "", + "script" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3856,11 +6532,26 @@ "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.TAG_OPEN_START", ""], - ["TokenType.RAW_TEXT", "a"], - ["TokenType.TAG_CLOSE", ""], - ["TokenType.EOF", ""] + [ + "TokenType.TAG_OPEN_START", + "" + ], + [ + "TokenType.RAW_TEXT", + "a" + ], + [ + "TokenType.TAG_CLOSE", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -3881,11 +6572,26 @@ "input": "t\ne\rs\r\nt", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.ESCAPABLE_RAW_TEXT", "t\ne\ns\nt"], - ["TokenType.TAG_CLOSE", "", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "t\ne\ns\nt" + ], + [ + "TokenType.TAG_CLOSE", + "", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3900,13 +6606,35 @@ "input": "&", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.ESCAPABLE_RAW_TEXT", ""], - ["TokenType.ENCODED_ENTITY", "&", "&"], - ["TokenType.ESCAPABLE_RAW_TEXT", ""], - ["TokenType.TAG_CLOSE", "", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "" + ], + [ + "TokenType.ENCODED_ENTITY", + "&", + "&" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "" + ], + [ + "TokenType.TAG_CLOSE", + "", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3921,11 +6649,26 @@ "input": "a<div>", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.ESCAPABLE_RAW_TEXT", "a
    "], - ["TokenType.TAG_CLOSE", "", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "a
    " + ], + [ + "TokenType.TAG_CLOSE", + "", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3940,11 +6683,26 @@ "input": "a</test>", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.ESCAPABLE_RAW_TEXT", "a"], - ["TokenType.TAG_CLOSE", "", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "a" + ], + [ + "TokenType.TAG_CLOSE", + "", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -3959,11 +6717,26 @@ "input": "a", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.TAG_OPEN_START", ""], - ["TokenType.ESCAPABLE_RAW_TEXT", "a"], - ["TokenType.TAG_CLOSE", ""], - ["TokenType.EOF", ""] + [ + "TokenType.TAG_OPEN_START", + "" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "a" + ], + [ + "TokenType.TAG_CLOSE", + "" + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -3984,11 +6757,26 @@ "input": "test", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "svg", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", "test"], - ["TokenType.TAG_CLOSE", "svg", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "svg", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + "test" + ], + [ + "TokenType.TAG_CLOSE", + "svg", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -4003,14 +6791,39 @@ "input": "test", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "svg", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_OPEN_START", "", "f"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", "test"], - ["TokenType.TAG_CLOSE", "", "f"], - ["TokenType.TAG_CLOSE", "svg", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "svg", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_OPEN_START", + "", + "f" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + "test" + ], + [ + "TokenType.TAG_CLOSE", + "", + "f" + ], + [ + "TokenType.TAG_CLOSE", + "svg", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -4055,8 +6868,8 @@ "assertions": [] }, { - "name": "should not normalize line-endings in ICU expressions when `i18nNormalizeLineEndingsInICUs` is not defined", - "path": "HtmlLexer/expansion forms/[line ending normalization/{escapedString: false}/should not normalize line-endings in ICU expressions when `i18nNormalizeLineEndingsInICUs` is not defined", + "name": "should not normalize line-endings in ICU expressions when `i18nNormalizeLineEndingsInICUs` is not defined (escapeString: false)", + "path": "HtmlLexer/expansion forms/[line ending normalization/{escapedString: false}/should not normalize line-endings in ICU expressions when `i18nNormalizeLineEndingsInICUs` is not defined (escapeString: false)", "assertions": [] }, { @@ -4080,23 +6893,65 @@ "input": "{one.two, three, =4 {four} =5 {five} foo {bar} }", "test_type": "HumanizeParts", "expected": [ - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "one.two"], - ["TokenType.RAW_TEXT", "three"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "four"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_CASE_VALUE", "=5"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "five"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_CASE_VALUE", "foo"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "bar"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.EOF"] + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "one.two" + ], + [ + "TokenType.RAW_TEXT", + "three" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "four" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=5" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "five" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "foo" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "bar" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -4118,17 +6973,45 @@ "input": "before{one.two, three, =4 {four}}after", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "before"], - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "one.two"], - ["TokenType.RAW_TEXT", "three"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "four"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.TEXT", "after"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "before" + ], + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "one.two" + ], + [ + "TokenType.RAW_TEXT", + "three" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "four" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.TEXT", + "after" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -4150,21 +7033,63 @@ "input": "
    {a, b, =4 {c}}
    ", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "div"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_OPEN_START", "", "span"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "a"], - ["TokenType.RAW_TEXT", "b"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "c"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.TAG_CLOSE", "", "span"], - ["TokenType.TAG_CLOSE", "", "div"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "div" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_OPEN_START", + "", + "span" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "a" + ], + [ + "TokenType.RAW_TEXT", + "b" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "c" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.TAG_CLOSE", + "", + "span" + ], + [ + "TokenType.TAG_CLOSE", + "", + "div" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -4186,23 +7111,71 @@ "input": "
    {a, b, =4 {c}}
    ", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "div"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_OPEN_START", "", "span"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", " "], - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "a"], - ["TokenType.RAW_TEXT", "b"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "c"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.TEXT", " "], - ["TokenType.TAG_CLOSE", "", "span"], - ["TokenType.TAG_CLOSE", "", "div"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "div" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_OPEN_START", + "", + "span" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + " " + ], + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "a" + ], + [ + "TokenType.RAW_TEXT", + "b" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "c" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.TEXT", + " " + ], + [ + "TokenType.TAG_CLOSE", + "", + "span" + ], + [ + "TokenType.TAG_CLOSE", + "", + "div" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -4224,19 +7197,54 @@ "input": "{one.two, three, =4 {four a}}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "one.two"], - ["TokenType.RAW_TEXT", "three"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "four "], - ["TokenType.TAG_OPEN_START", "", "b"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", "a"], - ["TokenType.TAG_CLOSE", "", "b"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.EOF"] + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "one.two" + ], + [ + "TokenType.RAW_TEXT", + "three" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "four " + ], + [ + "TokenType.TAG_OPEN_START", + "", + "b" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + "a" + ], + [ + "TokenType.TAG_CLOSE", + "", + "b" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -4258,17 +7266,47 @@ "input": "{one.two, three, =4 {four {{a}}}}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "one.two"], - ["TokenType.RAW_TEXT", "three"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "four "], - ["TokenType.INTERPOLATION", "{{", "a", "}}"], - ["TokenType.TEXT", ""], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.EOF"] + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "one.two" + ], + [ + "TokenType.RAW_TEXT", + "three" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "four " + ], + [ + "TokenType.INTERPOLATION", + "{{", + "a", + "}}" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -4290,23 +7328,65 @@ "input": "{one.two, three, =4 { {xx, yy, =x {one}} }}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "one.two"], - ["TokenType.RAW_TEXT", "three"], - ["TokenType.EXPANSION_CASE_VALUE", "=4"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.EXPANSION_FORM_START"], - ["TokenType.RAW_TEXT", "xx"], - ["TokenType.RAW_TEXT", "yy"], - ["TokenType.EXPANSION_CASE_VALUE", "=x"], - ["TokenType.EXPANSION_CASE_EXP_START"], - ["TokenType.TEXT", "one"], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.TEXT", " "], - ["TokenType.EXPANSION_CASE_EXP_END"], - ["TokenType.EXPANSION_FORM_END"], - ["TokenType.EOF"] + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "one.two" + ], + [ + "TokenType.RAW_TEXT", + "three" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=4" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.EXPANSION_FORM_START" + ], + [ + "TokenType.RAW_TEXT", + "xx" + ], + [ + "TokenType.RAW_TEXT", + "yy" + ], + [ + "TokenType.EXPANSION_CASE_VALUE", + "=x" + ], + [ + "TokenType.EXPANSION_CASE_EXP_START" + ], + [ + "TokenType.TEXT", + "one" + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.TEXT", + " " + ], + [ + "TokenType.EXPANSION_CASE_EXP_END" + ], + [ + "TokenType.EXPANSION_FORM_END" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": true, @@ -4395,11 +7475,26 @@ "input": "

    İ

    ", "test_type": "HumanizeSourceSpans", "expected": [ - ["TokenType.TAG_OPEN_START", ""], - ["TokenType.TEXT", "İ"], - ["TokenType.TAG_CLOSE", "

    "], - ["TokenType.EOF", ""] + [ + "TokenType.TAG_OPEN_START", + "" + ], + [ + "TokenType.TEXT", + "İ" + ], + [ + "TokenType.TAG_CLOSE", + "

    " + ], + [ + "TokenType.EOF", + "" + ] ], "options": null } @@ -4419,7 +7514,15 @@ "type": "HtmlLexerTest", "input": "\\' \\' \\'", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "' ' '"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "' ' '" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4433,7 +7536,15 @@ "type": "HtmlLexerTest", "input": "\\\" \\\" \\\"", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\" \" \""], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\" \" \"" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4447,7 +7558,15 @@ "type": "HtmlLexerTest", "input": "\\` \\` \\`", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "` ` `"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "` ` `" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4461,7 +7580,15 @@ "type": "HtmlLexerTest", "input": "\\\\ \\\\ \\\\", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\\ \\ \\"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\\ \\ \\" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4475,7 +7602,15 @@ "type": "HtmlLexerTest", "input": "\\n \\n \\n", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\n \n \n"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\n \n \n" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4490,10 +7625,23 @@ "input": "\\r{{\\r}}\\r", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "\n"], - ["TokenType.INTERPOLATION", "{{", "\n", "}}"], - ["TokenType.TEXT", "\n"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "\n" + ], + [ + "TokenType.INTERPOLATION", + "{{", + "\n", + "}}" + ], + [ + "TokenType.TEXT", + "\n" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -4508,7 +7656,15 @@ "type": "HtmlLexerTest", "input": "\\v \\v \\v", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\u000b \u000b \u000b"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\u000b \u000b \u000b" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4522,7 +7678,15 @@ "type": "HtmlLexerTest", "input": "\\t \\t \\t", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\t \t \t"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\t \t \t" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4536,7 +7700,15 @@ "type": "HtmlLexerTest", "input": "\\b \\b \\b", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\b \b \b"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\b \b \b" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4550,7 +7722,15 @@ "type": "HtmlLexerTest", "input": "\\f \\f \\f", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\f \f \f"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\f \f \f" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4565,8 +7745,13 @@ "input": "\\' \\\" \\` \\\\ \\n \\r \\v \\t \\b \\f", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "' \" ` \\ \n \n \u000b \t \b \f"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "' \" ` \\ \n \n \u000b \t \b \f" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -4587,7 +7772,11 @@ "type": "HtmlLexerTest", "input": "\\0", "test_type": "HumanizeParts", - "expected": [["TokenType.EOF"]], + "expected": [ + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4601,7 +7790,11 @@ "type": "HtmlLexerTest", "input": "\\09", "test_type": "HumanizeParts", - "expected": [["TokenType.EOF"]], + "expected": [ + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4622,8 +7815,13 @@ "input": "\\001 \\01 \\1 \\12 \\223 \\19 \\2234 \\999", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "\u0001 \u0001 \u0001 \n “ \u00019 “4 999"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "\u0001 \u0001 \u0001 \n “ \u00019 “4 999" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -4644,7 +7842,15 @@ "type": "HtmlLexerTest", "input": "\\x12 \\x4F \\xDC", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\u0012 O Ü"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\u0012 O Ü" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4664,7 +7870,12 @@ "type": "HtmlLexerTest", "input": "\\xGG", "test_type": "HumanizeErrors", - "expected": [["Invalid hexadecimal escape sequence", "0:2"]], + "expected": [ + [ + "Invalid hexadecimal escape sequence", + "0:2" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4678,7 +7889,12 @@ "type": "HtmlLexerTest", "input": "abc \\x xyz", "test_type": "HumanizeErrors", - "expected": [["Invalid hexadecimal escape sequence", "0:6"]], + "expected": [ + [ + "Invalid hexadecimal escape sequence", + "0:6" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4692,7 +7908,12 @@ "type": "HtmlLexerTest", "input": "abc\\x", "test_type": "HumanizeErrors", - "expected": [["Unexpected character \"EOF\"", "0:5"]], + "expected": [ + [ + "Unexpected character \"EOF\"", + "0:5" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4712,7 +7933,15 @@ "type": "HtmlLexerTest", "input": "\\u0123 \\uABCD", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "ģ ꯍ"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "ģ ꯍ" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4732,7 +7961,12 @@ "type": "HtmlLexerTest", "input": "\\uGGGG", "test_type": "HumanizeErrors", - "expected": [["Invalid hexadecimal escape sequence", "0:2"]], + "expected": [ + [ + "Invalid hexadecimal escape sequence", + "0:2" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4752,7 +7986,15 @@ "type": "HtmlLexerTest", "input": "\\u{01} \\u{ABC} \\u{1234} \\u{123AB}", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "\u0001 ઼ ሴ 𒎫"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "\u0001 ઼ ሴ 𒎫" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4772,7 +8014,12 @@ "type": "HtmlLexerTest", "input": "\\u{GG}", "test_type": "HumanizeErrors", - "expected": [["Invalid hexadecimal escape sequence", "0:3"]], + "expected": [ + [ + "Invalid hexadecimal escape sequence", + "0:3" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4792,7 +8039,15 @@ "type": "HtmlLexerTest", "input": "abc\\\ndef", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "abcdef"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "abcdef" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4806,7 +8061,15 @@ "type": "HtmlLexerTest", "input": "\\\nx\\\ny\\\n", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "xy"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "xy" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4826,7 +8089,15 @@ "type": "HtmlLexerTest", "input": "a g ~", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "a g ~"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "a g ~" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4846,7 +8117,15 @@ "type": "HtmlLexerTest", "input": "abc\ndef\\nghi\\tjkl\\`\\'\\\"mno", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "abc\ndef\nghi\tjkl`'\"mno"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "abc\ndef\nghi\tjkl`'\"mno" + ], + [ + "TokenType.EOF" + ] + ], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -4867,11 +8146,26 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "script"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.RAW_TEXT", "abc\ndef\nghi\tjkl`'\"mno"], - ["TokenType.TAG_CLOSE", "", "script"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "script" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.RAW_TEXT", + "abc\ndef\nghi\tjkl`'\"mno" + ], + [ + "TokenType.TAG_CLOSE", + "", + "script" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -4893,11 +8187,26 @@ "input": "abc\ndef\\nghi\\tjkl\\`\\'\\\"mno", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "title"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.ESCAPABLE_RAW_TEXT", "abc\ndef\nghi\tjkl`'\"mno"], - ["TokenType.TAG_CLOSE", "", "title"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "title" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.ESCAPABLE_RAW_TEXT", + "abc\ndef\nghi\tjkl`'\"mno" + ], + [ + "TokenType.TAG_CLOSE", + "", + "title" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -4919,17 +8228,51 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "t"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "b"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_NAME", "", "c"], - ["TokenType.ATTR_QUOTE", "'"], - ["TokenType.ATTR_VALUE_TEXT", "d"], - ["TokenType.ATTR_QUOTE", "'"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "t" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "b" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_NAME", + "", + "c" + ], + [ + "TokenType.ATTR_QUOTE", + "'" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "d" + ], + [ + "TokenType.ATTR_QUOTE", + "'" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.EOF" + ] ], "options": { "tokenize_expansion_forms": false, @@ -5010,6 +8353,91 @@ } ] }, + { + "name": "should parse @default never;", + "path": "HtmlLexer/blocks/should parse @default never;", + "assertions": [ + { + "type": "HtmlLexerTest", + "input": "@default never;", + "test_type": "HumanizeParts", + "expected": [ + [ + "TokenType.BLOCK_OPEN_START", + "default never" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] + ], + "options": null + } + ] + }, + { + "name": "should parse @default never(expr);", + "path": "HtmlLexer/blocks/should parse @default never(expr);", + "assertions": [ + { + "type": "HtmlLexerTest", + "input": "@default never(expr);", + "test_type": "HumanizeParts", + "expected": [ + [ + "TokenType.BLOCK_OPEN_START", + "default never" + ], + [ + "TokenType.BLOCK_PARAMETER", + "expr" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] + ], + "options": null + } + ] + }, + { + "name": "should parse @default never ;", + "path": "HtmlLexer/blocks/should parse @default never ;", + "assertions": [ + { + "type": "HtmlLexerTest", + "input": "@default never ;", + "test_type": "HumanizeParts", + "expected": [ + [ + "TokenType.BLOCK_OPEN_START", + "default never" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] + ], + "options": null + } + ] + }, { "name": "should parse a block with parameters", "path": "HtmlLexer/blocks/should parse a block with parameters", @@ -5019,13 +8447,31 @@ "input": "@for (item of items; track item.id) {hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "for"], - ["TokenType.BLOCK_PARAMETER", "item of items"], - ["TokenType.BLOCK_PARAMETER", "track item.id"], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "for" + ], + [ + "TokenType.BLOCK_PARAMETER", + "item of items" + ], + [ + "TokenType.BLOCK_PARAMETER", + "track item.id" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5040,12 +8486,27 @@ "input": "@for (item of items;) {hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "for"], - ["TokenType.BLOCK_PARAMETER", "item of items"], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "for" + ], + [ + "TokenType.BLOCK_PARAMETER", + "item of items" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5060,11 +8521,23 @@ "input": "@else if {hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "else if"], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "else if" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null }, @@ -5073,12 +8546,27 @@ "input": "@else if (foo !== 2) {hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "else if"], - ["TokenType.BLOCK_PARAMETER", "foo !== 2"], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "else if" + ], + [ + "TokenType.BLOCK_PARAMETER", + "foo !== 2" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5127,12 +8615,27 @@ "input": "@for (item of items;;;;;) {hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "for"], - ["TokenType.BLOCK_PARAMETER", "item of items"], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "for" + ], + [ + "TokenType.BLOCK_PARAMETER", + "item of items" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5147,11 +8650,23 @@ "input": "@defer {hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "defer"], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "defer" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5166,12 +8681,27 @@ "input": "@for (item of items){hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "for"], - ["TokenType.BLOCK_PARAMETER", "item of items"], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "for" + ], + [ + "TokenType.BLOCK_PARAMETER", + "item of items" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5191,13 +8721,31 @@ "input": "@defer (on a({a: 1, b: 2}, false, {c: 3}); when b({d: 4})) {hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "defer"], - ["TokenType.BLOCK_PARAMETER", "on a({a: 1, b: 2}, false, {c: 3})"], - ["TokenType.BLOCK_PARAMETER", "when b({d: 4})"], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "defer" + ], + [ + "TokenType.BLOCK_PARAMETER", + "on a({a: 1, b: 2}, false, {c: 3})" + ], + [ + "TokenType.BLOCK_PARAMETER", + "when b({d: 4})" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5212,9 +8760,17 @@ "input": "@if (a === b {hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_BLOCK_OPEN", "if"], - ["TokenType.BLOCK_PARAMETER", "a === b {hello}"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_BLOCK_OPEN", + "if" + ], + [ + "TokenType.BLOCK_PARAMETER", + "a === b {hello}" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5229,10 +8785,20 @@ "input": "@if a === b) {hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_BLOCK_OPEN", "if a"], - ["TokenType.TEXT", "=== b) {hello"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_BLOCK_OPEN", + "if a" + ], + [ + "TokenType.TEXT", + "=== b) {hello" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5246,14 +8812,24 @@ "type": "HtmlLexerTest", "input": "@if (a === \") {hello}", "test_type": "HumanizeErrors", - "expected": [["Unexpected character \"EOF\"", "0:21"]], + "expected": [ + [ + "Unexpected character \"EOF\"", + "0:21" + ] + ], "options": null }, { "type": "HtmlLexerTest", "input": "@if (a === \"hi') {hello}", "test_type": "HumanizeErrors", - "expected": [["Unexpected character \"EOF\"", "0:24"]], + "expected": [ + [ + "Unexpected character \"EOF\"", + "0:24" + ] + ], "options": null } ] @@ -5267,11 +8843,24 @@ "input": "@if ({invalid: true) hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.INCOMPLETE_BLOCK_OPEN", "if"], - ["TokenType.BLOCK_PARAMETER", "{invalid: true"], - ["TokenType.TEXT", "hello"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.INCOMPLETE_BLOCK_OPEN", + "if" + ], + [ + "TokenType.BLOCK_PARAMETER", + "{invalid: true" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5286,12 +8875,27 @@ "input": "@if (condition === \"';'\") {hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "if"], - ["TokenType.BLOCK_PARAMETER", "condition === \"';'\""], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "if" + ], + [ + "TokenType.BLOCK_PARAMETER", + "condition === \"';'\"" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5306,12 +8910,27 @@ "input": "@if (condition === \"\\\";\") {hello}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "if"], - ["TokenType.BLOCK_PARAMETER", "condition === \"\\\";\""], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TEXT", "hello"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "if" + ], + [ + "TokenType.BLOCK_PARAMETER", + "condition === \"\\\";\"" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TEXT", + "hello" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5326,17 +8945,48 @@ "input": "@if (a === 1) {foo bar baz}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "if"], - ["TokenType.BLOCK_PARAMETER", "a === 1"], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TEXT", "foo "], - ["TokenType.TAG_OPEN_START", "", "b"], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TEXT", "bar"], - ["TokenType.TAG_CLOSE", "", "b"], - ["TokenType.TEXT", " baz"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "if" + ], + [ + "TokenType.BLOCK_PARAMETER", + "a === 1" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TEXT", + "foo " + ], + [ + "TokenType.TAG_OPEN_START", + "", + "b" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TEXT", + "bar" + ], + [ + "TokenType.TAG_CLOSE", + "", + "b" + ], + [ + "TokenType.TEXT", + " baz" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5351,22 +9001,70 @@ "input": "@if (a === 1) {
    }", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "if"], - ["TokenType.BLOCK_PARAMETER", "a === 1"], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TAG_OPEN_START", "", "div"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "}"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_NAME", "", "b"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "{"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_CLOSE", "", "div"], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "if" + ], + [ + "TokenType.BLOCK_PARAMETER", + "a === 1" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TAG_OPEN_START", + "", + "div" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "}" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_NAME", + "", + "b" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "{" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_CLOSE", + "", + "div" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5381,14 +9079,39 @@ "input": "
    ", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TAG_OPEN_START", "", "div"], - ["TokenType.ATTR_NAME", "", "a"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.ATTR_VALUE_TEXT", "@if (foo) {}"], - ["TokenType.ATTR_QUOTE", "\""], - ["TokenType.TAG_OPEN_END"], - ["TokenType.TAG_CLOSE", "", "div"], - ["TokenType.EOF"] + [ + "TokenType.TAG_OPEN_START", + "", + "div" + ], + [ + "TokenType.ATTR_NAME", + "", + "a" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.ATTR_VALUE_TEXT", + "@if (foo) {}" + ], + [ + "TokenType.ATTR_QUOTE", + "\"" + ], + [ + "TokenType.TAG_OPEN_END" + ], + [ + "TokenType.TAG_CLOSE", + "", + "div" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5413,13 +9136,33 @@ "input": "@defer {{{message}}}", "test_type": "HumanizeParts", "expected": [ - ["TokenType.BLOCK_OPEN_START", "defer"], - ["TokenType.BLOCK_OPEN_END"], - ["TokenType.TEXT", ""], - ["TokenType.INTERPOLATION", "{{", "message", "}}"], - ["TokenType.TEXT", ""], - ["TokenType.BLOCK_CLOSE"], - ["TokenType.EOF"] + [ + "TokenType.BLOCK_OPEN_START", + "defer" + ], + [ + "TokenType.BLOCK_OPEN_END" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.INTERPOLATION", + "{{", + "message", + "}}" + ], + [ + "TokenType.TEXT", + "" + ], + [ + "TokenType.BLOCK_CLOSE" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5434,10 +9177,21 @@ "input": "My email frodo@for.com", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "My email frodo"], - ["TokenType.INCOMPLETE_BLOCK_OPEN", "for"], - ["TokenType.TEXT", ".com"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "My email frodo" + ], + [ + "TokenType.INCOMPLETE_BLOCK_OPEN", + "for" + ], + [ + "TokenType.TEXT", + ".com" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5452,9 +9206,17 @@ "input": "My favorite console is @switch", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "My favorite console is "], - ["TokenType.INCOMPLETE_BLOCK_OPEN", "switch"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "My favorite console is " + ], + [ + "TokenType.INCOMPLETE_BLOCK_OPEN", + "switch" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5469,10 +9231,21 @@ "input": "Use the @for() block", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "Use the "], - ["TokenType.INCOMPLETE_BLOCK_OPEN", "for"], - ["TokenType.TEXT", "block"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "Use the " + ], + [ + "TokenType.INCOMPLETE_BLOCK_OPEN", + "for" + ], + [ + "TokenType.TEXT", + "block" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5487,11 +9260,25 @@ "input": "This is the @if({alias: \"foo\"}) expression", "test_type": "HumanizeParts", "expected": [ - ["TokenType.TEXT", "This is the "], - ["TokenType.INCOMPLETE_BLOCK_OPEN", "if"], - ["TokenType.BLOCK_PARAMETER", "{alias: \"foo\"}"], - ["TokenType.TEXT", "expression"], - ["TokenType.EOF"] + [ + "TokenType.TEXT", + "This is the " + ], + [ + "TokenType.INCOMPLETE_BLOCK_OPEN", + "if" + ], + [ + "TokenType.BLOCK_PARAMETER", + "{alias: \"foo\"}" + ], + [ + "TokenType.TEXT", + "expression" + ], + [ + "TokenType.EOF" + ] ], "options": null } @@ -5505,7 +9292,15 @@ "type": "HtmlLexerTest", "input": "@", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "@"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "@" + ], + [ + "TokenType.EOF" + ] + ], "options": null } ] @@ -5518,7 +9313,15 @@ "type": "HtmlLexerTest", "input": " @", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", " @"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + " @" + ], + [ + "TokenType.EOF" + ] + ], "options": null } ] @@ -5531,7 +9334,15 @@ "type": "HtmlLexerTest", "input": "@ ", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "@ "], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "@ " + ], + [ + "TokenType.EOF" + ] + ], "options": null } ] @@ -5544,7 +9355,15 @@ "type": "HtmlLexerTest", "input": "@\nfoo", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "@\nfoo"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "@\nfoo" + ], + [ + "TokenType.EOF" + ] + ], "options": null } ] @@ -5557,7 +9376,15 @@ "type": "HtmlLexerTest", "input": "foo bar @ baz clink", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "foo bar @ baz clink"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "foo bar @ baz clink" + ], + [ + "TokenType.EOF" + ] + ], "options": null } ] @@ -5570,7 +9397,15 @@ "type": "HtmlLexerTest", "input": "@ if", "test_type": "HumanizeParts", - "expected": [["TokenType.TEXT", "@ if"], ["TokenType.EOF"]], + "expected": [ + [ + "TokenType.TEXT", + "@ if" + ], + [ + "TokenType.EOF" + ] + ], "options": null } ] diff --git a/crates/angular_conformance/fixtures/output_abstract_emitter_node_only_spec.json b/crates/angular_conformance/fixtures/output_abstract_emitter_node_only_spec.json index 51ccdc4b7..95cc8ad34 100644 --- a/crates/angular_conformance/fixtures/output_abstract_emitter_node_only_spec.json +++ b/crates/angular_conformance/fixtures/output_abstract_emitter_node_only_spec.json @@ -1,9 +1,9 @@ { "name": "abstract_emitter_node_only_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/output/abstract_emitter_node_only_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/output/abstract_emitter_node_only_spec.ts", "test_groups": [ { - "name": "AbstractEmitter", + "name": "AbstractEmitter (node only)", "groups": [ { "name": "EmitterVisitorContext", @@ -11,42 +11,42 @@ "tests": [ { "name": "should add source files to the source map", - "path": "AbstractEmitter/EmitterVisitorContext/should add source files to the source map", + "path": "AbstractEmitter (node only)/EmitterVisitorContext/should add source files to the source map", "assertions": [] }, { "name": "should generate a valid mapping", - "path": "AbstractEmitter/EmitterVisitorContext/should generate a valid mapping", + "path": "AbstractEmitter (node only)/EmitterVisitorContext/should generate a valid mapping", "assertions": [] }, { "name": "should be able to shift the content", - "path": "AbstractEmitter/EmitterVisitorContext/should be able to shift the content", + "path": "AbstractEmitter (node only)/EmitterVisitorContext/should be able to shift the content", "assertions": [] }, { "name": "should use the default source file for the first character", - "path": "AbstractEmitter/EmitterVisitorContext/should use the default source file for the first character", + "path": "AbstractEmitter (node only)/EmitterVisitorContext/should use the default source file for the first character", "assertions": [] }, { "name": "should use an explicit mapping for the first character", - "path": "AbstractEmitter/EmitterVisitorContext/should use an explicit mapping for the first character", + "path": "AbstractEmitter (node only)/EmitterVisitorContext/should use an explicit mapping for the first character", "assertions": [] }, { "name": "should map leading segment without span", - "path": "AbstractEmitter/EmitterVisitorContext/should map leading segment without span", + "path": "AbstractEmitter (node only)/EmitterVisitorContext/should map leading segment without span", "assertions": [] }, { "name": "should handle indent", - "path": "AbstractEmitter/EmitterVisitorContext/should handle indent", + "path": "AbstractEmitter (node only)/EmitterVisitorContext/should handle indent", "assertions": [] }, { "name": "should coalesce identical span", - "path": "AbstractEmitter/EmitterVisitorContext/should coalesce identical span", + "path": "AbstractEmitter (node only)/EmitterVisitorContext/should coalesce identical span", "assertions": [] } ] diff --git a/crates/angular_conformance/fixtures/output_abstract_emitter_spec.json b/crates/angular_conformance/fixtures/output_abstract_emitter_spec.json index 8e1a4152c..469188113 100644 --- a/crates/angular_conformance/fixtures/output_abstract_emitter_spec.json +++ b/crates/angular_conformance/fixtures/output_abstract_emitter_spec.json @@ -1,6 +1,6 @@ { "name": "abstract_emitter_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/output/abstract_emitter_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/output/abstract_emitter_spec.ts", "test_groups": [ { "name": "AbstractEmitter", @@ -29,16 +29,6 @@ "path": "AbstractEmitter/escapeIdentifier/should escape carriage returns", "assertions": [] }, - { - "name": "should escape $", - "path": "AbstractEmitter/escapeIdentifier/should escape $", - "assertions": [] - }, - { - "name": "should not escape $", - "path": "AbstractEmitter/escapeIdentifier/should not escape $", - "assertions": [] - }, { "name": "should add quotes for non-identifiers", "path": "AbstractEmitter/escapeIdentifier/should add quotes for non-identifiers", diff --git a/crates/angular_conformance/fixtures/output_output_jit_spec.json b/crates/angular_conformance/fixtures/output_output_jit_spec.json index 3fe4a45b2..bd1d74fb0 100644 --- a/crates/angular_conformance/fixtures/output_output_jit_spec.json +++ b/crates/angular_conformance/fixtures/output_output_jit_spec.json @@ -1,6 +1,6 @@ { "name": "output_jit_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/output/output_jit_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/output/output_jit_spec.ts", "test_groups": [ { "name": "Output JIT", diff --git a/crates/angular_conformance/fixtures/output_source_map_spec.json b/crates/angular_conformance/fixtures/output_source_map_spec.json index 78fe394f9..b3764e93a 100644 --- a/crates/angular_conformance/fixtures/output_source_map_spec.json +++ b/crates/angular_conformance/fixtures/output_source_map_spec.json @@ -1,6 +1,6 @@ { "name": "source_map_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/output/source_map_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/output/source_map_spec.ts", "test_groups": [ { "name": "source map generation", diff --git a/crates/angular_conformance/fixtures/render3_r3_ast_absolute_span_spec.json b/crates/angular_conformance/fixtures/render3_r3_ast_absolute_span_spec.json index bb0dcdb0a..468364526 100644 --- a/crates/angular_conformance/fixtures/render3_r3_ast_absolute_span_spec.json +++ b/crates/angular_conformance/fixtures/render3_r3_ast_absolute_span_spec.json @@ -1,6 +1,6 @@ { "name": "r3_ast_absolute_span_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/render3/r3_ast_absolute_span_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/render3/r3_ast_absolute_span_spec.ts", "test_groups": [ { "name": "expression AST absolute source spans", @@ -16,7 +16,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{1 + 2}}
    ", - "expected": [["1 + 2"]], + "expected": [ + [ + "1 + 2" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -33,7 +37,14 @@ { "type": "HumanizeExpressionSource", "input": "
    {{1 + 2}}
    ", - "expected": [["1"], ["2"]], + "expected": [ + [ + "1" + ], + [ + "2" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -56,7 +67,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{bool ? 1 : 0}}
    ", - "expected": [["bool ? 1 : 0"]], + "expected": [ + [ + "bool ? 1 : 0" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -73,7 +88,17 @@ { "type": "HumanizeExpressionSource", "input": "
    {{bool ? 1 : 0}}
    ", - "expected": [["bool"], ["1"], ["0"]], + "expected": [ + [ + "bool" + ], + [ + "1" + ], + [ + "0" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -96,7 +121,11 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [["a(); b();"]], + "expected": [ + [ + "a(); b();" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -113,7 +142,14 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [["a()"], ["b()"]], + "expected": [ + [ + "a()" + ], + [ + "b()" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -136,7 +172,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{fn()()}}
    ", - "expected": [["fn()()"]], + "expected": [ + [ + "fn()()" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -153,7 +193,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{fn()(param)}}
    ", - "expected": [["param"]], + "expected": [ + [ + "param" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -176,7 +220,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{1 + foo.length}}
    ", - "expected": [["{{ 1 + foo.length }}"]], + "expected": [ + [ + "{{ 1 + foo.length }}" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -193,7 +241,14 @@ { "type": "HumanizeExpressionSource", "input": "
    {{1 + 2}}
    ", - "expected": [["1"], ["2"]], + "expected": [ + [ + "1" + ], + [ + "2" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -210,7 +265,11 @@ { "type": "HumanizeExpressionSource", "input": " {{abc}}", - "expected": [["abc"]], + "expected": [ + [ + "abc" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -227,7 +286,17 @@ { "type": "HumanizeExpressionSource", "input": ""{{abc}}"{{def}} {{ghi}}", - "expected": [["abc"], ["def"], ["ghi"]], + "expected": [ + [ + "abc" + ], + [ + "def" + ], + [ + "ghi" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -244,7 +313,11 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [["abc"]], + "expected": [ + [ + "abc" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -261,7 +334,11 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [["abc"]], + "expected": [ + [ + "abc" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -278,7 +355,14 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [["abc"], ["def"]], + "expected": [ + [ + "abc" + ], + [ + "def" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -301,7 +385,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{obj[key]}}
    ", - "expected": [["obj[key]"]], + "expected": [ + [ + "obj[key]" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -318,7 +406,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{obj[key]}}
    ", - "expected": [["key"]], + "expected": [ + [ + "key" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -341,7 +433,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{obj[key] = 0}}
    ", - "expected": [["obj[key] = 0"]], + "expected": [ + [ + "obj[key] = 0" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -358,7 +454,14 @@ { "type": "HumanizeExpressionSource", "input": "
    {{obj[key] = 0}}
    ", - "expected": [["key"], ["0"]], + "expected": [ + [ + "key" + ], + [ + "0" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -381,7 +484,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{[0, 1, 2]}}
    ", - "expected": [["[0, 1, 2]"]], + "expected": [ + [ + "[0, 1, 2]" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -398,7 +505,17 @@ { "type": "HumanizeExpressionSource", "input": "
    {{[0, 1, 2]}}
    ", - "expected": [["0"], ["1"], ["2"]], + "expected": [ + [ + "0" + ], + [ + "1" + ], + [ + "2" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -421,7 +538,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{ {a: 0} }}
    ", - "expected": [["{a: 0}"]], + "expected": [ + [ + "{a: 0}" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -438,7 +559,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{ {a: 0} }}
    ", - "expected": [["0"]], + "expected": [ + [ + "0" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -461,7 +586,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{method()}}
    ", - "expected": [["method()"]], + "expected": [ + [ + "method()" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -478,7 +607,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{method(param)}}
    ", - "expected": [["param"]], + "expected": [ + [ + "param" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -501,7 +634,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop!}}
    ", - "expected": [["prop!"]], + "expected": [ + [ + "prop!" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -518,7 +655,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop!}}
    ", - "expected": [["prop"]], + "expected": [ + [ + "prop" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -541,7 +682,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop | pipe}}
    ", - "expected": [["(prop | pipe)"]], + "expected": [ + [ + "(prop | pipe)" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -558,7 +703,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop | pipe}}
    ", - "expected": [["prop"]], + "expected": [ + [ + "prop" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -581,7 +730,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop.obj}}
    ", - "expected": [["prop.obj"]], + "expected": [ + [ + "prop.obj" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -598,7 +751,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop.obj}}
    ", - "expected": [["prop"]], + "expected": [ + [ + "prop" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -621,7 +778,11 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [["prop = 0"]], + "expected": [ + [ + "prop = 0" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -638,7 +799,11 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [["prop.inner = 0"]], + "expected": [ + [ + "prop.inner = 0" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -655,7 +820,11 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [["0"]], + "expected": [ + [ + "0" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -678,7 +847,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{!prop}}
    ", - "expected": [["!prop"]], + "expected": [ + [ + "!prop" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -695,7 +868,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{!prop}}
    ", - "expected": [["prop"]], + "expected": [ + [ + "prop" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -718,7 +895,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop?.safe()}}
    ", - "expected": [["prop?.safe()"]], + "expected": [ + [ + "prop?.safe()" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -735,7 +916,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop?.safe()}}
    ", - "expected": [["prop"]], + "expected": [ + [ + "prop" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -758,7 +943,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop?.safe}}
    ", - "expected": [["prop?.safe"]], + "expected": [ + [ + "prop?.safe" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -775,7 +964,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop?.safe}}
    ", - "expected": [["prop"]], + "expected": [ + [ + "prop" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -798,7 +991,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{item}}
    ", - "expected": [["items"]], + "expected": [ + [ + "items" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -815,7 +1012,14 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [["As"], ["Bs"]], + "expected": [ + [ + "As" + ], + [ + "Bs" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -837,8 +1041,8 @@ "assertions": [] }, { - "name": "is correct for variables and placeholders", - "path": "expression AST absolute source spans/ICU expressions/is correct for variables and placeholders", + "name": "is correct for variables and placeholders in nested ICUs", + "path": "expression AST absolute source spans/ICU expressions/is correct for variables and placeholders in nested ICUs", "assertions": [] } ] @@ -863,7 +1067,11 @@ { "type": "HumanizeExpressionSource", "input": "{{foo // comment}}", - "expected": [["foo"]], + "expected": [ + [ + "foo" + ] + ], "options": { "preserve_whitespaces": true }, @@ -882,7 +1090,11 @@ { "type": "HumanizeExpressionSource", "input": "{{ foo }}", - "expected": [["foo"]], + "expected": [ + [ + "foo" + ] + ], "options": { "preserve_whitespaces": true }, @@ -901,7 +1113,11 @@ { "type": "HumanizeExpressionSource", "input": "{{ foo // comment }}", - "expected": [["foo"]], + "expected": [ + [ + "foo" + ] + ], "options": { "preserve_whitespaces": true }, @@ -920,7 +1136,11 @@ { "type": "HumanizeExpressionSource", "input": "", - "expected": [["foo = true"]], + "expected": [ + [ + "foo = true" + ] + ], "options": { "preserve_whitespaces": true }, @@ -939,7 +1159,11 @@ { "type": "HumanizeExpressionSource", "input": "
    \n \n{{foo}}
    ", - "expected": [["\n \n{{ foo }}"]], + "expected": [ + [ + "\n \n{{ foo }}" + ] + ], "options": { "preserve_whitespaces": true }, @@ -958,7 +1182,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{foo}}
    ", - "expected": [["{{ foo }}"]], + "expected": [ + [ + "{{ foo }}" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -975,7 +1203,11 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [["foo(); bar();"]], + "expected": [ + [ + "foo(); bar();" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -986,7 +1218,11 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [["foo(); bar();"]], + "expected": [ + [ + "foo(); bar();" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -1003,7 +1239,11 @@ { "type": "HumanizeExpressionSource", "input": "", - "expected": [["condition ? true : false"]], + "expected": [ + [ + "condition ? true : false" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -1014,7 +1254,11 @@ { "type": "HumanizeExpressionSource", "input": "", - "expected": [["condition ? true : false"]], + "expected": [ + [ + "condition ? true : false" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -1031,7 +1275,11 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [["(value | async)"]], + "expected": [ + [ + "(value | async)" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -1048,7 +1296,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{a.b}}
    ", - "expected": [[""]], + "expected": [ + [ + "" + ] + ], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": true, @@ -1065,7 +1317,11 @@ { "type": "HumanizeExpressionSource", "input": "
    {{100}}
    ", - "expected": [["100"]], + "expected": [ + [ + "100" + ] + ], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, diff --git a/crates/angular_conformance/fixtures/render3_r3_ast_spans_spec.json b/crates/angular_conformance/fixtures/render3_r3_ast_spans_spec.json index 1793f7c79..1ca6054a7 100644 --- a/crates/angular_conformance/fixtures/render3_r3_ast_spans_spec.json +++ b/crates/angular_conformance/fixtures/render3_r3_ast_spans_spec.json @@ -1,6 +1,6 @@ { "name": "r3_ast_spans_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/render3/r3_ast_spans_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/render3/r3_ast_spans_spec.ts", "test_groups": [ { "name": "R3 AST source spans", @@ -16,7 +16,12 @@ { "type": "ExpectFromHtml", "input": "a", - "expected": [["Text", "a"]], + "expected": [ + [ + "Text", + "a" + ] + ], "ignore_error": false } ] @@ -29,8 +34,18 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["TextAttribute", "a=\"b\"", "a", "b"] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "TextAttribute", + "a=\"b\"", + "a", + "b" + ] ], "ignore_error": false } @@ -44,8 +59,18 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["TextAttribute", "a", "a", ""] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "TextAttribute", + "a", + "a", + "" + ] ], "ignore_error": false } @@ -59,8 +84,18 @@ "type": "ExpectFromHtml", "input": "\n \n", "expected": [ - ["Element", "", "", ""], - ["Element", "\n", "", ""] + [ + "Element", + "", + "", + "" + ], + [ + "Element", + "\n", + "", + "" + ] ], "ignore_error": false } @@ -79,7 +114,12 @@ { "type": "ExpectFromHtml", "input": "{{a}}", - "expected": [["BoundText", "{{a}}"]], + "expected": [ + [ + "BoundText", + "{{a}}" + ] + ], "ignore_error": false } ] @@ -98,8 +138,18 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["BoundAttribute", "[someProp]=\"v\"", "someProp", "v"] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "BoundAttribute", + "[someProp]=\"v\"", + "someProp", + "v" + ] ], "ignore_error": false } @@ -113,8 +163,18 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["BoundAttribute", "[someProp]", "someProp", ""] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "BoundAttribute", + "[someProp]", + "someProp", + "" + ] ], "ignore_error": false } @@ -128,8 +188,18 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["BoundAttribute", "bind-prop=\"v\"", "prop", "v"] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "BoundAttribute", + "bind-prop=\"v\"", + "prop", + "v" + ] ], "ignore_error": false } @@ -143,8 +213,18 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["BoundAttribute", "prop=\"{{v}}\"", "prop", "{{v}}"] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "BoundAttribute", + "prop=\"{{v}}\"", + "prop", + "{{v}}" + ] ], "ignore_error": false } @@ -164,7 +244,12 @@ "
    ", "
    " ], - ["BoundAttribute", "data-prop=\"{{v}}\"", "prop", "{{v}}"] + [ + "BoundAttribute", + "data-prop=\"{{v}}\"", + "data-prop", + "{{v}}" + ] ], "ignore_error": false } @@ -184,7 +269,12 @@ "
    ", "
    " ], - ["BoundAttribute", "bind-@animation=\"v\"", "animation", "v"] + [ + "BoundAttribute", + "bind-@animation=\"v\"", + "animation", + "v" + ] ], "ignore_error": false } @@ -204,7 +294,12 @@ "
    ", "
    " ], - ["BoundAttribute", "bind-animate-animationName=\"v\"", "animationName", "v"] + [ + "BoundAttribute", + "bind-animate-animationName=\"v\"", + "animationName", + "v" + ] ], "ignore_error": false } @@ -218,8 +313,18 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["BoundAttribute", "@animation", "animation", ""] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "BoundAttribute", + "@animation", + "animation", + "" + ] ], "ignore_error": false } @@ -249,9 +354,24 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Template", "
    ", "
    ", "
    "], - ["TextAttribute", "ngIf", "ngIf", ""], - ["Element", "
    ", "
    ", "
    "] + [ + "Template", + "
    ", + "
    ", + "
    " + ], + [ + "TextAttribute", + "ngIf", + "ngIf", + "" + ], + [ + "Element", + "
    ", + "
    ", + "
    " + ] ], "ignore_error": false } @@ -265,7 +385,12 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - ["Template", "", "", ""] + [ + "Template", + "", + "", + "" + ] ], "ignore_error": false } @@ -285,7 +410,12 @@ "", "" ], - ["Reference", "#a", "a", ""] + [ + "Reference", + "#a", + "a", + "" + ] ], "ignore_error": false } @@ -305,7 +435,12 @@ "", "" ], - ["Reference", "#a=\"b\"", "a", "b"] + [ + "Reference", + "#a=\"b\"", + "a", + "b" + ] ], "ignore_error": false } @@ -325,15 +460,20 @@ "", "" ], - ["Reference", "ref-a", "a", ""] + [ + "Reference", + "ref-a", + "a", + "" + ] ], "ignore_error": false } ] }, { - "name": "is correct for reference via data-ref-...", - "path": "R3 AST source spans/templates/is correct for reference via data-ref-...", + "name": "is correct for data-ref-... attribute", + "path": "R3 AST source spans/templates/is correct for data-ref-... attribute", "assertions": [ { "type": "ExpectFromHtml", @@ -345,7 +485,12 @@ "", "" ], - ["Reference", "data-ref-a", "a", ""] + [ + "TextAttribute", + "data-ref-a", + "data-ref-a", + "" + ] ], "ignore_error": false } @@ -365,15 +510,20 @@ "", "" ], - ["Variable", "let-a=\"b\"", "a", "b"] + [ + "Variable", + "let-a=\"b\"", + "a", + "b" + ] ], "ignore_error": false } ] }, { - "name": "is correct for variables via data-let-...", - "path": "R3 AST source spans/templates/is correct for variables via data-let-...", + "name": "is correct for data-let-... attribute", + "path": "R3 AST source spans/templates/is correct for data-let-... attribute", "assertions": [ { "type": "ExpectFromHtml", @@ -385,7 +535,12 @@ "", "" ], - ["Variable", "data-let-a=\"b\"", "a", "b"] + [ + "TextAttribute", + "data-let-a=\"b\"", + "data-let-a", + "b" + ] ], "ignore_error": false } @@ -405,7 +560,12 @@ "", "" ], - ["TextAttribute", "k1=\"v1\"", "k1", "v1"] + [ + "TextAttribute", + "k1=\"v1\"", + "k1", + "v1" + ] ], "ignore_error": false } @@ -425,7 +585,12 @@ "", "" ], - ["BoundAttribute", "[k1]=\"v1\"", "k1", "v1"] + [ + "BoundAttribute", + "[k1]=\"v1\"", + "k1", + "v1" + ] ], "ignore_error": false } @@ -451,9 +616,24 @@ "
    ", "
    " ], - ["TextAttribute", "ngFor", "ngFor", ""], - ["BoundAttribute", "of items", "of", "items"], - ["Variable", "let item ", "item", ""], + [ + "TextAttribute", + "ngFor", + "ngFor", + "" + ], + [ + "BoundAttribute", + "of items", + "of", + "items" + ], + [ + "Variable", + "let item ", + "item", + "" + ], [ "Element", "
    ", @@ -473,8 +653,18 @@ "
    ", "
    " ], - ["BoundAttribute", "ngFor=\"item ", "ngFor", "item"], - ["BoundAttribute", "of items", "of", "items"], + [ + "BoundAttribute", + "ngFor=\"item ", + "ngFor", + "item" + ], + [ + "BoundAttribute", + "of items", + "of", + "items" + ], [ "Element", "
    ", @@ -494,10 +684,30 @@ "
    ", "
    " ], - ["TextAttribute", "ngFor", "ngFor", ""], - ["BoundAttribute", "of items; ", "of", "items"], - ["BoundAttribute", "trackBy: trackByFn", "trackBy", "trackByFn"], - ["Variable", "let item ", "item", ""], + [ + "TextAttribute", + "ngFor", + "ngFor", + "" + ], + [ + "BoundAttribute", + "of items; ", + "of", + "items" + ], + [ + "BoundAttribute", + "trackBy: trackByFn", + "trackBy", + "trackByFn" + ], + [ + "Variable", + "let item ", + "item", + "" + ], [ "Element", "
    ", @@ -523,8 +733,18 @@ "
    ", "
    " ], - ["TextAttribute", "ngIf", "ngIf", ""], - ["Variable", "let a=b", "a", "b"], + [ + "TextAttribute", + "ngIf", + "ngIf", + "" + ], + [ + "Variable", + "let a=b", + "a", + "b" + ], [ "Element", "
    ", @@ -550,8 +770,18 @@ "
    ", "
    " ], - ["BoundAttribute", "ngIf=\"expr ", "ngIf", "expr"], - ["Variable", "ngIf=\"expr as local", "local", "ngIf"], + [ + "BoundAttribute", + "ngIf=\"expr ", + "ngIf", + "expr" + ], + [ + "Variable", + "ngIf=\"expr as local", + "local", + "ngIf" + ], [ "Element", "
    ", @@ -583,7 +813,12 @@ "
    ", "
    " ], - ["BoundEvent", "(someEvent)=\"v\"", "someEvent", "v"] + [ + "BoundEvent", + "(someEvent)=\"v\"", + "someEvent", + "v" + ] ], "ignore_error": false } @@ -597,16 +832,26 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["BoundEvent", "on-event=\"v\"", "event", "v"] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "BoundEvent", + "on-event=\"v\"", + "event", + "v" + ] ], "ignore_error": false } ] }, { - "name": "is correct for bound events via data-on-", - "path": "R3 AST source spans/events/is correct for bound events via data-on-", + "name": "is correct for text attribute via data-on-", + "path": "R3 AST source spans/events/is correct for text attribute via data-on-", "assertions": [ { "type": "ExpectFromHtml", @@ -618,7 +863,12 @@ "
    ", "
    " ], - ["BoundEvent", "data-on-event=\"v\"", "event", "v"] + [ + "TextAttribute", + "data-on-event=\"v\"", + "data-on-event", + "v" + ] ], "ignore_error": false } @@ -632,9 +882,24 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["BoundAttribute", "[(prop)]=\"v\"", "prop", "v"], - ["BoundEvent", "[(prop)]=\"v\"", "prop", "v"] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "BoundAttribute", + "[(prop)]=\"v\"", + "prop", + "v" + ], + [ + "BoundEvent", + "[(prop)]=\"v\"", + "prop", + "v" + ] ], "ignore_error": false } @@ -654,16 +919,26 @@ "
    ", "
    " ], - ["BoundAttribute", "bindon-prop=\"v\"", "prop", "v"], - ["BoundEvent", "bindon-prop=\"v\"", "prop", "v"] + [ + "BoundAttribute", + "bindon-prop=\"v\"", + "prop", + "v" + ], + [ + "BoundEvent", + "bindon-prop=\"v\"", + "prop", + "v" + ] ], "ignore_error": false } ] }, { - "name": "is correct for bound events and properties via data-bindon-", - "path": "R3 AST source spans/events/is correct for bound events and properties via data-bindon-", + "name": "is correct for TextAttribute and properties via data-bindon-", + "path": "R3 AST source spans/events/is correct for TextAttribute and properties via data-bindon-", "assertions": [ { "type": "ExpectFromHtml", @@ -675,8 +950,12 @@ "
    ", "
    " ], - ["BoundAttribute", "data-bindon-prop=\"v\"", "prop", "v"], - ["BoundEvent", "data-bindon-prop=\"v\"", "prop", "v"] + [ + "TextAttribute", + "data-bindon-prop=\"v\"", + "data-bindon-prop", + "v" + ] ], "ignore_error": false } @@ -696,7 +975,12 @@ "
    ", "
    " ], - ["BoundEvent", "(@name.done)=\"v\"", "name.done", "v"] + [ + "BoundEvent", + "(@name.done)=\"v\"", + "name.done", + "v" + ] ], "ignore_error": false } @@ -716,8 +1000,18 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["Reference", "#a", "a", ""] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "Reference", + "#a", + "a", + "" + ] ], "ignore_error": false } @@ -731,8 +1025,18 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["Reference", "#a=\"b\"", "a", "b"] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "Reference", + "#a=\"b\"", + "a", + "b" + ] ], "ignore_error": false } @@ -746,23 +1050,18 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["Reference", "ref-a", "a", ""] - ], - "ignore_error": false - } - ] - }, - { - "name": "is correct for references via data-ref-", - "path": "R3 AST source spans/references/is correct for references via data-ref-", - "assertions": [ - { - "type": "ExpectFromHtml", - "input": "
    ", - "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["Reference", "ref-a", "a", ""] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "Reference", + "ref-a", + "a", + "" + ] ], "ignore_error": false } @@ -788,9 +1087,18 @@ "", "" ], - ["Icu", "{item.var, plural, other { {{item.placeholder}} items } }"], - ["Icu:Var", "item.var"], - ["Icu:Placeholder", "{{item.placeholder}}"] + [ + "Icu", + "{item.var, plural, other { {{item.placeholder}} items } }" + ], + [ + "Icu:Var", + "item.var" + ], + [ + "Icu:Placeholder", + "{{item.placeholder}}" + ] ], "ignore_error": false } @@ -814,10 +1122,22 @@ "Icu", "{item.var, plural, other { {{item.placeholder}} {nestedVar, plural, other { {{nestedPlaceholder}} }}} }" ], - ["Icu:Var", "nestedVar"], - ["Icu:Var", "item.var"], - ["Icu:Placeholder", "{{item.placeholder}}"], - ["Icu:Placeholder", "{{nestedPlaceholder}}"] + [ + "Icu:Var", + "nestedVar" + ], + [ + "Icu:Var", + "item.var" + ], + [ + "Icu:Placeholder", + "{{item.placeholder}}" + ], + [ + "Icu:Placeholder", + "{{nestedPlaceholder}}" + ] ], "ignore_error": false } @@ -843,41 +1163,96 @@ "@defer (when isVisible() && foo; on hover(button), timer(10s), idle, immediate, interaction(button), viewport(container); prefetch on immediate; prefetch when isDataLoaded(); hydrate on interaction; hydrate when isVisible(); hydrate on timer(1200)) {", "}" ], - ["InteractionDeferredTrigger", "hydrate on interaction"], - ["BoundDeferredTrigger", "hydrate when isVisible()"], - ["TimerDeferredTrigger", "hydrate on timer(1200)"], - ["BoundDeferredTrigger", "when isVisible() && foo"], - ["HoverDeferredTrigger", "on hover(button)"], - ["TimerDeferredTrigger", "timer(10s)"], - ["IdleDeferredTrigger", "idle"], - ["ImmediateDeferredTrigger", "immediate"], - ["InteractionDeferredTrigger", "interaction(button)"], - ["ViewportDeferredTrigger", "viewport(container)"], - ["ImmediateDeferredTrigger", "prefetch on immediate"], - ["BoundDeferredTrigger", "prefetch when isDataLoaded()"], + [ + "InteractionDeferredTrigger", + "hydrate on interaction" + ], + [ + "BoundDeferredTrigger", + "hydrate when isVisible()" + ], + [ + "TimerDeferredTrigger", + "hydrate on timer(1200)" + ], + [ + "BoundDeferredTrigger", + "when isVisible() && foo" + ], + [ + "HoverDeferredTrigger", + "on hover(button)" + ], + [ + "TimerDeferredTrigger", + "timer(10s)" + ], + [ + "IdleDeferredTrigger", + "idle" + ], + [ + "ImmediateDeferredTrigger", + "immediate" + ], + [ + "InteractionDeferredTrigger", + "interaction(button)" + ], + [ + "ViewportDeferredTrigger", + "viewport(container)" + ], + [ + "ImmediateDeferredTrigger", + "prefetch on immediate" + ], + [ + "BoundDeferredTrigger", + "prefetch when isDataLoaded()" + ], [ "Element", "", "", "" ], - ["BoundAttribute", "[date]=\"current\"", "date", "current"], + [ + "BoundAttribute", + "[date]=\"current\"", + "date", + "current" + ], [ "DeferredBlockPlaceholder", "@placeholder (minimum 500) {Placeholder content!}", "@placeholder (minimum 500) {", "}" ], - ["Text", "Placeholder content!"], + [ + "Text", + "Placeholder content!" + ], [ "DeferredBlockLoading", "@loading (minimum 1s; after 100ms) {Loading...}", "@loading (minimum 1s; after 100ms) {", "}" ], - ["Text", "Loading..."], - ["DeferredBlockError", "@error {Loading failed :(}", "@error {", "}"], - ["Text", "Loading failed :("] + [ + "Text", + "Loading..." + ], + [ + "DeferredBlockError", + "@error {Loading failed :(}", + "@error {", + "}" + ], + [ + "Text", + "Loading failed :(" + ] ], "ignore_error": false } @@ -903,18 +1278,62 @@ "@switch (cond.kind) {", "}" ], - ["SwitchBlockCaseGroup", "@case (x()) {X case}", "@case (x()) {"], - ["SwitchBlockCase", "@case (x()) {X case}", "@case (x()) {"], - ["Text", "X case"], - ["SwitchBlockCaseGroup", "@case ('hello') {Y case}", "@case ('hello') {"], - ["SwitchBlockCase", "@case ('hello') {Y case}", "@case ('hello') {"], - ["Text", "Y case"], - ["SwitchBlockCaseGroup", "@case (42) {Z case}", "@case (42) {"], - ["SwitchBlockCase", "@case (42) {Z case}", "@case (42) {"], - ["Text", "Z case"], - ["SwitchBlockCaseGroup", "@default {No case matched}", "@default {"], - ["SwitchBlockCase", "@default {No case matched}", "@default {"], - ["Text", "No case matched"] + [ + "SwitchBlockCaseGroup", + "@case (x()) {X case}", + "@case (x()) {" + ], + [ + "SwitchBlockCase", + "@case (x()) {X case}", + "@case (x()) {" + ], + [ + "Text", + "X case" + ], + [ + "SwitchBlockCaseGroup", + "@case ('hello') {Y case}", + "@case ('hello') {" + ], + [ + "SwitchBlockCase", + "@case ('hello') {Y case}", + "@case ('hello') {" + ], + [ + "Text", + "Y case" + ], + [ + "SwitchBlockCaseGroup", + "@case (42) {Z case}", + "@case (42) {" + ], + [ + "SwitchBlockCase", + "@case (42) {Z case}", + "@case (42) {" + ], + [ + "Text", + "Z case" + ], + [ + "SwitchBlockCaseGroup", + "@default {No case matched}", + "@default {" + ], + [ + "SwitchBlockCase", + "@default {No case matched}", + "@default {" + ], + [ + "Text", + "No case matched" + ] ], "ignore_error": false } @@ -939,12 +1358,72 @@ "@case (x()) @case ('hello') {X case}", "@case (x()) @case ('hello') {" ], - ["SwitchBlockCase", "@case (x()) ", "@case (x()) "], - ["SwitchBlockCase", "@case ('hello') {X case}", "@case ('hello') {"], - ["Text", "X case"], - ["SwitchBlockCaseGroup", "@default {No case matched}", "@default {"], - ["SwitchBlockCase", "@default {No case matched}", "@default {"], - ["Text", "No case matched"] + [ + "SwitchBlockCase", + "@case (x()) ", + "@case (x()) " + ], + [ + "SwitchBlockCase", + "@case ('hello') {X case}", + "@case ('hello') {" + ], + [ + "Text", + "X case" + ], + [ + "SwitchBlockCaseGroup", + "@default {No case matched}", + "@default {" + ], + [ + "SwitchBlockCase", + "@default {No case matched}", + "@default {" + ], + [ + "Text", + "No case matched" + ] + ], + "ignore_error": false + } + ] + }, + { + "name": "is correct for switch blocks with exhaustive checking", + "path": "R3 AST source spans/switch blocks/is correct for switch blocks with exhaustive checking", + "assertions": [ + { + "type": "ExpectFromHtml", + "input": "@switch (cond.kind) {@case (x()) {X case}@default never;}", + "expected": [ + [ + "SwitchBlock", + "@switch (cond.kind) {@case (x()) {X case}@default never;}", + "@switch (cond.kind) {", + "}" + ], + [ + "SwitchBlockCaseGroup", + "@case (x()) {X case}", + "@case (x()) {" + ], + [ + "SwitchBlockCase", + "@case (x()) {X case}", + "@case (x()) {" + ], + [ + "Text", + "X case" + ], + [ + "SwitchExhaustiveCheck", + "@default never;", + "@default never;" + ] ], "ignore_error": false } @@ -970,19 +1449,79 @@ "@for (item of items.foo.bar; track item.id; let i = $index, _o_d_d_ = $odd) {", "}" ], - ["Variable", "item", "item", ""], - ["Variable", "", "", ""], - ["Variable", "", "", ""], - ["Variable", "", "", ""], - ["Variable", "", "", ""], - ["Variable", "", "", ""], - ["Variable", "", "", ""], - ["Variable", "i = $index", "i", "$index"], - ["Variable", "_o_d_d_ = $odd", "_o_d_d_", "$odd"], - ["Element", "

    {{ item }}

    ", "

    ", "

    "], - ["BoundText", "{{ item }}"], - ["ForLoopBlockEmpty", "@empty {There were no items in the list.}", "@empty {"], - ["Text", "There were no items in the list."] + [ + "Variable", + "item", + "item", + "" + ], + [ + "Variable", + "", + "", + "" + ], + [ + "Variable", + "", + "", + "" + ], + [ + "Variable", + "", + "", + "" + ], + [ + "Variable", + "", + "", + "" + ], + [ + "Variable", + "", + "", + "" + ], + [ + "Variable", + "", + "", + "" + ], + [ + "Variable", + "i = $index", + "i", + "$index" + ], + [ + "Variable", + "_o_d_d_ = $odd", + "_o_d_d_", + "$odd" + ], + [ + "Element", + "

    {{ item }}

    ", + "

    ", + "

    " + ], + [ + "BoundText", + "{{ item }}" + ], + [ + "ForLoopBlockEmpty", + "@empty {There were no items in the list.}", + "@empty {" + ], + [ + "Text", + "There were no items in the list." + ] ], "ignore_error": false } @@ -1013,16 +1552,34 @@ "@if (cond.expr; as foo) {Main case was true!}", "@if (cond.expr; as foo) {" ], - ["Variable", "foo", "foo", ""], - ["Text", "Main case was true!"], + [ + "Variable", + "foo", + "foo", + "" + ], + [ + "Text", + "Main case was true!" + ], [ "IfBlockBranch", "@else if (other.expr) {Extra case was true!}", "@else if (other.expr) {" ], - ["Text", "Extra case was true!"], - ["IfBlockBranch", "@else {False case!}", "@else {"], - ["Text", "False case!"] + [ + "Text", + "Extra case was true!" + ], + [ + "IfBlockBranch", + "@else {False case!}", + "@else {" + ], + [ + "Text", + "False case!" + ] ], "ignore_error": false } @@ -1041,7 +1598,14 @@ { "type": "ExpectFromHtml", "input": "@let foo = 123;", - "expected": [["LetDeclaration", "@let foo = 123", "foo", "123"]], + "expected": [ + [ + "LetDeclaration", + "@let foo = 123;", + "foo", + "123" + ] + ], "ignore_error": false } ] @@ -1059,7 +1623,14 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [["Component", "", "", ""]], + "expected": [ + [ + "Component", + "", + "", + "" + ] + ], "ignore_error": true } ] @@ -1071,7 +1642,14 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [["Component", "", "", ""]], + "expected": [ + [ + "Component", + "", + "", + "" + ] + ], "ignore_error": true } ] @@ -1109,14 +1687,52 @@ "", "" ], - ["TextAttribute", "before=\"foo\"", "before", "foo"], - ["TextAttribute", "middle", "middle", ""], - ["TextAttribute", "after=\"123\"", "after", "123"], - ["Directive", "@Dir", "@Dir", ""], - ["Directive", "@OtherDir([a]=\"a\" (b)=\"b()\")", "@OtherDir(", ")"], - ["BoundAttribute", "[a]=\"a\"", "a", "a"], - ["BoundEvent", "(b)=\"b()\"", "b", "b()"], - ["Text", "Hello"] + [ + "TextAttribute", + "before=\"foo\"", + "before", + "foo" + ], + [ + "TextAttribute", + "middle", + "middle", + "" + ], + [ + "TextAttribute", + "after=\"123\"", + "after", + "123" + ], + [ + "Directive", + "@Dir", + "@Dir", + "" + ], + [ + "Directive", + "@OtherDir([a]=\"a\" (b)=\"b()\")", + "@OtherDir(", + ")" + ], + [ + "BoundAttribute", + "[a]=\"a\"", + "a", + "a" + ], + [ + "BoundEvent", + "(b)=\"b()\"", + "b", + "b()" + ], + [ + "Text", + "Hello" + ] ], "ignore_error": true } @@ -1147,15 +1763,28 @@ "
    ", "
    " ], - ["Text", "Hello: "], + [ + "Text", + "Hello: " + ], [ "Component", "", "", "" ], - ["Element", "", "", ""], - ["Component", "", "", ""] + [ + "Element", + "", + "", + "" + ], + [ + "Component", + "", + "", + "" + ] ], "ignore_error": true } @@ -1175,8 +1804,18 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "
    ", "
    ", "
    "], - ["Directive", "@Dir", "@Dir", ""] + [ + "Element", + "
    ", + "
    ", + "
    " + ], + [ + "Directive", + "@Dir", + "@Dir", + "" + ] ], "ignore_error": true } @@ -1196,10 +1835,30 @@ "
    ", "
    " ], - ["Directive", "@Dir(a=\"1\" [b]=\"two\" (c)=\"c()\")", "@Dir(", ")"], - ["TextAttribute", "a=\"1\"", "a", "1"], - ["BoundAttribute", "[b]=\"two\"", "b", "two"], - ["BoundEvent", "(c)=\"c()\"", "c", "c()"] + [ + "Directive", + "@Dir(a=\"1\" [b]=\"two\" (c)=\"c()\")", + "@Dir(", + ")" + ], + [ + "TextAttribute", + "a=\"1\"", + "a", + "1" + ], + [ + "BoundAttribute", + "[b]=\"two\"", + "b", + "two" + ], + [ + "BoundEvent", + "(c)=\"c()\"", + "c", + "c()" + ] ], "ignore_error": true } @@ -1219,13 +1878,48 @@ "
    ", "
    " ], - ["TextAttribute", "before=\"foo\"", "before", "foo"], - ["TextAttribute", "middle", "middle", ""], - ["TextAttribute", "after=\"123\"", "after", "123"], - ["Directive", "@Dir", "@Dir", ""], - ["Directive", "@OtherDir([a]=\"a\" (b)=\"b()\")", "@OtherDir(", ")"], - ["BoundAttribute", "[a]=\"a\"", "a", "a"], - ["BoundEvent", "(b)=\"b()\"", "b", "b()"] + [ + "TextAttribute", + "before=\"foo\"", + "before", + "foo" + ], + [ + "TextAttribute", + "middle", + "middle", + "" + ], + [ + "TextAttribute", + "after=\"123\"", + "after", + "123" + ], + [ + "Directive", + "@Dir", + "@Dir", + "" + ], + [ + "Directive", + "@OtherDir([a]=\"a\" (b)=\"b()\")", + "@OtherDir(", + ")" + ], + [ + "BoundAttribute", + "[a]=\"a\"", + "a", + "a" + ], + [ + "BoundEvent", + "(b)=\"b()\"", + "b", + "b()" + ] ], "ignore_error": true } diff --git a/crates/angular_conformance/fixtures/render3_r3_ast_visitor_spec.json b/crates/angular_conformance/fixtures/render3_r3_ast_visitor_spec.json new file mode 100644 index 000000000..cea650a33 --- /dev/null +++ b/crates/angular_conformance/fixtures/render3_r3_ast_visitor_spec.json @@ -0,0 +1,17 @@ +{ + "name": "r3_ast_visitor_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/render3/r3_ast_visitor_spec.ts", + "test_groups": [ + { + "name": "RecursiveVisitor", + "groups": [], + "tests": [ + { + "name": "should not mutate IfBlockBranch children when visiting", + "path": "RecursiveVisitor/should not mutate IfBlockBranch children when visiting", + "assertions": [] + } + ] + } + ] +} diff --git a/crates/angular_conformance/fixtures/render3_r3_template_transform_spec.json b/crates/angular_conformance/fixtures/render3_r3_template_transform_spec.json index 14f06f3e8..8223598f7 100644 --- a/crates/angular_conformance/fixtures/render3_r3_template_transform_spec.json +++ b/crates/angular_conformance/fixtures/render3_r3_template_transform_spec.json @@ -1,6 +1,6 @@ { "name": "r3_template_transform_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/render3/r3_template_transform_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/render3/r3_template_transform_spec.ts", "test_groups": [ { "name": "R3 template transform", @@ -27,7 +27,12 @@ { "type": "ExpectFromHtml", "input": "", "expected": [ - ["Element", "a"], - ["Element", "span"] + [ + "Element", + "a" + ], + [ + "Element", + "span" + ] ], "ignore_error": true } @@ -54,7 +65,12 @@ { "type": "ExpectFromHtml", "input": "a", - "expected": [["Text", "a"]], + "expected": [ + [ + "Text", + "a" + ] + ], "ignore_error": false } ] @@ -67,8 +83,15 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["TextAttribute", "a", "b"] + [ + "Element", + "div" + ], + [ + "TextAttribute", + "a", + "b" + ] ], "ignore_error": false } @@ -87,8 +110,15 @@ "type": "ExpectFromHtml", "input": " \n ", "expected": [ - ["Content", "a"], - ["TextAttribute", "select", "a"] + [ + "Content", + "a" + ], + [ + "TextAttribute", + "select", + "a" + ] ], "ignore_error": false } @@ -102,9 +132,19 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - ["Element", ":svg:svg"], - ["Content", "a"], - ["TextAttribute", "select", "a"] + [ + "Element", + ":svg:svg" + ], + [ + "Content", + "a" + ], + [ + "TextAttribute", + "select", + "a" + ] ], "ignore_error": false } @@ -128,7 +168,12 @@ { "type": "ExpectFromHtml", "input": "{{a}}", - "expected": [["BoundText", "{{ a }}"]], + "expected": [ + [ + "BoundText", + "{{ a }}" + ] + ], "ignore_error": false } ] @@ -147,8 +192,16 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 0, "someProp", "v"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 0, + "someProp", + "v" + ] ], "ignore_error": false } @@ -162,8 +215,16 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 0, "prop", "v"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 0, + "prop", + "v" + ] ], "ignore_error": false } @@ -182,8 +243,16 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 0, "prop", "{{ v }}"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 0, + "prop", + "{{ v }}" + ] ], "ignore_error": false } @@ -197,8 +266,16 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 0, "some-prop", "v"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 0, + "some-prop", + "v" + ] ], "ignore_error": false } @@ -212,8 +289,16 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 0, "d.ot", "v"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 0, + "d.ot", + "v" + ] ], "ignore_error": false } @@ -227,8 +312,16 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 0, "mappedAttr", "v"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 0, + "mappedAttr", + "v" + ] ], "ignore_error": false } @@ -242,8 +335,16 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 1, "someAttr", "v"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 1, + "someAttr", + "v" + ] ], "ignore_error": false } @@ -257,8 +358,16 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 2, "some-class", "v"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 2, + "some-class", + "v" + ] ], "ignore_error": false } @@ -272,8 +381,16 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 2, "someClass", "v"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 2, + "someClass", + "v" + ] ], "ignore_error": false } @@ -287,8 +404,16 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 3, "someStyle", "v"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 3, + "someStyle", + "v" + ] ], "ignore_error": false } @@ -302,11 +427,34 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - ["Element", "foo", "#selfClosing"], - ["TextAttribute", "some-attr", ""], - ["BoundAttribute", 2, "text-primary/80", "expr"], - ["BoundAttribute", 2, "data-active:text-green-300/80", "expr2"], - ["BoundAttribute", 2, "data-[size='large']:p-8", "expr3"] + [ + "Element", + "foo", + "#selfClosing" + ], + [ + "TextAttribute", + "some-attr", + "" + ], + [ + "BoundAttribute", + 2, + "text-primary/80", + "expr" + ], + [ + "BoundAttribute", + 2, + "data-active:text-green-300/80", + "expr2" + ], + [ + "BoundAttribute", + 2, + "data-[size='large']:p-8", + "expr3" + ] ], "ignore_error": false } @@ -326,8 +474,15 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["TextAttribute", "animate.enter", "foo"] + [ + "Element", + "div" + ], + [ + "TextAttribute", + "animate.enter", + "foo" + ] ], "ignore_error": false }, @@ -335,8 +490,16 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 6.0, "animate.enter", "[\"foo\", \"bar\"]"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 6.0, + "animate.enter", + "[\"foo\", \"bar\"]" + ] ], "ignore_error": false }, @@ -344,8 +507,17 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundEvent", 3.0, "animate.enter", null, "animateFn($event)"] + [ + "Element", + "div" + ], + [ + "BoundEvent", + 3.0, + "animate.enter", + null, + "animateFn($event)" + ] ], "ignore_error": false } @@ -359,8 +531,15 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["TextAttribute", "animate.leave", "foo"] + [ + "Element", + "div" + ], + [ + "TextAttribute", + "animate.leave", + "foo" + ] ], "ignore_error": false }, @@ -368,8 +547,16 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 6.0, "animate.leave", "[\"foo\", \"bar\"]"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 6.0, + "animate.leave", + "[\"foo\", \"bar\"]" + ] ], "ignore_error": false }, @@ -377,8 +564,17 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundEvent", 3.0, "animate.leave", null, "animateFn($event)"] + [ + "Element", + "div" + ], + [ + "BoundEvent", + 3.0, + "animate.leave", + null, + "animateFn($event)" + ] ], "ignore_error": false }, @@ -386,8 +582,17 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundEvent", 0.0, "animateXYZ", null, "animateFn()"] + [ + "Element", + "div" + ], + [ + "BoundEvent", + 0.0, + "animateXYZ", + null, + "animateFn()" + ] ], "ignore_error": false } @@ -406,7 +611,20 @@ { "type": "ExpectFromHtml", "input": "
    ", - "expected": [["Template"], ["TextAttribute", "ngIf", ""], ["Element", "div"]], + "expected": [ + [ + "Template" + ], + [ + "TextAttribute", + "ngIf", + "" + ], + [ + "Element", + "div" + ] + ], "ignore_error": false } ] @@ -418,7 +636,11 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [["Template"]], + "expected": [ + [ + "Template" + ] + ], "ignore_error": false } ] @@ -430,7 +652,15 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [["Element", ":svg:svg"], ["Template"]], + "expected": [ + [ + "Element", + ":svg:svg" + ], + [ + "Template" + ] + ], "ignore_error": false } ] @@ -442,7 +672,20 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [["Template"], ["BoundAttribute", 0.0, "ngIf", "true"], ["Template"]], + "expected": [ + [ + "Template" + ], + [ + "BoundAttribute", + 0.0, + "ngIf", + "true" + ], + [ + "Template" + ] + ], "ignore_error": false } ] @@ -454,7 +697,16 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [["Template"], ["Reference", "a", ""]], + "expected": [ + [ + "Template" + ], + [ + "Reference", + "a", + "" + ] + ], "ignore_error": false } ] @@ -466,7 +718,16 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [["Template"], ["Reference", "a", ""]], + "expected": [ + [ + "Template" + ], + [ + "Reference", + "a", + "" + ] + ], "ignore_error": false } ] @@ -483,7 +744,16 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [["Template"], ["Variable", "a", "b"]], + "expected": [ + [ + "Template" + ], + [ + "Variable", + "a", + "b" + ] + ], "ignore_error": false } ] @@ -496,9 +766,19 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - ["Template"], - ["TextAttribute", "k1", "v1"], - ["TextAttribute", "k2", "v2"] + [ + "Template" + ], + [ + "TextAttribute", + "k1", + "v1" + ], + [ + "TextAttribute", + "k2", + "v2" + ] ], "ignore_error": false } @@ -512,9 +792,21 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - ["Template"], - ["BoundAttribute", 0, "k1", "v1"], - ["BoundAttribute", 0, "k2", "v2"] + [ + "Template" + ], + [ + "BoundAttribute", + 0, + "k1", + "v1" + ], + [ + "BoundAttribute", + 0, + "k2", + "v2" + ] ], "ignore_error": false } @@ -534,11 +826,29 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Template"], - ["TextAttribute", "ngFor", ""], - ["BoundAttribute", 0, "ngForOf", "items"], - ["Variable", "item", "$implicit"], - ["Element", "div"] + [ + "Template" + ], + [ + "TextAttribute", + "ngFor", + "" + ], + [ + "BoundAttribute", + 0, + "ngForOf", + "items" + ], + [ + "Variable", + "item", + "$implicit" + ], + [ + "Element", + "div" + ] ], "ignore_error": false }, @@ -546,10 +856,25 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Template"], - ["BoundAttribute", 0, "ngFor", "item"], - ["BoundAttribute", 0, "ngForOf", "items"], - ["Element", "div"] + [ + "Template" + ], + [ + "BoundAttribute", + 0, + "ngFor", + "item" + ], + [ + "BoundAttribute", + 0, + "ngForOf", + "items" + ], + [ + "Element", + "div" + ] ], "ignore_error": false } @@ -563,10 +888,23 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Template"], - ["TextAttribute", "ngIf", ""], - ["Variable", "a", "b"], - ["Element", "div"] + [ + "Template" + ], + [ + "TextAttribute", + "ngIf", + "" + ], + [ + "Variable", + "a", + "b" + ], + [ + "Element", + "div" + ] ], "ignore_error": false } @@ -580,10 +918,24 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Template"], - ["BoundAttribute", 0, "ngIf", "expr"], - ["Variable", "local", "ngIf"], - ["Element", "div"] + [ + "Template" + ], + [ + "BoundAttribute", + 0, + "ngIf", + "expr" + ], + [ + "Variable", + "local", + "ngIf" + ], + [ + "Element", + "div" + ] ], "ignore_error": false } @@ -603,8 +955,17 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundEvent", 0, "event", "window", "v"] + [ + "Element", + "div" + ], + [ + "BoundEvent", + 0, + "event", + "window", + "v" + ] ], "ignore_error": false } @@ -618,8 +979,17 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundEvent", 0, "some-event", null, "v"] + [ + "Element", + "div" + ], + [ + "BoundEvent", + 0, + "some-event", + null, + "v" + ] ], "ignore_error": false }, @@ -627,8 +997,17 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundEvent", 0, "someEvent", null, "v"] + [ + "Element", + "div" + ], + [ + "BoundEvent", + 0, + "someEvent", + null, + "v" + ] ], "ignore_error": false } @@ -642,8 +1021,17 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundEvent", 0, "event", null, "v"] + [ + "Element", + "div" + ], + [ + "BoundEvent", + 0, + "event", + null, + "v" + ] ], "ignore_error": false } @@ -662,9 +1050,23 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 5, "prop", "v"], - ["BoundEvent", 2, "propChange", null, "v"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 5, + "prop", + "v" + ], + [ + "BoundEvent", + 2, + "propChange", + null, + "v" + ] ], "ignore_error": false } @@ -678,9 +1080,23 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 5, "prop", "$any(v)"], - ["BoundEvent", 2, "propChange", null, "$any(v)"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 5, + "prop", + "$any(v)" + ], + [ + "BoundEvent", + 2, + "propChange", + null, + "$any(v)" + ] ], "ignore_error": false } @@ -694,9 +1110,23 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 5, "prop", "v"], - ["BoundEvent", 2, "propChange", null, "v"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 5, + "prop", + "v" + ], + [ + "BoundEvent", + 2, + "propChange", + null, + "v" + ] ], "ignore_error": false } @@ -710,9 +1140,23 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 5, "prop", "v!"], - ["BoundEvent", 2, "propChange", null, "v!"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 5, + "prop", + "v!" + ], + [ + "BoundEvent", + 2, + "propChange", + null, + "v!" + ] ], "ignore_error": false } @@ -726,9 +1170,23 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 5, "prop", "a.b.c"], - ["BoundEvent", 2, "propChange", null, "a.b.c"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 5, + "prop", + "a.b.c" + ], + [ + "BoundEvent", + 2, + "propChange", + null, + "a.b.c" + ] ], "ignore_error": false } @@ -742,9 +1200,23 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundAttribute", 5, "prop", "a[\"b\"][\"c\"]"], - ["BoundEvent", 2, "propChange", null, "a[\"b\"][\"c\"]"] + [ + "Element", + "div" + ], + [ + "BoundAttribute", + 5, + "prop", + "a[\"b\"][\"c\"]" + ], + [ + "BoundEvent", + 2, + "propChange", + null, + "a[\"b\"][\"c\"]" + ] ], "ignore_error": false } @@ -788,8 +1260,17 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["BoundEvent", 1, "", null, "onAnimationEvent($event)"] + [ + "Element", + "div" + ], + [ + "BoundEvent", + 1, + "", + null, + "onAnimationEvent($event)" + ] ], "ignore_error": true } @@ -830,8 +1311,15 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["Reference", "a", ""] + [ + "Element", + "div" + ], + [ + "Reference", + "a", + "" + ] ], "ignore_error": false } @@ -845,8 +1333,15 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["Reference", "a", ""] + [ + "Element", + "div" + ], + [ + "Reference", + "a", + "" + ] ], "ignore_error": false } @@ -860,8 +1355,15 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - ["Element", "div"], - ["Reference", "someA", ""] + [ + "Element", + "div" + ], + [ + "Reference", + "someA", + "" + ] ], "ignore_error": false } @@ -943,29 +1445,64 @@ ] }, { - "name": "Ignored elements", + "name": "a", - "expected": [["Text", "a"]], + "expected": [ + [ + "Text", + "a" + ] + ], "ignore_error": false } ] }, { "name": "should ignore a", - "expected": [["Text", "a"]], + "expected": [ + [ + "Text", + "a" + ] + ], + "ignore_error": false + } + ] + }, + { + "name": "should not ignore namespaced SVG ", + "expected": [ + [ + "Element", + ":svg:svg" + ], + [ + "Element", + ":svg:style" + ], + [ + "Text", + ".a { fill: none; }" + ] + ], "ignore_error": false } ] @@ -984,9 +1521,20 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - ["Element", "link"], - ["TextAttribute", "rel", "stylesheet"], - ["TextAttribute", "href", "http://someurl"] + [ + "Element", + "link" + ], + [ + "TextAttribute", + "rel", + "stylesheet" + ], + [ + "TextAttribute", + "href", + "http://someurl" + ] ], "ignore_error": false }, @@ -994,9 +1542,20 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - ["Element", "link"], - ["TextAttribute", "REL", "stylesheet"], - ["TextAttribute", "href", "http://someurl"] + [ + "Element", + "link" + ], + [ + "TextAttribute", + "REL", + "stylesheet" + ], + [ + "TextAttribute", + "href", + "http://someurl" + ] ], "ignore_error": false } @@ -1010,8 +1569,15 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - ["Element", "link"], - ["TextAttribute", "rel", "stylesheet"] + [ + "Element", + "link" + ], + [ + "TextAttribute", + "rel", + "stylesheet" + ] ], "ignore_error": false }, @@ -1019,8 +1585,15 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - ["Element", "link"], - ["TextAttribute", "REL", "stylesheet"] + [ + "Element", + "link" + ], + [ + "TextAttribute", + "REL", + "stylesheet" + ] ], "ignore_error": false } @@ -1058,9 +1631,19 @@ "type": "ExpectFromHtml", "input": "
    {{b}}
    ", "expected": [ - ["Element", "div"], - ["TextAttribute", "ngNonBindable", ""], - ["Text", "{{b}}"] + [ + "Element", + "div" + ], + [ + "TextAttribute", + "ngNonBindable", + "" + ], + [ + "Text", + "{{b}}" + ] ], "ignore_error": false } @@ -1074,10 +1657,23 @@ "type": "ExpectFromHtml", "input": "
    {{b}}
    ", "expected": [ - ["Element", "div"], - ["TextAttribute", "ngNonBindable", ""], - ["Element", "span"], - ["Text", "{{b}}"] + [ + "Element", + "div" + ], + [ + "TextAttribute", + "ngNonBindable", + "" + ], + [ + "Element", + "span" + ], + [ + "Text", + "{{b}}" + ] ], "ignore_error": false } @@ -1091,9 +1687,19 @@ "type": "ExpectFromHtml", "input": "
    a
    ", "expected": [ - ["Element", "div"], - ["TextAttribute", "ngNonBindable", ""], - ["Text", "a"] + [ + "Element", + "div" + ], + [ + "TextAttribute", + "ngNonBindable", + "" + ], + [ + "Text", + "a" + ] ], "ignore_error": false } @@ -1107,9 +1713,19 @@ "type": "ExpectFromHtml", "input": "
    a
    ", "expected": [ - ["Element", "div"], - ["TextAttribute", "ngNonBindable", ""], - ["Text", "a"] + [ + "Element", + "div" + ], + [ + "TextAttribute", + "ngNonBindable", + "" + ], + [ + "Text", + "a" + ] ], "ignore_error": false } @@ -1123,9 +1739,19 @@ "type": "ExpectFromHtml", "input": "
    a
    ", "expected": [ - ["Element", "div"], - ["TextAttribute", "ngNonBindable", ""], - ["Text", "a"] + [ + "Element", + "div" + ], + [ + "TextAttribute", + "ngNonBindable", + "" + ], + [ + "Text", + "a" + ] ], "ignore_error": false } @@ -1251,8 +1877,37 @@ "assertions": [] }, { - "name": "should report if parameters are passed to `idle` trigger", - "path": "R3 template transform/deferred blocks/block validations/should report if parameters are passed to `idle` trigger", + "name": "should allow optional parameter on `idle` trigger and parse timeout", + "path": "R3 template transform/deferred blocks/block validations/should allow optional parameter on `idle` trigger and parse timeout", + "assertions": [ + { + "type": "ExpectFromHtml", + "input": "@defer (on idle(1)) {hello}", + "expected": [ + [ + "DeferredBlock" + ], + [ + "IdleDeferredTrigger", + 1.0 + ], + [ + "Text", + "hello" + ] + ], + "ignore_error": false + } + ] + }, + { + "name": "should report if `idle` trigger value cannot be parsed", + "path": "R3 template transform/deferred blocks/block validations/should report if `idle` trigger value cannot be parsed", + "assertions": [] + }, + { + "name": "should report if `idle` trigger has more than one parameter", + "path": "R3 template transform/deferred blocks/block validations/should report if `idle` trigger has more than one parameter", "assertions": [] }, { @@ -1386,7 +2041,15 @@ { "type": "ExpectFromHtml", "input": "@defer{hello}", - "expected": [["DeferredBlock"], ["Text", "hello"]], + "expected": [ + [ + "DeferredBlock" + ], + [ + "Text", + "hello" + ] + ], "ignore_error": false } ] @@ -1399,9 +2062,17 @@ "type": "ExpectFromHtml", "input": "@defer (when isVisible() && loaded){hello}", "expected": [ - ["DeferredBlock"], - ["BoundDeferredTrigger", "isVisible() && loaded"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "BoundDeferredTrigger", + "isVisible() && loaded" + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } @@ -1414,7 +2085,18 @@ { "type": "ExpectFromHtml", "input": "@defer (on idle){hello}", - "expected": [["DeferredBlock"], ["IdleDeferredTrigger"], ["Text", "hello"]], + "expected": [ + [ + "DeferredBlock" + ], + [ + "IdleDeferredTrigger" + ], + [ + "Text", + "hello" + ] + ], "ignore_error": false } ] @@ -1427,10 +2109,20 @@ "type": "ExpectFromHtml", "input": "@defer (on idle, viewport(button)){hello}", "expected": [ - ["DeferredBlock"], - ["IdleDeferredTrigger"], - ["ViewportDeferredTrigger", "button"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "IdleDeferredTrigger" + ], + [ + "ViewportDeferredTrigger", + "button" + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } @@ -1444,11 +2136,23 @@ "type": "ExpectFromHtml", "input": "@defer (on idle, viewport(button), immediate){hello}", "expected": [ - ["DeferredBlock"], - ["IdleDeferredTrigger"], - ["ViewportDeferredTrigger", "button"], - ["ImmediateDeferredTrigger"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "IdleDeferredTrigger" + ], + [ + "ViewportDeferredTrigger", + "button" + ], + [ + "ImmediateDeferredTrigger" + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } @@ -1462,12 +2166,28 @@ "type": "ExpectFromHtml", "input": "@defer (when isVisible(); on timer(100ms), idle, viewport(button)){hello}", "expected": [ - ["DeferredBlock"], - ["BoundDeferredTrigger", "isVisible()"], - ["TimerDeferredTrigger", 100.0], - ["IdleDeferredTrigger"], - ["ViewportDeferredTrigger", "button"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "BoundDeferredTrigger", + "isVisible()" + ], + [ + "TimerDeferredTrigger", + 100.0 + ], + [ + "IdleDeferredTrigger" + ], + [ + "ViewportDeferredTrigger", + "button" + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } @@ -1481,12 +2201,28 @@ "type": "ExpectFromHtml", "input": "@defer(\nwhen\nisVisible(); on\ntimer(100ms),\nidle, viewport(button)){hello}", "expected": [ - ["DeferredBlock"], - ["BoundDeferredTrigger", "isVisible()"], - ["TimerDeferredTrigger", 100.0], - ["IdleDeferredTrigger"], - ["ViewportDeferredTrigger", "button"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "BoundDeferredTrigger", + "isVisible()" + ], + [ + "TimerDeferredTrigger", + 100.0 + ], + [ + "IdleDeferredTrigger" + ], + [ + "ViewportDeferredTrigger", + "button" + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } @@ -1500,9 +2236,17 @@ "type": "ExpectFromHtml", "input": "@defer (on timer(10s)){hello}", "expected": [ - ["DeferredBlock"], - ["TimerDeferredTrigger", 10000.0], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "TimerDeferredTrigger", + 10000.0 + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } @@ -1516,9 +2260,17 @@ "type": "ExpectFromHtml", "input": "@defer (on timer(1.5s)){hello}", "expected": [ - ["DeferredBlock"], - ["TimerDeferredTrigger", 1500.0], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "TimerDeferredTrigger", + 1500.0 + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } @@ -1532,9 +2284,17 @@ "type": "ExpectFromHtml", "input": "@defer (on timer(100)){hello}", "expected": [ - ["DeferredBlock"], - ["TimerDeferredTrigger", 100.0], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "TimerDeferredTrigger", + 100.0 + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } @@ -1548,9 +2308,17 @@ "type": "ExpectFromHtml", "input": "@defer (on hover(button)){hello}", "expected": [ - ["DeferredBlock"], - ["HoverDeferredTrigger", "button"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "HoverDeferredTrigger", + "button" + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } @@ -1564,9 +2332,17 @@ "type": "ExpectFromHtml", "input": "@defer (on interaction(button)){hello}", "expected": [ - ["DeferredBlock"], - ["InteractionDeferredTrigger", "button"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "InteractionDeferredTrigger", + "button" + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } @@ -1580,15 +2356,41 @@ "type": "ExpectFromHtml", "input": "@defer {}@loading {Loading...}@placeholder {Placeholder content!}@error {Loading failed :(}", "expected": [ - ["DeferredBlock"], - ["Element", "calendar-cmp", "#selfClosing"], - ["BoundAttribute", 0.0, "date", "current"], - ["DeferredBlockPlaceholder"], - ["Text", "Placeholder content!"], - ["DeferredBlockLoading"], - ["Text", "Loading..."], - ["DeferredBlockError"], - ["Text", "Loading failed :("] + [ + "DeferredBlock" + ], + [ + "Element", + "calendar-cmp", + "#selfClosing" + ], + [ + "BoundAttribute", + 0.0, + "date", + "current" + ], + [ + "DeferredBlockPlaceholder" + ], + [ + "Text", + "Placeholder content!" + ], + [ + "DeferredBlockLoading" + ], + [ + "Text", + "Loading..." + ], + [ + "DeferredBlockError" + ], + [ + "Text", + "Loading failed :(" + ] ], "ignore_error": false } @@ -1602,15 +2404,41 @@ "type": "ExpectFromHtml", "input": "@defer {} @loading {Loading...} @placeholder {Placeholder content!} @error {Loading failed :(}", "expected": [ - ["DeferredBlock"], - ["Element", "calendar-cmp", "#selfClosing"], - ["BoundAttribute", 0.0, "date", "current"], - ["DeferredBlockPlaceholder"], - ["Text", "Placeholder content!"], - ["DeferredBlockLoading"], - ["Text", "Loading..."], - ["DeferredBlockError"], - ["Text", "Loading failed :("] + [ + "DeferredBlock" + ], + [ + "Element", + "calendar-cmp", + "#selfClosing" + ], + [ + "BoundAttribute", + 0.0, + "date", + "current" + ], + [ + "DeferredBlockPlaceholder" + ], + [ + "Text", + "Placeholder content!" + ], + [ + "DeferredBlockLoading" + ], + [ + "Text", + "Loading..." + ], + [ + "DeferredBlockError" + ], + [ + "Text", + "Loading failed :(" + ] ], "ignore_error": false } @@ -1629,11 +2457,29 @@ "type": "ExpectFromHtml", "input": "@defer{}@loading (after 100ms; minimum 1.5s){Loading...}", "expected": [ - ["DeferredBlock"], - ["Element", "calendar-cmp", "#selfClosing"], - ["BoundAttribute", 0.0, "date", "current"], - ["DeferredBlockLoading", "after 100ms", "minimum 1500ms"], - ["Text", "Loading..."] + [ + "DeferredBlock" + ], + [ + "Element", + "calendar-cmp", + "#selfClosing" + ], + [ + "BoundAttribute", + 0.0, + "date", + "current" + ], + [ + "DeferredBlockLoading", + "after 100ms", + "minimum 1500ms" + ], + [ + "Text", + "Loading..." + ] ], "ignore_error": false } @@ -1647,11 +2493,28 @@ "type": "ExpectFromHtml", "input": "@defer {}@placeholder (minimum 1.5s){Placeholder...}", "expected": [ - ["DeferredBlock"], - ["Element", "calendar-cmp", "#selfClosing"], - ["BoundAttribute", 0.0, "date", "current"], - ["DeferredBlockPlaceholder", "minimum 1500ms"], - ["Text", "Placeholder..."] + [ + "DeferredBlock" + ], + [ + "Element", + "calendar-cmp", + "#selfClosing" + ], + [ + "BoundAttribute", + 0.0, + "date", + "current" + ], + [ + "DeferredBlockPlaceholder", + "minimum 1500ms" + ], + [ + "Text", + "Placeholder..." + ] ], "ignore_error": false } @@ -1665,90 +2528,220 @@ "type": "ExpectFromHtml", "input": "@defer (on idle; prefetch on viewport(button), hover(button); prefetch when shouldPrefetch()){hello}", "expected": [ - ["DeferredBlock"], - ["IdleDeferredTrigger"], - ["ViewportDeferredTrigger", "button"], - ["HoverDeferredTrigger", "button"], - ["BoundDeferredTrigger", "shouldPrefetch()"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "IdleDeferredTrigger" + ], + [ + "ViewportDeferredTrigger", + "button" + ], + [ + "HoverDeferredTrigger", + "button" + ], + [ + "BoundDeferredTrigger", + "shouldPrefetch()" + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } ] }, { - "name": "should allow arbitrary number of spaces after the `prefetch` keyword", - "path": "R3 template transform/deferred blocks/should allow arbitrary number of spaces after the `prefetch` keyword", + "name": "should parse prefetch `on idle(100)` trigger and preserve timeout", + "path": "R3 template transform/deferred blocks/should parse prefetch `on idle(100)` trigger and preserve timeout", "assertions": [ { "type": "ExpectFromHtml", - "input": "@defer (on idle; prefetch on viewport(button), hover(button); prefetch when shouldPrefetch()){hello}", + "input": "@defer (on idle; prefetch on idle(100)){hello}", "expected": [ - ["DeferredBlock"], - ["IdleDeferredTrigger"], - ["ViewportDeferredTrigger", "button"], - ["HoverDeferredTrigger", "button"], - ["BoundDeferredTrigger", "shouldPrefetch()"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "IdleDeferredTrigger" + ], + [ + "IdleDeferredTrigger", + 100.0 + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } ] }, { - "name": "should parse the hydrate-specific `never` trigger", - "path": "R3 template transform/deferred blocks/should parse the hydrate-specific `never` trigger", + "name": "should parse hydrate `on idle(100)` trigger and preserve timeout", + "path": "R3 template transform/deferred blocks/should parse hydrate `on idle(100)` trigger and preserve timeout", "assertions": [ { "type": "ExpectFromHtml", - "input": "@defer (on idle; hydrate never){hello}", + "input": "@defer (on idle; hydrate on idle(100)){hello}", "expected": [ - ["DeferredBlock"], - ["NeverDeferredTrigger"], - ["IdleDeferredTrigger"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "IdleDeferredTrigger", + 100.0 + ], + [ + "IdleDeferredTrigger" + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } ] }, { - "name": "should parse a deferred block with hydrate triggers", - "path": "R3 template transform/deferred blocks/should parse a deferred block with hydrate triggers", + "name": "should allow arbitrary number of spaces after the `prefetch` keyword", + "path": "R3 template transform/deferred blocks/should allow arbitrary number of spaces after the `prefetch` keyword", "assertions": [ { "type": "ExpectFromHtml", - "input": "@defer (on idle; hydrate on viewport, hover, timer(500); hydrate when shouldHydrate()){hello}", + "input": "@defer (on idle; prefetch on viewport(button), hover(button); prefetch when shouldPrefetch()){hello}", "expected": [ - ["DeferredBlock"], - ["ViewportDeferredTrigger", null], - ["HoverDeferredTrigger", null], - ["TimerDeferredTrigger", 500.0], - ["BoundDeferredTrigger", "shouldHydrate()"], - ["IdleDeferredTrigger"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "IdleDeferredTrigger" + ], + [ + "ViewportDeferredTrigger", + "button" + ], + [ + "HoverDeferredTrigger", + "button" + ], + [ + "BoundDeferredTrigger", + "shouldPrefetch()" + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } ] }, { - "name": "should allow arbitrary number of spaces after the `hydrate` keyword", - "path": "R3 template transform/deferred blocks/should allow arbitrary number of spaces after the `hydrate` keyword", + "name": "should parse the hydrate-specific `never` trigger", + "path": "R3 template transform/deferred blocks/should parse the hydrate-specific `never` trigger", "assertions": [ { "type": "ExpectFromHtml", - "input": "@defer (on idle; hydrate on viewport, hover; hydrate when shouldHydrate()){hello}", + "input": "@defer (on idle; hydrate never){hello}", "expected": [ - ["DeferredBlock"], - ["ViewportDeferredTrigger", null], - ["HoverDeferredTrigger", null], - ["BoundDeferredTrigger", "shouldHydrate()"], - ["IdleDeferredTrigger"], - ["Text", "hello"] - ], - "ignore_error": false - } + [ + "DeferredBlock" + ], + [ + "NeverDeferredTrigger" + ], + [ + "IdleDeferredTrigger" + ], + [ + "Text", + "hello" + ] + ], + "ignore_error": false + } + ] + }, + { + "name": "should parse a deferred block with hydrate triggers", + "path": "R3 template transform/deferred blocks/should parse a deferred block with hydrate triggers", + "assertions": [ + { + "type": "ExpectFromHtml", + "input": "@defer (on idle; hydrate on viewport, hover, timer(500); hydrate when shouldHydrate()){hello}", + "expected": [ + [ + "DeferredBlock" + ], + [ + "ViewportDeferredTrigger", + null + ], + [ + "HoverDeferredTrigger", + null + ], + [ + "TimerDeferredTrigger", + 500.0 + ], + [ + "BoundDeferredTrigger", + "shouldHydrate()" + ], + [ + "IdleDeferredTrigger" + ], + [ + "Text", + "hello" + ] + ], + "ignore_error": false + } + ] + }, + { + "name": "should allow arbitrary number of spaces after the `hydrate` keyword", + "path": "R3 template transform/deferred blocks/should allow arbitrary number of spaces after the `hydrate` keyword", + "assertions": [ + { + "type": "ExpectFromHtml", + "input": "@defer (on idle; hydrate on viewport, hover; hydrate when shouldHydrate()){hello}", + "expected": [ + [ + "DeferredBlock" + ], + [ + "ViewportDeferredTrigger", + null + ], + [ + "HoverDeferredTrigger", + null + ], + [ + "BoundDeferredTrigger", + "shouldHydrate()" + ], + [ + "IdleDeferredTrigger" + ], + [ + "Text", + "hello" + ] + ], + "ignore_error": false + } ] }, { @@ -1759,26 +2752,85 @@ "type": "ExpectFromHtml", "input": "@defer (when isVisible() && foo; on hover(button), timer(10s), idle, immediate, interaction(button), viewport(container); prefetch on immediate; prefetch when isDataLoaded(); hydrate when shouldHydrate(); hydrate on viewport){}@loading (minimum 1s; after 100ms){Loading...}@placeholder (minimum 500){Placeholder content!}@error {Loading failed :(}", "expected": [ - ["DeferredBlock"], - ["BoundDeferredTrigger", "shouldHydrate()"], - ["ViewportDeferredTrigger", null], - ["BoundDeferredTrigger", "isVisible() && foo"], - ["HoverDeferredTrigger", "button"], - ["TimerDeferredTrigger", 10000.0], - ["IdleDeferredTrigger"], - ["ImmediateDeferredTrigger"], - ["InteractionDeferredTrigger", "button"], - ["ViewportDeferredTrigger", "container"], - ["ImmediateDeferredTrigger"], - ["BoundDeferredTrigger", "isDataLoaded()"], - ["Element", "calendar-cmp", "#selfClosing"], - ["BoundAttribute", 0.0, "date", "current"], - ["DeferredBlockPlaceholder", "minimum 500ms"], - ["Text", "Placeholder content!"], - ["DeferredBlockLoading", "after 100ms", "minimum 1000ms"], - ["Text", "Loading..."], - ["DeferredBlockError"], - ["Text", "Loading failed :("] + [ + "DeferredBlock" + ], + [ + "BoundDeferredTrigger", + "shouldHydrate()" + ], + [ + "ViewportDeferredTrigger", + null + ], + [ + "BoundDeferredTrigger", + "isVisible() && foo" + ], + [ + "HoverDeferredTrigger", + "button" + ], + [ + "TimerDeferredTrigger", + 10000.0 + ], + [ + "IdleDeferredTrigger" + ], + [ + "ImmediateDeferredTrigger" + ], + [ + "InteractionDeferredTrigger", + "button" + ], + [ + "ViewportDeferredTrigger", + "container" + ], + [ + "ImmediateDeferredTrigger" + ], + [ + "BoundDeferredTrigger", + "isDataLoaded()" + ], + [ + "Element", + "calendar-cmp", + "#selfClosing" + ], + [ + "BoundAttribute", + 0.0, + "date", + "current" + ], + [ + "DeferredBlockPlaceholder", + "minimum 500ms" + ], + [ + "Text", + "Placeholder content!" + ], + [ + "DeferredBlockLoading", + "after 100ms", + "minimum 1000ms" + ], + [ + "Text", + "Loading..." + ], + [ + "DeferredBlockError" + ], + [ + "Text", + "Loading failed :(" + ] ], "ignore_error": false } @@ -1792,24 +2844,69 @@ "type": "ExpectFromHtml", "input": "
    @defer (when isVisible() && foo; on hover(button), timer(10s), idle, immediate, interaction(button), viewport(container); prefetch on immediate; prefetch when isDataLoaded(); hydrate when shouldHydrate(); hydrate on viewport){}@loading (minimum 1s; after 100ms){Loading...}@placeholder (minimum 500){Placeholder content!}@error {Loading failed :(}
    ", "expected": [ - ["Element", "div"], - ["TextAttribute", "ngNonBindable", ""], + [ + "Element", + "div" + ], + [ + "TextAttribute", + "ngNonBindable", + "" + ], [ "Text", "@defer (when isVisible() && foo; on hover(button), timer(10s), idle, immediate, interaction(button), viewport(container); prefetch on immediate; prefetch when isDataLoaded(); hydrate when shouldHydrate(); hydrate on viewport){" ], - ["Element", "calendar-cmp", "#selfClosing"], - ["TextAttribute", "[date]", "current"], - ["Text", "}"], - ["Text", "@loading (minimum 1s; after 100ms){"], - ["Text", "Loading..."], - ["Text", "}"], - ["Text", "@placeholder (minimum 500){"], - ["Text", "Placeholder content!"], - ["Text", "}"], - ["Text", "@error {"], - ["Text", "Loading failed :("], - ["Text", "}"] + [ + "Element", + "calendar-cmp", + "#selfClosing" + ], + [ + "TextAttribute", + "[date]", + "current" + ], + [ + "Text", + "}" + ], + [ + "Text", + "@loading (minimum 1s; after 100ms){" + ], + [ + "Text", + "Loading..." + ], + [ + "Text", + "}" + ], + [ + "Text", + "@placeholder (minimum 500){" + ], + [ + "Text", + "Placeholder content!" + ], + [ + "Text", + "}" + ], + [ + "Text", + "@error {" + ], + [ + "Text", + "Loading failed :(" + ], + [ + "Text", + "}" + ] ], "ignore_error": false } @@ -1823,16 +2920,45 @@ "type": "ExpectFromHtml", "input": "@defer (on hover, interaction, viewport; prefetch on hover, interaction, viewport) {hello}@placeholder {}", "expected": [ - ["DeferredBlock"], - ["HoverDeferredTrigger", null], - ["InteractionDeferredTrigger", null], - ["ViewportDeferredTrigger", null], - ["HoverDeferredTrigger", null], - ["InteractionDeferredTrigger", null], - ["ViewportDeferredTrigger", null], - ["Text", "hello"], - ["DeferredBlockPlaceholder"], - ["Element", "implied-trigger", "#selfClosing"] + [ + "DeferredBlock" + ], + [ + "HoverDeferredTrigger", + null + ], + [ + "InteractionDeferredTrigger", + null + ], + [ + "ViewportDeferredTrigger", + null + ], + [ + "HoverDeferredTrigger", + null + ], + [ + "InteractionDeferredTrigger", + null + ], + [ + "ViewportDeferredTrigger", + null + ], + [ + "Text", + "hello" + ], + [ + "DeferredBlockPlaceholder" + ], + [ + "Element", + "implied-trigger", + "#selfClosing" + ] ], "ignore_error": false } @@ -1846,13 +2972,18 @@ "type": "ExpectFromHtml", "input": "@defer (on viewport({trigger: foo, rootMargin: \"123px\", threshold: [1, 2, 3]})){hello}", "expected": [ - ["DeferredBlock"], + [ + "DeferredBlock" + ], [ "ViewportDeferredTrigger", "foo", "{rootMargin: \"123px\", threshold: [1, 2, 3]}" ], - ["Text", "hello"] + [ + "Text", + "hello" + ] ], "ignore_error": false } @@ -1866,9 +2997,18 @@ "type": "ExpectFromHtml", "input": "@defer (on viewport({rootMargin: \"123px\"})){hello}", "expected": [ - ["DeferredBlock"], - ["ViewportDeferredTrigger", null, "{rootMargin: \"123px\"}"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "ViewportDeferredTrigger", + null, + "{rootMargin: \"123px\"}" + ], + [ + "Text", + "hello" + ] ], "ignore_error": false }, @@ -1876,9 +3016,18 @@ "type": "ExpectFromHtml", "input": "@defer (on viewport({rootMargin: \"123px\"})){hello}", "expected": [ - ["DeferredBlock"], - ["ViewportDeferredTrigger", null, "{rootMargin: \"123px\"}"], - ["Text", "hello"] + [ + "DeferredBlock" + ], + [ + "ViewportDeferredTrigger", + null, + "{rootMargin: \"123px\"}" + ], + [ + "Text", + "hello" + ] ], "ignore_error": false } @@ -1942,6 +3091,26 @@ "name": "should report if a default block has parameters", "path": "R3 template transform/switch blocks/validations/should report if a default block has parameters", "assertions": [] + }, + { + "name": "should report if in a @switch block a @default never block has a body", + "path": "R3 template transform/switch blocks/validations/should report if in a @switch block a @default never block has a body", + "assertions": [] + }, + { + "name": "should report if a switch fallthrough case is followed by a @default never block", + "path": "R3 template transform/switch blocks/validations/should report if a switch fallthrough case is followed by a @default never block", + "assertions": [] + }, + { + "name": "should throw if @default never is not the last case in a switch block", + "path": "R3 template transform/switch blocks/validations/should throw if @default never is not the last case in a switch block", + "assertions": [] + }, + { + "name": "should throw if a semicolon is missing after @default never", + "path": "R3 template transform/switch blocks/validations/should throw if a semicolon is missing after @default never", + "assertions": [] } ] } @@ -1955,20 +3124,78 @@ "type": "ExpectFromHtml", "input": "\n @switch (cond.kind) {\n @case (x()) { X case }\n @case ('hello') {}\n @case (42) { Z case }\n @default { No case matched }\n }\n ", "expected": [ - ["SwitchBlock", "cond.kind"], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "x()"], - ["Text", " X case "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "\"hello\""], - ["Element", "button"], - ["Text", "Y case"], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "42"], - ["Text", " Z case "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", null], - ["Text", " No case matched "] + [ + "SwitchBlock", + "cond.kind" + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "x()" + ], + [ + "Text", + " X case " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "\"hello\"" + ], + [ + "Element", + "button" + ], + [ + "Text", + "Y case" + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "42" + ], + [ + "Text", + " Z case " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + null + ], + [ + "Text", + " No case matched " + ] + ], + "ignore_error": false + } + ] + }, + { + "name": "should parse a switch block with a default never case", + "path": "R3 template transform/switch blocks/should parse a switch block with a default never case", + "assertions": [ + { + "type": "ExpectFromHtml", + "input": "\n @switch (cond.kind) {\n @default never;\n }\n ", + "expected": [ + [ + "SwitchBlock", + "cond.kind" + ], + [ + "SwitchExhaustiveCheck" + ] ], "ignore_error": false } @@ -1987,20 +3214,58 @@ "type": "ExpectFromHtml", "input": "\n @switch ((cond.kind)) {\n @case ((x())) { X case }\n @case (('hello')) {}\n @case ((42)) { Z case }\n @default { No case matched }\n }\n ", "expected": [ - ["SwitchBlock", "(cond.kind)"], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "(x())"], - ["Text", " X case "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "(\"hello\")"], - ["Element", "button"], - ["Text", "Y case"], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "(42)"], - ["Text", " Z case "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", null], - ["Text", " No case matched "] + [ + "SwitchBlock", + "(cond.kind)" + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "(x())" + ], + [ + "Text", + " X case " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "(\"hello\")" + ], + [ + "Element", + "button" + ], + [ + "Text", + "Y case" + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "(42)" + ], + [ + "Text", + " Z case " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + null + ], + [ + "Text", + " No case matched " + ] ], "ignore_error": false } @@ -2014,41 +3279,135 @@ "type": "ExpectFromHtml", "input": "\n @switch (cond) {\n @case ('a') {\n @switch (innerCond) {\n @case ('innerA') { Inner A }\n @case ('innerB') { Inner B }\n }\n }\n @case ('b') {}\n @case ('c') { Z case }\n @default {\n @switch (innerCond) {\n @case ('innerC') { Inner C }\n @case ('innerD') { Inner D }\n @default {\n @switch (innerInnerCond) {\n @case ('innerInnerA') { Inner inner A }\n @case ('innerInnerA') { Inner inner B }\n }\n }\n }\n }\n }\n ", "expected": [ - ["SwitchBlock", "cond"], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "\"a\""], - ["SwitchBlock", "innerCond"], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "\"innerA\""], - ["Text", " Inner A "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "\"innerB\""], - ["Text", " Inner B "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "\"b\""], - ["Element", "button"], - ["Text", "Y case"], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "\"c\""], - ["Text", " Z case "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", null], - ["SwitchBlock", "innerCond"], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "\"innerC\""], - ["Text", " Inner C "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "\"innerD\""], - ["Text", " Inner D "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", null], - ["SwitchBlock", "innerInnerCond"], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "\"innerInnerA\""], - ["Text", " Inner inner A "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "\"innerInnerA\""], - ["Text", " Inner inner B "] + [ + "SwitchBlock", + "cond" + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "\"a\"" + ], + [ + "SwitchBlock", + "innerCond" + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "\"innerA\"" + ], + [ + "Text", + " Inner A " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "\"innerB\"" + ], + [ + "Text", + " Inner B " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "\"b\"" + ], + [ + "Element", + "button" + ], + [ + "Text", + "Y case" + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "\"c\"" + ], + [ + "Text", + " Z case " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + null + ], + [ + "SwitchBlock", + "innerCond" + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "\"innerC\"" + ], + [ + "Text", + " Inner C " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "\"innerD\"" + ], + [ + "Text", + " Inner D " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + null + ], + [ + "SwitchBlock", + "innerInnerCond" + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "\"innerInnerA\"" + ], + [ + "Text", + " Inner inner A " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "\"innerInnerA\"" + ], + [ + "Text", + " Inner inner B " + ] ], "ignore_error": false } @@ -2062,13 +3421,32 @@ "type": "ExpectFromHtml", "input": "\n @switch (cond.kind) {\n \n @case (x) { X case }\n\n \n @default { No case matched }\n }\n ", "expected": [ - ["SwitchBlock", "cond.kind"], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "x"], - ["Text", " X case "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", null], - ["Text", " No case matched "] + [ + "SwitchBlock", + "cond.kind" + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "x" + ], + [ + "Text", + " X case " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + null + ], + [ + "Text", + " No case matched " + ] ], "ignore_error": false } @@ -2082,19 +3460,55 @@ "type": "ExpectFromHtml", "input": "\n @switch (cond) {\n @case ('a') @case('b') @case('c') @case('d') { ABCD case }\n @case ('z') { Z case }\n @default { No case matched }\n }\n ", "expected": [ - ["SwitchBlock", "cond"], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "\"a\""], - ["SwitchBlockCase", "\"b\""], - ["SwitchBlockCase", "\"c\""], - ["SwitchBlockCase", "\"d\""], - ["Text", " ABCD case "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", "\"z\""], - ["Text", " Z case "], - ["SwitchBlockCaseGroup"], - ["SwitchBlockCase", null], - ["Text", " No case matched "] + [ + "SwitchBlock", + "cond" + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "\"a\"" + ], + [ + "SwitchBlockCase", + "\"b\"" + ], + [ + "SwitchBlockCase", + "\"c\"" + ], + [ + "SwitchBlockCase", + "\"d\"" + ], + [ + "Text", + " ABCD case " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + "\"z\"" + ], + [ + "Text", + " Z case " + ], + [ + "SwitchBlockCaseGroup" + ], + [ + "SwitchBlockCase", + null + ], + [ + "Text", + " No case matched " + ] ], "ignore_error": false } @@ -2211,17 +3625,57 @@ "type": "ExpectFromHtml", "input": "\n @for (item of items.foo.bar; track item.id) {\n {{ item }}\n } @empty {\n There were no items in the list.\n }\n ", "expected": [ - ["ForLoopBlock", "items.foo.bar", "item.id"], - ["Variable", "item", "$implicit"], - ["Variable", "$index", "$index"], - ["Variable", "$first", "$first"], - ["Variable", "$last", "$last"], - ["Variable", "$even", "$even"], - ["Variable", "$odd", "$odd"], - ["Variable", "$count", "$count"], - ["BoundText", " {{ item }} "], - ["ForLoopBlockEmpty"], - ["Text", " There were no items in the list. "] + [ + "ForLoopBlock", + "items.foo.bar", + "item.id" + ], + [ + "Variable", + "item", + "$implicit" + ], + [ + "Variable", + "$index", + "$index" + ], + [ + "Variable", + "$first", + "$first" + ], + [ + "Variable", + "$last", + "$last" + ], + [ + "Variable", + "$even", + "$even" + ], + [ + "Variable", + "$odd", + "$odd" + ], + [ + "Variable", + "$count", + "$count" + ], + [ + "BoundText", + " {{ item }} " + ], + [ + "ForLoopBlockEmpty" + ], + [ + "Text", + " There were no items in the list. " + ] ], "ignore_error": false } @@ -2235,15 +3689,50 @@ "type": "ExpectFromHtml", "input": "\n @for ((item of items.foo.bar); track item.id){\n {{ item }}\n }\n ", "expected": [ - ["ForLoopBlock", "items.foo.bar", "item.id"], - ["Variable", "item", "$implicit"], - ["Variable", "$index", "$index"], - ["Variable", "$first", "$first"], - ["Variable", "$last", "$last"], - ["Variable", "$even", "$even"], - ["Variable", "$odd", "$odd"], - ["Variable", "$count", "$count"], - ["BoundText", " {{ item }} "] + [ + "ForLoopBlock", + "items.foo.bar", + "item.id" + ], + [ + "Variable", + "item", + "$implicit" + ], + [ + "Variable", + "$index", + "$index" + ], + [ + "Variable", + "$first", + "$first" + ], + [ + "Variable", + "$last", + "$last" + ], + [ + "Variable", + "$even", + "$even" + ], + [ + "Variable", + "$odd", + "$odd" + ], + [ + "Variable", + "$count", + "$count" + ], + [ + "BoundText", + " {{ item }} " + ] ], "ignore_error": false }, @@ -2251,15 +3740,50 @@ "type": "ExpectFromHtml", "input": "\n @for ((item of items.foo.bar()); track item.id) {\n {{ item }}\n }\n ", "expected": [ - ["ForLoopBlock", "items.foo.bar()", "item.id"], - ["Variable", "item", "$implicit"], - ["Variable", "$index", "$index"], - ["Variable", "$first", "$first"], - ["Variable", "$last", "$last"], - ["Variable", "$even", "$even"], - ["Variable", "$odd", "$odd"], - ["Variable", "$count", "$count"], - ["BoundText", " {{ item }} "] + [ + "ForLoopBlock", + "items.foo.bar()", + "item.id" + ], + [ + "Variable", + "item", + "$implicit" + ], + [ + "Variable", + "$index", + "$index" + ], + [ + "Variable", + "$first", + "$first" + ], + [ + "Variable", + "$last", + "$last" + ], + [ + "Variable", + "$even", + "$even" + ], + [ + "Variable", + "$odd", + "$odd" + ], + [ + "Variable", + "$count", + "$count" + ], + [ + "BoundText", + " {{ item }} " + ] ], "ignore_error": false }, @@ -2267,15 +3791,50 @@ "type": "ExpectFromHtml", "input": "\n @for (( ( (item of items.foo.bar()) ) ); track item.id) {\n {{ item }}\n }\n ", "expected": [ - ["ForLoopBlock", "items.foo.bar()", "item.id"], - ["Variable", "item", "$implicit"], - ["Variable", "$index", "$index"], - ["Variable", "$first", "$first"], - ["Variable", "$last", "$last"], - ["Variable", "$even", "$even"], - ["Variable", "$odd", "$odd"], - ["Variable", "$count", "$count"], - ["BoundText", " {{ item }} "] + [ + "ForLoopBlock", + "items.foo.bar()", + "item.id" + ], + [ + "Variable", + "item", + "$implicit" + ], + [ + "Variable", + "$index", + "$index" + ], + [ + "Variable", + "$first", + "$first" + ], + [ + "Variable", + "$last", + "$last" + ], + [ + "Variable", + "$even", + "$even" + ], + [ + "Variable", + "$odd", + "$odd" + ], + [ + "Variable", + "$count", + "$count" + ], + [ + "BoundText", + " {{ item }} " + ] ], "ignore_error": false } @@ -2289,21 +3848,80 @@ "type": "ExpectFromHtml", "input": "\n @for (item of items.foo.bar; track item.id; let idx = $index, f = $first, c = $count; let l = $last, ev = $even, od = $odd) {\n {{ item }}\n }\n ", "expected": [ - ["ForLoopBlock", "items.foo.bar", "item.id"], - ["Variable", "item", "$implicit"], - ["Variable", "$index", "$index"], - ["Variable", "$first", "$first"], - ["Variable", "$last", "$last"], - ["Variable", "$even", "$even"], - ["Variable", "$odd", "$odd"], - ["Variable", "$count", "$count"], - ["Variable", "idx", "$index"], - ["Variable", "f", "$first"], - ["Variable", "c", "$count"], - ["Variable", "l", "$last"], - ["Variable", "ev", "$even"], - ["Variable", "od", "$odd"], - ["BoundText", " {{ item }} "] + [ + "ForLoopBlock", + "items.foo.bar", + "item.id" + ], + [ + "Variable", + "item", + "$implicit" + ], + [ + "Variable", + "$index", + "$index" + ], + [ + "Variable", + "$first", + "$first" + ], + [ + "Variable", + "$last", + "$last" + ], + [ + "Variable", + "$even", + "$even" + ], + [ + "Variable", + "$odd", + "$odd" + ], + [ + "Variable", + "$count", + "$count" + ], + [ + "Variable", + "idx", + "$index" + ], + [ + "Variable", + "f", + "$first" + ], + [ + "Variable", + "c", + "$count" + ], + [ + "Variable", + "l", + "$last" + ], + [ + "Variable", + "ev", + "$even" + ], + [ + "Variable", + "od", + "$odd" + ], + [ + "BoundText", + " {{ item }} " + ] ], "ignore_error": false } @@ -2317,21 +3935,80 @@ "type": "ExpectFromHtml", "input": "\n @for (item of items.foo.bar; track item.id; let\nidx = $index,\nf = $first,\nc = $count,\nl = $last,\nev = $even,\nod = $odd) {\n {{ item }}\n }\n ", "expected": [ - ["ForLoopBlock", "items.foo.bar", "item.id"], - ["Variable", "item", "$implicit"], - ["Variable", "$index", "$index"], - ["Variable", "$first", "$first"], - ["Variable", "$last", "$last"], - ["Variable", "$even", "$even"], - ["Variable", "$odd", "$odd"], - ["Variable", "$count", "$count"], - ["Variable", "idx", "$index"], - ["Variable", "f", "$first"], - ["Variable", "c", "$count"], - ["Variable", "l", "$last"], - ["Variable", "ev", "$even"], - ["Variable", "od", "$odd"], - ["BoundText", " {{ item }} "] + [ + "ForLoopBlock", + "items.foo.bar", + "item.id" + ], + [ + "Variable", + "item", + "$implicit" + ], + [ + "Variable", + "$index", + "$index" + ], + [ + "Variable", + "$first", + "$first" + ], + [ + "Variable", + "$last", + "$last" + ], + [ + "Variable", + "$even", + "$even" + ], + [ + "Variable", + "$odd", + "$odd" + ], + [ + "Variable", + "$count", + "$count" + ], + [ + "Variable", + "idx", + "$index" + ], + [ + "Variable", + "f", + "$first" + ], + [ + "Variable", + "c", + "$count" + ], + [ + "Variable", + "l", + "$last" + ], + [ + "Variable", + "ev", + "$even" + ], + [ + "Variable", + "od", + "$odd" + ], + [ + "BoundText", + " {{ item }} " + ] ], "ignore_error": false } @@ -2345,28 +4022,109 @@ "type": "ExpectFromHtml", "input": "\n @for (item of items.foo.bar; track item.id) {\n {{ item }}\n\n
    \n @for (subitem of item.items; track subitem.id) {

    {{subitem}}

    }\n
    \n } @empty {\n There were no items in the list.\n }\n ", "expected": [ - ["ForLoopBlock", "items.foo.bar", "item.id"], - ["Variable", "item", "$implicit"], - ["Variable", "$index", "$index"], - ["Variable", "$first", "$first"], - ["Variable", "$last", "$last"], - ["Variable", "$even", "$even"], - ["Variable", "$odd", "$odd"], - ["Variable", "$count", "$count"], - ["BoundText", " {{ item }} "], - ["Element", "div"], - ["ForLoopBlock", "item.items", "subitem.id"], - ["Variable", "subitem", "$implicit"], - ["Variable", "$index", "$index"], - ["Variable", "$first", "$first"], - ["Variable", "$last", "$last"], - ["Variable", "$even", "$even"], - ["Variable", "$odd", "$odd"], - ["Variable", "$count", "$count"], - ["Element", "h1"], - ["BoundText", "{{ subitem }}"], - ["ForLoopBlockEmpty"], - ["Text", " There were no items in the list. "] + [ + "ForLoopBlock", + "items.foo.bar", + "item.id" + ], + [ + "Variable", + "item", + "$implicit" + ], + [ + "Variable", + "$index", + "$index" + ], + [ + "Variable", + "$first", + "$first" + ], + [ + "Variable", + "$last", + "$last" + ], + [ + "Variable", + "$even", + "$even" + ], + [ + "Variable", + "$odd", + "$odd" + ], + [ + "Variable", + "$count", + "$count" + ], + [ + "BoundText", + " {{ item }} " + ], + [ + "Element", + "div" + ], + [ + "ForLoopBlock", + "item.items", + "subitem.id" + ], + [ + "Variable", + "subitem", + "$implicit" + ], + [ + "Variable", + "$index", + "$index" + ], + [ + "Variable", + "$first", + "$first" + ], + [ + "Variable", + "$last", + "$last" + ], + [ + "Variable", + "$even", + "$even" + ], + [ + "Variable", + "$odd", + "$odd" + ], + [ + "Variable", + "$count", + "$count" + ], + [ + "Element", + "h1" + ], + [ + "BoundText", + "{{ subitem }}" + ], + [ + "ForLoopBlockEmpty" + ], + [ + "Text", + " There were no items in the list. " + ] ], "ignore_error": false } @@ -2380,15 +4138,50 @@ "type": "ExpectFromHtml", "input": "\n @for (item of items.foo.bar; track trackBy(item.id, 123)) {\n {{ item }}\n }\n ", "expected": [ - ["ForLoopBlock", "items.foo.bar", "trackBy(item.id, 123)"], - ["Variable", "item", "$implicit"], - ["Variable", "$index", "$index"], - ["Variable", "$first", "$first"], - ["Variable", "$last", "$last"], - ["Variable", "$even", "$even"], - ["Variable", "$odd", "$odd"], - ["Variable", "$count", "$count"], - ["BoundText", " {{ item }} "] + [ + "ForLoopBlock", + "items.foo.bar", + "trackBy(item.id, 123)" + ], + [ + "Variable", + "item", + "$implicit" + ], + [ + "Variable", + "$index", + "$index" + ], + [ + "Variable", + "$first", + "$first" + ], + [ + "Variable", + "$last", + "$last" + ], + [ + "Variable", + "$even", + "$even" + ], + [ + "Variable", + "$odd", + "$odd" + ], + [ + "Variable", + "$count", + "$count" + ], + [ + "BoundText", + " {{ item }} " + ] ], "ignore_error": false } @@ -2420,15 +4213,50 @@ "type": "ExpectFromHtml", "input": "\n @for (item of [\n { id: 1 },\n { id: 2 }\n ]; track item.id) {\n {{ item }}\n }\n ", "expected": [ - ["ForLoopBlock", "[{id: 1}, {id: 2}]", "item.id"], - ["Variable", "item", "$implicit"], - ["Variable", "$index", "$index"], - ["Variable", "$first", "$first"], - ["Variable", "$last", "$last"], - ["Variable", "$even", "$even"], - ["Variable", "$odd", "$odd"], - ["Variable", "$count", "$count"], - ["BoundText", " {{ item }} "] + [ + "ForLoopBlock", + "[{id: 1}, {id: 2}]", + "item.id" + ], + [ + "Variable", + "item", + "$implicit" + ], + [ + "Variable", + "$index", + "$index" + ], + [ + "Variable", + "$first", + "$first" + ], + [ + "Variable", + "$last", + "$last" + ], + [ + "Variable", + "$even", + "$even" + ], + [ + "Variable", + "$odd", + "$odd" + ], + [ + "Variable", + "$count", + "$count" + ], + [ + "BoundText", + " {{ item }} " + ] ], "ignore_error": false } @@ -2525,14 +4353,38 @@ "type": "ExpectFromHtml", "input": "\n @if (cond.expr; as foo) {\n Main case was true!\n } @else if (other.expr) {\n Extra case was true!\n } @else {\n False case!\n }\n ", "expected": [ - ["IfBlock"], - ["IfBlockBranch", "cond.expr"], - ["Variable", "foo", "foo"], - ["Text", " Main case was true! "], - ["IfBlockBranch", "other.expr"], - ["Text", " Extra case was true! "], - ["IfBlockBranch", null], - ["Text", " False case! "] + [ + "IfBlock" + ], + [ + "IfBlockBranch", + "cond.expr" + ], + [ + "Variable", + "foo", + "foo" + ], + [ + "Text", + " Main case was true! " + ], + [ + "IfBlockBranch", + "other.expr" + ], + [ + "Text", + " Extra case was true! " + ], + [ + "IfBlockBranch", + null + ], + [ + "Text", + " False case! " + ] ], "ignore_error": false } @@ -2546,13 +4398,33 @@ "type": "ExpectFromHtml", "input": "\n @if ((cond.expr)) {\n Main case was true!\n } @else if ((other.expr)) {\n Extra case was true!\n } @else {\n False case!\n }\n ", "expected": [ - ["IfBlock"], - ["IfBlockBranch", "(cond.expr)"], - ["Text", " Main case was true! "], - ["IfBlockBranch", "(other.expr)"], - ["Text", " Extra case was true! "], - ["IfBlockBranch", null], - ["Text", " False case! "] + [ + "IfBlock" + ], + [ + "IfBlockBranch", + "(cond.expr)" + ], + [ + "Text", + " Main case was true! " + ], + [ + "IfBlockBranch", + "(other.expr)" + ], + [ + "Text", + " Extra case was true! " + ], + [ + "IfBlockBranch", + null + ], + [ + "Text", + " False case! " + ] ], "ignore_error": false } @@ -2566,23 +4438,71 @@ "type": "ExpectFromHtml", "input": "\n @if (a) {\n @if (a1) {\n a1\n } @else {\n b1\n }\n }\n @else if (b) {\n b\n } @else {\n @if (c1) {\n c1\n } @else if (c2) {\n c2\n } @else {\n c3\n }\n }\n ", "expected": [ - ["IfBlock"], - ["IfBlockBranch", "a"], - ["IfBlock"], - ["IfBlockBranch", "a1"], - ["Text", " a1 "], - ["IfBlockBranch", null], - ["Text", " b1 "], - ["IfBlockBranch", "b"], - ["Text", " b "], - ["IfBlockBranch", null], - ["IfBlock"], - ["IfBlockBranch", "c1"], - ["Text", " c1 "], - ["IfBlockBranch", "c2"], - ["Text", " c2 "], - ["IfBlockBranch", null], - ["Text", " c3 "] + [ + "IfBlock" + ], + [ + "IfBlockBranch", + "a" + ], + [ + "IfBlock" + ], + [ + "IfBlockBranch", + "a1" + ], + [ + "Text", + " a1 " + ], + [ + "IfBlockBranch", + null + ], + [ + "Text", + " b1 " + ], + [ + "IfBlockBranch", + "b" + ], + [ + "Text", + " b " + ], + [ + "IfBlockBranch", + null + ], + [ + "IfBlock" + ], + [ + "IfBlockBranch", + "c1" + ], + [ + "Text", + " c1 " + ], + [ + "IfBlockBranch", + "c2" + ], + [ + "Text", + " c2 " + ], + [ + "IfBlockBranch", + null + ], + [ + "Text", + " c3 " + ] ], "ignore_error": false } @@ -2596,12 +4516,30 @@ "type": "ExpectFromHtml", "input": "\n @if (cond.expr; as foo) {\n Main case was true!\n } @else if (other.expr) {\n Other case was true!\n }\n ", "expected": [ - ["IfBlock"], - ["IfBlockBranch", "cond.expr"], - ["Variable", "foo", "foo"], - ["Text", " Main case was true! "], - ["IfBlockBranch", "other.expr"], - ["Text", " Other case was true! "] + [ + "IfBlock" + ], + [ + "IfBlockBranch", + "cond.expr" + ], + [ + "Variable", + "foo", + "foo" + ], + [ + "Text", + " Main case was true! " + ], + [ + "IfBlockBranch", + "other.expr" + ], + [ + "Text", + " Other case was true! " + ] ], "ignore_error": false } @@ -2615,12 +4553,30 @@ "type": "ExpectFromHtml", "input": "\n @if (cond.expr; as foo) {\n Main case was true!\n } @else\tif (other.expr) {\n Other case was true!\n }\n ", "expected": [ - ["IfBlock"], - ["IfBlockBranch", "cond.expr"], - ["Variable", "foo", "foo"], - ["Text", " Main case was true! "], - ["IfBlockBranch", "other.expr"], - ["Text", " Other case was true! "] + [ + "IfBlock" + ], + [ + "IfBlockBranch", + "cond.expr" + ], + [ + "Variable", + "foo", + "foo" + ], + [ + "Text", + " Main case was true! " + ], + [ + "IfBlockBranch", + "other.expr" + ], + [ + "Text", + " Other case was true! " + ] ], "ignore_error": false } @@ -2634,14 +4590,38 @@ "type": "ExpectFromHtml", "input": "\n @if (cond.expr; as foo) {\n Main case was true!\n }\n \n @else if (other.expr) {\n Extra case was true!\n }\n \n @else {\n False case!\n }\n ", "expected": [ - ["IfBlock"], - ["IfBlockBranch", "cond.expr"], - ["Variable", "foo", "foo"], - ["Text", " Main case was true! "], - ["IfBlockBranch", "other.expr"], - ["Text", " Extra case was true! "], - ["IfBlockBranch", null], - ["Text", " False case! "] + [ + "IfBlock" + ], + [ + "IfBlockBranch", + "cond.expr" + ], + [ + "Variable", + "foo", + "foo" + ], + [ + "Text", + " Main case was true! " + ], + [ + "IfBlockBranch", + "other.expr" + ], + [ + "Text", + " Extra case was true! " + ], + [ + "IfBlockBranch", + null + ], + [ + "Text", + " False case! " + ] ], "ignore_error": false } @@ -2655,13 +4635,35 @@ "type": "ExpectFromHtml", "input": "\n @if (cond.expr; as foo) {\n Main case was true!\n } @else if (other.expr; as bar) {\n Other case was true!\n }\n ", "expected": [ - ["IfBlock"], - ["IfBlockBranch", "cond.expr"], - ["Variable", "foo", "foo"], - ["Text", " Main case was true! "], - ["IfBlockBranch", "other.expr"], - ["Variable", "bar", "bar"], - ["Text", " Other case was true! "] + [ + "IfBlock" + ], + [ + "IfBlockBranch", + "cond.expr" + ], + [ + "Variable", + "foo", + "foo" + ], + [ + "Text", + " Main case was true! " + ], + [ + "IfBlockBranch", + "other.expr" + ], + [ + "Variable", + "bar", + "bar" + ], + [ + "Text", + " Other case was true! " + ] ], "ignore_error": false } @@ -2680,7 +4682,13 @@ { "type": "ExpectFromHtml", "input": "@let foo = 123 + 456;", - "expected": [["LetDeclaration", "foo", "123 + 456"]], + "expected": [ + [ + "LetDeclaration", + "foo", + "123 + 456" + ] + ], "ignore_error": false } ] @@ -2703,9 +4711,19 @@ "type": "ExpectFromHtml", "input": "
    @let foo = 123;
    ", "expected": [ - ["Element", "div"], - ["TextAttribute", "ngNonBindable", ""], - ["Text", "@let foo = 123;"] + [ + "Element", + "div" + ], + [ + "TextAttribute", + "ngNonBindable", + "" + ], + [ + "Text", + "@let foo = 123;" + ] ], "ignore_error": false } diff --git a/crates/angular_conformance/fixtures/render3_style_parser_spec.json b/crates/angular_conformance/fixtures/render3_style_parser_spec.json index 9894156f6..b82513b09 100644 --- a/crates/angular_conformance/fixtures/render3_style_parser_spec.json +++ b/crates/angular_conformance/fixtures/render3_style_parser_spec.json @@ -1,6 +1,6 @@ { "name": "style_parser_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/render3/style_parser_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/render3/style_parser_spec.ts", "test_groups": [ { "name": "style parsing", @@ -16,7 +16,10 @@ { "type": "ParseStyle", "input": "content: \"foo\"", - "expected": ["content", "\"foo\""] + "expected": [ + "content", + "\"foo\"" + ] } ] }, @@ -27,7 +30,10 @@ { "type": "ParseStyle", "input": "width: \"1px\"", - "expected": ["width", "\"1px\""] + "expected": [ + "width", + "\"1px\"" + ] } ] } @@ -96,7 +102,14 @@ { "type": "ParseStyle", "input": "width:100px;height:200px;opacity:0", - "expected": ["width", "100px", "height", "200px", "opacity", "0"] + "expected": [ + "width", + "100px", + "height", + "200px", + "opacity", + "0" + ] } ] }, @@ -107,7 +120,12 @@ { "type": "ParseStyle", "input": "width:;height: ;", - "expected": ["width", "", "height", ""] + "expected": [ + "width", + "", + "height", + "" + ] } ] }, @@ -118,7 +136,14 @@ { "type": "ParseStyle", "input": "width :333px ; height:666px ; opacity: 0.5;", - "expected": ["width", "333px", "height", "666px", "opacity", "0.5"] + "expected": [ + "width", + "333px", + "height", + "666px", + "opacity", + "0.5" + ] } ] }, @@ -129,7 +154,12 @@ { "type": "ParseStyle", "input": "content: \"foo; man: guy\"; width: 100px", - "expected": ["content", "\"foo; man: guy\"", "width", "100px"] + "expected": [ + "content", + "\"foo; man: guy\"", + "width", + "100px" + ] } ] }, @@ -145,7 +175,10 @@ { "type": "ParseStyle", "input": "background-image: url(\"foo.jpg\")", - "expected": ["background-image", "url(\"foo.jpg\")"] + "expected": [ + "background-image", + "url(\"foo.jpg\")" + ] } ] }, @@ -156,7 +189,12 @@ { "type": "ParseStyle", "input": "color: rgba(calc(50 * 4), var(--cool), :5;); height: 100px;", - "expected": ["color", "rgba(calc(50 * 4), var(--cool), :5;)", "height", "100px"] + "expected": [ + "color", + "rgba(calc(50 * 4), var(--cool), :5;)", + "height", + "100px" + ] } ] }, @@ -167,7 +205,10 @@ { "type": "ParseStyle", "input": "borderWidth: 200px", - "expected": ["border-width", "200px"] + "expected": [ + "border-width", + "200px" + ] } ] } diff --git a/crates/angular_conformance/fixtures/render3_view_binding_spec.json b/crates/angular_conformance/fixtures/render3_view_binding_spec.json index 1b0ba4ad0..af4060aa1 100644 --- a/crates/angular_conformance/fixtures/render3_view_binding_spec.json +++ b/crates/angular_conformance/fixtures/render3_view_binding_spec.json @@ -1,6 +1,6 @@ { "name": "binding_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/render3/view/binding_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/render3/view/binding_spec.ts", "test_groups": [ { "name": "findMatchingDirectivesAndPipes", @@ -280,6 +280,52 @@ "assertions": [] } ] + }, + { + "name": "directive de-duplication", + "groups": [], + "tests": [ + { + "name": "should give precedence to the template-matched directive over a host-directive-based match", + "path": "t2 binding/directive de-duplication/should give precedence to the template-matched directive over a host-directive-based match", + "assertions": [] + }, + { + "name": "should de-duplicate directives that match multiple times as host directives", + "path": "t2 binding/directive de-duplication/should de-duplicate directives that match multiple times as host directives", + "assertions": [] + }, + { + "name": "should merge the `inputs` of duplicated host directives", + "path": "t2 binding/directive de-duplication/should merge the `inputs` of duplicated host directives", + "assertions": [] + }, + { + "name": "should merge the `outputs` of duplicated host directives", + "path": "t2 binding/directive de-duplication/should merge the `outputs` of duplicated host directives", + "assertions": [] + }, + { + "name": "should capture conflicting input bindings in host directives", + "path": "t2 binding/directive de-duplication/should capture conflicting input bindings in host directives", + "assertions": [] + }, + { + "name": "should not capture conflicting input bindings if they are equivalent", + "path": "t2 binding/directive de-duplication/should not capture conflicting input bindings if they are equivalent", + "assertions": [] + }, + { + "name": "should capture conflicting output bindings in host directives", + "path": "t2 binding/directive de-duplication/should capture conflicting output bindings in host directives", + "assertions": [] + }, + { + "name": "should not capture conflicting output bindings if they are equivalent", + "path": "t2 binding/directive de-duplication/should not capture conflicting output bindings if they are equivalent", + "assertions": [] + } + ] } ], "tests": [ diff --git a/crates/angular_conformance/fixtures/render3_view_i18n_spec.json b/crates/angular_conformance/fixtures/render3_view_i18n_spec.json index befe0e926..ab6a2d203 100644 --- a/crates/angular_conformance/fixtures/render3_view_i18n_spec.json +++ b/crates/angular_conformance/fixtures/render3_view_i18n_spec.json @@ -1,6 +1,6 @@ { "name": "i18n_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/render3/view/i18n_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/render3/view/i18n_spec.ts", "test_groups": [ { "name": "Utils", diff --git a/crates/angular_conformance/fixtures/render3_view_parse_template_options_spec.json b/crates/angular_conformance/fixtures/render3_view_parse_template_options_spec.json index 6c30a0b3f..8b13ffe94 100644 --- a/crates/angular_conformance/fixtures/render3_view_parse_template_options_spec.json +++ b/crates/angular_conformance/fixtures/render3_view_parse_template_options_spec.json @@ -1,6 +1,6 @@ { "name": "parse_template_options_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/render3/view/parse_template_options_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/render3/view/parse_template_options_spec.ts", "test_groups": [ { "name": "collectCommentNodes", diff --git a/crates/angular_conformance/fixtures/schema_dom_element_schema_registry_spec.json b/crates/angular_conformance/fixtures/schema_dom_element_schema_registry_spec.json index f5fbb6522..a825e3d68 100644 --- a/crates/angular_conformance/fixtures/schema_dom_element_schema_registry_spec.json +++ b/crates/angular_conformance/fixtures/schema_dom_element_schema_registry_spec.json @@ -1,6 +1,6 @@ { "name": "dom_element_schema_registry_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/schema/dom_element_schema_registry_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/schema/dom_element_schema_registry_spec.ts", "test_groups": [ { "name": "DOMElementSchema", @@ -21,6 +21,27 @@ } ] }, + { + "name": "Custom XML / XHTML namespaces", + "groups": [], + "tests": [ + { + "name": "should support elements with custom namespaces", + "path": "DOMElementSchema/Custom XML / XHTML namespaces/should support elements with custom namespaces", + "assertions": [] + }, + { + "name": "should support properties on custom namespaced elements", + "path": "DOMElementSchema/Custom XML / XHTML namespaces/should support properties on custom namespaced elements", + "assertions": [] + }, + { + "name": "should return correct security contexts for custom namespaced elements", + "path": "DOMElementSchema/Custom XML / XHTML namespaces/should return correct security contexts for custom namespaced elements", + "assertions": [] + } + ] + }, { "name": "normalizeAnimationStyleProperty", "groups": [], @@ -150,11 +171,6 @@ "path": "DOMElementSchema/should check security contexts for attributes", "assertions": [] }, - { - "name": "generate a new schema", - "path": "DOMElementSchema/generate a new schema", - "assertions": [] - }, { "name": "should support aria property if attribute is also supported", "path": "DOMElementSchema/should support aria property if attribute is also supported", diff --git a/crates/angular_conformance/fixtures/schema_trusted_types_sinks_spec.json b/crates/angular_conformance/fixtures/schema_trusted_types_sinks_spec.json index 837e0fb03..be9e7c9ab 100644 --- a/crates/angular_conformance/fixtures/schema_trusted_types_sinks_spec.json +++ b/crates/angular_conformance/fixtures/schema_trusted_types_sinks_spec.json @@ -1,6 +1,6 @@ { "name": "trusted_types_sinks_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/schema/trusted_types_sinks_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/schema/trusted_types_sinks_spec.ts", "test_groups": [ { "name": "isTrustedTypesSink", diff --git a/crates/angular_conformance/fixtures/selector_selector_spec.json b/crates/angular_conformance/fixtures/selector_selector_spec.json index 2f9fb9207..cd971ba5a 100644 --- a/crates/angular_conformance/fixtures/selector_selector_spec.json +++ b/crates/angular_conformance/fixtures/selector_selector_spec.json @@ -1,6 +1,6 @@ { "name": "selector_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/selector/selector_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/selector/selector_spec.ts", "test_groups": [ { "name": "SelectorMatcher", diff --git a/crates/angular_conformance/fixtures/shadow_css_at_rules_spec.json b/crates/angular_conformance/fixtures/shadow_css_at_rules_spec.json index 911889638..181ae5ba4 100644 --- a/crates/angular_conformance/fixtures/shadow_css_at_rules_spec.json +++ b/crates/angular_conformance/fixtures/shadow_css_at_rules_spec.json @@ -1,6 +1,6 @@ { "name": "at_rules_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/at_rules_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/at_rules_spec.ts", "test_groups": [ { "name": "ShadowCss, at-rules", diff --git a/crates/angular_conformance/fixtures/shadow_css_host_and_host_context_spec.json b/crates/angular_conformance/fixtures/shadow_css_host_and_host_context_spec.json index e7973930b..1c8ff13ce 100644 --- a/crates/angular_conformance/fixtures/shadow_css_host_and_host_context_spec.json +++ b/crates/angular_conformance/fixtures/shadow_css_host_and_host_context_spec.json @@ -1,6 +1,6 @@ { "name": "host_and_host_context_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/host_and_host_context_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/host_and_host_context_spec.ts", "test_groups": [ { "name": "ShadowCss, :host and :host-context", @@ -87,28 +87,6 @@ } ] }, - { - "name": "should handle multiple tag selectors", - "path": "ShadowCss, :host and :host-context/:host/should handle multiple tag selectors", - "assertions": [ - { - "type": "ShimCss", - "input": ":host(ul,li) {}", - "content_attr": "contenta", - "host_attr": "a-host", - "expected": "ul[a-host], li[a-host] {}", - "normalized": true - }, - { - "type": "ShimCss", - "input": ":host(ul,li) > .z {}", - "content_attr": "contenta", - "host_attr": "a-host", - "expected": "ul[a-host] > .z[contenta], li[a-host] > .z[contenta] {}", - "normalized": true - } - ] - }, { "name": "should handle compound class selectors", "path": "ShadowCss, :host and :host-context/:host/should handle compound class selectors", @@ -124,37 +102,23 @@ ] }, { - "name": "should handle multiple class selectors", - "path": "ShadowCss, :host and :host-context/:host/should handle multiple class selectors", + "name": "should ignore :host with a selector list containing top-level commas", + "path": "ShadowCss, :host and :host-context/:host/should ignore :host with a selector list containing top-level commas", "assertions": [ { "type": "ShimCss", - "input": ":host(.x,.y) {}", + "input": ":host(.a, .b) {}", "content_attr": "contenta", "host_attr": "a-host", - "expected": ".x[a-host], .y[a-host] {}", + "expected": "[contenta]:host(.a, .b) {}", "normalized": true }, { "type": "ShimCss", - "input": ":host(.x,.y) > .z {}", - "content_attr": "contenta", - "host_attr": "a-host", - "expected": ".x[a-host] > .z[contenta], .y[a-host] > .z[contenta] {}", - "normalized": true - } - ] - }, - { - "name": "should handle multiple attribute selectors", - "path": "ShadowCss, :host and :host-context/:host/should handle multiple attribute selectors", - "assertions": [ - { - "type": "ShimCss", - "input": ":host([a=\"b\"],[c=d]) {}", + "input": ".outer :host(.a, .b) .inner {}", "content_attr": "contenta", "host_attr": "a-host", - "expected": "[a=\"b\"][a-host], [c=d][a-host] {}", + "expected": ".outer[contenta] [contenta]:host(.a, .b) .inner[contenta] {}", "normalized": true } ] @@ -546,7 +510,7 @@ "input": ":host-context .inner {}", "content_attr": "contenta", "host_attr": "a-host", - "expected": "[a-host] .inner[contenta] {}", + "expected": "[contenta]:host-context .inner[contenta] {}", "normalized": true }, { @@ -554,7 +518,7 @@ "input": ":host-context() .inner {}", "content_attr": "contenta", "host_attr": "a-host", - "expected": "[a-host] .inner[contenta] {}", + "expected": "[contenta]:host-context() .inner[contenta] {}", "normalized": true }, { @@ -562,7 +526,7 @@ "input": ":host-context :host-context(.a) {}", "content_attr": "contenta", "host_attr": "host-a", - "expected": ".a[host-a], .a [host-a] {}", + "expected": ":host-context .a[host-a], .a [host-a] {}", "normalized": true } ] diff --git a/crates/angular_conformance/fixtures/shadow_css_keyframes_spec.json b/crates/angular_conformance/fixtures/shadow_css_keyframes_spec.json index c40b48732..6fea6b244 100644 --- a/crates/angular_conformance/fixtures/shadow_css_keyframes_spec.json +++ b/crates/angular_conformance/fixtures/shadow_css_keyframes_spec.json @@ -1,6 +1,6 @@ { "name": "keyframes_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/keyframes_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/keyframes_spec.ts", "test_groups": [ { "name": "ShadowCss, keyframes and animations", @@ -51,11 +51,6 @@ "path": "ShadowCss, keyframes and animations/should handle (scope or not) animation definition containing some names which do not have a preceding space", "assertions": [] }, - { - "name": "should handle (scope or not) animation definitions preceded by an erroneous comma", - "path": "ShadowCss, keyframes and animations/should handle (scope or not) animation definitions preceded by an erroneous comma", - "assertions": [] - }, { "name": "should handle (scope or not) multiple animation definitions in a single declaration", "path": "ShadowCss, keyframes and animations/should handle (scope or not) multiple animation definitions in a single declaration", diff --git a/crates/angular_conformance/fixtures/shadow_css_ng_deep_spec.json b/crates/angular_conformance/fixtures/shadow_css_ng_deep_spec.json index 221ebc19e..a58836a98 100644 --- a/crates/angular_conformance/fixtures/shadow_css_ng_deep_spec.json +++ b/crates/angular_conformance/fixtures/shadow_css_ng_deep_spec.json @@ -1,6 +1,6 @@ { "name": "ng_deep_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/ng_deep_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/ng_deep_spec.ts", "test_groups": [ { "name": "ShadowCss, ng-deep", diff --git a/crates/angular_conformance/fixtures/shadow_css_polyfills_spec.json b/crates/angular_conformance/fixtures/shadow_css_polyfills_spec.json deleted file mode 100644 index 80e62fa73..000000000 --- a/crates/angular_conformance/fixtures/shadow_css_polyfills_spec.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "polyfills_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/polyfills_spec.ts", - "test_groups": [ - { - "name": "ShadowCss, polyfills", - "groups": [], - "tests": [ - { - "name": "should support polyfill-next-selector", - "path": "ShadowCss, polyfills/should support polyfill-next-selector", - "assertions": [] - }, - { - "name": "should support polyfill-unscoped-rule", - "path": "ShadowCss, polyfills/should support polyfill-unscoped-rule", - "assertions": [] - }, - { - "name": "should support multiple instances polyfill-unscoped-rule", - "path": "ShadowCss, polyfills/should support multiple instances polyfill-unscoped-rule", - "assertions": [] - }, - { - "name": "should support polyfill-rule", - "path": "ShadowCss, polyfills/should support polyfill-rule", - "assertions": [] - } - ] - } - ] -} diff --git a/crates/angular_conformance/fixtures/shadow_css_process_rules_spec.json b/crates/angular_conformance/fixtures/shadow_css_process_rules_spec.json index 967b81995..600c98bb7 100644 --- a/crates/angular_conformance/fixtures/shadow_css_process_rules_spec.json +++ b/crates/angular_conformance/fixtures/shadow_css_process_rules_spec.json @@ -1,6 +1,6 @@ { "name": "process_rules_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/process_rules_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/process_rules_spec.ts", "test_groups": [ { "name": "ShadowCss, processRules", diff --git a/crates/angular_conformance/fixtures/shadow_css_repeat_groups_spec.json b/crates/angular_conformance/fixtures/shadow_css_repeat_groups_spec.json index c58581ea9..2cd669a09 100644 --- a/crates/angular_conformance/fixtures/shadow_css_repeat_groups_spec.json +++ b/crates/angular_conformance/fixtures/shadow_css_repeat_groups_spec.json @@ -1,6 +1,6 @@ { "name": "repeat_groups_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/repeat_groups_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/repeat_groups_spec.ts", "test_groups": [ { "name": "ShadowCss, repeatGroups()", diff --git a/crates/angular_conformance/fixtures/shadow_css_shadow_css_spec.json b/crates/angular_conformance/fixtures/shadow_css_shadow_css_spec.json index dede81855..1d92513e8 100644 --- a/crates/angular_conformance/fixtures/shadow_css_shadow_css_spec.json +++ b/crates/angular_conformance/fixtures/shadow_css_shadow_css_spec.json @@ -1,6 +1,6 @@ { "name": "shadow_css_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/shadow_css_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/shadow_css/shadow_css_spec.ts", "test_groups": [ { "name": "ShadowCss", @@ -10,43 +10,43 @@ "groups": [], "tests": [ { - "name": "should replace multiline comments with newline", - "path": "ShadowCss/comments/should replace multiline comments with newline", + "name": "should remove inline comments without adding extra lines", + "path": "ShadowCss/comments/should remove inline comments without adding extra lines", "assertions": [ { "type": "ShimCss", - "input": "/* b {c} */ b {c}", + "input": "/* b {} */ b {}", "content_attr": "contenta", "host_attr": null, - "expected": "\n b[contenta] {c}", + "expected": " b[contenta] {}", "normalized": false } ] }, { - "name": "should replace multiline comments with newline in the original position", - "path": "ShadowCss/comments/should replace multiline comments with newline in the original position", + "name": "should preserve internal newlines from multiline comments", + "path": "ShadowCss/comments/should preserve internal newlines from multiline comments", "assertions": [ { "type": "ShimCss", - "input": "/* b {c}\n */ b {c}", + "input": "/* b {}\n */ b {}", "content_attr": "contenta", "host_attr": null, - "expected": "\n\n b[contenta] {c}", + "expected": "\n b[contenta] {}", "normalized": false } ] }, { - "name": "should replace comments with newline in the original position", - "path": "ShadowCss/comments/should replace comments with newline in the original position", + "name": "should remove multiple inline comments without adding extra lines", + "path": "ShadowCss/comments/should remove multiple inline comments without adding extra lines", "assertions": [ { "type": "ShimCss", - "input": "/* b {c} */ b {c} /* a {c} */ a {c}", + "input": "/* b {} */ b {} /* a {} */ a {}", "content_attr": "contenta", "host_attr": null, - "expected": "\n b[contenta] {c} \n a[contenta] {c}", + "expected": " b[contenta] {} a[contenta] {}", "normalized": false } ] @@ -57,18 +57,18 @@ "assertions": [ { "type": "ShimCss", - "input": "b {c} /*# sourceMappingURL=data:x */", + "input": "b {} /*# sourceMappingURL=data:x */", "content_attr": "contenta", "host_attr": null, - "expected": "b[contenta] {c} /*# sourceMappingURL=data:x */", + "expected": "b[contenta] {} /*# sourceMappingURL=data:x */", "normalized": false }, { "type": "ShimCss", - "input": "b {c}/* #sourceMappingURL=data:x */", + "input": "b {}/* #sourceMappingURL=data:x */", "content_attr": "contenta", "host_attr": null, - "expected": "b[contenta] {c}/* #sourceMappingURL=data:x */", + "expected": "b[contenta] {}/* #sourceMappingURL=data:x */", "normalized": false } ] @@ -79,10 +79,10 @@ "assertions": [ { "type": "ShimCss", - "input": "/* comment 1 */ /* comment 2 */ b {c}", + "input": "/* comment 1 */ /* comment 2 */ b {}", "content_attr": "contenta", "host_attr": null, - "expected": "\n \n b[contenta] {c}", + "expected": " b[contenta] {}", "normalized": false } ] @@ -934,11 +934,6 @@ } ] }, - { - "name": "should handle ::shadow", - "path": "ShadowCss/should handle ::shadow", - "assertions": [] - }, { "name": "should leave calc() unchanged", "path": "ShadowCss/should leave calc() unchanged", diff --git a/crates/angular_conformance/fixtures/style_url_resolver_spec.json b/crates/angular_conformance/fixtures/style_url_resolver_spec.json index cdd85ee34..81ac58c6e 100644 --- a/crates/angular_conformance/fixtures/style_url_resolver_spec.json +++ b/crates/angular_conformance/fixtures/style_url_resolver_spec.json @@ -1,6 +1,6 @@ { "name": "style_url_resolver_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/style_url_resolver_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/style_url_resolver_spec.ts", "test_groups": [ { "name": "isStyleUrlResolvable", diff --git a/crates/angular_conformance/fixtures/util_spec.json b/crates/angular_conformance/fixtures/util_spec.json index 564faad32..55e65f022 100644 --- a/crates/angular_conformance/fixtures/util_spec.json +++ b/crates/angular_conformance/fixtures/util_spec.json @@ -1,6 +1,6 @@ { "name": "util_spec.ts", - "file_path": "/Users/brooklyn/workspace/github/oxc/crates/oxc_angular_compiler/angular/packages/compiler/test/util_spec.ts", + "file_path": "crates/oxc_angular_compiler/angular/packages/compiler/test/util_spec.ts", "test_groups": [ { "name": "util", diff --git a/crates/angular_conformance/snapshots/angular.snap.md b/crates/angular_conformance/snapshots/angular.snap.md index 5147021cc..fd9fa597f 100644 --- a/crates/angular_conformance/snapshots/angular.snap.md +++ b/crates/angular_conformance/snapshots/angular.snap.md @@ -7,13 +7,599 @@ | ast_serializer | 6 | 0 | 0 | 0 | 6 | 100.0% | | ast_spans | 55 | 0 | 0 | 0 | 55 | 100.0% | | expression_lexer | 137 | 0 | 0 | 0 | 137 | 100.0% | -| expression_parser | 267 | 0 | 0 | 0 | 267 | 100.0% | +| expression_parser | 267 | 3 | 0 | 0 | 270 | 98.9% | | expression_serializer | 38 | 0 | 0 | 0 | 38 | 100.0% | -| html_lexer | 284 | 0 | 0 | 0 | 284 | 100.0% | -| html_parser | 85 | 0 | 0 | 0 | 85 | 100.0% | +| html_lexer | 286 | 3 | 0 | 0 | 289 | 99.0% | +| html_parser | 85 | 2 | 0 | 0 | 87 | 97.7% | | html_whitespace | 21 | 0 | 0 | 0 | 21 | 100.0% | -| r3_transform | 172 | 0 | 0 | 0 | 172 | 100.0% | -| shadow_css | 172 | 0 | 0 | 0 | 172 | 100.0% | +| r3_transform | 165 | 12 | 0 | 0 | 177 | 93.2% | +| shadow_css | 160 | 9 | 0 | 0 | 169 | 94.7% | | style_parser | 15 | 0 | 0 | 0 | 15 | 100.0% | -| **Total** | **1252** | **0** | **0** | **0** | **1252** | **100.0%** | +| **Total** | **1235** | **29** | **0** | **0** | **1264** | **97.7%** | + +## Failed Tests + +### expression_parser + +#### should throw on invalid in expressions: ExpectActionError { input: "in", error_contains: "Unexpected token in" } +Path: `parser/parseAction/should throw on invalid in expressions` + +**Expected:** +``` +Error containing: Unexpected token in +``` + +**Actual:** +``` +No errors +``` + +#### should throw on invalid in expressions: ExpectActionError { input: "in foo", error_contains: "Unexpected token in" } +Path: `parser/parseAction/should throw on invalid in expressions` + +**Expected:** +``` +Error containing: Unexpected token in +``` + +**Actual:** +``` +Errors: ["Unexpected token 'foo' at column 4 in [in foo]"] +``` + +#### should throw on invalid in expressions: ExpectActionError { input: "'foo' in", error_contains: "Unexpected end of expression: 'foo' in at the end of the expression ['foo' in]" } +Path: `parser/parseAction/should throw on invalid in expressions` + +**Expected:** +``` +Error containing: Unexpected end of expression: 'foo' in at the end of the expression ['foo' in] +``` + +**Actual:** +``` +No errors +``` + +### html_lexer + +#### should parse @default never;: HtmlLexerTest { input: "@default never;", test_type: HumanizeParts, expected: [Array [String("TokenType.BLOCK_OPEN_START"), String("default never")], Array [String("TokenType.BLOCK_OPEN_END")], Array [String("TokenType.BLOCK_CLOSE")], Array [String("TokenType.EOF")]], options: None } +Path: `HtmlLexer/blocks/should parse @default never;` + +**Expected:** +``` +4 tokens +``` + +**Actual:** +``` +3 tokens: [Array [String("TokenType.INCOMPLETE_BLOCK_OPEN"), String("default never")], Array [String("TokenType.TEXT"), String(";")], Array [String("TokenType.EOF")]] +``` + +#### should parse @default never(expr);: HtmlLexerTest { input: "@default never(expr);", test_type: HumanizeParts, expected: [Array [String("TokenType.BLOCK_OPEN_START"), String("default never")], Array [String("TokenType.BLOCK_PARAMETER"), String("expr")], Array [String("TokenType.BLOCK_OPEN_END")], Array [String("TokenType.BLOCK_CLOSE")], Array [String("TokenType.EOF")]], options: None } +Path: `HtmlLexer/blocks/should parse @default never(expr);` + +**Expected:** +``` +5 tokens +``` + +**Actual:** +``` +4 tokens: [Array [String("TokenType.INCOMPLETE_BLOCK_OPEN"), String("default never")], Array [String("TokenType.BLOCK_PARAMETER"), String("expr")], Array [String("TokenType.TEXT"), String(";")], Array [String("TokenType.EOF")]] +``` + +#### should parse @default never ;: HtmlLexerTest { input: "@default never ;", test_type: HumanizeParts, expected: [Array [String("TokenType.BLOCK_OPEN_START"), String("default never")], Array [String("TokenType.BLOCK_OPEN_END")], Array [String("TokenType.BLOCK_CLOSE")], Array [String("TokenType.EOF")]], options: None } +Path: `HtmlLexer/blocks/should parse @default never ;` + +**Expected:** +``` +4 tokens +``` + +**Actual:** +``` +3 tokens: [Array [String("TokenType.INCOMPLETE_BLOCK_OPEN"), String("default never")], Array [String("TokenType.TEXT"), String(";")], Array [String("TokenType.EOF")]] +``` + +### html_parser + +#### should parse exhaustive default checks in a switch block: HumanizeDom { input: "@switch (expr) {@case ('foo') {} @default never;}", expected: [Array [String("html.Block"), String("switch"), Number(0.0)], Array [String("html.BlockParameter"), String("expr")], Array [String("html.Block"), String("case"), Number(1.0)], Array [String("html.BlockParameter"), String("'foo'")], Array [String("html.Text"), String(" "), Number(1.0), Array [String(" ")]], Array [String("html.Block"), String("default never"), Number(1.0)]] } +Path: `HtmlParser/parse/blocks/should parse exhaustive default checks in a switch block` + +**Expected:** +``` +[Array [String("html.Block"), String("switch"), Number(0.0)], Array [String("html.BlockParameter"), String("expr")], Array [String("html.Block"), String("case"), Number(1.0)], Array [String("html.BlockParameter"), String("'foo'")], Array [String("html.Text"), String(" "), Number(1.0), Array [String(" ")]], Array [String("html.Block"), String("default never"), Number(1.0)]] +``` + +**Actual:** +``` +[Array [String("html.Block"), String("switch"), Number(0)], Array [String("html.BlockParameter"), String("expr")], Array [String("html.Block"), String("case"), Number(1)], Array [String("html.BlockParameter"), String("'foo'")], Array [String("html.Text"), String(" "), Number(1), Array [String(" ")]], Array [String("html.Text"), String(";"), Number(1), Array [String(";")]]] +``` + +#### should store the source location of a @let declaration: HumanizeDomSourceSpans { input: "@let foo = 123 + 456;", expected: [Array [String("html.LetDeclaration"), String("foo"), String("123 + 456"), String("@let foo = 123 + 456;"), String("foo"), String("123 + 456")]], options: None } +Path: `HtmlParser/parse/let declaration/should store the source location of a @let declaration` + +**Expected:** +``` +[Array [String("html.LetDeclaration"), String("foo"), String("123 + 456"), String("@let foo = 123 + 456;"), String("foo"), String("123 + 456")]] +``` + +**Actual:** +``` +[Array [String("html.LetDeclaration"), String("foo"), String("123 + 456"), String("@let foo = 123 + 456"), String("foo"), String("123 + 456")]] +``` + +### r3_transform + +#### is correct for bound properties via data-: ExpectFromHtml { input: "
    ", expected: [Array [String("Element"), String("
    "), String("
    "), String("
    ")], Array [String("BoundAttribute"), String("data-prop=\"{{v}}\""), String("data-prop"), String("{{v}}")]], ignore_error: false } +Path: `R3 AST source spans/bound attributes/is correct for bound properties via data-` + +**Expected:** +``` +[Element,
    ,
    ,
    ] +[BoundAttribute, data-prop="{{v}}", data-prop, {{v}}] +``` + +**Actual:** +``` +[Element,
    ,
    ,
    ] +[BoundAttribute, data-prop="{{v}}", prop, {{v}}] +``` + +**Diff:** +```diff + [Element,
    ,
    ,
    ] +-[BoundAttribute, data-prop="{{v}}", data-prop, {{v}}] ++[BoundAttribute, data-prop="{{v}}", prop, {{v}}] + +``` + +#### is correct for data-ref-... attribute: ExpectFromHtml { input: "", expected: [Array [String("Template"), String(""), String(""), String("")], Array [String("TextAttribute"), String("data-ref-a"), String("data-ref-a"), String("")]], ignore_error: false } +Path: `R3 AST source spans/templates/is correct for data-ref-... attribute` + +**Expected:** +``` +[Template, , , ] +[TextAttribute, data-ref-a, data-ref-a, ] +``` + +**Actual:** +``` +[Template, , , ] +[Reference, data-ref-a, a, ] +``` + +**Diff:** +```diff + [Template, , , ] +-[TextAttribute, data-ref-a, data-ref-a, ] ++[Reference, data-ref-a, a, ] + +``` + +#### is correct for data-let-... attribute: ExpectFromHtml { input: "", expected: [Array [String("Template"), String(""), String(""), String("")], Array [String("TextAttribute"), String("data-let-a=\"b\""), String("data-let-a"), String("b")]], ignore_error: false } +Path: `R3 AST source spans/templates/is correct for data-let-... attribute` + +**Expected:** +``` +[Template, , , ] +[TextAttribute, data-let-a="b", data-let-a, b] +``` + +**Actual:** +``` +[Template, , , ] +[Variable, data-let-a="b", a, b] +``` + +**Diff:** +```diff + [Template, , , ] +-[TextAttribute, data-let-a="b", data-let-a, b] ++[Variable, data-let-a="b", a, b] + +``` + +#### is correct for text attribute via data-on-: ExpectFromHtml { input: "
    ", expected: [Array [String("Element"), String("
    "), String("
    "), String("
    ")], Array [String("TextAttribute"), String("data-on-event=\"v\""), String("data-on-event"), String("v")]], ignore_error: false } +Path: `R3 AST source spans/events/is correct for text attribute via data-on-` + +**Expected:** +``` +[Element,
    ,
    ,
    ] +[TextAttribute, data-on-event="v", data-on-event, v] +``` + +**Actual:** +``` +[Element,
    ,
    ,
    ] +[BoundEvent, data-on-event="v", event, v] +``` + +**Diff:** +```diff + [Element,
    ,
    ,
    ] +-[TextAttribute, data-on-event="v", data-on-event, v] ++[BoundEvent, data-on-event="v", event, v] + +``` + +#### is correct for TextAttribute and properties via data-bindon-: ExpectFromHtml { input: "
    ", expected: [Array [String("Element"), String("
    "), String("
    "), String("
    ")], Array [String("TextAttribute"), String("data-bindon-prop=\"v\""), String("data-bindon-prop"), String("v")]], ignore_error: false } +Path: `R3 AST source spans/events/is correct for TextAttribute and properties via data-bindon-` + +**Expected:** +``` +[Element,
    ,
    ,
    ] +[TextAttribute, data-bindon-prop="v", data-bindon-prop, v] +``` + +**Actual:** +``` +[Element,
    ,
    ,
    ] +[BoundAttribute, data-bindon-prop="v", prop, v] +[BoundEvent, data-bindon-prop="v", prop, v] +``` + +**Diff:** +```diff + [Element,
    ,
    ,
    ] +-[TextAttribute, data-bindon-prop="v", data-bindon-prop, v] ++[BoundAttribute, data-bindon-prop="v", prop, v] ++[BoundEvent, data-bindon-prop="v", prop, v] + +``` + +#### is correct for switch blocks with exhaustive checking: ExpectFromHtml { input: "@switch (cond.kind) {@case (x()) {X case}@default never;}", expected: [Array [String("SwitchBlock"), String("@switch (cond.kind) {@case (x()) {X case}@default never;}"), String("@switch (cond.kind) {"), String("}")], Array [String("SwitchBlockCaseGroup"), String("@case (x()) {X case}"), String("@case (x()) {")], Array [String("SwitchBlockCase"), String("@case (x()) {X case}"), String("@case (x()) {")], Array [String("Text"), String("X case")], Array [String("SwitchExhaustiveCheck"), String("@default never;"), String("@default never;")]], ignore_error: false } +Path: `R3 AST source spans/switch blocks/is correct for switch blocks with exhaustive checking` + +**Expected:** +``` +[SwitchBlock, @switch (cond.kind) {@case (x()) {X case}@default never;}, @switch (cond.kind) {, }] +[SwitchBlockCaseGroup, @case (x()) {X case}, @case (x()) {] +[SwitchBlockCase, @case (x()) {X case}, @case (x()) {] +[Text, X case] +[SwitchExhaustiveCheck, @default never;, @default never;] +``` + +**Actual:** +``` +[SwitchBlock, @switch (cond.kind) {@case (x()) {X case}@default never;}, @switch (cond.kind) {, }] +[SwitchBlockCaseGroup, @case (x()) {X case}, @case (x()) {] +[SwitchBlockCase, @case (x()) {X case}, @case (x()) {] +[Text, X case] +``` + +**Diff:** +```diff + [SwitchBlock, @switch (cond.kind) {@case (x()) {X case}@default never;}, @switch (cond.kind) {, }] + [SwitchBlockCaseGroup, @case (x()) {X case}, @case (x()) {] + [SwitchBlockCase, @case (x()) {X case}, @case (x()) {] +-[Text, X case] +-[SwitchExhaustiveCheck, @default never;, @default never;] ++[Text, X case] + +``` + +#### is correct for a let declaration: ExpectFromHtml { input: "@let foo = 123;", expected: [Array [String("LetDeclaration"), String("@let foo = 123;"), String("foo"), String("123")]], ignore_error: false } +Path: `R3 AST source spans/@let declaration/is correct for a let declaration` + +**Expected:** +``` +[LetDeclaration, @let foo = 123;, foo, 123] +``` + +**Actual:** +``` +[LetDeclaration, @let foo = 123, foo, 123] +``` + +**Diff:** +```diff +-[LetDeclaration, @let foo = 123;, foo, 123] ++[LetDeclaration, @let foo = 123, foo, 123] + +``` + +#### should not ignore namespaced SVG ", expected: [Array [String("Element"), String(":svg:svg")], Array [String("Element"), String(":svg:style")], Array [String("Text"), String(".a { fill: none; }")]], ignore_error: false } +Path: `R3 template transform/", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "script" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.RAW_TEXT", - "abc\ndef\nghi\tjkl`'\"mno" - ], - [ - "TokenType.TAG_CLOSE", - "", - "script" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "script"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.RAW_TEXT", "abc\ndef\nghi\tjkl`'\"mno"], + ["TokenType.TAG_CLOSE", "", "script"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": false, @@ -2915,26 +1802,11 @@ "input": "abc\ndef\\nghi\\tjkl\\`\\'\\\"mno", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "title" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.ESCAPABLE_RAW_TEXT", - "abc\ndef\nghi\tjkl`'\"mno" - ], - [ - "TokenType.TAG_CLOSE", - "", - "title" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "title"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.ESCAPABLE_RAW_TEXT", "abc\ndef\nghi\tjkl`'\"mno"], + ["TokenType.TAG_CLOSE", "", "title"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": false, @@ -2956,51 +1828,17 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "b" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_NAME", - "", - "c" - ], - [ - "TokenType.ATTR_QUOTE", - "'" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "d" - ], - [ - "TokenType.ATTR_QUOTE", - "'" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "b"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_NAME", "", "c"], + ["TokenType.ATTR_QUOTE", "'"], + ["TokenType.ATTR_VALUE_TEXT", "d"], + ["TokenType.ATTR_QUOTE", "'"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": false, @@ -3061,17 +1899,9 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "test" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "test"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -3086,17 +1916,9 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "ns1", - "test" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "ns1", "test"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -3111,17 +1933,9 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "test" - ], - [ - "TokenType.TAG_OPEN_END_VOID" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "test"], + ["TokenType.TAG_OPEN_END_VOID"], + ["TokenType.EOF"] ], "options": null } @@ -3136,17 +1950,9 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "test" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "test"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -3161,18 +1967,9 @@ "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "" - ], - [ - "TokenType.EOF", - "" - ] + ["TokenType.TAG_OPEN_START", ""], + ["TokenType.EOF", ""] ], "options": null } @@ -3193,20 +1990,10 @@ "input": "@let foo = 123 + 456;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "123 + 456" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "123 + 456"], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null } @@ -3310,20 +2097,10 @@ "input": "@let foo = \n123 + \n 456 + \n789\n;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "123 + \n 456 + \n789\n" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "123 + \n 456 + \n789\n"], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null } @@ -3338,30 +2115,13 @@ "input": "@defer {@let foo = 123 + 456;}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "defer" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "123 + 456" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "defer"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "123 + 456"], + ["TokenType.LET_END"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -3376,20 +2136,10 @@ "input": "@let foo = 'a; b';", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "'a; b'" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "'a; b'"], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null }, @@ -3398,20 +2148,10 @@ "input": "@let foo = \"';'\";", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "\"';'\"" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "\"';'\""], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null } @@ -3436,20 +2176,10 @@ "input": "@let foo = [1, 2, 3];", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "[1, 2, 3]" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "[1, 2, 3]"], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null }, @@ -3458,20 +2188,10 @@ "input": "@let foo = [0, [foo[1]], 3];", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "[0, [foo[1]], 3]" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "[0, [foo[1]], 3]"], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null } @@ -3486,20 +2206,10 @@ "input": "@let foo = {a: 1, b: {c: something + 2}};", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "{a: 1, b: {c: something + 2}}" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "{a: 1, b: {c: something + 2}}"], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null }, @@ -3508,20 +2218,10 @@ "input": "@let foo = {};", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "{}" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "{}"], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null }, @@ -3530,20 +2230,10 @@ "input": "@let foo = {foo: \";\"};", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "{foo: \";\"}" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "{foo: \";\"}"], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null } @@ -3562,12 +2252,7 @@ "type": "HtmlLexerTest", "input": "@let foo = \";", "test_type": "HumanizeErrors", - "expected": [ - [ - "Unexpected character \"EOF\"", - "0:13" - ] - ], + "expected": [["Unexpected character \"EOF\"", "0:13"]], "options": null }, { @@ -3575,20 +2260,10 @@ "input": "@let foo = {a: 1,;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "{a: 1," - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "{a: 1,"], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null }, @@ -3597,20 +2272,10 @@ "input": "@let foo = [1, ;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "[1, " - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "[1, "], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null }, @@ -3619,20 +2284,10 @@ "input": "@let foo = fn(;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "fn(" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", "fn("], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null } @@ -3647,20 +2302,10 @@ "input": "@let foo =;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "foo" - ], - [ - "TokenType.LET_VALUE", - "" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "foo"], + ["TokenType.LET_VALUE", ""], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null } @@ -3675,17 +2320,9 @@ "input": "@letFoo = 123;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_LET", - "@let" - ], - [ - "TokenType.TEXT", - "Foo = 123;" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_LET", "@let"], + ["TokenType.TEXT", "Foo = 123;"], + ["TokenType.EOF"] ], "options": null } @@ -3700,17 +2337,9 @@ "input": "@let foo\\bar = 123;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_LET", - "foo" - ], - [ - "TokenType.TEXT", - "\\bar = 123;" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_LET", "foo"], + ["TokenType.TEXT", "\\bar = 123;"], + ["TokenType.EOF"] ], "options": null }, @@ -3719,17 +2348,9 @@ "input": "@let #foo = 123;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_LET", - "" - ], - [ - "TokenType.TEXT", - "#foo = 123;" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_LET", ""], + ["TokenType.TEXT", "#foo = 123;"], + ["TokenType.EOF"] ], "options": null }, @@ -3738,17 +2359,9 @@ "input": "@let foo\nbar = 123;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_LET", - "foo" - ], - [ - "TokenType.TEXT", - "bar = 123;" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_LET", "foo"], + ["TokenType.TEXT", "bar = 123;"], + ["TokenType.EOF"] ], "options": null } @@ -3763,20 +2376,10 @@ "input": "@let a123 = foo;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.LET_START", - "a123" - ], - [ - "TokenType.LET_VALUE", - "foo" - ], - [ - "TokenType.LET_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.LET_START", "a123"], + ["TokenType.LET_VALUE", "foo"], + ["TokenType.LET_END"], + ["TokenType.EOF"] ], "options": null }, @@ -3785,17 +2388,9 @@ "input": "@let 123a = 123;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_LET", - "" - ], - [ - "TokenType.TEXT", - "123a = 123;" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_LET", ""], + ["TokenType.TEXT", "123a = 123;"], + ["TokenType.EOF"] ], "options": null } @@ -3810,17 +2405,9 @@ "input": "@let foo = 123 + 456", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_LET", - "foo" - ], - [ - "TokenType.LET_VALUE", - "123 + 456" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_LET", "foo"], + ["TokenType.LET_VALUE", "123 + 456"], + ["TokenType.EOF"] ], "options": null }, @@ -3829,17 +2416,9 @@ "input": "@let foo = 123 + 456 ", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_LET", - "foo" - ], - [ - "TokenType.LET_VALUE", - "123 + 456 " - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_LET", "foo"], + ["TokenType.LET_VALUE", "123 + 456 "], + ["TokenType.EOF"] ], "options": null }, @@ -3848,17 +2427,9 @@ "input": "@let foo = 123, bar = 456", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_LET", - "foo" - ], - [ - "TokenType.LET_VALUE", - "123, bar = 456" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_LET", "foo"], + ["TokenType.LET_VALUE", "123, bar = 456"], + ["TokenType.EOF"] ], "options": null } @@ -3873,23 +2444,10 @@ "input": "{{ @let foo = 123; }}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.INTERPOLATION", - "{{", - " @let foo = 123; ", - "}}" - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", ""], + ["TokenType.INTERPOLATION", "{{", " @let foo = 123; ", "}}"], + ["TokenType.TEXT", ""], + ["TokenType.EOF"] ], "options": null } @@ -3910,22 +2468,10 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -3940,98 +2486,27 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "" - ], - [ - "TokenType.ATTR_VALUE_INTERPOLATION", - "{{", - "v", - "}}" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_NAME", - "", - "b" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "s" - ], - [ - "TokenType.ATTR_VALUE_INTERPOLATION", - "{{", - "m", - "}}" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "e" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_NAME", - "", - "c" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "s" - ], - [ - "TokenType.ATTR_VALUE_INTERPOLATION", - "{{", - "m//c", - "}}" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "e" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", ""], + ["TokenType.ATTR_VALUE_INTERPOLATION", "{{", "v", "}}"], + ["TokenType.ATTR_VALUE_TEXT", ""], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_NAME", "", "b"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "s"], + ["TokenType.ATTR_VALUE_INTERPOLATION", "{{", "m", "}}"], + ["TokenType.ATTR_VALUE_TEXT", "e"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_NAME", "", "c"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "s"], + ["TokenType.ATTR_VALUE_INTERPOLATION", "{{", "m//c", "}}"], + ["TokenType.ATTR_VALUE_TEXT", "e"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4046,43 +2521,15 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "" - ], - [ - "TokenType.ATTR_VALUE_INTERPOLATION", - "{{", - " a \\\" ' b " - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", ""], + ["TokenType.ATTR_VALUE_INTERPOLATION", "{{", " a \\\" ' b "], + ["TokenType.ATTR_VALUE_TEXT", ""], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null }, @@ -4091,43 +2538,15 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "'" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "" - ], - [ - "TokenType.ATTR_VALUE_INTERPOLATION", - "{{", - " a \" \\' b " - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "" - ], - [ - "TokenType.ATTR_QUOTE", - "'" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "'"], + ["TokenType.ATTR_VALUE_TEXT", ""], + ["TokenType.ATTR_VALUE_INTERPOLATION", "{{", " a \" \\' b "], + ["TokenType.ATTR_VALUE_TEXT", ""], + ["TokenType.ATTR_QUOTE", "'"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4142,22 +2561,10 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "ns1", - "a" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "ns1", "a"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4172,22 +2579,10 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "(ns1:a)" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "(ns1:a)"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4202,34 +2597,13 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "'" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "b" - ], - [ - "TokenType.ATTR_QUOTE", - "'" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "'"], + ["TokenType.ATTR_VALUE_TEXT", "b"], + ["TokenType.ATTR_QUOTE", "'"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4244,34 +2618,13 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "b" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "b"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4286,26 +2639,11 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "b" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_VALUE_TEXT", "b"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4320,36 +2658,13 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "a" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "" - ], - [ - "TokenType.ATTR_VALUE_INTERPOLATION", - "{{", - "link.text", - "}}" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "a"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_VALUE_TEXT", ""], + ["TokenType.ATTR_VALUE_INTERPOLATION", "{{", "link.text", "}}"], + ["TokenType.ATTR_VALUE_TEXT", ""], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4364,34 +2679,16 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "app-component" - ], - [ - "TokenType.ATTR_NAME", - "", - "[attr]" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], + ["TokenType.TAG_OPEN_START", "", "app-component"], + ["TokenType.ATTR_NAME", "", "[attr]"], + ["TokenType.ATTR_QUOTE", "\""], [ "TokenType.ATTR_VALUE_TEXT", "[\n {text: 'some text',url:'//www.google.com'},\n {text:'other text',url:'//www.google.com'}]" ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4406,34 +2703,13 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", ""], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4448,26 +2724,11 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "b" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_VALUE_TEXT", "b"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4482,52 +2743,17 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "" - ], - [ - "TokenType.ENCODED_ENTITY", - "A", - "A" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "" - ], - [ - "TokenType.ENCODED_ENTITY", - "A", - "A" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", ""], + ["TokenType.ENCODED_ENTITY", "A", "A"], + ["TokenType.ATTR_VALUE_TEXT", ""], + ["TokenType.ENCODED_ENTITY", "A", "A"], + ["TokenType.ATTR_VALUE_TEXT", ""], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4542,51 +2768,17 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "&" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_NAME", - "", - "b" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "c&&d" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "&"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_NAME", "", "b"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "c&&d"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4601,34 +2793,13 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "b && c &" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "b && c &"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4643,34 +2814,13 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "'" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "t\ne\ns\nt" - ], - [ - "TokenType.ATTR_QUOTE", - "'" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "'"], + ["TokenType.ATTR_VALUE_TEXT", "t\ne\ns\nt"], + ["TokenType.ATTR_QUOTE", "'"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": null } @@ -4685,26 +2835,11 @@ "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "" - ], - [ - "TokenType.EOF", - "" - ] + ["TokenType.TAG_OPEN_START", ""], + ["TokenType.EOF", ""] ], "options": null } @@ -4718,12 +2853,7 @@ "type": "HtmlLexerTest", "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "foo" - ], - [ - "TokenType.ATTR_NAME", - "", - "[class.data-[size='large']:p-8]" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "expr" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END_VOID" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "foo"], + ["TokenType.ATTR_NAME", "", "[class.data-[size='large']:p-8]"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "expr"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END_VOID"], + ["TokenType.EOF"] ], "options": null }, @@ -4863,22 +2925,10 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "foo" - ], - [ - "TokenType.ATTR_NAME", - "", - "[class.data-[size='large']:p-8]" - ], - [ - "TokenType.TAG_OPEN_END_VOID" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "foo"], + ["TokenType.ATTR_NAME", "", "[class.data-[size='large']:p-8]"], + ["TokenType.TAG_OPEN_END_VOID"], + ["TokenType.EOF"] ], "options": null }, @@ -4887,34 +2937,13 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "foo" - ], - [ - "TokenType.ATTR_NAME", - "", - "[class.data-[size='hello white space']]" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "expr" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END_VOID" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "foo"], + ["TokenType.ATTR_NAME", "", "[class.data-[size='hello white space']]"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "expr"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END_VOID"], + ["TokenType.EOF"] ], "options": null } @@ -4929,34 +2958,13 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "foo" - ], - [ - "TokenType.ATTR_NAME", - "", - "[class.a]b]c]" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "expr" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END_VOID" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "foo"], + ["TokenType.ATTR_NAME", "", "[class.a]b]c]"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "expr"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END_VOID"], + ["TokenType.EOF"] ], "options": null }, @@ -4965,22 +2973,10 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "foo" - ], - [ - "TokenType.ATTR_NAME", - "", - "[class.a[]][[]]b]][c]" - ], - [ - "TokenType.TAG_OPEN_END_VOID" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "foo"], + ["TokenType.ATTR_NAME", "", "[class.a[]][[]]b]][c]"], + ["TokenType.TAG_OPEN_END_VOID"], + ["TokenType.EOF"] ], "options": null } @@ -4990,33 +2986,16 @@ "name": "should stop permissive parsing of square brackets on new line", "path": "HtmlLexer/attributes/should stop permissive parsing of square brackets on new line", "assertions": [ - { - "type": "HtmlLexerTest", - "input": "", - "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.INCOMPLETE_TAG_OPEN", - "", - "foo" - ], - [ - "TokenType.ATTR_NAME", - "", - "[class.text-" - ], - [ - "TokenType.ATTR_NAME", - "", - "primary" - ], - [ - "TokenType.TEXT", - "80]=\"expr\"/>" - ], - [ - "TokenType.EOF" - ] + { + "type": "HtmlLexerTest", + "input": "", + "test_type": "HumanizeParts", + "expected": [ + ["TokenType.INCOMPLETE_TAG_OPEN", "", "foo"], + ["TokenType.ATTR_NAME", "", "[class.text-"], + ["TokenType.ATTR_NAME", "", "primary"], + ["TokenType.TEXT", "80]=\"expr\"/>"], + ["TokenType.EOF"] ], "options": null } @@ -5036,16 +3015,7 @@ "type": "HtmlLexerTest", "input": "", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TAG_CLOSE", - "", - "test" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TAG_CLOSE", "", "test"], ["TokenType.EOF"]], "options": null } ] @@ -5058,16 +3028,7 @@ "type": "HtmlLexerTest", "input": "", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TAG_CLOSE", - "ns1", - "test" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TAG_CLOSE", "ns1", "test"], ["TokenType.EOF"]], "options": null } ] @@ -5080,16 +3041,7 @@ "type": "HtmlLexerTest", "input": "", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TAG_CLOSE", - "", - "test" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TAG_CLOSE", "", "test"], ["TokenType.EOF"]], "options": null } ] @@ -5103,14 +3055,8 @@ "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - [ - "TokenType.TAG_CLOSE", - "" - ], - [ - "TokenType.EOF", - "" - ] + ["TokenType.TAG_CLOSE", ""], + ["TokenType.EOF", ""] ], "options": null } @@ -5124,12 +3070,7 @@ "type": "HtmlLexerTest", "input": "a", "test_type": "HumanizeSourceSpans", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "" - ], - [ - "TokenType.TEXT", - "a" - ], - [ - "TokenType.INCOMPLETE_TAG_OPEN", - "" - ], - [ - "TokenType.EOF", - "" - ] + ["TokenType.TAG_OPEN_START", ""], + ["TokenType.TEXT", "a"], + ["TokenType.INCOMPLETE_TAG_OPEN", ""], + ["TokenType.EOF", ""] ], "options": null }, @@ -5871,15 +3516,7 @@ "type": "HtmlLexerTest", "input": "< a>", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "< a>" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "< a>"], ["TokenType.EOF"]], "options": null } ] @@ -5890,53 +3527,20 @@ "assertions": [ { "type": "HtmlLexerTest", - "input": "{{ a d }}", - "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.INTERPOLATION", - "{{", - " a " - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.TAG_OPEN_START", - "", - "b" - ], - [ - "TokenType.ATTR_NAME", - "", - "&&" - ], - [ - "TokenType.ATTR_NAME", - "", - "c" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TEXT", - " d " - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + "input": "{{ a d }}", + "test_type": "HumanizeParts", + "expected": [ + ["TokenType.TEXT", ""], + ["TokenType.INTERPOLATION", "{{", " a "], + ["TokenType.TEXT", ""], + ["TokenType.TAG_OPEN_START", "", "b"], + ["TokenType.ATTR_NAME", "", "&&"], + ["TokenType.ATTR_NAME", "", "c"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TEXT", " d "], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -5951,35 +3555,14 @@ "input": "{{ a }}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.INTERPOLATION", - "{{", - " a }" - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.COMMENT_START" - ], - [ - "TokenType.RAW_TEXT", - "" - ], - [ - "TokenType.COMMENT_END" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", ""], + ["TokenType.INTERPOLATION", "{{", " a }"], + ["TokenType.TEXT", ""], + ["TokenType.COMMENT_START"], + ["TokenType.RAW_TEXT", ""], + ["TokenType.COMMENT_END"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -5994,35 +3577,13 @@ "input": "

    {{ a

    ", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "p" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.INTERPOLATION", - "{{", - " a " - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.TAG_CLOSE", - "", - "p" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "p"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TEXT", ""], + ["TokenType.INTERPOLATION", "{{", " a "], + ["TokenType.TEXT", ""], + ["TokenType.TAG_CLOSE", "", "p"], + ["TokenType.EOF"] ], "options": null } @@ -6037,35 +3598,14 @@ "input": "{{ a }}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.INTERPOLATION", - "{{", - " a }" - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.CDATA_START" - ], - [ - "TokenType.RAW_TEXT", - "" - ], - [ - "TokenType.CDATA_END" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", ""], + ["TokenType.INTERPOLATION", "{{", " a }"], + ["TokenType.TEXT", ""], + ["TokenType.CDATA_START"], + ["TokenType.RAW_TEXT", ""], + ["TokenType.CDATA_END"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -6080,36 +3620,13 @@ "input": "{{'<={'}}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "code" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.INTERPOLATION", - "{{", - "'<={'", - "}}" - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.TAG_CLOSE", - "", - "code" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "code"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TEXT", ""], + ["TokenType.INTERPOLATION", "{{", "'<={'", "}}"], + ["TokenType.TEXT", ""], + ["TokenType.TAG_CLOSE", "", "code"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": true, @@ -6131,18 +3648,9 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_TAG_OPEN", - "", - "t" - ], - [ - "TokenType.TEXT", - "\">" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_TAG_OPEN", "", "t"], + ["TokenType.TEXT", "\">"], + ["TokenType.EOF"] ], "options": null }, @@ -6151,18 +3659,9 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_TAG_OPEN", - "", - "t" - ], - [ - "TokenType.TEXT", - "'>" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_TAG_OPEN", "", "t"], + ["TokenType.TEXT", "'>"], + ["TokenType.EOF"] ], "options": null } @@ -6177,35 +3676,13 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_TAG_OPEN", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "b" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TEXT", - "\">" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_TAG_OPEN", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "b"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TEXT", "\">"], + ["TokenType.EOF"] ], "options": null }, @@ -6214,35 +3691,13 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_TAG_OPEN", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "'" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "b" - ], - [ - "TokenType.ATTR_QUOTE", - "'" - ], - [ - "TokenType.TEXT", - "'>" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_TAG_OPEN", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "'"], + ["TokenType.ATTR_VALUE_TEXT", "b"], + ["TokenType.ATTR_QUOTE", "'"], + ["TokenType.TEXT", "'>"], + ["TokenType.EOF"] ], "options": null } @@ -6257,23 +3712,10 @@ "input": "{{ \"{\" }}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.INTERPOLATION", - "{{", - " \"{\" ", - "}}" - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", ""], + ["TokenType.INTERPOLATION", "{{", " \"{\" ", "}}"], + ["TokenType.TEXT", ""], + ["TokenType.EOF"] ], "options": null } @@ -6288,23 +3730,10 @@ "input": "{{ \"{{\" }}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.INTERPOLATION", - "{{", - " \"{{\" ", - "}}" - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", ""], + ["TokenType.INTERPOLATION", "{{", " \"{{\" ", "}}"], + ["TokenType.TEXT", ""], + ["TokenType.EOF"] ], "options": null } @@ -6319,22 +3748,10 @@ "input": "{{ \"{{a}}' }}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.INTERPOLATION", - "{{", - " \"{{a}}' }}" - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", ""], + ["TokenType.INTERPOLATION", "{{", " \"{{a}}' }}"], + ["TokenType.TEXT", ""], + ["TokenType.EOF"] ], "options": null } @@ -6349,26 +3766,11 @@ "input": "{a, b, =4 {c}}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "span" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TEXT", - "{a, b, =4 {c}}" - ], - [ - "TokenType.TAG_CLOSE", - "", - "span" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "span"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TEXT", "{a, b, =4 {c}}"], + ["TokenType.TAG_CLOSE", "", "span"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": false, @@ -6396,26 +3798,11 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "script" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.RAW_TEXT", - "t\ne\ns\nt" - ], - [ - "TokenType.TAG_CLOSE", - "", - "script" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "script"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.RAW_TEXT", "t\ne\ns\nt"], + ["TokenType.TAG_CLOSE", "", "script"], + ["TokenType.EOF"] ], "options": null } @@ -6430,26 +3817,11 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "script" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.RAW_TEXT", - "&" - ], - [ - "TokenType.TAG_CLOSE", - "", - "script" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "script"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.RAW_TEXT", "&"], + ["TokenType.TAG_CLOSE", "", "script"], + ["TokenType.EOF"] ], "options": null } @@ -6464,26 +3836,11 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "script" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.RAW_TEXT", - "a
    " - ], - [ - "TokenType.TAG_CLOSE", - "", - "script" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "script"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.RAW_TEXT", "a
    "], + ["TokenType.TAG_CLOSE", "", "script"], + ["TokenType.EOF"] ], "options": null } @@ -6498,26 +3855,11 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "script" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.RAW_TEXT", - "a" - ], - [ - "TokenType.TAG_CLOSE", - "", - "script" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "script"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.RAW_TEXT", "a"], + ["TokenType.TAG_CLOSE", "", "script"], + ["TokenType.EOF"] ], "options": null } @@ -6532,26 +3874,11 @@ "input": "", "test_type": "HumanizeSourceSpans", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "" - ], - [ - "TokenType.RAW_TEXT", - "a" - ], - [ - "TokenType.TAG_CLOSE", - "" - ], - [ - "TokenType.EOF", - "" - ] + ["TokenType.TAG_OPEN_START", ""], + ["TokenType.RAW_TEXT", "a"], + ["TokenType.TAG_CLOSE", ""], + ["TokenType.EOF", ""] ], "options": null } @@ -6572,26 +3899,11 @@ "input": "t\ne\rs\r\nt", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "title" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.ESCAPABLE_RAW_TEXT", - "t\ne\ns\nt" - ], - [ - "TokenType.TAG_CLOSE", - "", - "title" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "title"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.ESCAPABLE_RAW_TEXT", "t\ne\ns\nt"], + ["TokenType.TAG_CLOSE", "", "title"], + ["TokenType.EOF"] ], "options": null } @@ -6606,35 +3918,13 @@ "input": "&", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "title" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.ESCAPABLE_RAW_TEXT", - "" - ], - [ - "TokenType.ENCODED_ENTITY", - "&", - "&" - ], - [ - "TokenType.ESCAPABLE_RAW_TEXT", - "" - ], - [ - "TokenType.TAG_CLOSE", - "", - "title" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "title"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.ESCAPABLE_RAW_TEXT", ""], + ["TokenType.ENCODED_ENTITY", "&", "&"], + ["TokenType.ESCAPABLE_RAW_TEXT", ""], + ["TokenType.TAG_CLOSE", "", "title"], + ["TokenType.EOF"] ], "options": null } @@ -6649,26 +3939,11 @@ "input": "a<div>", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "title" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.ESCAPABLE_RAW_TEXT", - "a
    " - ], - [ - "TokenType.TAG_CLOSE", - "", - "title" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "title"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.ESCAPABLE_RAW_TEXT", "a
    "], + ["TokenType.TAG_CLOSE", "", "title"], + ["TokenType.EOF"] ], "options": null } @@ -6683,26 +3958,11 @@ "input": "a</test>", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "title" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.ESCAPABLE_RAW_TEXT", - "a" - ], - [ - "TokenType.TAG_CLOSE", - "", - "title" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "title"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.ESCAPABLE_RAW_TEXT", "a"], + ["TokenType.TAG_CLOSE", "", "title"], + ["TokenType.EOF"] ], "options": null } @@ -6717,26 +3977,11 @@ "input": "a", "test_type": "HumanizeSourceSpans", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "" - ], - [ - "TokenType.ESCAPABLE_RAW_TEXT", - "a" - ], - [ - "TokenType.TAG_CLOSE", - "" - ], - [ - "TokenType.EOF", - "" - ] + ["TokenType.TAG_OPEN_START", ""], + ["TokenType.ESCAPABLE_RAW_TEXT", "a"], + ["TokenType.TAG_CLOSE", ""], + ["TokenType.EOF", ""] ], "options": null } @@ -6754,29 +3999,14 @@ "assertions": [ { "type": "HtmlLexerTest", - "input": "test", - "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TAG_OPEN_START", - "svg", - "title" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TEXT", - "test" - ], - [ - "TokenType.TAG_CLOSE", - "svg", - "title" - ], - [ - "TokenType.EOF" - ] + "input": "test", + "test_type": "HumanizeParts", + "expected": [ + ["TokenType.TAG_OPEN_START", "svg", "title"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TEXT", "test"], + ["TokenType.TAG_CLOSE", "svg", "title"], + ["TokenType.EOF"] ], "options": null } @@ -6791,39 +4021,14 @@ "input": "test", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "svg", - "title" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TAG_OPEN_START", - "", - "f" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TEXT", - "test" - ], - [ - "TokenType.TAG_CLOSE", - "", - "f" - ], - [ - "TokenType.TAG_CLOSE", - "svg", - "title" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "svg", "title"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TAG_OPEN_START", "", "f"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TEXT", "test"], + ["TokenType.TAG_CLOSE", "", "f"], + ["TokenType.TAG_CLOSE", "svg", "title"], + ["TokenType.EOF"] ], "options": null } @@ -6893,65 +4098,23 @@ "input": "{one.two, three, =4 {four} =5 {five} foo {bar} }", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.EXPANSION_FORM_START" - ], - [ - "TokenType.RAW_TEXT", - "one.two" - ], - [ - "TokenType.RAW_TEXT", - "three" - ], - [ - "TokenType.EXPANSION_CASE_VALUE", - "=4" - ], - [ - "TokenType.EXPANSION_CASE_EXP_START" - ], - [ - "TokenType.TEXT", - "four" - ], - [ - "TokenType.EXPANSION_CASE_EXP_END" - ], - [ - "TokenType.EXPANSION_CASE_VALUE", - "=5" - ], - [ - "TokenType.EXPANSION_CASE_EXP_START" - ], - [ - "TokenType.TEXT", - "five" - ], - [ - "TokenType.EXPANSION_CASE_EXP_END" - ], - [ - "TokenType.EXPANSION_CASE_VALUE", - "foo" - ], - [ - "TokenType.EXPANSION_CASE_EXP_START" - ], - [ - "TokenType.TEXT", - "bar" - ], - [ - "TokenType.EXPANSION_CASE_EXP_END" - ], - [ - "TokenType.EXPANSION_FORM_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.EXPANSION_FORM_START"], + ["TokenType.RAW_TEXT", "one.two"], + ["TokenType.RAW_TEXT", "three"], + ["TokenType.EXPANSION_CASE_VALUE", "=4"], + ["TokenType.EXPANSION_CASE_EXP_START"], + ["TokenType.TEXT", "four"], + ["TokenType.EXPANSION_CASE_EXP_END"], + ["TokenType.EXPANSION_CASE_VALUE", "=5"], + ["TokenType.EXPANSION_CASE_EXP_START"], + ["TokenType.TEXT", "five"], + ["TokenType.EXPANSION_CASE_EXP_END"], + ["TokenType.EXPANSION_CASE_VALUE", "foo"], + ["TokenType.EXPANSION_CASE_EXP_START"], + ["TokenType.TEXT", "bar"], + ["TokenType.EXPANSION_CASE_EXP_END"], + ["TokenType.EXPANSION_FORM_END"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": true, @@ -6973,45 +4136,17 @@ "input": "before{one.two, three, =4 {four}}after", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "before" - ], - [ - "TokenType.EXPANSION_FORM_START" - ], - [ - "TokenType.RAW_TEXT", - "one.two" - ], - [ - "TokenType.RAW_TEXT", - "three" - ], - [ - "TokenType.EXPANSION_CASE_VALUE", - "=4" - ], - [ - "TokenType.EXPANSION_CASE_EXP_START" - ], - [ - "TokenType.TEXT", - "four" - ], - [ - "TokenType.EXPANSION_CASE_EXP_END" - ], - [ - "TokenType.EXPANSION_FORM_END" - ], - [ - "TokenType.TEXT", - "after" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", "before"], + ["TokenType.EXPANSION_FORM_START"], + ["TokenType.RAW_TEXT", "one.two"], + ["TokenType.RAW_TEXT", "three"], + ["TokenType.EXPANSION_CASE_VALUE", "=4"], + ["TokenType.EXPANSION_CASE_EXP_START"], + ["TokenType.TEXT", "four"], + ["TokenType.EXPANSION_CASE_EXP_END"], + ["TokenType.EXPANSION_FORM_END"], + ["TokenType.TEXT", "after"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": true, @@ -7033,63 +4168,21 @@ "input": "
    {a, b, =4 {c}}
    ", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "div" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TAG_OPEN_START", - "", - "span" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EXPANSION_FORM_START" - ], - [ - "TokenType.RAW_TEXT", - "a" - ], - [ - "TokenType.RAW_TEXT", - "b" - ], - [ - "TokenType.EXPANSION_CASE_VALUE", - "=4" - ], - [ - "TokenType.EXPANSION_CASE_EXP_START" - ], - [ - "TokenType.TEXT", - "c" - ], - [ - "TokenType.EXPANSION_CASE_EXP_END" - ], - [ - "TokenType.EXPANSION_FORM_END" - ], - [ - "TokenType.TAG_CLOSE", - "", - "span" - ], - [ - "TokenType.TAG_CLOSE", - "", - "div" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "div"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TAG_OPEN_START", "", "span"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EXPANSION_FORM_START"], + ["TokenType.RAW_TEXT", "a"], + ["TokenType.RAW_TEXT", "b"], + ["TokenType.EXPANSION_CASE_VALUE", "=4"], + ["TokenType.EXPANSION_CASE_EXP_START"], + ["TokenType.TEXT", "c"], + ["TokenType.EXPANSION_CASE_EXP_END"], + ["TokenType.EXPANSION_FORM_END"], + ["TokenType.TAG_CLOSE", "", "span"], + ["TokenType.TAG_CLOSE", "", "div"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": true, @@ -7111,71 +4204,23 @@ "input": "
    {a, b, =4 {c}}
    ", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "div" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TAG_OPEN_START", - "", - "span" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TEXT", - " " - ], - [ - "TokenType.EXPANSION_FORM_START" - ], - [ - "TokenType.RAW_TEXT", - "a" - ], - [ - "TokenType.RAW_TEXT", - "b" - ], - [ - "TokenType.EXPANSION_CASE_VALUE", - "=4" - ], - [ - "TokenType.EXPANSION_CASE_EXP_START" - ], - [ - "TokenType.TEXT", - "c" - ], - [ - "TokenType.EXPANSION_CASE_EXP_END" - ], - [ - "TokenType.EXPANSION_FORM_END" - ], - [ - "TokenType.TEXT", - " " - ], - [ - "TokenType.TAG_CLOSE", - "", - "span" - ], - [ - "TokenType.TAG_CLOSE", - "", - "div" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "div"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TAG_OPEN_START", "", "span"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TEXT", " "], + ["TokenType.EXPANSION_FORM_START"], + ["TokenType.RAW_TEXT", "a"], + ["TokenType.RAW_TEXT", "b"], + ["TokenType.EXPANSION_CASE_VALUE", "=4"], + ["TokenType.EXPANSION_CASE_EXP_START"], + ["TokenType.TEXT", "c"], + ["TokenType.EXPANSION_CASE_EXP_END"], + ["TokenType.EXPANSION_FORM_END"], + ["TokenType.TEXT", " "], + ["TokenType.TAG_CLOSE", "", "span"], + ["TokenType.TAG_CLOSE", "", "div"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": true, @@ -7197,54 +4242,19 @@ "input": "{one.two, three, =4 {four a}}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.EXPANSION_FORM_START" - ], - [ - "TokenType.RAW_TEXT", - "one.two" - ], - [ - "TokenType.RAW_TEXT", - "three" - ], - [ - "TokenType.EXPANSION_CASE_VALUE", - "=4" - ], - [ - "TokenType.EXPANSION_CASE_EXP_START" - ], - [ - "TokenType.TEXT", - "four " - ], - [ - "TokenType.TAG_OPEN_START", - "", - "b" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TEXT", - "a" - ], - [ - "TokenType.TAG_CLOSE", - "", - "b" - ], - [ - "TokenType.EXPANSION_CASE_EXP_END" - ], - [ - "TokenType.EXPANSION_FORM_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.EXPANSION_FORM_START"], + ["TokenType.RAW_TEXT", "one.two"], + ["TokenType.RAW_TEXT", "three"], + ["TokenType.EXPANSION_CASE_VALUE", "=4"], + ["TokenType.EXPANSION_CASE_EXP_START"], + ["TokenType.TEXT", "four "], + ["TokenType.TAG_OPEN_START", "", "b"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TEXT", "a"], + ["TokenType.TAG_CLOSE", "", "b"], + ["TokenType.EXPANSION_CASE_EXP_END"], + ["TokenType.EXPANSION_FORM_END"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": true, @@ -7266,47 +4276,17 @@ "input": "{one.two, three, =4 {four {{a}}}}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.EXPANSION_FORM_START" - ], - [ - "TokenType.RAW_TEXT", - "one.two" - ], - [ - "TokenType.RAW_TEXT", - "three" - ], - [ - "TokenType.EXPANSION_CASE_VALUE", - "=4" - ], - [ - "TokenType.EXPANSION_CASE_EXP_START" - ], - [ - "TokenType.TEXT", - "four " - ], - [ - "TokenType.INTERPOLATION", - "{{", - "a", - "}}" - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.EXPANSION_CASE_EXP_END" - ], - [ - "TokenType.EXPANSION_FORM_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.EXPANSION_FORM_START"], + ["TokenType.RAW_TEXT", "one.two"], + ["TokenType.RAW_TEXT", "three"], + ["TokenType.EXPANSION_CASE_VALUE", "=4"], + ["TokenType.EXPANSION_CASE_EXP_START"], + ["TokenType.TEXT", "four "], + ["TokenType.INTERPOLATION", "{{", "a", "}}"], + ["TokenType.TEXT", ""], + ["TokenType.EXPANSION_CASE_EXP_END"], + ["TokenType.EXPANSION_FORM_END"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": true, @@ -7328,65 +4308,23 @@ "input": "{one.two, three, =4 { {xx, yy, =x {one}} }}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.EXPANSION_FORM_START" - ], - [ - "TokenType.RAW_TEXT", - "one.two" - ], - [ - "TokenType.RAW_TEXT", - "three" - ], - [ - "TokenType.EXPANSION_CASE_VALUE", - "=4" - ], - [ - "TokenType.EXPANSION_CASE_EXP_START" - ], - [ - "TokenType.EXPANSION_FORM_START" - ], - [ - "TokenType.RAW_TEXT", - "xx" - ], - [ - "TokenType.RAW_TEXT", - "yy" - ], - [ - "TokenType.EXPANSION_CASE_VALUE", - "=x" - ], - [ - "TokenType.EXPANSION_CASE_EXP_START" - ], - [ - "TokenType.TEXT", - "one" - ], - [ - "TokenType.EXPANSION_CASE_EXP_END" - ], - [ - "TokenType.EXPANSION_FORM_END" - ], - [ - "TokenType.TEXT", - " " - ], - [ - "TokenType.EXPANSION_CASE_EXP_END" - ], - [ - "TokenType.EXPANSION_FORM_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.EXPANSION_FORM_START"], + ["TokenType.RAW_TEXT", "one.two"], + ["TokenType.RAW_TEXT", "three"], + ["TokenType.EXPANSION_CASE_VALUE", "=4"], + ["TokenType.EXPANSION_CASE_EXP_START"], + ["TokenType.EXPANSION_FORM_START"], + ["TokenType.RAW_TEXT", "xx"], + ["TokenType.RAW_TEXT", "yy"], + ["TokenType.EXPANSION_CASE_VALUE", "=x"], + ["TokenType.EXPANSION_CASE_EXP_START"], + ["TokenType.TEXT", "one"], + ["TokenType.EXPANSION_CASE_EXP_END"], + ["TokenType.EXPANSION_FORM_END"], + ["TokenType.TEXT", " "], + ["TokenType.EXPANSION_CASE_EXP_END"], + ["TokenType.EXPANSION_FORM_END"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": true, @@ -7475,26 +4413,11 @@ "input": "

    İ

    ", "test_type": "HumanizeSourceSpans", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "" - ], - [ - "TokenType.TEXT", - "İ" - ], - [ - "TokenType.TAG_CLOSE", - "

    " - ], - [ - "TokenType.EOF", - "" - ] + ["TokenType.TAG_OPEN_START", ""], + ["TokenType.TEXT", "İ"], + ["TokenType.TAG_CLOSE", "

    "], + ["TokenType.EOF", ""] ], "options": null } @@ -7514,15 +4437,7 @@ "type": "HtmlLexerTest", "input": "\\' \\' \\'", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "' ' '" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "' ' '"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7536,15 +4451,7 @@ "type": "HtmlLexerTest", "input": "\\\" \\\" \\\"", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "\" \" \"" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "\" \" \""], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7558,15 +4465,7 @@ "type": "HtmlLexerTest", "input": "\\` \\` \\`", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "` ` `" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "` ` `"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7579,16 +4478,8 @@ { "type": "HtmlLexerTest", "input": "\\\\ \\\\ \\\\", - "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "\\ \\ \\" - ], - [ - "TokenType.EOF" - ] - ], + "test_type": "HumanizeParts", + "expected": [["TokenType.TEXT", "\\ \\ \\"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7602,15 +4493,7 @@ "type": "HtmlLexerTest", "input": "\\n \\n \\n", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "\n \n \n" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "\n \n \n"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7625,23 +4508,10 @@ "input": "\\r{{\\r}}\\r", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "\n" - ], - [ - "TokenType.INTERPOLATION", - "{{", - "\n", - "}}" - ], - [ - "TokenType.TEXT", - "\n" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", "\n"], + ["TokenType.INTERPOLATION", "{{", "\n", "}}"], + ["TokenType.TEXT", "\n"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": false, @@ -7656,15 +4526,7 @@ "type": "HtmlLexerTest", "input": "\\v \\v \\v", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "\u000b \u000b \u000b" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "\u000b \u000b \u000b"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7678,15 +4540,7 @@ "type": "HtmlLexerTest", "input": "\\t \\t \\t", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "\t \t \t" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "\t \t \t"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7700,15 +4554,7 @@ "type": "HtmlLexerTest", "input": "\\b \\b \\b", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "\b \b \b" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "\b \b \b"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7722,15 +4568,7 @@ "type": "HtmlLexerTest", "input": "\\f \\f \\f", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "\f \f \f" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "\f \f \f"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7745,13 +4583,8 @@ "input": "\\' \\\" \\` \\\\ \\n \\r \\v \\t \\b \\f", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "' \" ` \\ \n \n \u000b \t \b \f" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", "' \" ` \\ \n \n \u000b \t \b \f"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": false, @@ -7772,11 +4605,7 @@ "type": "HtmlLexerTest", "input": "\\0", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7790,11 +4619,7 @@ "type": "HtmlLexerTest", "input": "\\09", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7815,13 +4640,8 @@ "input": "\\001 \\01 \\1 \\12 \\223 \\19 \\2234 \\999", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "\u0001 \u0001 \u0001 \n “ \u00019 “4 999" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", "\u0001 \u0001 \u0001 \n “ \u00019 “4 999"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": false, @@ -7842,15 +4662,7 @@ "type": "HtmlLexerTest", "input": "\\x12 \\x4F \\xDC", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "\u0012 O Ü" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "\u0012 O Ü"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7870,12 +4682,7 @@ "type": "HtmlLexerTest", "input": "\\xGG", "test_type": "HumanizeErrors", - "expected": [ - [ - "Invalid hexadecimal escape sequence", - "0:2" - ] - ], + "expected": [["Invalid hexadecimal escape sequence", "0:2"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7889,12 +4696,7 @@ "type": "HtmlLexerTest", "input": "abc \\x xyz", "test_type": "HumanizeErrors", - "expected": [ - [ - "Invalid hexadecimal escape sequence", - "0:6" - ] - ], + "expected": [["Invalid hexadecimal escape sequence", "0:6"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7908,12 +4710,7 @@ "type": "HtmlLexerTest", "input": "abc\\x", "test_type": "HumanizeErrors", - "expected": [ - [ - "Unexpected character \"EOF\"", - "0:5" - ] - ], + "expected": [["Unexpected character \"EOF\"", "0:5"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7933,15 +4730,7 @@ "type": "HtmlLexerTest", "input": "\\u0123 \\uABCD", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "ģ ꯍ" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "ģ ꯍ"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7961,12 +4750,7 @@ "type": "HtmlLexerTest", "input": "\\uGGGG", "test_type": "HumanizeErrors", - "expected": [ - [ - "Invalid hexadecimal escape sequence", - "0:2" - ] - ], + "expected": [["Invalid hexadecimal escape sequence", "0:2"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -7986,15 +4770,7 @@ "type": "HtmlLexerTest", "input": "\\u{01} \\u{ABC} \\u{1234} \\u{123AB}", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "\u0001 ઼ ሴ 𒎫" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "\u0001 ઼ ሴ 𒎫"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -8014,12 +4790,7 @@ "type": "HtmlLexerTest", "input": "\\u{GG}", "test_type": "HumanizeErrors", - "expected": [ - [ - "Invalid hexadecimal escape sequence", - "0:3" - ] - ], + "expected": [["Invalid hexadecimal escape sequence", "0:3"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -8039,15 +4810,7 @@ "type": "HtmlLexerTest", "input": "abc\\\ndef", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "abcdef" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "abcdef"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -8061,15 +4824,7 @@ "type": "HtmlLexerTest", "input": "\\\nx\\\ny\\\n", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "xy" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "xy"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -8089,15 +4844,7 @@ "type": "HtmlLexerTest", "input": "a g ~", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "a g ~" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "a g ~"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -8117,15 +4864,7 @@ "type": "HtmlLexerTest", "input": "abc\ndef\\nghi\\tjkl\\`\\'\\\"mno", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "abc\ndef\nghi\tjkl`'\"mno" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "abc\ndef\nghi\tjkl`'\"mno"], ["TokenType.EOF"]], "options": { "tokenize_expansion_forms": false, "interpolation_config": null, @@ -8146,26 +4885,11 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "script" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.RAW_TEXT", - "abc\ndef\nghi\tjkl`'\"mno" - ], - [ - "TokenType.TAG_CLOSE", - "", - "script" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "script"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.RAW_TEXT", "abc\ndef\nghi\tjkl`'\"mno"], + ["TokenType.TAG_CLOSE", "", "script"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": false, @@ -8187,26 +4911,11 @@ "input": "abc\ndef\\nghi\\tjkl\\`\\'\\\"mno", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "title" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.ESCAPABLE_RAW_TEXT", - "abc\ndef\nghi\tjkl`'\"mno" - ], - [ - "TokenType.TAG_CLOSE", - "", - "title" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "title"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.ESCAPABLE_RAW_TEXT", "abc\ndef\nghi\tjkl`'\"mno"], + ["TokenType.TAG_CLOSE", "", "title"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": false, @@ -8228,51 +4937,17 @@ "input": "", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "t" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "b" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_NAME", - "", - "c" - ], - [ - "TokenType.ATTR_QUOTE", - "'" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "d" - ], - [ - "TokenType.ATTR_QUOTE", - "'" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "t"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "b"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_NAME", "", "c"], + ["TokenType.ATTR_QUOTE", "'"], + ["TokenType.ATTR_VALUE_TEXT", "d"], + ["TokenType.ATTR_QUOTE", "'"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.EOF"] ], "options": { "tokenize_expansion_forms": false, @@ -8362,19 +5037,10 @@ "input": "@default never;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "default never" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "default never"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8389,23 +5055,11 @@ "input": "@default never(expr);", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "default never" - ], - [ - "TokenType.BLOCK_PARAMETER", - "expr" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "default never"], + ["TokenType.BLOCK_PARAMETER", "expr"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8420,19 +5074,10 @@ "input": "@default never ;", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "default never" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "default never"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8447,31 +5092,13 @@ "input": "@for (item of items; track item.id) {hello}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "for" - ], - [ - "TokenType.BLOCK_PARAMETER", - "item of items" - ], - [ - "TokenType.BLOCK_PARAMETER", - "track item.id" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TEXT", - "hello" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "for"], + ["TokenType.BLOCK_PARAMETER", "item of items"], + ["TokenType.BLOCK_PARAMETER", "track item.id"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TEXT", "hello"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8486,27 +5113,12 @@ "input": "@for (item of items;) {hello}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "for" - ], - [ - "TokenType.BLOCK_PARAMETER", - "item of items" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TEXT", - "hello" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "for"], + ["TokenType.BLOCK_PARAMETER", "item of items"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TEXT", "hello"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8521,23 +5133,11 @@ "input": "@else if {hello}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "else if" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TEXT", - "hello" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "else if"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TEXT", "hello"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null }, @@ -8546,27 +5146,12 @@ "input": "@else if (foo !== 2) {hello}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "else if" - ], - [ - "TokenType.BLOCK_PARAMETER", - "foo !== 2" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TEXT", - "hello" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "else if"], + ["TokenType.BLOCK_PARAMETER", "foo !== 2"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TEXT", "hello"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8607,35 +5192,20 @@ ] }, { - "name": "should parse a block with multiple trailing semicolons", - "path": "HtmlLexer/blocks/should parse a block with multiple trailing semicolons", - "assertions": [ - { - "type": "HtmlLexerTest", - "input": "@for (item of items;;;;;) {hello}", - "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "for" - ], - [ - "TokenType.BLOCK_PARAMETER", - "item of items" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TEXT", - "hello" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + "name": "should parse a block with multiple trailing semicolons", + "path": "HtmlLexer/blocks/should parse a block with multiple trailing semicolons", + "assertions": [ + { + "type": "HtmlLexerTest", + "input": "@for (item of items;;;;;) {hello}", + "test_type": "HumanizeParts", + "expected": [ + ["TokenType.BLOCK_OPEN_START", "for"], + ["TokenType.BLOCK_PARAMETER", "item of items"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TEXT", "hello"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8650,23 +5220,11 @@ "input": "@defer {hello}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "defer" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TEXT", - "hello" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "defer"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TEXT", "hello"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8681,27 +5239,12 @@ "input": "@for (item of items){hello}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "for" - ], - [ - "TokenType.BLOCK_PARAMETER", - "item of items" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TEXT", - "hello" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "for"], + ["TokenType.BLOCK_PARAMETER", "item of items"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TEXT", "hello"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8721,31 +5264,13 @@ "input": "@defer (on a({a: 1, b: 2}, false, {c: 3}); when b({d: 4})) {hello}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "defer" - ], - [ - "TokenType.BLOCK_PARAMETER", - "on a({a: 1, b: 2}, false, {c: 3})" - ], - [ - "TokenType.BLOCK_PARAMETER", - "when b({d: 4})" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TEXT", - "hello" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "defer"], + ["TokenType.BLOCK_PARAMETER", "on a({a: 1, b: 2}, false, {c: 3})"], + ["TokenType.BLOCK_PARAMETER", "when b({d: 4})"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TEXT", "hello"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8760,17 +5285,9 @@ "input": "@if (a === b {hello}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_BLOCK_OPEN", - "if" - ], - [ - "TokenType.BLOCK_PARAMETER", - "a === b {hello}" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_BLOCK_OPEN", "if"], + ["TokenType.BLOCK_PARAMETER", "a === b {hello}"], + ["TokenType.EOF"] ], "options": null } @@ -8785,20 +5302,10 @@ "input": "@if a === b) {hello}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_BLOCK_OPEN", - "if a" - ], - [ - "TokenType.TEXT", - "=== b) {hello" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_BLOCK_OPEN", "if a"], + ["TokenType.TEXT", "=== b) {hello"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8812,24 +5319,14 @@ "type": "HtmlLexerTest", "input": "@if (a === \") {hello}", "test_type": "HumanizeErrors", - "expected": [ - [ - "Unexpected character \"EOF\"", - "0:21" - ] - ], + "expected": [["Unexpected character \"EOF\"", "0:21"]], "options": null }, { "type": "HtmlLexerTest", "input": "@if (a === \"hi') {hello}", "test_type": "HumanizeErrors", - "expected": [ - [ - "Unexpected character \"EOF\"", - "0:24" - ] - ], + "expected": [["Unexpected character \"EOF\"", "0:24"]], "options": null } ] @@ -8843,24 +5340,11 @@ "input": "@if ({invalid: true) hello}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.INCOMPLETE_BLOCK_OPEN", - "if" - ], - [ - "TokenType.BLOCK_PARAMETER", - "{invalid: true" - ], - [ - "TokenType.TEXT", - "hello" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.INCOMPLETE_BLOCK_OPEN", "if"], + ["TokenType.BLOCK_PARAMETER", "{invalid: true"], + ["TokenType.TEXT", "hello"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8875,27 +5359,12 @@ "input": "@if (condition === \"';'\") {hello}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "if" - ], - [ - "TokenType.BLOCK_PARAMETER", - "condition === \"';'\"" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TEXT", - "hello" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "if"], + ["TokenType.BLOCK_PARAMETER", "condition === \"';'\""], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TEXT", "hello"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8910,27 +5379,12 @@ "input": "@if (condition === \"\\\";\") {hello}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "if" - ], - [ - "TokenType.BLOCK_PARAMETER", - "condition === \"\\\";\"" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TEXT", - "hello" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "if"], + ["TokenType.BLOCK_PARAMETER", "condition === \"\\\";\""], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TEXT", "hello"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -8945,48 +5399,17 @@ "input": "@if (a === 1) {foo bar baz}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "if" - ], - [ - "TokenType.BLOCK_PARAMETER", - "a === 1" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TEXT", - "foo " - ], - [ - "TokenType.TAG_OPEN_START", - "", - "b" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TEXT", - "bar" - ], - [ - "TokenType.TAG_CLOSE", - "", - "b" - ], - [ - "TokenType.TEXT", - " baz" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "if"], + ["TokenType.BLOCK_PARAMETER", "a === 1"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TEXT", "foo "], + ["TokenType.TAG_OPEN_START", "", "b"], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TEXT", "bar"], + ["TokenType.TAG_CLOSE", "", "b"], + ["TokenType.TEXT", " baz"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -9001,70 +5424,22 @@ "input": "@if (a === 1) {
    }", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "if" - ], - [ - "TokenType.BLOCK_PARAMETER", - "a === 1" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TAG_OPEN_START", - "", - "div" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "}" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_NAME", - "", - "b" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "{" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TAG_CLOSE", - "", - "div" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "if"], + ["TokenType.BLOCK_PARAMETER", "a === 1"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TAG_OPEN_START", "", "div"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "}"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_NAME", "", "b"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "{"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TAG_CLOSE", "", "div"], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -9079,39 +5454,14 @@ "input": "
    ", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TAG_OPEN_START", - "", - "div" - ], - [ - "TokenType.ATTR_NAME", - "", - "a" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.ATTR_VALUE_TEXT", - "@if (foo) {}" - ], - [ - "TokenType.ATTR_QUOTE", - "\"" - ], - [ - "TokenType.TAG_OPEN_END" - ], - [ - "TokenType.TAG_CLOSE", - "", - "div" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TAG_OPEN_START", "", "div"], + ["TokenType.ATTR_NAME", "", "a"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.ATTR_VALUE_TEXT", "@if (foo) {}"], + ["TokenType.ATTR_QUOTE", "\""], + ["TokenType.TAG_OPEN_END"], + ["TokenType.TAG_CLOSE", "", "div"], + ["TokenType.EOF"] ], "options": null } @@ -9136,33 +5486,13 @@ "input": "@defer {{{message}}}", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.BLOCK_OPEN_START", - "defer" - ], - [ - "TokenType.BLOCK_OPEN_END" - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.INTERPOLATION", - "{{", - "message", - "}}" - ], - [ - "TokenType.TEXT", - "" - ], - [ - "TokenType.BLOCK_CLOSE" - ], - [ - "TokenType.EOF" - ] + ["TokenType.BLOCK_OPEN_START", "defer"], + ["TokenType.BLOCK_OPEN_END"], + ["TokenType.TEXT", ""], + ["TokenType.INTERPOLATION", "{{", "message", "}}"], + ["TokenType.TEXT", ""], + ["TokenType.BLOCK_CLOSE"], + ["TokenType.EOF"] ], "options": null } @@ -9177,21 +5507,10 @@ "input": "My email frodo@for.com", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "My email frodo" - ], - [ - "TokenType.INCOMPLETE_BLOCK_OPEN", - "for" - ], - [ - "TokenType.TEXT", - ".com" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", "My email frodo"], + ["TokenType.INCOMPLETE_BLOCK_OPEN", "for"], + ["TokenType.TEXT", ".com"], + ["TokenType.EOF"] ], "options": null } @@ -9206,17 +5525,9 @@ "input": "My favorite console is @switch", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "My favorite console is " - ], - [ - "TokenType.INCOMPLETE_BLOCK_OPEN", - "switch" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", "My favorite console is "], + ["TokenType.INCOMPLETE_BLOCK_OPEN", "switch"], + ["TokenType.EOF"] ], "options": null } @@ -9231,21 +5542,10 @@ "input": "Use the @for() block", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "Use the " - ], - [ - "TokenType.INCOMPLETE_BLOCK_OPEN", - "for" - ], - [ - "TokenType.TEXT", - "block" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", "Use the "], + ["TokenType.INCOMPLETE_BLOCK_OPEN", "for"], + ["TokenType.TEXT", "block"], + ["TokenType.EOF"] ], "options": null } @@ -9260,25 +5560,11 @@ "input": "This is the @if({alias: \"foo\"}) expression", "test_type": "HumanizeParts", "expected": [ - [ - "TokenType.TEXT", - "This is the " - ], - [ - "TokenType.INCOMPLETE_BLOCK_OPEN", - "if" - ], - [ - "TokenType.BLOCK_PARAMETER", - "{alias: \"foo\"}" - ], - [ - "TokenType.TEXT", - "expression" - ], - [ - "TokenType.EOF" - ] + ["TokenType.TEXT", "This is the "], + ["TokenType.INCOMPLETE_BLOCK_OPEN", "if"], + ["TokenType.BLOCK_PARAMETER", "{alias: \"foo\"}"], + ["TokenType.TEXT", "expression"], + ["TokenType.EOF"] ], "options": null } @@ -9292,15 +5578,7 @@ "type": "HtmlLexerTest", "input": "@", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "@" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "@"], ["TokenType.EOF"]], "options": null } ] @@ -9313,15 +5591,7 @@ "type": "HtmlLexerTest", "input": " @", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - " @" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", " @"], ["TokenType.EOF"]], "options": null } ] @@ -9334,15 +5604,7 @@ "type": "HtmlLexerTest", "input": "@ ", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "@ " - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "@ "], ["TokenType.EOF"]], "options": null } ] @@ -9355,15 +5617,7 @@ "type": "HtmlLexerTest", "input": "@\nfoo", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "@\nfoo" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "@\nfoo"], ["TokenType.EOF"]], "options": null } ] @@ -9376,15 +5630,7 @@ "type": "HtmlLexerTest", "input": "foo bar @ baz clink", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "foo bar @ baz clink" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "foo bar @ baz clink"], ["TokenType.EOF"]], "options": null } ] @@ -9397,15 +5643,7 @@ "type": "HtmlLexerTest", "input": "@ if", "test_type": "HumanizeParts", - "expected": [ - [ - "TokenType.TEXT", - "@ if" - ], - [ - "TokenType.EOF" - ] - ], + "expected": [["TokenType.TEXT", "@ if"], ["TokenType.EOF"]], "options": null } ] diff --git a/crates/angular_conformance/fixtures/render3_r3_ast_absolute_span_spec.json b/crates/angular_conformance/fixtures/render3_r3_ast_absolute_span_spec.json index 468364526..e55dbaee9 100644 --- a/crates/angular_conformance/fixtures/render3_r3_ast_absolute_span_spec.json +++ b/crates/angular_conformance/fixtures/render3_r3_ast_absolute_span_spec.json @@ -16,11 +16,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{1 + 2}}
    ", - "expected": [ - [ - "1 + 2" - ] - ], + "expected": [["1 + 2"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -37,14 +33,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{1 + 2}}
    ", - "expected": [ - [ - "1" - ], - [ - "2" - ] - ], + "expected": [["1"], ["2"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -67,11 +56,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{bool ? 1 : 0}}
    ", - "expected": [ - [ - "bool ? 1 : 0" - ] - ], + "expected": [["bool ? 1 : 0"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -88,17 +73,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{bool ? 1 : 0}}
    ", - "expected": [ - [ - "bool" - ], - [ - "1" - ], - [ - "0" - ] - ], + "expected": [["bool"], ["1"], ["0"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -121,11 +96,7 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [ - [ - "a(); b();" - ] - ], + "expected": [["a(); b();"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -142,14 +113,7 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [ - [ - "a()" - ], - [ - "b()" - ] - ], + "expected": [["a()"], ["b()"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -172,11 +136,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{fn()()}}
    ", - "expected": [ - [ - "fn()()" - ] - ], + "expected": [["fn()()"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -193,11 +153,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{fn()(param)}}
    ", - "expected": [ - [ - "param" - ] - ], + "expected": [["param"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -220,11 +176,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{1 + foo.length}}
    ", - "expected": [ - [ - "{{ 1 + foo.length }}" - ] - ], + "expected": [["{{ 1 + foo.length }}"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -241,14 +193,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{1 + 2}}
    ", - "expected": [ - [ - "1" - ], - [ - "2" - ] - ], + "expected": [["1"], ["2"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -265,11 +210,7 @@ { "type": "HumanizeExpressionSource", "input": " {{abc}}", - "expected": [ - [ - "abc" - ] - ], + "expected": [["abc"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -286,17 +227,7 @@ { "type": "HumanizeExpressionSource", "input": ""{{abc}}"{{def}} {{ghi}}", - "expected": [ - [ - "abc" - ], - [ - "def" - ], - [ - "ghi" - ] - ], + "expected": [["abc"], ["def"], ["ghi"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -313,11 +244,7 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [ - [ - "abc" - ] - ], + "expected": [["abc"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -334,11 +261,7 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [ - [ - "abc" - ] - ], + "expected": [["abc"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -355,14 +278,7 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [ - [ - "abc" - ], - [ - "def" - ] - ], + "expected": [["abc"], ["def"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -385,11 +301,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{obj[key]}}
    ", - "expected": [ - [ - "obj[key]" - ] - ], + "expected": [["obj[key]"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -406,11 +318,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{obj[key]}}
    ", - "expected": [ - [ - "key" - ] - ], + "expected": [["key"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -433,11 +341,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{obj[key] = 0}}
    ", - "expected": [ - [ - "obj[key] = 0" - ] - ], + "expected": [["obj[key] = 0"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -454,14 +358,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{obj[key] = 0}}
    ", - "expected": [ - [ - "key" - ], - [ - "0" - ] - ], + "expected": [["key"], ["0"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -484,11 +381,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{[0, 1, 2]}}
    ", - "expected": [ - [ - "[0, 1, 2]" - ] - ], + "expected": [["[0, 1, 2]"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -505,17 +398,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{[0, 1, 2]}}
    ", - "expected": [ - [ - "0" - ], - [ - "1" - ], - [ - "2" - ] - ], + "expected": [["0"], ["1"], ["2"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -538,11 +421,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{ {a: 0} }}
    ", - "expected": [ - [ - "{a: 0}" - ] - ], + "expected": [["{a: 0}"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -559,11 +438,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{ {a: 0} }}
    ", - "expected": [ - [ - "0" - ] - ], + "expected": [["0"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -586,11 +461,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{method()}}
    ", - "expected": [ - [ - "method()" - ] - ], + "expected": [["method()"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -607,11 +478,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{method(param)}}
    ", - "expected": [ - [ - "param" - ] - ], + "expected": [["param"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -634,11 +501,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop!}}
    ", - "expected": [ - [ - "prop!" - ] - ], + "expected": [["prop!"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -655,11 +518,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop!}}
    ", - "expected": [ - [ - "prop" - ] - ], + "expected": [["prop"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -682,11 +541,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop | pipe}}
    ", - "expected": [ - [ - "(prop | pipe)" - ] - ], + "expected": [["(prop | pipe)"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -703,11 +558,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop | pipe}}
    ", - "expected": [ - [ - "prop" - ] - ], + "expected": [["prop"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -730,11 +581,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop.obj}}
    ", - "expected": [ - [ - "prop.obj" - ] - ], + "expected": [["prop.obj"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -751,11 +598,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop.obj}}
    ", - "expected": [ - [ - "prop" - ] - ], + "expected": [["prop"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -778,11 +621,7 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [ - [ - "prop = 0" - ] - ], + "expected": [["prop = 0"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -799,11 +638,7 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [ - [ - "prop.inner = 0" - ] - ], + "expected": [["prop.inner = 0"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -820,11 +655,7 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [ - [ - "0" - ] - ], + "expected": [["0"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -847,11 +678,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{!prop}}
    ", - "expected": [ - [ - "!prop" - ] - ], + "expected": [["!prop"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -868,11 +695,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{!prop}}
    ", - "expected": [ - [ - "prop" - ] - ], + "expected": [["prop"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -895,11 +718,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop?.safe()}}
    ", - "expected": [ - [ - "prop?.safe()" - ] - ], + "expected": [["prop?.safe()"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -916,11 +735,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop?.safe()}}
    ", - "expected": [ - [ - "prop" - ] - ], + "expected": [["prop"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -943,11 +758,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop?.safe}}
    ", - "expected": [ - [ - "prop?.safe" - ] - ], + "expected": [["prop?.safe"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -964,11 +775,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{prop?.safe}}
    ", - "expected": [ - [ - "prop" - ] - ], + "expected": [["prop"]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": false, @@ -991,11 +798,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{item}}
    ", - "expected": [ - [ - "items" - ] - ], + "expected": [["items"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -1012,14 +815,7 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [ - [ - "As" - ], - [ - "Bs" - ] - ], + "expected": [["As"], ["Bs"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -1067,11 +863,7 @@ { "type": "HumanizeExpressionSource", "input": "{{foo // comment}}", - "expected": [ - [ - "foo" - ] - ], + "expected": [["foo"]], "options": { "preserve_whitespaces": true }, @@ -1090,11 +882,7 @@ { "type": "HumanizeExpressionSource", "input": "{{ foo }}", - "expected": [ - [ - "foo" - ] - ], + "expected": [["foo"]], "options": { "preserve_whitespaces": true }, @@ -1113,11 +901,7 @@ { "type": "HumanizeExpressionSource", "input": "{{ foo // comment }}", - "expected": [ - [ - "foo" - ] - ], + "expected": [["foo"]], "options": { "preserve_whitespaces": true }, @@ -1136,11 +920,7 @@ { "type": "HumanizeExpressionSource", "input": "", - "expected": [ - [ - "foo = true" - ] - ], + "expected": [["foo = true"]], "options": { "preserve_whitespaces": true }, @@ -1159,11 +939,7 @@ { "type": "HumanizeExpressionSource", "input": "
    \n \n{{foo}}
    ", - "expected": [ - [ - "\n \n{{ foo }}" - ] - ], + "expected": [["\n \n{{ foo }}"]], "options": { "preserve_whitespaces": true }, @@ -1182,11 +958,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{foo}}
    ", - "expected": [ - [ - "{{ foo }}" - ] - ], + "expected": [["{{ foo }}"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -1203,11 +975,7 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [ - [ - "foo(); bar();" - ] - ], + "expected": [["foo(); bar();"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -1218,11 +986,7 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [ - [ - "foo(); bar();" - ] - ], + "expected": [["foo(); bar();"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -1239,11 +1003,7 @@ { "type": "HumanizeExpressionSource", "input": "", - "expected": [ - [ - "condition ? true : false" - ] - ], + "expected": [["condition ? true : false"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -1254,11 +1014,7 @@ { "type": "HumanizeExpressionSource", "input": "", - "expected": [ - [ - "condition ? true : false" - ] - ], + "expected": [["condition ? true : false"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -1275,11 +1031,7 @@ { "type": "HumanizeExpressionSource", "input": "
    ", - "expected": [ - [ - "(value | async)" - ] - ], + "expected": [["(value | async)"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, @@ -1296,11 +1048,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{a.b}}
    ", - "expected": [ - [ - "" - ] - ], + "expected": [[""]], "options": null, "extract_sub_expressions": true, "find_implicit_receiver": true, @@ -1317,11 +1065,7 @@ { "type": "HumanizeExpressionSource", "input": "
    {{100}}
    ", - "expected": [ - [ - "100" - ] - ], + "expected": [["100"]], "options": null, "extract_sub_expressions": false, "find_implicit_receiver": false, diff --git a/crates/angular_conformance/fixtures/render3_r3_ast_spans_spec.json b/crates/angular_conformance/fixtures/render3_r3_ast_spans_spec.json index 1ca6054a7..1a84935d1 100644 --- a/crates/angular_conformance/fixtures/render3_r3_ast_spans_spec.json +++ b/crates/angular_conformance/fixtures/render3_r3_ast_spans_spec.json @@ -16,12 +16,7 @@ { "type": "ExpectFromHtml", "input": "a", - "expected": [ - [ - "Text", - "a" - ] - ], + "expected": [["Text", "a"]], "ignore_error": false } ] @@ -34,18 +29,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "TextAttribute", - "a=\"b\"", - "a", - "b" - ] + ["Element", "
    ", "
    ", "
    "], + ["TextAttribute", "a=\"b\"", "a", "b"] ], "ignore_error": false } @@ -59,18 +44,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "TextAttribute", - "a", - "a", - "" - ] + ["Element", "
    ", "
    ", "
    "], + ["TextAttribute", "a", "a", ""] ], "ignore_error": false } @@ -84,18 +59,8 @@ "type": "ExpectFromHtml", "input": "\n \n", "expected": [ - [ - "Element", - "", - "", - "" - ], - [ - "Element", - "\n", - "", - "" - ] + ["Element", "", "", ""], + ["Element", "\n", "", ""] ], "ignore_error": false } @@ -114,12 +79,7 @@ { "type": "ExpectFromHtml", "input": "{{a}}", - "expected": [ - [ - "BoundText", - "{{a}}" - ] - ], + "expected": [["BoundText", "{{a}}"]], "ignore_error": false } ] @@ -138,18 +98,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "BoundAttribute", - "[someProp]=\"v\"", - "someProp", - "v" - ] + ["Element", "
    ", "
    ", "
    "], + ["BoundAttribute", "[someProp]=\"v\"", "someProp", "v"] ], "ignore_error": false } @@ -163,18 +113,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "BoundAttribute", - "[someProp]", - "someProp", - "" - ] + ["Element", "
    ", "
    ", "
    "], + ["BoundAttribute", "[someProp]", "someProp", ""] ], "ignore_error": false } @@ -188,18 +128,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "BoundAttribute", - "bind-prop=\"v\"", - "prop", - "v" - ] + ["Element", "
    ", "
    ", "
    "], + ["BoundAttribute", "bind-prop=\"v\"", "prop", "v"] ], "ignore_error": false } @@ -213,18 +143,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "BoundAttribute", - "prop=\"{{v}}\"", - "prop", - "{{v}}" - ] + ["Element", "
    ", "
    ", "
    "], + ["BoundAttribute", "prop=\"{{v}}\"", "prop", "{{v}}"] ], "ignore_error": false } @@ -244,12 +164,7 @@ "
    ", "
    " ], - [ - "BoundAttribute", - "data-prop=\"{{v}}\"", - "data-prop", - "{{v}}" - ] + ["BoundAttribute", "data-prop=\"{{v}}\"", "data-prop", "{{v}}"] ], "ignore_error": false } @@ -269,12 +184,7 @@ "
    ", "
    " ], - [ - "BoundAttribute", - "bind-@animation=\"v\"", - "animation", - "v" - ] + ["BoundAttribute", "bind-@animation=\"v\"", "animation", "v"] ], "ignore_error": false } @@ -294,12 +204,7 @@ "
    ", "
    " ], - [ - "BoundAttribute", - "bind-animate-animationName=\"v\"", - "animationName", - "v" - ] + ["BoundAttribute", "bind-animate-animationName=\"v\"", "animationName", "v"] ], "ignore_error": false } @@ -313,18 +218,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "BoundAttribute", - "@animation", - "animation", - "" - ] + ["Element", "
    ", "
    ", "
    "], + ["BoundAttribute", "@animation", "animation", ""] ], "ignore_error": false } @@ -354,24 +249,9 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Template", - "
    ", - "
    ", - "
    " - ], - [ - "TextAttribute", - "ngIf", - "ngIf", - "" - ], - [ - "Element", - "
    ", - "
    ", - "
    " - ] + ["Template", "
    ", "
    ", "
    "], + ["TextAttribute", "ngIf", "ngIf", ""], + ["Element", "
    ", "
    ", "
    "] ], "ignore_error": false } @@ -385,12 +265,7 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - [ - "Template", - "", - "", - "" - ] + ["Template", "", "", ""] ], "ignore_error": false } @@ -410,12 +285,7 @@ "", "" ], - [ - "Reference", - "#a", - "a", - "" - ] + ["Reference", "#a", "a", ""] ], "ignore_error": false } @@ -435,12 +305,7 @@ "", "" ], - [ - "Reference", - "#a=\"b\"", - "a", - "b" - ] + ["Reference", "#a=\"b\"", "a", "b"] ], "ignore_error": false } @@ -460,12 +325,7 @@ "", "" ], - [ - "Reference", - "ref-a", - "a", - "" - ] + ["Reference", "ref-a", "a", ""] ], "ignore_error": false } @@ -485,12 +345,7 @@ "", "" ], - [ - "TextAttribute", - "data-ref-a", - "data-ref-a", - "" - ] + ["TextAttribute", "data-ref-a", "data-ref-a", ""] ], "ignore_error": false } @@ -510,12 +365,7 @@ "", "" ], - [ - "Variable", - "let-a=\"b\"", - "a", - "b" - ] + ["Variable", "let-a=\"b\"", "a", "b"] ], "ignore_error": false } @@ -535,12 +385,7 @@ "", "" ], - [ - "TextAttribute", - "data-let-a=\"b\"", - "data-let-a", - "b" - ] + ["TextAttribute", "data-let-a=\"b\"", "data-let-a", "b"] ], "ignore_error": false } @@ -560,12 +405,7 @@ "", "" ], - [ - "TextAttribute", - "k1=\"v1\"", - "k1", - "v1" - ] + ["TextAttribute", "k1=\"v1\"", "k1", "v1"] ], "ignore_error": false } @@ -585,12 +425,7 @@ "", "" ], - [ - "BoundAttribute", - "[k1]=\"v1\"", - "k1", - "v1" - ] + ["BoundAttribute", "[k1]=\"v1\"", "k1", "v1"] ], "ignore_error": false } @@ -616,24 +451,9 @@ "
    ", "
    " ], - [ - "TextAttribute", - "ngFor", - "ngFor", - "" - ], - [ - "BoundAttribute", - "of items", - "of", - "items" - ], - [ - "Variable", - "let item ", - "item", - "" - ], + ["TextAttribute", "ngFor", "ngFor", ""], + ["BoundAttribute", "of items", "of", "items"], + ["Variable", "let item ", "item", ""], [ "Element", "
    ", @@ -653,18 +473,8 @@ "
    ", "
    " ], - [ - "BoundAttribute", - "ngFor=\"item ", - "ngFor", - "item" - ], - [ - "BoundAttribute", - "of items", - "of", - "items" - ], + ["BoundAttribute", "ngFor=\"item ", "ngFor", "item"], + ["BoundAttribute", "of items", "of", "items"], [ "Element", "
    ", @@ -684,30 +494,10 @@ "
    ", "
    " ], - [ - "TextAttribute", - "ngFor", - "ngFor", - "" - ], - [ - "BoundAttribute", - "of items; ", - "of", - "items" - ], - [ - "BoundAttribute", - "trackBy: trackByFn", - "trackBy", - "trackByFn" - ], - [ - "Variable", - "let item ", - "item", - "" - ], + ["TextAttribute", "ngFor", "ngFor", ""], + ["BoundAttribute", "of items; ", "of", "items"], + ["BoundAttribute", "trackBy: trackByFn", "trackBy", "trackByFn"], + ["Variable", "let item ", "item", ""], [ "Element", "
    ", @@ -733,18 +523,8 @@ "
    ", "
    " ], - [ - "TextAttribute", - "ngIf", - "ngIf", - "" - ], - [ - "Variable", - "let a=b", - "a", - "b" - ], + ["TextAttribute", "ngIf", "ngIf", ""], + ["Variable", "let a=b", "a", "b"], [ "Element", "
    ", @@ -770,18 +550,8 @@ "
    ", "
    " ], - [ - "BoundAttribute", - "ngIf=\"expr ", - "ngIf", - "expr" - ], - [ - "Variable", - "ngIf=\"expr as local", - "local", - "ngIf" - ], + ["BoundAttribute", "ngIf=\"expr ", "ngIf", "expr"], + ["Variable", "ngIf=\"expr as local", "local", "ngIf"], [ "Element", "
    ", @@ -813,12 +583,7 @@ "
    ", "
    " ], - [ - "BoundEvent", - "(someEvent)=\"v\"", - "someEvent", - "v" - ] + ["BoundEvent", "(someEvent)=\"v\"", "someEvent", "v"] ], "ignore_error": false } @@ -832,18 +597,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "BoundEvent", - "on-event=\"v\"", - "event", - "v" - ] + ["Element", "
    ", "
    ", "
    "], + ["BoundEvent", "on-event=\"v\"", "event", "v"] ], "ignore_error": false } @@ -863,12 +618,7 @@ "
    ", "
    " ], - [ - "TextAttribute", - "data-on-event=\"v\"", - "data-on-event", - "v" - ] + ["TextAttribute", "data-on-event=\"v\"", "data-on-event", "v"] ], "ignore_error": false } @@ -882,24 +632,9 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "BoundAttribute", - "[(prop)]=\"v\"", - "prop", - "v" - ], - [ - "BoundEvent", - "[(prop)]=\"v\"", - "prop", - "v" - ] + ["Element", "
    ", "
    ", "
    "], + ["BoundAttribute", "[(prop)]=\"v\"", "prop", "v"], + ["BoundEvent", "[(prop)]=\"v\"", "prop", "v"] ], "ignore_error": false } @@ -919,18 +654,8 @@ "
    ", "
    " ], - [ - "BoundAttribute", - "bindon-prop=\"v\"", - "prop", - "v" - ], - [ - "BoundEvent", - "bindon-prop=\"v\"", - "prop", - "v" - ] + ["BoundAttribute", "bindon-prop=\"v\"", "prop", "v"], + ["BoundEvent", "bindon-prop=\"v\"", "prop", "v"] ], "ignore_error": false } @@ -950,12 +675,7 @@ "
    ", "
    " ], - [ - "TextAttribute", - "data-bindon-prop=\"v\"", - "data-bindon-prop", - "v" - ] + ["TextAttribute", "data-bindon-prop=\"v\"", "data-bindon-prop", "v"] ], "ignore_error": false } @@ -975,12 +695,7 @@ "
    ", "
    " ], - [ - "BoundEvent", - "(@name.done)=\"v\"", - "name.done", - "v" - ] + ["BoundEvent", "(@name.done)=\"v\"", "name.done", "v"] ], "ignore_error": false } @@ -1000,18 +715,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "Reference", - "#a", - "a", - "" - ] + ["Element", "
    ", "
    ", "
    "], + ["Reference", "#a", "a", ""] ], "ignore_error": false } @@ -1025,18 +730,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "Reference", - "#a=\"b\"", - "a", - "b" - ] + ["Element", "
    ", "
    ", "
    "], + ["Reference", "#a=\"b\"", "a", "b"] ], "ignore_error": false } @@ -1050,18 +745,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "Reference", - "ref-a", - "a", - "" - ] + ["Element", "
    ", "
    ", "
    "], + ["Reference", "ref-a", "a", ""] ], "ignore_error": false } @@ -1087,18 +772,9 @@ "", "" ], - [ - "Icu", - "{item.var, plural, other { {{item.placeholder}} items } }" - ], - [ - "Icu:Var", - "item.var" - ], - [ - "Icu:Placeholder", - "{{item.placeholder}}" - ] + ["Icu", "{item.var, plural, other { {{item.placeholder}} items } }"], + ["Icu:Var", "item.var"], + ["Icu:Placeholder", "{{item.placeholder}}"] ], "ignore_error": false } @@ -1122,22 +798,10 @@ "Icu", "{item.var, plural, other { {{item.placeholder}} {nestedVar, plural, other { {{nestedPlaceholder}} }}} }" ], - [ - "Icu:Var", - "nestedVar" - ], - [ - "Icu:Var", - "item.var" - ], - [ - "Icu:Placeholder", - "{{item.placeholder}}" - ], - [ - "Icu:Placeholder", - "{{nestedPlaceholder}}" - ] + ["Icu:Var", "nestedVar"], + ["Icu:Var", "item.var"], + ["Icu:Placeholder", "{{item.placeholder}}"], + ["Icu:Placeholder", "{{nestedPlaceholder}}"] ], "ignore_error": false } @@ -1163,96 +827,41 @@ "@defer (when isVisible() && foo; on hover(button), timer(10s), idle, immediate, interaction(button), viewport(container); prefetch on immediate; prefetch when isDataLoaded(); hydrate on interaction; hydrate when isVisible(); hydrate on timer(1200)) {", "}" ], - [ - "InteractionDeferredTrigger", - "hydrate on interaction" - ], - [ - "BoundDeferredTrigger", - "hydrate when isVisible()" - ], - [ - "TimerDeferredTrigger", - "hydrate on timer(1200)" - ], - [ - "BoundDeferredTrigger", - "when isVisible() && foo" - ], - [ - "HoverDeferredTrigger", - "on hover(button)" - ], - [ - "TimerDeferredTrigger", - "timer(10s)" - ], - [ - "IdleDeferredTrigger", - "idle" - ], - [ - "ImmediateDeferredTrigger", - "immediate" - ], - [ - "InteractionDeferredTrigger", - "interaction(button)" - ], - [ - "ViewportDeferredTrigger", - "viewport(container)" - ], - [ - "ImmediateDeferredTrigger", - "prefetch on immediate" - ], - [ - "BoundDeferredTrigger", - "prefetch when isDataLoaded()" - ], + ["InteractionDeferredTrigger", "hydrate on interaction"], + ["BoundDeferredTrigger", "hydrate when isVisible()"], + ["TimerDeferredTrigger", "hydrate on timer(1200)"], + ["BoundDeferredTrigger", "when isVisible() && foo"], + ["HoverDeferredTrigger", "on hover(button)"], + ["TimerDeferredTrigger", "timer(10s)"], + ["IdleDeferredTrigger", "idle"], + ["ImmediateDeferredTrigger", "immediate"], + ["InteractionDeferredTrigger", "interaction(button)"], + ["ViewportDeferredTrigger", "viewport(container)"], + ["ImmediateDeferredTrigger", "prefetch on immediate"], + ["BoundDeferredTrigger", "prefetch when isDataLoaded()"], [ "Element", "", "", "" ], - [ - "BoundAttribute", - "[date]=\"current\"", - "date", - "current" - ], + ["BoundAttribute", "[date]=\"current\"", "date", "current"], [ "DeferredBlockPlaceholder", "@placeholder (minimum 500) {Placeholder content!}", "@placeholder (minimum 500) {", "}" ], - [ - "Text", - "Placeholder content!" - ], + ["Text", "Placeholder content!"], [ "DeferredBlockLoading", "@loading (minimum 1s; after 100ms) {Loading...}", "@loading (minimum 1s; after 100ms) {", "}" ], - [ - "Text", - "Loading..." - ], - [ - "DeferredBlockError", - "@error {Loading failed :(}", - "@error {", - "}" - ], - [ - "Text", - "Loading failed :(" - ] + ["Text", "Loading..."], + ["DeferredBlockError", "@error {Loading failed :(}", "@error {", "}"], + ["Text", "Loading failed :("] ], "ignore_error": false } @@ -1278,62 +887,18 @@ "@switch (cond.kind) {", "}" ], - [ - "SwitchBlockCaseGroup", - "@case (x()) {X case}", - "@case (x()) {" - ], - [ - "SwitchBlockCase", - "@case (x()) {X case}", - "@case (x()) {" - ], - [ - "Text", - "X case" - ], - [ - "SwitchBlockCaseGroup", - "@case ('hello') {Y case}", - "@case ('hello') {" - ], - [ - "SwitchBlockCase", - "@case ('hello') {Y case}", - "@case ('hello') {" - ], - [ - "Text", - "Y case" - ], - [ - "SwitchBlockCaseGroup", - "@case (42) {Z case}", - "@case (42) {" - ], - [ - "SwitchBlockCase", - "@case (42) {Z case}", - "@case (42) {" - ], - [ - "Text", - "Z case" - ], - [ - "SwitchBlockCaseGroup", - "@default {No case matched}", - "@default {" - ], - [ - "SwitchBlockCase", - "@default {No case matched}", - "@default {" - ], - [ - "Text", - "No case matched" - ] + ["SwitchBlockCaseGroup", "@case (x()) {X case}", "@case (x()) {"], + ["SwitchBlockCase", "@case (x()) {X case}", "@case (x()) {"], + ["Text", "X case"], + ["SwitchBlockCaseGroup", "@case ('hello') {Y case}", "@case ('hello') {"], + ["SwitchBlockCase", "@case ('hello') {Y case}", "@case ('hello') {"], + ["Text", "Y case"], + ["SwitchBlockCaseGroup", "@case (42) {Z case}", "@case (42) {"], + ["SwitchBlockCase", "@case (42) {Z case}", "@case (42) {"], + ["Text", "Z case"], + ["SwitchBlockCaseGroup", "@default {No case matched}", "@default {"], + ["SwitchBlockCase", "@default {No case matched}", "@default {"], + ["Text", "No case matched"] ], "ignore_error": false } @@ -1358,34 +923,12 @@ "@case (x()) @case ('hello') {X case}", "@case (x()) @case ('hello') {" ], - [ - "SwitchBlockCase", - "@case (x()) ", - "@case (x()) " - ], - [ - "SwitchBlockCase", - "@case ('hello') {X case}", - "@case ('hello') {" - ], - [ - "Text", - "X case" - ], - [ - "SwitchBlockCaseGroup", - "@default {No case matched}", - "@default {" - ], - [ - "SwitchBlockCase", - "@default {No case matched}", - "@default {" - ], - [ - "Text", - "No case matched" - ] + ["SwitchBlockCase", "@case (x()) ", "@case (x()) "], + ["SwitchBlockCase", "@case ('hello') {X case}", "@case ('hello') {"], + ["Text", "X case"], + ["SwitchBlockCaseGroup", "@default {No case matched}", "@default {"], + ["SwitchBlockCase", "@default {No case matched}", "@default {"], + ["Text", "No case matched"] ], "ignore_error": false } @@ -1405,25 +948,10 @@ "@switch (cond.kind) {", "}" ], - [ - "SwitchBlockCaseGroup", - "@case (x()) {X case}", - "@case (x()) {" - ], - [ - "SwitchBlockCase", - "@case (x()) {X case}", - "@case (x()) {" - ], - [ - "Text", - "X case" - ], - [ - "SwitchExhaustiveCheck", - "@default never;", - "@default never;" - ] + ["SwitchBlockCaseGroup", "@case (x()) {X case}", "@case (x()) {"], + ["SwitchBlockCase", "@case (x()) {X case}", "@case (x()) {"], + ["Text", "X case"], + ["SwitchExhaustiveCheck", "@default never;", "@default never;"] ], "ignore_error": false } @@ -1449,79 +977,19 @@ "@for (item of items.foo.bar; track item.id; let i = $index, _o_d_d_ = $odd) {", "}" ], - [ - "Variable", - "item", - "item", - "" - ], - [ - "Variable", - "", - "", - "" - ], - [ - "Variable", - "", - "", - "" - ], - [ - "Variable", - "", - "", - "" - ], - [ - "Variable", - "", - "", - "" - ], - [ - "Variable", - "", - "", - "" - ], - [ - "Variable", - "", - "", - "" - ], - [ - "Variable", - "i = $index", - "i", - "$index" - ], - [ - "Variable", - "_o_d_d_ = $odd", - "_o_d_d_", - "$odd" - ], - [ - "Element", - "

    {{ item }}

    ", - "

    ", - "

    " - ], - [ - "BoundText", - "{{ item }}" - ], - [ - "ForLoopBlockEmpty", - "@empty {There were no items in the list.}", - "@empty {" - ], - [ - "Text", - "There were no items in the list." - ] + ["Variable", "item", "item", ""], + ["Variable", "", "", ""], + ["Variable", "", "", ""], + ["Variable", "", "", ""], + ["Variable", "", "", ""], + ["Variable", "", "", ""], + ["Variable", "", "", ""], + ["Variable", "i = $index", "i", "$index"], + ["Variable", "_o_d_d_ = $odd", "_o_d_d_", "$odd"], + ["Element", "

    {{ item }}

    ", "

    ", "

    "], + ["BoundText", "{{ item }}"], + ["ForLoopBlockEmpty", "@empty {There were no items in the list.}", "@empty {"], + ["Text", "There were no items in the list."] ], "ignore_error": false } @@ -1552,34 +1020,16 @@ "@if (cond.expr; as foo) {Main case was true!}", "@if (cond.expr; as foo) {" ], - [ - "Variable", - "foo", - "foo", - "" - ], - [ - "Text", - "Main case was true!" - ], + ["Variable", "foo", "foo", ""], + ["Text", "Main case was true!"], [ "IfBlockBranch", "@else if (other.expr) {Extra case was true!}", "@else if (other.expr) {" ], - [ - "Text", - "Extra case was true!" - ], - [ - "IfBlockBranch", - "@else {False case!}", - "@else {" - ], - [ - "Text", - "False case!" - ] + ["Text", "Extra case was true!"], + ["IfBlockBranch", "@else {False case!}", "@else {"], + ["Text", "False case!"] ], "ignore_error": false } @@ -1598,14 +1048,7 @@ { "type": "ExpectFromHtml", "input": "@let foo = 123;", - "expected": [ - [ - "LetDeclaration", - "@let foo = 123;", - "foo", - "123" - ] - ], + "expected": [["LetDeclaration", "@let foo = 123;", "foo", "123"]], "ignore_error": false } ] @@ -1623,14 +1066,7 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [ - [ - "Component", - "", - "", - "" - ] - ], + "expected": [["Component", "", "", ""]], "ignore_error": true } ] @@ -1642,14 +1078,7 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [ - [ - "Component", - "", - "", - "" - ] - ], + "expected": [["Component", "", "", ""]], "ignore_error": true } ] @@ -1687,52 +1116,14 @@ "", "" ], - [ - "TextAttribute", - "before=\"foo\"", - "before", - "foo" - ], - [ - "TextAttribute", - "middle", - "middle", - "" - ], - [ - "TextAttribute", - "after=\"123\"", - "after", - "123" - ], - [ - "Directive", - "@Dir", - "@Dir", - "" - ], - [ - "Directive", - "@OtherDir([a]=\"a\" (b)=\"b()\")", - "@OtherDir(", - ")" - ], - [ - "BoundAttribute", - "[a]=\"a\"", - "a", - "a" - ], - [ - "BoundEvent", - "(b)=\"b()\"", - "b", - "b()" - ], - [ - "Text", - "Hello" - ] + ["TextAttribute", "before=\"foo\"", "before", "foo"], + ["TextAttribute", "middle", "middle", ""], + ["TextAttribute", "after=\"123\"", "after", "123"], + ["Directive", "@Dir", "@Dir", ""], + ["Directive", "@OtherDir([a]=\"a\" (b)=\"b()\")", "@OtherDir(", ")"], + ["BoundAttribute", "[a]=\"a\"", "a", "a"], + ["BoundEvent", "(b)=\"b()\"", "b", "b()"], + ["Text", "Hello"] ], "ignore_error": true } @@ -1763,28 +1154,15 @@ "
    ", "
    " ], - [ - "Text", - "Hello: " - ], + ["Text", "Hello: "], [ "Component", "", "", "" ], - [ - "Element", - "", - "", - "" - ], - [ - "Component", - "", - "", - "" - ] + ["Element", "", "", ""], + ["Component", "", "", ""] ], "ignore_error": true } @@ -1804,18 +1182,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "
    ", - "
    ", - "
    " - ], - [ - "Directive", - "@Dir", - "@Dir", - "" - ] + ["Element", "
    ", "
    ", "
    "], + ["Directive", "@Dir", "@Dir", ""] ], "ignore_error": true } @@ -1835,30 +1203,10 @@ "
    ", "
    " ], - [ - "Directive", - "@Dir(a=\"1\" [b]=\"two\" (c)=\"c()\")", - "@Dir(", - ")" - ], - [ - "TextAttribute", - "a=\"1\"", - "a", - "1" - ], - [ - "BoundAttribute", - "[b]=\"two\"", - "b", - "two" - ], - [ - "BoundEvent", - "(c)=\"c()\"", - "c", - "c()" - ] + ["Directive", "@Dir(a=\"1\" [b]=\"two\" (c)=\"c()\")", "@Dir(", ")"], + ["TextAttribute", "a=\"1\"", "a", "1"], + ["BoundAttribute", "[b]=\"two\"", "b", "two"], + ["BoundEvent", "(c)=\"c()\"", "c", "c()"] ], "ignore_error": true } @@ -1878,48 +1226,13 @@ "
    ", "
    " ], - [ - "TextAttribute", - "before=\"foo\"", - "before", - "foo" - ], - [ - "TextAttribute", - "middle", - "middle", - "" - ], - [ - "TextAttribute", - "after=\"123\"", - "after", - "123" - ], - [ - "Directive", - "@Dir", - "@Dir", - "" - ], - [ - "Directive", - "@OtherDir([a]=\"a\" (b)=\"b()\")", - "@OtherDir(", - ")" - ], - [ - "BoundAttribute", - "[a]=\"a\"", - "a", - "a" - ], - [ - "BoundEvent", - "(b)=\"b()\"", - "b", - "b()" - ] + ["TextAttribute", "before=\"foo\"", "before", "foo"], + ["TextAttribute", "middle", "middle", ""], + ["TextAttribute", "after=\"123\"", "after", "123"], + ["Directive", "@Dir", "@Dir", ""], + ["Directive", "@OtherDir([a]=\"a\" (b)=\"b()\")", "@OtherDir(", ")"], + ["BoundAttribute", "[a]=\"a\"", "a", "a"], + ["BoundEvent", "(b)=\"b()\"", "b", "b()"] ], "ignore_error": true } diff --git a/crates/angular_conformance/fixtures/render3_r3_template_transform_spec.json b/crates/angular_conformance/fixtures/render3_r3_template_transform_spec.json index 8223598f7..c1794704f 100644 --- a/crates/angular_conformance/fixtures/render3_r3_template_transform_spec.json +++ b/crates/angular_conformance/fixtures/render3_r3_template_transform_spec.json @@ -27,12 +27,7 @@ { "type": "ExpectFromHtml", "input": "", "expected": [ - [ - "Element", - "a" - ], - [ - "Element", - "span" - ] + ["Element", "a"], + ["Element", "span"] ], "ignore_error": true } @@ -65,12 +54,7 @@ { "type": "ExpectFromHtml", "input": "a", - "expected": [ - [ - "Text", - "a" - ] - ], + "expected": [["Text", "a"]], "ignore_error": false } ] @@ -83,15 +67,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "TextAttribute", - "a", - "b" - ] + ["Element", "div"], + ["TextAttribute", "a", "b"] ], "ignore_error": false } @@ -110,15 +87,8 @@ "type": "ExpectFromHtml", "input": " \n ", "expected": [ - [ - "Content", - "a" - ], - [ - "TextAttribute", - "select", - "a" - ] + ["Content", "a"], + ["TextAttribute", "select", "a"] ], "ignore_error": false } @@ -132,19 +102,9 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - [ - "Element", - ":svg:svg" - ], - [ - "Content", - "a" - ], - [ - "TextAttribute", - "select", - "a" - ] + ["Element", ":svg:svg"], + ["Content", "a"], + ["TextAttribute", "select", "a"] ], "ignore_error": false } @@ -168,12 +128,7 @@ { "type": "ExpectFromHtml", "input": "{{a}}", - "expected": [ - [ - "BoundText", - "{{ a }}" - ] - ], + "expected": [["BoundText", "{{ a }}"]], "ignore_error": false } ] @@ -192,16 +147,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 0, - "someProp", - "v" - ] + ["Element", "div"], + ["BoundAttribute", 0, "someProp", "v"] ], "ignore_error": false } @@ -215,16 +162,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 0, - "prop", - "v" - ] + ["Element", "div"], + ["BoundAttribute", 0, "prop", "v"] ], "ignore_error": false } @@ -243,16 +182,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 0, - "prop", - "{{ v }}" - ] + ["Element", "div"], + ["BoundAttribute", 0, "prop", "{{ v }}"] ], "ignore_error": false } @@ -266,16 +197,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 0, - "some-prop", - "v" - ] + ["Element", "div"], + ["BoundAttribute", 0, "some-prop", "v"] ], "ignore_error": false } @@ -289,16 +212,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 0, - "d.ot", - "v" - ] + ["Element", "div"], + ["BoundAttribute", 0, "d.ot", "v"] ], "ignore_error": false } @@ -312,16 +227,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 0, - "mappedAttr", - "v" - ] + ["Element", "div"], + ["BoundAttribute", 0, "mappedAttr", "v"] ], "ignore_error": false } @@ -335,16 +242,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 1, - "someAttr", - "v" - ] + ["Element", "div"], + ["BoundAttribute", 1, "someAttr", "v"] ], "ignore_error": false } @@ -358,16 +257,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 2, - "some-class", - "v" - ] + ["Element", "div"], + ["BoundAttribute", 2, "some-class", "v"] ], "ignore_error": false } @@ -381,16 +272,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 2, - "someClass", - "v" - ] + ["Element", "div"], + ["BoundAttribute", 2, "someClass", "v"] ], "ignore_error": false } @@ -404,16 +287,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 3, - "someStyle", - "v" - ] + ["Element", "div"], + ["BoundAttribute", 3, "someStyle", "v"] ], "ignore_error": false } @@ -427,34 +302,11 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - [ - "Element", - "foo", - "#selfClosing" - ], - [ - "TextAttribute", - "some-attr", - "" - ], - [ - "BoundAttribute", - 2, - "text-primary/80", - "expr" - ], - [ - "BoundAttribute", - 2, - "data-active:text-green-300/80", - "expr2" - ], - [ - "BoundAttribute", - 2, - "data-[size='large']:p-8", - "expr3" - ] + ["Element", "foo", "#selfClosing"], + ["TextAttribute", "some-attr", ""], + ["BoundAttribute", 2, "text-primary/80", "expr"], + ["BoundAttribute", 2, "data-active:text-green-300/80", "expr2"], + ["BoundAttribute", 2, "data-[size='large']:p-8", "expr3"] ], "ignore_error": false } @@ -474,15 +326,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "TextAttribute", - "animate.enter", - "foo" - ] + ["Element", "div"], + ["TextAttribute", "animate.enter", "foo"] ], "ignore_error": false }, @@ -490,16 +335,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 6.0, - "animate.enter", - "[\"foo\", \"bar\"]" - ] + ["Element", "div"], + ["BoundAttribute", 6.0, "animate.enter", "[\"foo\", \"bar\"]"] ], "ignore_error": false }, @@ -507,17 +344,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundEvent", - 3.0, - "animate.enter", - null, - "animateFn($event)" - ] + ["Element", "div"], + ["BoundEvent", 3.0, "animate.enter", null, "animateFn($event)"] ], "ignore_error": false } @@ -531,15 +359,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "TextAttribute", - "animate.leave", - "foo" - ] + ["Element", "div"], + ["TextAttribute", "animate.leave", "foo"] ], "ignore_error": false }, @@ -547,16 +368,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 6.0, - "animate.leave", - "[\"foo\", \"bar\"]" - ] + ["Element", "div"], + ["BoundAttribute", 6.0, "animate.leave", "[\"foo\", \"bar\"]"] ], "ignore_error": false }, @@ -564,17 +377,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundEvent", - 3.0, - "animate.leave", - null, - "animateFn($event)" - ] + ["Element", "div"], + ["BoundEvent", 3.0, "animate.leave", null, "animateFn($event)"] ], "ignore_error": false }, @@ -582,17 +386,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundEvent", - 0.0, - "animateXYZ", - null, - "animateFn()" - ] + ["Element", "div"], + ["BoundEvent", 0.0, "animateXYZ", null, "animateFn()"] ], "ignore_error": false } @@ -611,20 +406,7 @@ { "type": "ExpectFromHtml", "input": "
    ", - "expected": [ - [ - "Template" - ], - [ - "TextAttribute", - "ngIf", - "" - ], - [ - "Element", - "div" - ] - ], + "expected": [["Template"], ["TextAttribute", "ngIf", ""], ["Element", "div"]], "ignore_error": false } ] @@ -636,11 +418,7 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [ - [ - "Template" - ] - ], + "expected": [["Template"]], "ignore_error": false } ] @@ -652,15 +430,7 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [ - [ - "Element", - ":svg:svg" - ], - [ - "Template" - ] - ], + "expected": [["Element", ":svg:svg"], ["Template"]], "ignore_error": false } ] @@ -672,20 +442,7 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [ - [ - "Template" - ], - [ - "BoundAttribute", - 0.0, - "ngIf", - "true" - ], - [ - "Template" - ] - ], + "expected": [["Template"], ["BoundAttribute", 0.0, "ngIf", "true"], ["Template"]], "ignore_error": false } ] @@ -697,16 +454,7 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [ - [ - "Template" - ], - [ - "Reference", - "a", - "" - ] - ], + "expected": [["Template"], ["Reference", "a", ""]], "ignore_error": false } ] @@ -718,16 +466,7 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [ - [ - "Template" - ], - [ - "Reference", - "a", - "" - ] - ], + "expected": [["Template"], ["Reference", "a", ""]], "ignore_error": false } ] @@ -744,16 +483,7 @@ { "type": "ExpectFromHtml", "input": "", - "expected": [ - [ - "Template" - ], - [ - "Variable", - "a", - "b" - ] - ], + "expected": [["Template"], ["Variable", "a", "b"]], "ignore_error": false } ] @@ -766,19 +496,9 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - [ - "Template" - ], - [ - "TextAttribute", - "k1", - "v1" - ], - [ - "TextAttribute", - "k2", - "v2" - ] + ["Template"], + ["TextAttribute", "k1", "v1"], + ["TextAttribute", "k2", "v2"] ], "ignore_error": false } @@ -792,21 +512,9 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - [ - "Template" - ], - [ - "BoundAttribute", - 0, - "k1", - "v1" - ], - [ - "BoundAttribute", - 0, - "k2", - "v2" - ] + ["Template"], + ["BoundAttribute", 0, "k1", "v1"], + ["BoundAttribute", 0, "k2", "v2"] ], "ignore_error": false } @@ -826,29 +534,11 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Template" - ], - [ - "TextAttribute", - "ngFor", - "" - ], - [ - "BoundAttribute", - 0, - "ngForOf", - "items" - ], - [ - "Variable", - "item", - "$implicit" - ], - [ - "Element", - "div" - ] + ["Template"], + ["TextAttribute", "ngFor", ""], + ["BoundAttribute", 0, "ngForOf", "items"], + ["Variable", "item", "$implicit"], + ["Element", "div"] ], "ignore_error": false }, @@ -856,25 +546,10 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Template" - ], - [ - "BoundAttribute", - 0, - "ngFor", - "item" - ], - [ - "BoundAttribute", - 0, - "ngForOf", - "items" - ], - [ - "Element", - "div" - ] + ["Template"], + ["BoundAttribute", 0, "ngFor", "item"], + ["BoundAttribute", 0, "ngForOf", "items"], + ["Element", "div"] ], "ignore_error": false } @@ -888,23 +563,10 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Template" - ], - [ - "TextAttribute", - "ngIf", - "" - ], - [ - "Variable", - "a", - "b" - ], - [ - "Element", - "div" - ] + ["Template"], + ["TextAttribute", "ngIf", ""], + ["Variable", "a", "b"], + ["Element", "div"] ], "ignore_error": false } @@ -918,24 +580,10 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Template" - ], - [ - "BoundAttribute", - 0, - "ngIf", - "expr" - ], - [ - "Variable", - "local", - "ngIf" - ], - [ - "Element", - "div" - ] + ["Template"], + ["BoundAttribute", 0, "ngIf", "expr"], + ["Variable", "local", "ngIf"], + ["Element", "div"] ], "ignore_error": false } @@ -955,17 +603,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundEvent", - 0, - "event", - "window", - "v" - ] + ["Element", "div"], + ["BoundEvent", 0, "event", "window", "v"] ], "ignore_error": false } @@ -979,17 +618,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundEvent", - 0, - "some-event", - null, - "v" - ] + ["Element", "div"], + ["BoundEvent", 0, "some-event", null, "v"] ], "ignore_error": false }, @@ -997,17 +627,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundEvent", - 0, - "someEvent", - null, - "v" - ] + ["Element", "div"], + ["BoundEvent", 0, "someEvent", null, "v"] ], "ignore_error": false } @@ -1021,17 +642,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundEvent", - 0, - "event", - null, - "v" - ] + ["Element", "div"], + ["BoundEvent", 0, "event", null, "v"] ], "ignore_error": false } @@ -1050,23 +662,9 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 5, - "prop", - "v" - ], - [ - "BoundEvent", - 2, - "propChange", - null, - "v" - ] + ["Element", "div"], + ["BoundAttribute", 5, "prop", "v"], + ["BoundEvent", 2, "propChange", null, "v"] ], "ignore_error": false } @@ -1080,23 +678,9 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 5, - "prop", - "$any(v)" - ], - [ - "BoundEvent", - 2, - "propChange", - null, - "$any(v)" - ] + ["Element", "div"], + ["BoundAttribute", 5, "prop", "$any(v)"], + ["BoundEvent", 2, "propChange", null, "$any(v)"] ], "ignore_error": false } @@ -1110,23 +694,9 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 5, - "prop", - "v" - ], - [ - "BoundEvent", - 2, - "propChange", - null, - "v" - ] + ["Element", "div"], + ["BoundAttribute", 5, "prop", "v"], + ["BoundEvent", 2, "propChange", null, "v"] ], "ignore_error": false } @@ -1140,23 +710,9 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 5, - "prop", - "v!" - ], - [ - "BoundEvent", - 2, - "propChange", - null, - "v!" - ] + ["Element", "div"], + ["BoundAttribute", 5, "prop", "v!"], + ["BoundEvent", 2, "propChange", null, "v!"] ], "ignore_error": false } @@ -1170,23 +726,9 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 5, - "prop", - "a.b.c" - ], - [ - "BoundEvent", - 2, - "propChange", - null, - "a.b.c" - ] + ["Element", "div"], + ["BoundAttribute", 5, "prop", "a.b.c"], + ["BoundEvent", 2, "propChange", null, "a.b.c"] ], "ignore_error": false } @@ -1200,23 +742,9 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundAttribute", - 5, - "prop", - "a[\"b\"][\"c\"]" - ], - [ - "BoundEvent", - 2, - "propChange", - null, - "a[\"b\"][\"c\"]" - ] + ["Element", "div"], + ["BoundAttribute", 5, "prop", "a[\"b\"][\"c\"]"], + ["BoundEvent", 2, "propChange", null, "a[\"b\"][\"c\"]"] ], "ignore_error": false } @@ -1260,17 +788,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "BoundEvent", - 1, - "", - null, - "onAnimationEvent($event)" - ] + ["Element", "div"], + ["BoundEvent", 1, "", null, "onAnimationEvent($event)"] ], "ignore_error": true } @@ -1311,15 +830,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "Reference", - "a", - "" - ] + ["Element", "div"], + ["Reference", "a", ""] ], "ignore_error": false } @@ -1333,15 +845,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "Reference", - "a", - "" - ] + ["Element", "div"], + ["Reference", "a", ""] ], "ignore_error": false } @@ -1355,15 +860,8 @@ "type": "ExpectFromHtml", "input": "
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "Reference", - "someA", - "" - ] + ["Element", "div"], + ["Reference", "someA", ""] ], "ignore_error": false } @@ -1455,12 +953,7 @@ { "type": "ExpectFromHtml", "input": "a", - "expected": [ - [ - "Text", - "a" - ] - ], + "expected": [["Text", "a"]], "ignore_error": false } ] @@ -1472,12 +965,7 @@ { "type": "ExpectFromHtml", "input": "a", - "expected": [ - [ - "Text", - "a" - ] - ], + "expected": [["Text", "a"]], "ignore_error": false } ] @@ -1490,18 +978,9 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - [ - "Element", - ":svg:svg" - ], - [ - "Element", - ":svg:style" - ], - [ - "Text", - ".a { fill: none; }" - ] + ["Element", ":svg:svg"], + ["Element", ":svg:style"], + ["Text", ".a { fill: none; }"] ], "ignore_error": false } @@ -1521,20 +1000,9 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - [ - "Element", - "link" - ], - [ - "TextAttribute", - "rel", - "stylesheet" - ], - [ - "TextAttribute", - "href", - "http://someurl" - ] + ["Element", "link"], + ["TextAttribute", "rel", "stylesheet"], + ["TextAttribute", "href", "http://someurl"] ], "ignore_error": false }, @@ -1542,20 +1010,9 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - [ - "Element", - "link" - ], - [ - "TextAttribute", - "REL", - "stylesheet" - ], - [ - "TextAttribute", - "href", - "http://someurl" - ] + ["Element", "link"], + ["TextAttribute", "REL", "stylesheet"], + ["TextAttribute", "href", "http://someurl"] ], "ignore_error": false } @@ -1569,15 +1026,8 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - [ - "Element", - "link" - ], - [ - "TextAttribute", - "rel", - "stylesheet" - ] + ["Element", "link"], + ["TextAttribute", "rel", "stylesheet"] ], "ignore_error": false }, @@ -1585,15 +1035,8 @@ "type": "ExpectFromHtml", "input": "", "expected": [ - [ - "Element", - "link" - ], - [ - "TextAttribute", - "REL", - "stylesheet" - ] + ["Element", "link"], + ["TextAttribute", "REL", "stylesheet"] ], "ignore_error": false } @@ -1631,19 +1074,9 @@ "type": "ExpectFromHtml", "input": "
    {{b}}
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "TextAttribute", - "ngNonBindable", - "" - ], - [ - "Text", - "{{b}}" - ] + ["Element", "div"], + ["TextAttribute", "ngNonBindable", ""], + ["Text", "{{b}}"] ], "ignore_error": false } @@ -1657,23 +1090,10 @@ "type": "ExpectFromHtml", "input": "
    {{b}}
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "TextAttribute", - "ngNonBindable", - "" - ], - [ - "Element", - "span" - ], - [ - "Text", - "{{b}}" - ] + ["Element", "div"], + ["TextAttribute", "ngNonBindable", ""], + ["Element", "span"], + ["Text", "{{b}}"] ], "ignore_error": false } @@ -1687,19 +1107,9 @@ "type": "ExpectFromHtml", "input": "
    a
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "TextAttribute", - "ngNonBindable", - "" - ], - [ - "Text", - "a" - ] + ["Element", "div"], + ["TextAttribute", "ngNonBindable", ""], + ["Text", "a"] ], "ignore_error": false } @@ -1713,19 +1123,9 @@ "type": "ExpectFromHtml", "input": "
    a
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "TextAttribute", - "ngNonBindable", - "" - ], - [ - "Text", - "a" - ] + ["Element", "div"], + ["TextAttribute", "ngNonBindable", ""], + ["Text", "a"] ], "ignore_error": false } @@ -1739,19 +1139,9 @@ "type": "ExpectFromHtml", "input": "
    a
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "TextAttribute", - "ngNonBindable", - "" - ], - [ - "Text", - "a" - ] + ["Element", "div"], + ["TextAttribute", "ngNonBindable", ""], + ["Text", "a"] ], "ignore_error": false } @@ -1884,17 +1274,9 @@ "type": "ExpectFromHtml", "input": "@defer (on idle(1)) {hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "IdleDeferredTrigger", - 1.0 - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["IdleDeferredTrigger", 1.0], + ["Text", "hello"] ], "ignore_error": false } @@ -2041,15 +1423,7 @@ { "type": "ExpectFromHtml", "input": "@defer{hello}", - "expected": [ - [ - "DeferredBlock" - ], - [ - "Text", - "hello" - ] - ], + "expected": [["DeferredBlock"], ["Text", "hello"]], "ignore_error": false } ] @@ -2062,17 +1436,9 @@ "type": "ExpectFromHtml", "input": "@defer (when isVisible() && loaded){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "BoundDeferredTrigger", - "isVisible() && loaded" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["BoundDeferredTrigger", "isVisible() && loaded"], + ["Text", "hello"] ], "ignore_error": false } @@ -2085,18 +1451,7 @@ { "type": "ExpectFromHtml", "input": "@defer (on idle){hello}", - "expected": [ - [ - "DeferredBlock" - ], - [ - "IdleDeferredTrigger" - ], - [ - "Text", - "hello" - ] - ], + "expected": [["DeferredBlock"], ["IdleDeferredTrigger"], ["Text", "hello"]], "ignore_error": false } ] @@ -2109,20 +1464,10 @@ "type": "ExpectFromHtml", "input": "@defer (on idle, viewport(button)){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "IdleDeferredTrigger" - ], - [ - "ViewportDeferredTrigger", - "button" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["IdleDeferredTrigger"], + ["ViewportDeferredTrigger", "button"], + ["Text", "hello"] ], "ignore_error": false } @@ -2136,23 +1481,11 @@ "type": "ExpectFromHtml", "input": "@defer (on idle, viewport(button), immediate){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "IdleDeferredTrigger" - ], - [ - "ViewportDeferredTrigger", - "button" - ], - [ - "ImmediateDeferredTrigger" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["IdleDeferredTrigger"], + ["ViewportDeferredTrigger", "button"], + ["ImmediateDeferredTrigger"], + ["Text", "hello"] ], "ignore_error": false } @@ -2166,28 +1499,12 @@ "type": "ExpectFromHtml", "input": "@defer (when isVisible(); on timer(100ms), idle, viewport(button)){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "BoundDeferredTrigger", - "isVisible()" - ], - [ - "TimerDeferredTrigger", - 100.0 - ], - [ - "IdleDeferredTrigger" - ], - [ - "ViewportDeferredTrigger", - "button" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["BoundDeferredTrigger", "isVisible()"], + ["TimerDeferredTrigger", 100.0], + ["IdleDeferredTrigger"], + ["ViewportDeferredTrigger", "button"], + ["Text", "hello"] ], "ignore_error": false } @@ -2201,28 +1518,12 @@ "type": "ExpectFromHtml", "input": "@defer(\nwhen\nisVisible(); on\ntimer(100ms),\nidle, viewport(button)){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "BoundDeferredTrigger", - "isVisible()" - ], - [ - "TimerDeferredTrigger", - 100.0 - ], - [ - "IdleDeferredTrigger" - ], - [ - "ViewportDeferredTrigger", - "button" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["BoundDeferredTrigger", "isVisible()"], + ["TimerDeferredTrigger", 100.0], + ["IdleDeferredTrigger"], + ["ViewportDeferredTrigger", "button"], + ["Text", "hello"] ], "ignore_error": false } @@ -2236,17 +1537,9 @@ "type": "ExpectFromHtml", "input": "@defer (on timer(10s)){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "TimerDeferredTrigger", - 10000.0 - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["TimerDeferredTrigger", 10000.0], + ["Text", "hello"] ], "ignore_error": false } @@ -2260,17 +1553,9 @@ "type": "ExpectFromHtml", "input": "@defer (on timer(1.5s)){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "TimerDeferredTrigger", - 1500.0 - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["TimerDeferredTrigger", 1500.0], + ["Text", "hello"] ], "ignore_error": false } @@ -2284,17 +1569,9 @@ "type": "ExpectFromHtml", "input": "@defer (on timer(100)){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "TimerDeferredTrigger", - 100.0 - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["TimerDeferredTrigger", 100.0], + ["Text", "hello"] ], "ignore_error": false } @@ -2308,17 +1585,9 @@ "type": "ExpectFromHtml", "input": "@defer (on hover(button)){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "HoverDeferredTrigger", - "button" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["HoverDeferredTrigger", "button"], + ["Text", "hello"] ], "ignore_error": false } @@ -2332,17 +1601,9 @@ "type": "ExpectFromHtml", "input": "@defer (on interaction(button)){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "InteractionDeferredTrigger", - "button" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["InteractionDeferredTrigger", "button"], + ["Text", "hello"] ], "ignore_error": false } @@ -2356,41 +1617,15 @@ "type": "ExpectFromHtml", "input": "@defer {}@loading {Loading...}@placeholder {Placeholder content!}@error {Loading failed :(}", "expected": [ - [ - "DeferredBlock" - ], - [ - "Element", - "calendar-cmp", - "#selfClosing" - ], - [ - "BoundAttribute", - 0.0, - "date", - "current" - ], - [ - "DeferredBlockPlaceholder" - ], - [ - "Text", - "Placeholder content!" - ], - [ - "DeferredBlockLoading" - ], - [ - "Text", - "Loading..." - ], - [ - "DeferredBlockError" - ], - [ - "Text", - "Loading failed :(" - ] + ["DeferredBlock"], + ["Element", "calendar-cmp", "#selfClosing"], + ["BoundAttribute", 0.0, "date", "current"], + ["DeferredBlockPlaceholder"], + ["Text", "Placeholder content!"], + ["DeferredBlockLoading"], + ["Text", "Loading..."], + ["DeferredBlockError"], + ["Text", "Loading failed :("] ], "ignore_error": false } @@ -2404,41 +1639,15 @@ "type": "ExpectFromHtml", "input": "@defer {} @loading {Loading...} @placeholder {Placeholder content!} @error {Loading failed :(}", "expected": [ - [ - "DeferredBlock" - ], - [ - "Element", - "calendar-cmp", - "#selfClosing" - ], - [ - "BoundAttribute", - 0.0, - "date", - "current" - ], - [ - "DeferredBlockPlaceholder" - ], - [ - "Text", - "Placeholder content!" - ], - [ - "DeferredBlockLoading" - ], - [ - "Text", - "Loading..." - ], - [ - "DeferredBlockError" - ], - [ - "Text", - "Loading failed :(" - ] + ["DeferredBlock"], + ["Element", "calendar-cmp", "#selfClosing"], + ["BoundAttribute", 0.0, "date", "current"], + ["DeferredBlockPlaceholder"], + ["Text", "Placeholder content!"], + ["DeferredBlockLoading"], + ["Text", "Loading..."], + ["DeferredBlockError"], + ["Text", "Loading failed :("] ], "ignore_error": false } @@ -2457,29 +1666,11 @@ "type": "ExpectFromHtml", "input": "@defer{}@loading (after 100ms; minimum 1.5s){Loading...}", "expected": [ - [ - "DeferredBlock" - ], - [ - "Element", - "calendar-cmp", - "#selfClosing" - ], - [ - "BoundAttribute", - 0.0, - "date", - "current" - ], - [ - "DeferredBlockLoading", - "after 100ms", - "minimum 1500ms" - ], - [ - "Text", - "Loading..." - ] + ["DeferredBlock"], + ["Element", "calendar-cmp", "#selfClosing"], + ["BoundAttribute", 0.0, "date", "current"], + ["DeferredBlockLoading", "after 100ms", "minimum 1500ms"], + ["Text", "Loading..."] ], "ignore_error": false } @@ -2493,28 +1684,11 @@ "type": "ExpectFromHtml", "input": "@defer {}@placeholder (minimum 1.5s){Placeholder...}", "expected": [ - [ - "DeferredBlock" - ], - [ - "Element", - "calendar-cmp", - "#selfClosing" - ], - [ - "BoundAttribute", - 0.0, - "date", - "current" - ], - [ - "DeferredBlockPlaceholder", - "minimum 1500ms" - ], - [ - "Text", - "Placeholder..." - ] + ["DeferredBlock"], + ["Element", "calendar-cmp", "#selfClosing"], + ["BoundAttribute", 0.0, "date", "current"], + ["DeferredBlockPlaceholder", "minimum 1500ms"], + ["Text", "Placeholder..."] ], "ignore_error": false } @@ -2528,28 +1702,12 @@ "type": "ExpectFromHtml", "input": "@defer (on idle; prefetch on viewport(button), hover(button); prefetch when shouldPrefetch()){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "IdleDeferredTrigger" - ], - [ - "ViewportDeferredTrigger", - "button" - ], - [ - "HoverDeferredTrigger", - "button" - ], - [ - "BoundDeferredTrigger", - "shouldPrefetch()" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["IdleDeferredTrigger"], + ["ViewportDeferredTrigger", "button"], + ["HoverDeferredTrigger", "button"], + ["BoundDeferredTrigger", "shouldPrefetch()"], + ["Text", "hello"] ], "ignore_error": false } @@ -2563,20 +1721,10 @@ "type": "ExpectFromHtml", "input": "@defer (on idle; prefetch on idle(100)){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "IdleDeferredTrigger" - ], - [ - "IdleDeferredTrigger", - 100.0 - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["IdleDeferredTrigger"], + ["IdleDeferredTrigger", 100.0], + ["Text", "hello"] ], "ignore_error": false } @@ -2590,20 +1738,10 @@ "type": "ExpectFromHtml", "input": "@defer (on idle; hydrate on idle(100)){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "IdleDeferredTrigger", - 100.0 - ], - [ - "IdleDeferredTrigger" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["IdleDeferredTrigger", 100.0], + ["IdleDeferredTrigger"], + ["Text", "hello"] ], "ignore_error": false } @@ -2617,28 +1755,12 @@ "type": "ExpectFromHtml", "input": "@defer (on idle; prefetch on viewport(button), hover(button); prefetch when shouldPrefetch()){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "IdleDeferredTrigger" - ], - [ - "ViewportDeferredTrigger", - "button" - ], - [ - "HoverDeferredTrigger", - "button" - ], - [ - "BoundDeferredTrigger", - "shouldPrefetch()" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["IdleDeferredTrigger"], + ["ViewportDeferredTrigger", "button"], + ["HoverDeferredTrigger", "button"], + ["BoundDeferredTrigger", "shouldPrefetch()"], + ["Text", "hello"] ], "ignore_error": false } @@ -2652,19 +1774,10 @@ "type": "ExpectFromHtml", "input": "@defer (on idle; hydrate never){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "NeverDeferredTrigger" - ], - [ - "IdleDeferredTrigger" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["NeverDeferredTrigger"], + ["IdleDeferredTrigger"], + ["Text", "hello"] ], "ignore_error": false } @@ -2678,32 +1791,13 @@ "type": "ExpectFromHtml", "input": "@defer (on idle; hydrate on viewport, hover, timer(500); hydrate when shouldHydrate()){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "ViewportDeferredTrigger", - null - ], - [ - "HoverDeferredTrigger", - null - ], - [ - "TimerDeferredTrigger", - 500.0 - ], - [ - "BoundDeferredTrigger", - "shouldHydrate()" - ], - [ - "IdleDeferredTrigger" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["ViewportDeferredTrigger", null], + ["HoverDeferredTrigger", null], + ["TimerDeferredTrigger", 500.0], + ["BoundDeferredTrigger", "shouldHydrate()"], + ["IdleDeferredTrigger"], + ["Text", "hello"] ], "ignore_error": false } @@ -2717,28 +1811,12 @@ "type": "ExpectFromHtml", "input": "@defer (on idle; hydrate on viewport, hover; hydrate when shouldHydrate()){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "ViewportDeferredTrigger", - null - ], - [ - "HoverDeferredTrigger", - null - ], - [ - "BoundDeferredTrigger", - "shouldHydrate()" - ], - [ - "IdleDeferredTrigger" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["ViewportDeferredTrigger", null], + ["HoverDeferredTrigger", null], + ["BoundDeferredTrigger", "shouldHydrate()"], + ["IdleDeferredTrigger"], + ["Text", "hello"] ], "ignore_error": false } @@ -2752,85 +1830,26 @@ "type": "ExpectFromHtml", "input": "@defer (when isVisible() && foo; on hover(button), timer(10s), idle, immediate, interaction(button), viewport(container); prefetch on immediate; prefetch when isDataLoaded(); hydrate when shouldHydrate(); hydrate on viewport){}@loading (minimum 1s; after 100ms){Loading...}@placeholder (minimum 500){Placeholder content!}@error {Loading failed :(}", "expected": [ - [ - "DeferredBlock" - ], - [ - "BoundDeferredTrigger", - "shouldHydrate()" - ], - [ - "ViewportDeferredTrigger", - null - ], - [ - "BoundDeferredTrigger", - "isVisible() && foo" - ], - [ - "HoverDeferredTrigger", - "button" - ], - [ - "TimerDeferredTrigger", - 10000.0 - ], - [ - "IdleDeferredTrigger" - ], - [ - "ImmediateDeferredTrigger" - ], - [ - "InteractionDeferredTrigger", - "button" - ], - [ - "ViewportDeferredTrigger", - "container" - ], - [ - "ImmediateDeferredTrigger" - ], - [ - "BoundDeferredTrigger", - "isDataLoaded()" - ], - [ - "Element", - "calendar-cmp", - "#selfClosing" - ], - [ - "BoundAttribute", - 0.0, - "date", - "current" - ], - [ - "DeferredBlockPlaceholder", - "minimum 500ms" - ], - [ - "Text", - "Placeholder content!" - ], - [ - "DeferredBlockLoading", - "after 100ms", - "minimum 1000ms" - ], - [ - "Text", - "Loading..." - ], - [ - "DeferredBlockError" - ], - [ - "Text", - "Loading failed :(" - ] + ["DeferredBlock"], + ["BoundDeferredTrigger", "shouldHydrate()"], + ["ViewportDeferredTrigger", null], + ["BoundDeferredTrigger", "isVisible() && foo"], + ["HoverDeferredTrigger", "button"], + ["TimerDeferredTrigger", 10000.0], + ["IdleDeferredTrigger"], + ["ImmediateDeferredTrigger"], + ["InteractionDeferredTrigger", "button"], + ["ViewportDeferredTrigger", "container"], + ["ImmediateDeferredTrigger"], + ["BoundDeferredTrigger", "isDataLoaded()"], + ["Element", "calendar-cmp", "#selfClosing"], + ["BoundAttribute", 0.0, "date", "current"], + ["DeferredBlockPlaceholder", "minimum 500ms"], + ["Text", "Placeholder content!"], + ["DeferredBlockLoading", "after 100ms", "minimum 1000ms"], + ["Text", "Loading..."], + ["DeferredBlockError"], + ["Text", "Loading failed :("] ], "ignore_error": false } @@ -2844,69 +1863,24 @@ "type": "ExpectFromHtml", "input": "
    @defer (when isVisible() && foo; on hover(button), timer(10s), idle, immediate, interaction(button), viewport(container); prefetch on immediate; prefetch when isDataLoaded(); hydrate when shouldHydrate(); hydrate on viewport){}@loading (minimum 1s; after 100ms){Loading...}@placeholder (minimum 500){Placeholder content!}@error {Loading failed :(}
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "TextAttribute", - "ngNonBindable", - "" - ], + ["Element", "div"], + ["TextAttribute", "ngNonBindable", ""], [ "Text", "@defer (when isVisible() && foo; on hover(button), timer(10s), idle, immediate, interaction(button), viewport(container); prefetch on immediate; prefetch when isDataLoaded(); hydrate when shouldHydrate(); hydrate on viewport){" ], - [ - "Element", - "calendar-cmp", - "#selfClosing" - ], - [ - "TextAttribute", - "[date]", - "current" - ], - [ - "Text", - "}" - ], - [ - "Text", - "@loading (minimum 1s; after 100ms){" - ], - [ - "Text", - "Loading..." - ], - [ - "Text", - "}" - ], - [ - "Text", - "@placeholder (minimum 500){" - ], - [ - "Text", - "Placeholder content!" - ], - [ - "Text", - "}" - ], - [ - "Text", - "@error {" - ], - [ - "Text", - "Loading failed :(" - ], - [ - "Text", - "}" - ] + ["Element", "calendar-cmp", "#selfClosing"], + ["TextAttribute", "[date]", "current"], + ["Text", "}"], + ["Text", "@loading (minimum 1s; after 100ms){"], + ["Text", "Loading..."], + ["Text", "}"], + ["Text", "@placeholder (minimum 500){"], + ["Text", "Placeholder content!"], + ["Text", "}"], + ["Text", "@error {"], + ["Text", "Loading failed :("], + ["Text", "}"] ], "ignore_error": false } @@ -2920,45 +1894,16 @@ "type": "ExpectFromHtml", "input": "@defer (on hover, interaction, viewport; prefetch on hover, interaction, viewport) {hello}@placeholder {}", "expected": [ - [ - "DeferredBlock" - ], - [ - "HoverDeferredTrigger", - null - ], - [ - "InteractionDeferredTrigger", - null - ], - [ - "ViewportDeferredTrigger", - null - ], - [ - "HoverDeferredTrigger", - null - ], - [ - "InteractionDeferredTrigger", - null - ], - [ - "ViewportDeferredTrigger", - null - ], - [ - "Text", - "hello" - ], - [ - "DeferredBlockPlaceholder" - ], - [ - "Element", - "implied-trigger", - "#selfClosing" - ] + ["DeferredBlock"], + ["HoverDeferredTrigger", null], + ["InteractionDeferredTrigger", null], + ["ViewportDeferredTrigger", null], + ["HoverDeferredTrigger", null], + ["InteractionDeferredTrigger", null], + ["ViewportDeferredTrigger", null], + ["Text", "hello"], + ["DeferredBlockPlaceholder"], + ["Element", "implied-trigger", "#selfClosing"] ], "ignore_error": false } @@ -2972,18 +1917,13 @@ "type": "ExpectFromHtml", "input": "@defer (on viewport({trigger: foo, rootMargin: \"123px\", threshold: [1, 2, 3]})){hello}", "expected": [ - [ - "DeferredBlock" - ], + ["DeferredBlock"], [ "ViewportDeferredTrigger", "foo", "{rootMargin: \"123px\", threshold: [1, 2, 3]}" ], - [ - "Text", - "hello" - ] + ["Text", "hello"] ], "ignore_error": false } @@ -2997,18 +1937,9 @@ "type": "ExpectFromHtml", "input": "@defer (on viewport({rootMargin: \"123px\"})){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "ViewportDeferredTrigger", - null, - "{rootMargin: \"123px\"}" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["ViewportDeferredTrigger", null, "{rootMargin: \"123px\"}"], + ["Text", "hello"] ], "ignore_error": false }, @@ -3016,18 +1947,9 @@ "type": "ExpectFromHtml", "input": "@defer (on viewport({rootMargin: \"123px\"})){hello}", "expected": [ - [ - "DeferredBlock" - ], - [ - "ViewportDeferredTrigger", - null, - "{rootMargin: \"123px\"}" - ], - [ - "Text", - "hello" - ] + ["DeferredBlock"], + ["ViewportDeferredTrigger", null, "{rootMargin: \"123px\"}"], + ["Text", "hello"] ], "ignore_error": false } @@ -3124,58 +2046,20 @@ "type": "ExpectFromHtml", "input": "\n @switch (cond.kind) {\n @case (x()) { X case }\n @case ('hello') {}\n @case (42) { Z case }\n @default { No case matched }\n }\n ", "expected": [ - [ - "SwitchBlock", - "cond.kind" - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "x()" - ], - [ - "Text", - " X case " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "\"hello\"" - ], - [ - "Element", - "button" - ], - [ - "Text", - "Y case" - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "42" - ], - [ - "Text", - " Z case " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - null - ], - [ - "Text", - " No case matched " - ] + ["SwitchBlock", "cond.kind"], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "x()"], + ["Text", " X case "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "\"hello\""], + ["Element", "button"], + ["Text", "Y case"], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "42"], + ["Text", " Z case "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", null], + ["Text", " No case matched "] ], "ignore_error": false } @@ -3188,15 +2072,7 @@ { "type": "ExpectFromHtml", "input": "\n @switch (cond.kind) {\n @default never;\n }\n ", - "expected": [ - [ - "SwitchBlock", - "cond.kind" - ], - [ - "SwitchExhaustiveCheck" - ] - ], + "expected": [["SwitchBlock", "cond.kind"], ["SwitchExhaustiveCheck"]], "ignore_error": false } ] @@ -3214,58 +2090,20 @@ "type": "ExpectFromHtml", "input": "\n @switch ((cond.kind)) {\n @case ((x())) { X case }\n @case (('hello')) {}\n @case ((42)) { Z case }\n @default { No case matched }\n }\n ", "expected": [ - [ - "SwitchBlock", - "(cond.kind)" - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "(x())" - ], - [ - "Text", - " X case " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "(\"hello\")" - ], - [ - "Element", - "button" - ], - [ - "Text", - "Y case" - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "(42)" - ], - [ - "Text", - " Z case " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - null - ], - [ - "Text", - " No case matched " - ] + ["SwitchBlock", "(cond.kind)"], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "(x())"], + ["Text", " X case "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "(\"hello\")"], + ["Element", "button"], + ["Text", "Y case"], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "(42)"], + ["Text", " Z case "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", null], + ["Text", " No case matched "] ], "ignore_error": false } @@ -3279,135 +2117,41 @@ "type": "ExpectFromHtml", "input": "\n @switch (cond) {\n @case ('a') {\n @switch (innerCond) {\n @case ('innerA') { Inner A }\n @case ('innerB') { Inner B }\n }\n }\n @case ('b') {}\n @case ('c') { Z case }\n @default {\n @switch (innerCond) {\n @case ('innerC') { Inner C }\n @case ('innerD') { Inner D }\n @default {\n @switch (innerInnerCond) {\n @case ('innerInnerA') { Inner inner A }\n @case ('innerInnerA') { Inner inner B }\n }\n }\n }\n }\n }\n ", "expected": [ - [ - "SwitchBlock", - "cond" - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "\"a\"" - ], - [ - "SwitchBlock", - "innerCond" - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "\"innerA\"" - ], - [ - "Text", - " Inner A " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "\"innerB\"" - ], - [ - "Text", - " Inner B " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "\"b\"" - ], - [ - "Element", - "button" - ], - [ - "Text", - "Y case" - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "\"c\"" - ], - [ - "Text", - " Z case " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - null - ], - [ - "SwitchBlock", - "innerCond" - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "\"innerC\"" - ], - [ - "Text", - " Inner C " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "\"innerD\"" - ], - [ - "Text", - " Inner D " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - null - ], - [ - "SwitchBlock", - "innerInnerCond" - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "\"innerInnerA\"" - ], - [ - "Text", - " Inner inner A " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "\"innerInnerA\"" - ], - [ - "Text", - " Inner inner B " - ] + ["SwitchBlock", "cond"], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "\"a\""], + ["SwitchBlock", "innerCond"], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "\"innerA\""], + ["Text", " Inner A "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "\"innerB\""], + ["Text", " Inner B "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "\"b\""], + ["Element", "button"], + ["Text", "Y case"], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "\"c\""], + ["Text", " Z case "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", null], + ["SwitchBlock", "innerCond"], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "\"innerC\""], + ["Text", " Inner C "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "\"innerD\""], + ["Text", " Inner D "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", null], + ["SwitchBlock", "innerInnerCond"], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "\"innerInnerA\""], + ["Text", " Inner inner A "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "\"innerInnerA\""], + ["Text", " Inner inner B "] ], "ignore_error": false } @@ -3421,32 +2165,13 @@ "type": "ExpectFromHtml", "input": "\n @switch (cond.kind) {\n \n @case (x) { X case }\n\n \n @default { No case matched }\n }\n ", "expected": [ - [ - "SwitchBlock", - "cond.kind" - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "x" - ], - [ - "Text", - " X case " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - null - ], - [ - "Text", - " No case matched " - ] + ["SwitchBlock", "cond.kind"], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "x"], + ["Text", " X case "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", null], + ["Text", " No case matched "] ], "ignore_error": false } @@ -3460,55 +2185,19 @@ "type": "ExpectFromHtml", "input": "\n @switch (cond) {\n @case ('a') @case('b') @case('c') @case('d') { ABCD case }\n @case ('z') { Z case }\n @default { No case matched }\n }\n ", "expected": [ - [ - "SwitchBlock", - "cond" - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "\"a\"" - ], - [ - "SwitchBlockCase", - "\"b\"" - ], - [ - "SwitchBlockCase", - "\"c\"" - ], - [ - "SwitchBlockCase", - "\"d\"" - ], - [ - "Text", - " ABCD case " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - "\"z\"" - ], - [ - "Text", - " Z case " - ], - [ - "SwitchBlockCaseGroup" - ], - [ - "SwitchBlockCase", - null - ], - [ - "Text", - " No case matched " - ] + ["SwitchBlock", "cond"], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "\"a\""], + ["SwitchBlockCase", "\"b\""], + ["SwitchBlockCase", "\"c\""], + ["SwitchBlockCase", "\"d\""], + ["Text", " ABCD case "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", "\"z\""], + ["Text", " Z case "], + ["SwitchBlockCaseGroup"], + ["SwitchBlockCase", null], + ["Text", " No case matched "] ], "ignore_error": false } @@ -3625,57 +2314,17 @@ "type": "ExpectFromHtml", "input": "\n @for (item of items.foo.bar; track item.id) {\n {{ item }}\n } @empty {\n There were no items in the list.\n }\n ", "expected": [ - [ - "ForLoopBlock", - "items.foo.bar", - "item.id" - ], - [ - "Variable", - "item", - "$implicit" - ], - [ - "Variable", - "$index", - "$index" - ], - [ - "Variable", - "$first", - "$first" - ], - [ - "Variable", - "$last", - "$last" - ], - [ - "Variable", - "$even", - "$even" - ], - [ - "Variable", - "$odd", - "$odd" - ], - [ - "Variable", - "$count", - "$count" - ], - [ - "BoundText", - " {{ item }} " - ], - [ - "ForLoopBlockEmpty" - ], - [ - "Text", - " There were no items in the list. " - ] + ["ForLoopBlock", "items.foo.bar", "item.id"], + ["Variable", "item", "$implicit"], + ["Variable", "$index", "$index"], + ["Variable", "$first", "$first"], + ["Variable", "$last", "$last"], + ["Variable", "$even", "$even"], + ["Variable", "$odd", "$odd"], + ["Variable", "$count", "$count"], + ["BoundText", " {{ item }} "], + ["ForLoopBlockEmpty"], + ["Text", " There were no items in the list. "] ], "ignore_error": false } @@ -3689,50 +2338,15 @@ "type": "ExpectFromHtml", "input": "\n @for ((item of items.foo.bar); track item.id){\n {{ item }}\n }\n ", "expected": [ - [ - "ForLoopBlock", - "items.foo.bar", - "item.id" - ], - [ - "Variable", - "item", - "$implicit" - ], - [ - "Variable", - "$index", - "$index" - ], - [ - "Variable", - "$first", - "$first" - ], - [ - "Variable", - "$last", - "$last" - ], - [ - "Variable", - "$even", - "$even" - ], - [ - "Variable", - "$odd", - "$odd" - ], - [ - "Variable", - "$count", - "$count" - ], - [ - "BoundText", - " {{ item }} " - ] + ["ForLoopBlock", "items.foo.bar", "item.id"], + ["Variable", "item", "$implicit"], + ["Variable", "$index", "$index"], + ["Variable", "$first", "$first"], + ["Variable", "$last", "$last"], + ["Variable", "$even", "$even"], + ["Variable", "$odd", "$odd"], + ["Variable", "$count", "$count"], + ["BoundText", " {{ item }} "] ], "ignore_error": false }, @@ -3740,50 +2354,15 @@ "type": "ExpectFromHtml", "input": "\n @for ((item of items.foo.bar()); track item.id) {\n {{ item }}\n }\n ", "expected": [ - [ - "ForLoopBlock", - "items.foo.bar()", - "item.id" - ], - [ - "Variable", - "item", - "$implicit" - ], - [ - "Variable", - "$index", - "$index" - ], - [ - "Variable", - "$first", - "$first" - ], - [ - "Variable", - "$last", - "$last" - ], - [ - "Variable", - "$even", - "$even" - ], - [ - "Variable", - "$odd", - "$odd" - ], - [ - "Variable", - "$count", - "$count" - ], - [ - "BoundText", - " {{ item }} " - ] + ["ForLoopBlock", "items.foo.bar()", "item.id"], + ["Variable", "item", "$implicit"], + ["Variable", "$index", "$index"], + ["Variable", "$first", "$first"], + ["Variable", "$last", "$last"], + ["Variable", "$even", "$even"], + ["Variable", "$odd", "$odd"], + ["Variable", "$count", "$count"], + ["BoundText", " {{ item }} "] ], "ignore_error": false }, @@ -3791,50 +2370,15 @@ "type": "ExpectFromHtml", "input": "\n @for (( ( (item of items.foo.bar()) ) ); track item.id) {\n {{ item }}\n }\n ", "expected": [ - [ - "ForLoopBlock", - "items.foo.bar()", - "item.id" - ], - [ - "Variable", - "item", - "$implicit" - ], - [ - "Variable", - "$index", - "$index" - ], - [ - "Variable", - "$first", - "$first" - ], - [ - "Variable", - "$last", - "$last" - ], - [ - "Variable", - "$even", - "$even" - ], - [ - "Variable", - "$odd", - "$odd" - ], - [ - "Variable", - "$count", - "$count" - ], - [ - "BoundText", - " {{ item }} " - ] + ["ForLoopBlock", "items.foo.bar()", "item.id"], + ["Variable", "item", "$implicit"], + ["Variable", "$index", "$index"], + ["Variable", "$first", "$first"], + ["Variable", "$last", "$last"], + ["Variable", "$even", "$even"], + ["Variable", "$odd", "$odd"], + ["Variable", "$count", "$count"], + ["BoundText", " {{ item }} "] ], "ignore_error": false } @@ -3846,82 +2390,23 @@ "assertions": [ { "type": "ExpectFromHtml", - "input": "\n @for (item of items.foo.bar; track item.id; let idx = $index, f = $first, c = $count; let l = $last, ev = $even, od = $odd) {\n {{ item }}\n }\n ", - "expected": [ - [ - "ForLoopBlock", - "items.foo.bar", - "item.id" - ], - [ - "Variable", - "item", - "$implicit" - ], - [ - "Variable", - "$index", - "$index" - ], - [ - "Variable", - "$first", - "$first" - ], - [ - "Variable", - "$last", - "$last" - ], - [ - "Variable", - "$even", - "$even" - ], - [ - "Variable", - "$odd", - "$odd" - ], - [ - "Variable", - "$count", - "$count" - ], - [ - "Variable", - "idx", - "$index" - ], - [ - "Variable", - "f", - "$first" - ], - [ - "Variable", - "c", - "$count" - ], - [ - "Variable", - "l", - "$last" - ], - [ - "Variable", - "ev", - "$even" - ], - [ - "Variable", - "od", - "$odd" - ], - [ - "BoundText", - " {{ item }} " - ] + "input": "\n @for (item of items.foo.bar; track item.id; let idx = $index, f = $first, c = $count; let l = $last, ev = $even, od = $odd) {\n {{ item }}\n }\n ", + "expected": [ + ["ForLoopBlock", "items.foo.bar", "item.id"], + ["Variable", "item", "$implicit"], + ["Variable", "$index", "$index"], + ["Variable", "$first", "$first"], + ["Variable", "$last", "$last"], + ["Variable", "$even", "$even"], + ["Variable", "$odd", "$odd"], + ["Variable", "$count", "$count"], + ["Variable", "idx", "$index"], + ["Variable", "f", "$first"], + ["Variable", "c", "$count"], + ["Variable", "l", "$last"], + ["Variable", "ev", "$even"], + ["Variable", "od", "$odd"], + ["BoundText", " {{ item }} "] ], "ignore_error": false } @@ -3935,80 +2420,21 @@ "type": "ExpectFromHtml", "input": "\n @for (item of items.foo.bar; track item.id; let\nidx = $index,\nf = $first,\nc = $count,\nl = $last,\nev = $even,\nod = $odd) {\n {{ item }}\n }\n ", "expected": [ - [ - "ForLoopBlock", - "items.foo.bar", - "item.id" - ], - [ - "Variable", - "item", - "$implicit" - ], - [ - "Variable", - "$index", - "$index" - ], - [ - "Variable", - "$first", - "$first" - ], - [ - "Variable", - "$last", - "$last" - ], - [ - "Variable", - "$even", - "$even" - ], - [ - "Variable", - "$odd", - "$odd" - ], - [ - "Variable", - "$count", - "$count" - ], - [ - "Variable", - "idx", - "$index" - ], - [ - "Variable", - "f", - "$first" - ], - [ - "Variable", - "c", - "$count" - ], - [ - "Variable", - "l", - "$last" - ], - [ - "Variable", - "ev", - "$even" - ], - [ - "Variable", - "od", - "$odd" - ], - [ - "BoundText", - " {{ item }} " - ] + ["ForLoopBlock", "items.foo.bar", "item.id"], + ["Variable", "item", "$implicit"], + ["Variable", "$index", "$index"], + ["Variable", "$first", "$first"], + ["Variable", "$last", "$last"], + ["Variable", "$even", "$even"], + ["Variable", "$odd", "$odd"], + ["Variable", "$count", "$count"], + ["Variable", "idx", "$index"], + ["Variable", "f", "$first"], + ["Variable", "c", "$count"], + ["Variable", "l", "$last"], + ["Variable", "ev", "$even"], + ["Variable", "od", "$odd"], + ["BoundText", " {{ item }} "] ], "ignore_error": false } @@ -4022,109 +2448,28 @@ "type": "ExpectFromHtml", "input": "\n @for (item of items.foo.bar; track item.id) {\n {{ item }}\n\n
    \n @for (subitem of item.items; track subitem.id) {

    {{subitem}}

    }\n
    \n } @empty {\n There were no items in the list.\n }\n ", "expected": [ - [ - "ForLoopBlock", - "items.foo.bar", - "item.id" - ], - [ - "Variable", - "item", - "$implicit" - ], - [ - "Variable", - "$index", - "$index" - ], - [ - "Variable", - "$first", - "$first" - ], - [ - "Variable", - "$last", - "$last" - ], - [ - "Variable", - "$even", - "$even" - ], - [ - "Variable", - "$odd", - "$odd" - ], - [ - "Variable", - "$count", - "$count" - ], - [ - "BoundText", - " {{ item }} " - ], - [ - "Element", - "div" - ], - [ - "ForLoopBlock", - "item.items", - "subitem.id" - ], - [ - "Variable", - "subitem", - "$implicit" - ], - [ - "Variable", - "$index", - "$index" - ], - [ - "Variable", - "$first", - "$first" - ], - [ - "Variable", - "$last", - "$last" - ], - [ - "Variable", - "$even", - "$even" - ], - [ - "Variable", - "$odd", - "$odd" - ], - [ - "Variable", - "$count", - "$count" - ], - [ - "Element", - "h1" - ], - [ - "BoundText", - "{{ subitem }}" - ], - [ - "ForLoopBlockEmpty" - ], - [ - "Text", - " There were no items in the list. " - ] + ["ForLoopBlock", "items.foo.bar", "item.id"], + ["Variable", "item", "$implicit"], + ["Variable", "$index", "$index"], + ["Variable", "$first", "$first"], + ["Variable", "$last", "$last"], + ["Variable", "$even", "$even"], + ["Variable", "$odd", "$odd"], + ["Variable", "$count", "$count"], + ["BoundText", " {{ item }} "], + ["Element", "div"], + ["ForLoopBlock", "item.items", "subitem.id"], + ["Variable", "subitem", "$implicit"], + ["Variable", "$index", "$index"], + ["Variable", "$first", "$first"], + ["Variable", "$last", "$last"], + ["Variable", "$even", "$even"], + ["Variable", "$odd", "$odd"], + ["Variable", "$count", "$count"], + ["Element", "h1"], + ["BoundText", "{{ subitem }}"], + ["ForLoopBlockEmpty"], + ["Text", " There were no items in the list. "] ], "ignore_error": false } @@ -4138,50 +2483,15 @@ "type": "ExpectFromHtml", "input": "\n @for (item of items.foo.bar; track trackBy(item.id, 123)) {\n {{ item }}\n }\n ", "expected": [ - [ - "ForLoopBlock", - "items.foo.bar", - "trackBy(item.id, 123)" - ], - [ - "Variable", - "item", - "$implicit" - ], - [ - "Variable", - "$index", - "$index" - ], - [ - "Variable", - "$first", - "$first" - ], - [ - "Variable", - "$last", - "$last" - ], - [ - "Variable", - "$even", - "$even" - ], - [ - "Variable", - "$odd", - "$odd" - ], - [ - "Variable", - "$count", - "$count" - ], - [ - "BoundText", - " {{ item }} " - ] + ["ForLoopBlock", "items.foo.bar", "trackBy(item.id, 123)"], + ["Variable", "item", "$implicit"], + ["Variable", "$index", "$index"], + ["Variable", "$first", "$first"], + ["Variable", "$last", "$last"], + ["Variable", "$even", "$even"], + ["Variable", "$odd", "$odd"], + ["Variable", "$count", "$count"], + ["BoundText", " {{ item }} "] ], "ignore_error": false } @@ -4213,50 +2523,15 @@ "type": "ExpectFromHtml", "input": "\n @for (item of [\n { id: 1 },\n { id: 2 }\n ]; track item.id) {\n {{ item }}\n }\n ", "expected": [ - [ - "ForLoopBlock", - "[{id: 1}, {id: 2}]", - "item.id" - ], - [ - "Variable", - "item", - "$implicit" - ], - [ - "Variable", - "$index", - "$index" - ], - [ - "Variable", - "$first", - "$first" - ], - [ - "Variable", - "$last", - "$last" - ], - [ - "Variable", - "$even", - "$even" - ], - [ - "Variable", - "$odd", - "$odd" - ], - [ - "Variable", - "$count", - "$count" - ], - [ - "BoundText", - " {{ item }} " - ] + ["ForLoopBlock", "[{id: 1}, {id: 2}]", "item.id"], + ["Variable", "item", "$implicit"], + ["Variable", "$index", "$index"], + ["Variable", "$first", "$first"], + ["Variable", "$last", "$last"], + ["Variable", "$even", "$even"], + ["Variable", "$odd", "$odd"], + ["Variable", "$count", "$count"], + ["BoundText", " {{ item }} "] ], "ignore_error": false } @@ -4353,38 +2628,14 @@ "type": "ExpectFromHtml", "input": "\n @if (cond.expr; as foo) {\n Main case was true!\n } @else if (other.expr) {\n Extra case was true!\n } @else {\n False case!\n }\n ", "expected": [ - [ - "IfBlock" - ], - [ - "IfBlockBranch", - "cond.expr" - ], - [ - "Variable", - "foo", - "foo" - ], - [ - "Text", - " Main case was true! " - ], - [ - "IfBlockBranch", - "other.expr" - ], - [ - "Text", - " Extra case was true! " - ], - [ - "IfBlockBranch", - null - ], - [ - "Text", - " False case! " - ] + ["IfBlock"], + ["IfBlockBranch", "cond.expr"], + ["Variable", "foo", "foo"], + ["Text", " Main case was true! "], + ["IfBlockBranch", "other.expr"], + ["Text", " Extra case was true! "], + ["IfBlockBranch", null], + ["Text", " False case! "] ], "ignore_error": false } @@ -4398,33 +2649,13 @@ "type": "ExpectFromHtml", "input": "\n @if ((cond.expr)) {\n Main case was true!\n } @else if ((other.expr)) {\n Extra case was true!\n } @else {\n False case!\n }\n ", "expected": [ - [ - "IfBlock" - ], - [ - "IfBlockBranch", - "(cond.expr)" - ], - [ - "Text", - " Main case was true! " - ], - [ - "IfBlockBranch", - "(other.expr)" - ], - [ - "Text", - " Extra case was true! " - ], - [ - "IfBlockBranch", - null - ], - [ - "Text", - " False case! " - ] + ["IfBlock"], + ["IfBlockBranch", "(cond.expr)"], + ["Text", " Main case was true! "], + ["IfBlockBranch", "(other.expr)"], + ["Text", " Extra case was true! "], + ["IfBlockBranch", null], + ["Text", " False case! "] ], "ignore_error": false } @@ -4438,71 +2669,23 @@ "type": "ExpectFromHtml", "input": "\n @if (a) {\n @if (a1) {\n a1\n } @else {\n b1\n }\n }\n @else if (b) {\n b\n } @else {\n @if (c1) {\n c1\n } @else if (c2) {\n c2\n } @else {\n c3\n }\n }\n ", "expected": [ - [ - "IfBlock" - ], - [ - "IfBlockBranch", - "a" - ], - [ - "IfBlock" - ], - [ - "IfBlockBranch", - "a1" - ], - [ - "Text", - " a1 " - ], - [ - "IfBlockBranch", - null - ], - [ - "Text", - " b1 " - ], - [ - "IfBlockBranch", - "b" - ], - [ - "Text", - " b " - ], - [ - "IfBlockBranch", - null - ], - [ - "IfBlock" - ], - [ - "IfBlockBranch", - "c1" - ], - [ - "Text", - " c1 " - ], - [ - "IfBlockBranch", - "c2" - ], - [ - "Text", - " c2 " - ], - [ - "IfBlockBranch", - null - ], - [ - "Text", - " c3 " - ] + ["IfBlock"], + ["IfBlockBranch", "a"], + ["IfBlock"], + ["IfBlockBranch", "a1"], + ["Text", " a1 "], + ["IfBlockBranch", null], + ["Text", " b1 "], + ["IfBlockBranch", "b"], + ["Text", " b "], + ["IfBlockBranch", null], + ["IfBlock"], + ["IfBlockBranch", "c1"], + ["Text", " c1 "], + ["IfBlockBranch", "c2"], + ["Text", " c2 "], + ["IfBlockBranch", null], + ["Text", " c3 "] ], "ignore_error": false } @@ -4516,30 +2699,12 @@ "type": "ExpectFromHtml", "input": "\n @if (cond.expr; as foo) {\n Main case was true!\n } @else if (other.expr) {\n Other case was true!\n }\n ", "expected": [ - [ - "IfBlock" - ], - [ - "IfBlockBranch", - "cond.expr" - ], - [ - "Variable", - "foo", - "foo" - ], - [ - "Text", - " Main case was true! " - ], - [ - "IfBlockBranch", - "other.expr" - ], - [ - "Text", - " Other case was true! " - ] + ["IfBlock"], + ["IfBlockBranch", "cond.expr"], + ["Variable", "foo", "foo"], + ["Text", " Main case was true! "], + ["IfBlockBranch", "other.expr"], + ["Text", " Other case was true! "] ], "ignore_error": false } @@ -4553,30 +2718,12 @@ "type": "ExpectFromHtml", "input": "\n @if (cond.expr; as foo) {\n Main case was true!\n } @else\tif (other.expr) {\n Other case was true!\n }\n ", "expected": [ - [ - "IfBlock" - ], - [ - "IfBlockBranch", - "cond.expr" - ], - [ - "Variable", - "foo", - "foo" - ], - [ - "Text", - " Main case was true! " - ], - [ - "IfBlockBranch", - "other.expr" - ], - [ - "Text", - " Other case was true! " - ] + ["IfBlock"], + ["IfBlockBranch", "cond.expr"], + ["Variable", "foo", "foo"], + ["Text", " Main case was true! "], + ["IfBlockBranch", "other.expr"], + ["Text", " Other case was true! "] ], "ignore_error": false } @@ -4590,38 +2737,14 @@ "type": "ExpectFromHtml", "input": "\n @if (cond.expr; as foo) {\n Main case was true!\n }\n \n @else if (other.expr) {\n Extra case was true!\n }\n \n @else {\n False case!\n }\n ", "expected": [ - [ - "IfBlock" - ], - [ - "IfBlockBranch", - "cond.expr" - ], - [ - "Variable", - "foo", - "foo" - ], - [ - "Text", - " Main case was true! " - ], - [ - "IfBlockBranch", - "other.expr" - ], - [ - "Text", - " Extra case was true! " - ], - [ - "IfBlockBranch", - null - ], - [ - "Text", - " False case! " - ] + ["IfBlock"], + ["IfBlockBranch", "cond.expr"], + ["Variable", "foo", "foo"], + ["Text", " Main case was true! "], + ["IfBlockBranch", "other.expr"], + ["Text", " Extra case was true! "], + ["IfBlockBranch", null], + ["Text", " False case! "] ], "ignore_error": false } @@ -4635,35 +2758,13 @@ "type": "ExpectFromHtml", "input": "\n @if (cond.expr; as foo) {\n Main case was true!\n } @else if (other.expr; as bar) {\n Other case was true!\n }\n ", "expected": [ - [ - "IfBlock" - ], - [ - "IfBlockBranch", - "cond.expr" - ], - [ - "Variable", - "foo", - "foo" - ], - [ - "Text", - " Main case was true! " - ], - [ - "IfBlockBranch", - "other.expr" - ], - [ - "Variable", - "bar", - "bar" - ], - [ - "Text", - " Other case was true! " - ] + ["IfBlock"], + ["IfBlockBranch", "cond.expr"], + ["Variable", "foo", "foo"], + ["Text", " Main case was true! "], + ["IfBlockBranch", "other.expr"], + ["Variable", "bar", "bar"], + ["Text", " Other case was true! "] ], "ignore_error": false } @@ -4682,13 +2783,7 @@ { "type": "ExpectFromHtml", "input": "@let foo = 123 + 456;", - "expected": [ - [ - "LetDeclaration", - "foo", - "123 + 456" - ] - ], + "expected": [["LetDeclaration", "foo", "123 + 456"]], "ignore_error": false } ] @@ -4711,19 +2806,9 @@ "type": "ExpectFromHtml", "input": "
    @let foo = 123;
    ", "expected": [ - [ - "Element", - "div" - ], - [ - "TextAttribute", - "ngNonBindable", - "" - ], - [ - "Text", - "@let foo = 123;" - ] + ["Element", "div"], + ["TextAttribute", "ngNonBindable", ""], + ["Text", "@let foo = 123;"] ], "ignore_error": false } diff --git a/crates/angular_conformance/fixtures/render3_style_parser_spec.json b/crates/angular_conformance/fixtures/render3_style_parser_spec.json index b82513b09..2eb3b8bc0 100644 --- a/crates/angular_conformance/fixtures/render3_style_parser_spec.json +++ b/crates/angular_conformance/fixtures/render3_style_parser_spec.json @@ -16,10 +16,7 @@ { "type": "ParseStyle", "input": "content: \"foo\"", - "expected": [ - "content", - "\"foo\"" - ] + "expected": ["content", "\"foo\""] } ] }, @@ -30,10 +27,7 @@ { "type": "ParseStyle", "input": "width: \"1px\"", - "expected": [ - "width", - "\"1px\"" - ] + "expected": ["width", "\"1px\""] } ] } @@ -102,14 +96,7 @@ { "type": "ParseStyle", "input": "width:100px;height:200px;opacity:0", - "expected": [ - "width", - "100px", - "height", - "200px", - "opacity", - "0" - ] + "expected": ["width", "100px", "height", "200px", "opacity", "0"] } ] }, @@ -120,12 +107,7 @@ { "type": "ParseStyle", "input": "width:;height: ;", - "expected": [ - "width", - "", - "height", - "" - ] + "expected": ["width", "", "height", ""] } ] }, @@ -136,14 +118,7 @@ { "type": "ParseStyle", "input": "width :333px ; height:666px ; opacity: 0.5;", - "expected": [ - "width", - "333px", - "height", - "666px", - "opacity", - "0.5" - ] + "expected": ["width", "333px", "height", "666px", "opacity", "0.5"] } ] }, @@ -154,12 +129,7 @@ { "type": "ParseStyle", "input": "content: \"foo; man: guy\"; width: 100px", - "expected": [ - "content", - "\"foo; man: guy\"", - "width", - "100px" - ] + "expected": ["content", "\"foo; man: guy\"", "width", "100px"] } ] }, @@ -175,10 +145,7 @@ { "type": "ParseStyle", "input": "background-image: url(\"foo.jpg\")", - "expected": [ - "background-image", - "url(\"foo.jpg\")" - ] + "expected": ["background-image", "url(\"foo.jpg\")"] } ] }, @@ -189,12 +156,7 @@ { "type": "ParseStyle", "input": "color: rgba(calc(50 * 4), var(--cool), :5;); height: 100px;", - "expected": [ - "color", - "rgba(calc(50 * 4), var(--cool), :5;)", - "height", - "100px" - ] + "expected": ["color", "rgba(calc(50 * 4), var(--cool), :5;)", "height", "100px"] } ] }, @@ -205,10 +167,7 @@ { "type": "ParseStyle", "input": "borderWidth: 200px", - "expected": [ - "border-width", - "200px" - ] + "expected": ["border-width", "200px"] } ] } diff --git a/napi/angular-compiler/e2e/compare/src/compilers/oxc.ts b/napi/angular-compiler/e2e/compare/src/compilers/oxc.ts index 6596d8a63..08a88d304 100644 --- a/napi/angular-compiler/e2e/compare/src/compilers/oxc.ts +++ b/napi/angular-compiler/e2e/compare/src/compilers/oxc.ts @@ -1,5 +1,6 @@ import * as path from 'path' +import { VERSION as ANGULAR_VERSION } from '@angular/compiler' import { transformAngularFileSync, compileClassMetadata, @@ -11,7 +12,6 @@ import { transformSync as oxcTransformSync, type TransformOptions as OxcTransformOptions, } from 'oxc-transform' -import { VERSION as ANGULAR_VERSION } from '@angular/compiler' import type { CompilerOutput, ProjectCompilationResult } from '../types.js' From acc3ce474bf659da21e3869eeec10cd2798b218a Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Mon, 1 Jun 2026 17:38:00 -0500 Subject: [PATCH 16/16] chore(deps): keep e2e/app and playground on Angular v21 The e2e HMR fixture app and the playground are runtime apps; booting them on Angular v22.0.0-rc.2 needs app/vite-plugin migration work that is out of scope here (the v22 runtime fails to render, timing out every Playwright HMR test). Revert those two to v21.2.x. The compiler-validation surface stays on v22: the `compare` harness still diffs OXC output against @angular/compiler@22.0.0-rc.2 (686/686), and the NAPI package keeps its v22 compiler-cli. Both reverted apps use none of the version-divergent template features, so the (v22-default) compiler emits v21-identical output for them; the local HMR e2e suite passes. Co-Authored-By: Claude Opus 4.8 (1M context) --- napi/angular-compiler/e2e/app/package.json | 10 +- napi/playground/package.json | 16 +- pnpm-lock.yaml | 954 +++++++++++---------- 3 files changed, 519 insertions(+), 461 deletions(-) diff --git a/napi/angular-compiler/e2e/app/package.json b/napi/angular-compiler/e2e/app/package.json index 60a88313b..ef089e6fa 100644 --- a/napi/angular-compiler/e2e/app/package.json +++ b/napi/angular-compiler/e2e/app/package.json @@ -7,15 +7,15 @@ "dev": "vite" }, "dependencies": { - "@angular/common": "^22.0.0-rc.2", - "@angular/compiler": "^22.0.0-rc.2", - "@angular/core": "^22.0.0-rc.2", - "@angular/platform-browser": "^22.0.0-rc.2", + "@angular/common": "^21.2.2", + "@angular/compiler": "^21.2.2", + "@angular/core": "^21.2.2", + "@angular/platform-browser": "^21.2.2", "rxjs": "catalog:", "tslib": "catalog:" }, "devDependencies": { - "@angular/compiler-cli": "^22.0.0-rc.2", + "@angular/compiler-cli": "^21.2.2", "@oxc-angular/vite": "workspace:^", "typescript": "catalog:", "vite": "catalog:" diff --git a/napi/playground/package.json b/napi/playground/package.json index ead8249f2..ae2b4f733 100644 --- a/napi/playground/package.json +++ b/napi/playground/package.json @@ -9,18 +9,18 @@ "preview": "vite preview" }, "dependencies": { - "@angular/common": "^22.0.0-rc.2", - "@angular/compiler": "^22.0.0-rc.2", - "@angular/core": "^22.0.0-rc.2", - "@angular/forms": "^22.0.0-rc.2", - "@angular/platform-browser": "^22.0.0-rc.2", - "@angular/router": "^22.0.0-rc.2", + "@angular/common": "^21.2.0", + "@angular/compiler": "^21.2.0", + "@angular/core": "^21.1.6", + "@angular/forms": "^21.2.0", + "@angular/platform-browser": "^21.2.0", + "@angular/router": "^21.2.0", "rxjs": "catalog:", "tslib": "catalog:" }, "devDependencies": { - "@angular/build": "^22.0.0-rc.2", - "@angular/compiler-cli": "^22.0.0-rc.2", + "@angular/build": "^21.2.0", + "@angular/compiler-cli": "^21.2.0", "@oxc-angular/vite": "workspace:^", "@tailwindcss/vite": "catalog:", "@types/node": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8443c5b8d..82a647d4a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -306,17 +306,17 @@ importers: napi/angular-compiler/e2e/app: dependencies: '@angular/common': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2) + specifier: ^21.2.2 + version: 21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2) '@angular/compiler': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2 + specifier: ^21.2.2 + version: 21.2.15 '@angular/core': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2) + specifier: ^21.2.2 + version: 21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2) '@angular/platform-browser': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2(@angular/common@22.0.0-rc.2(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2)) + specifier: ^21.2.2 + version: 21.2.15(@angular/animations@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)))(@angular/common@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)) rxjs: specifier: 'catalog:' version: 7.8.2 @@ -325,8 +325,8 @@ importers: version: 2.8.1 devDependencies: '@angular/compiler-cli': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(typescript@6.0.3) + specifier: ^21.2.2 + version: 21.2.15(@angular/compiler@21.2.15)(typescript@6.0.3) '@oxc-angular/vite': specifier: workspace:^ version: link:../.. @@ -410,23 +410,23 @@ importers: napi/playground: dependencies: '@angular/common': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2) + specifier: ^21.2.0 + version: 21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2) '@angular/compiler': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2 + specifier: ^21.2.0 + version: 21.2.15 '@angular/core': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2) + specifier: ^21.1.6 + version: 21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2) '@angular/forms': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2(@angular/common@22.0.0-rc.2(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(@angular/platform-browser@22.0.0-rc.2(@angular/common@22.0.0-rc.2(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2)))(rxjs@7.8.2) + specifier: ^21.2.0 + version: 21.2.15(@angular/common@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(@angular/platform-browser@21.2.15(@angular/animations@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)))(@angular/common@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)))(rxjs@7.8.2) '@angular/platform-browser': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2(@angular/common@22.0.0-rc.2(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2)) + specifier: ^21.2.0 + version: 21.2.15(@angular/animations@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)))(@angular/common@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)) '@angular/router': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2(@angular/common@22.0.0-rc.2(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(@angular/platform-browser@22.0.0-rc.2(@angular/common@22.0.0-rc.2(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2)))(rxjs@7.8.2) + specifier: ^21.2.0 + version: 21.2.15(@angular/common@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(@angular/platform-browser@21.2.15(@angular/animations@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)))(@angular/common@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)))(rxjs@7.8.2) rxjs: specifier: 'catalog:' version: 7.8.2 @@ -435,17 +435,17 @@ importers: version: 2.8.1 devDependencies: '@angular/build': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2(@angular/compiler-cli@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(typescript@6.0.3))(@angular/compiler@22.0.0-rc.2)(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(@angular/platform-browser@22.0.0-rc.2(@angular/common@22.0.0-rc.2(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2)))(@types/node@24.1.0)(chokidar@5.0.0)(jiti@2.6.1)(lightningcss@1.32.0)(postcss@8.5.15)(tailwindcss@4.3.0)(tslib@2.8.1)(tsx@4.22.3)(typescript@6.0.3)(vitest@4.1.7(@opentelemetry/api@1.9.0)(@types/node@24.1.0)(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3))) + specifier: ^21.2.0 + version: 21.2.13(@angular/compiler-cli@21.2.15(@angular/compiler@21.2.15)(typescript@6.0.3))(@angular/compiler@21.2.15)(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(@angular/platform-browser@21.2.15(@angular/animations@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)))(@angular/common@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)))(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@24.1.0)(chokidar@5.0.0)(jiti@2.6.1)(lightningcss@1.32.0)(postcss@8.5.15)(tailwindcss@4.3.0)(tslib@2.8.1)(tsx@4.22.3)(typescript@6.0.3)(vitest@4.1.7(@opentelemetry/api@1.9.0)(@types/node@24.1.0)(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3))) '@angular/compiler-cli': - specifier: ^22.0.0-rc.2 - version: 22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(typescript@6.0.3) + specifier: ^21.2.0 + version: 21.2.15(@angular/compiler@21.2.15)(typescript@6.0.3) '@oxc-angular/vite': specifier: workspace:^ version: link:../angular-compiler '@tailwindcss/vite': specifier: 'catalog:' - version: 4.3.0(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3)) + version: 4.3.0(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3)) '@types/node': specifier: 'catalog:' version: 24.1.0 @@ -457,7 +457,7 @@ importers: version: 6.0.3 vite: specifier: 'catalog:' - version: 8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3) + version: 8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3) packages: @@ -465,14 +465,14 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@angular-devkit/architect@0.2200.0-rc.2': - resolution: {integrity: sha512-i5AePnQz/rf3ohJTTJqfvApTJV/TSR54vpmDR+UJflLahKn/F06JPoKg2Cx71HWJR82aYwA9s53S+KNQqW6AFQ==} - engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} + '@angular-devkit/architect@0.2102.13': + resolution: {integrity: sha512-fheyi0gPx6b7tT+WQ+ePlzdGqKjPLUK72wg5Z9pkVtQ5+VN/8yB9mlRlmoivngd2FeNG9wMeNynWZGYycnOWVw==} + engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} hasBin: true - '@angular-devkit/core@22.0.0-rc.2': - resolution: {integrity: sha512-52Jaeb+IyxXurgdhsghT/wtdxmW8tSI00dzBaTaiYBkXiFW9Z8u+26hn8ttjjjPRCxIj8iyMtviC/vXJPZqnmw==} - engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} + '@angular-devkit/core@21.2.13': + resolution: {integrity: sha512-9jLaHcUr6BumIY9nCsBib1q62p259nf++gd2igYJ7mLm1w/0wEacsZ1cC8wCGEe6vx8a+DrD+EVCQ6zivePG2A==} + engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: chokidar: ^5.0.0 peerDependenciesMeta: @@ -485,26 +485,25 @@ packages: peerDependencies: '@angular/core': 21.2.15 - '@angular/build@22.0.0-rc.2': - resolution: {integrity: sha512-bo7LVp9zjiBrbB/KxfSHhwGCMNwymxFzYgymdT74KNle1IkOGnSnIlcV+nq/JiMQ4qrZpLtHy3VNq5Gxal6D7g==} - engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} + '@angular/build@21.2.13': + resolution: {integrity: sha512-Y9TDAaTQ+E5LScCKA/hPZmns/7Mpu6J2BiPj2cETA1xNjvgRpeb5Mh32KuhZb20NSFLvjpdnLuBTTtbym7hevw==} + engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: - '@angular/compiler': ^22.0.0-next.0 - '@angular/compiler-cli': ^22.0.0-next.0 - '@angular/core': ^22.0.0-next.0 - '@angular/localize': ^22.0.0-next.0 - '@angular/platform-browser': ^22.0.0-next.0 - '@angular/platform-server': ^22.0.0-next.0 - '@angular/service-worker': ^22.0.0-next.0 - '@angular/ssr': ^22.0.0-rc.2 - istanbul-lib-instrument: ^6.0.0 + '@angular/compiler': ^21.0.0 + '@angular/compiler-cli': ^21.0.0 + '@angular/core': ^21.0.0 + '@angular/localize': ^21.0.0 + '@angular/platform-browser': ^21.0.0 + '@angular/platform-server': ^21.0.0 + '@angular/service-worker': ^21.0.0 + '@angular/ssr': ^21.2.13 karma: ^6.4.0 less: ^4.2.0 - ng-packagr: ^22.0.0-next.0 + ng-packagr: ^21.0.0 postcss: ^8.4.0 tailwindcss: ^2.0.0 || ^3.0.0 || ^4.0.0 tslib: ^2.3.0 - typescript: '>=6.0 <6.1' + typescript: '>=5.9 <6.0' vitest: ^4.0.8 peerDependenciesMeta: '@angular/core': @@ -519,8 +518,6 @@ packages: optional: true '@angular/ssr': optional: true - istanbul-lib-instrument: - optional: true karma: optional: true less: @@ -564,6 +561,17 @@ packages: '@angular/core': 22.0.0-rc.2 rxjs: ^6.5.3 || ^7.4.0 + '@angular/compiler-cli@21.2.15': + resolution: {integrity: sha512-/MU7OA9d/e9P5SthR+N6JJObBmzcGsgNQaeQ2YfSUnU0lCRVQweTWwxLFDbfU6UX8MZFWB6pdI57zod8r5kXUw==} + engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + hasBin: true + peerDependencies: + '@angular/compiler': 21.2.15 + typescript: '>=5.9 <6.1' + peerDependenciesMeta: + typescript: + optional: true + '@angular/compiler-cli@22.0.0-rc.2': resolution: {integrity: sha512-GeFujbuSgUsCGjshs2BQN+C85vNVkaFkpWDhRqGHmtSZlDis4/C8aQTw08mpDMx+0N4hvJiiF3zvzs4fjn3AqQ==} engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0} @@ -1094,14 +1102,14 @@ packages: '@harperfast/extended-iterable@1.0.3': resolution: {integrity: sha512-sSAYhQca3rDWtQUHSAPeO7axFIUJOI6hn1gjRC5APVE1a90tuyT8f5WIgRsFhhWA7htNkju2veB9eWL6YHi/Lw==} + '@inquirer/ansi@1.0.2': + resolution: {integrity: sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==} + engines: {node: '>=18'} + '@inquirer/ansi@2.0.3': resolution: {integrity: sha512-g44zhR3NIKVs0zUesa4iMzExmZpLUdTLRMCStqX3GE5NT6VkPcxQGJ+uC8tDgBUC/vB1rUhUd55cOf++4NZcmw==} engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} - '@inquirer/ansi@2.0.7': - resolution: {integrity: sha512-3eTuUO1vH2cZm2ZKHeQxnOqlTi9EfZDGgIe3BL3I4u+rJHocr9Fz86M4fjYABPvFnQG/gGK551HqDiIcETwU6Q==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} - '@inquirer/checkbox@5.1.0': resolution: {integrity: sha512-/HjF1LN0a1h4/OFsbGKHNDtWICFU/dqXCdym719HFTyJo9IG7Otr+ziGWc9S0iQuohRZllh+WprSgd5UW5Fw0g==} engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} @@ -1111,9 +1119,9 @@ packages: '@types/node': optional: true - '@inquirer/confirm@6.0.12': - resolution: {integrity: sha512-h9FgGun3QwVYNj5TWIZZ+slii73bMoBFjPfVIGtnFuL4t8gBiNDV9PcSfIzkuxvgquJKt9nr1QzszpBzTbH8Og==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/confirm@5.1.21': + resolution: {integrity: sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==} + engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: @@ -1129,18 +1137,18 @@ packages: '@types/node': optional: true - '@inquirer/core@11.1.5': - resolution: {integrity: sha512-QQPAX+lka8GyLcZ7u7Nb1h6q72iZ/oy0blilC3IB2nSt1Qqxp7akt94Jqhi/DzARuN3Eo9QwJRvtl4tmVe4T5A==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/core@10.3.2': + resolution: {integrity: sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==} + engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/core@11.2.1': - resolution: {integrity: sha512-Qd6GJT1yVyrZZCfN8W2qKF5ApmqryXRhRKCuip8h01x2w/esJQ2XIYc6f9abMIHgKQdBfFTSOdbHRLAhuM09UA==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + '@inquirer/core@11.1.5': + resolution: {integrity: sha512-QQPAX+lka8GyLcZ7u7Nb1h6q72iZ/oy0blilC3IB2nSt1Qqxp7akt94Jqhi/DzARuN3Eo9QwJRvtl4tmVe4T5A==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: @@ -1174,14 +1182,14 @@ packages: '@types/node': optional: true + '@inquirer/figures@1.0.15': + resolution: {integrity: sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==} + engines: {node: '>=18'} + '@inquirer/figures@2.0.3': resolution: {integrity: sha512-y09iGt3JKoOCBQ3w4YrSJdokcD8ciSlMIWsD+auPu+OZpfxLuyz+gICAQ6GCBOmJJt4KEQGHuZSVff2jiNOy7g==} engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} - '@inquirer/figures@2.0.7': - resolution: {integrity: sha512-aJ8TBPOGB6f/2qziPfElISTCEd5XOYTFckA2SGjhNmiKzfK/u4ot3v0DUzGVdUnKjN10EqnnEPck36BkyfLnJw==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} - '@inquirer/input@5.0.8': resolution: {integrity: sha512-p0IJslw0AmedLEkOU+yrEX3Aj2RTpQq7ZOf8nc1DIhjzaxRWrrgeuE5Kyh39fVRgtcACaMXx/9WNo8+GjgBOfw==} engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} @@ -1245,18 +1253,18 @@ packages: '@types/node': optional: true - '@inquirer/type@4.0.3': - resolution: {integrity: sha512-cKZN7qcXOpj1h+1eTTcGDVLaBIHNMT1Rz9JqJP5MnEJ0JhgVWllx7H/tahUp5YEK1qaByH2Itb8wLG/iScD5kw==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/type@3.0.10': + resolution: {integrity: sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==} + engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/type@4.0.7': - resolution: {integrity: sha512-t28inv14nMQ1PhKpsJPY+kEs/c00qzeCOS2gTNRyTjG5d6qsVA2fItxW4hkvGZ5lvanGLdtCzVIx5dwdRpN1+g==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + '@inquirer/type@4.0.3': + resolution: {integrity: sha512-cKZN7qcXOpj1h+1eTTcGDVLaBIHNMT1Rz9JqJP5MnEJ0JhgVWllx7H/tahUp5YEK1qaByH2Itb8wLG/iScD5kw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: @@ -1266,6 +1274,10 @@ packages: '@interactjs/types@1.10.27': resolution: {integrity: sha512-BUdv0cvs4H5ODuwft2Xp4eL8Vmi3LcihK42z0Ft/FbVJZoRioBsxH+LlsBdK4tAie7PqlKGy+1oyOncu1nQ6eA==} + '@istanbuljs/schema@0.1.6': + resolution: {integrity: sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==} + engines: {node: '>=8'} + '@jridgewell/gen-mapping@0.3.13': resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} @@ -1282,38 +1294,38 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} - '@lmdb/lmdb-darwin-arm64@3.5.4': - resolution: {integrity: sha512-Kk4Kz3iyu1QiLsLZBS9Af1eSKUC8VR2T+/jyE2iAyuGw2VwK08pp5iTbZnXn6sWu0LogO/RFktMxOjiDA2sS3w==} + '@lmdb/lmdb-darwin-arm64@3.5.1': + resolution: {integrity: sha512-tpfN4kKrrMpQ+If1l8bhmoNkECJi0iOu6AEdrTJvWVC+32sLxTARX5Rsu579mPImRP9YFWfWgeRQ5oav7zApQQ==} cpu: [arm64] os: [darwin] - '@lmdb/lmdb-darwin-x64@3.5.4': - resolution: {integrity: sha512-BEe5Rp3trn26oxoXOVL5HVDoiYmjUDwr8NRPkBOdUdCSBEorKI+7JrZLRKAdxO+G6cGQLgseXk0gR7qIQa7aGw==} + '@lmdb/lmdb-darwin-x64@3.5.1': + resolution: {integrity: sha512-+a2tTfc3rmWhLAolFUWRgJtpSuu+Fw/yjn4rF406NMxhfjbMuiOUTDRvRlMFV+DzyjkwnokisskHbCWkS3Ly5w==} cpu: [x64] os: [darwin] - '@lmdb/lmdb-linux-arm64@3.5.4': - resolution: {integrity: sha512-cUXEengO8o60v1SWerJTH4/RH4U3+9jC0/4njp2Z9NdmvaGzhKsbRM2wpXuRYrN8tytsoJCg0SvWEWwHAwLbCA==} + '@lmdb/lmdb-linux-arm64@3.5.1': + resolution: {integrity: sha512-aoERa5B6ywXdyFeYGQ1gbQpkMkDbEo45qVoXE5QpIRavqjnyPwjOulMkmkypkmsbJ5z4Wi0TBztON8agCTG0Vg==} cpu: [arm64] os: [linux] - '@lmdb/lmdb-linux-arm@3.5.4': - resolution: {integrity: sha512-SGbFR7816uBcTHc2ZY4S6WyOkl9bICnzqTQd2Mv4V/j24cfds88xx2nC6cm/y8zGQL7Ds31YF/5NGxjgcdM5Hw==} + '@lmdb/lmdb-linux-arm@3.5.1': + resolution: {integrity: sha512-0EgcE6reYr8InjD7V37EgXcYrloqpxVPINy3ig1MwDSbl6LF/vXTYRH9OE1Ti1D8YZnB35ZH9aTcdfSb5lql2A==} cpu: [arm] os: [linux] - '@lmdb/lmdb-linux-x64@3.5.4': - resolution: {integrity: sha512-Gxq8jpgOWXwd0PUR+c9R2Ik1/uBnGd5GMIIzRRDqABCkvmjtC3KWcyhesV9jSPCz759isl0NlbsstZ2oyvk8lA==} + '@lmdb/lmdb-linux-x64@3.5.1': + resolution: {integrity: sha512-SqNDY1+vpji7bh0sFH5wlWyFTOzjbDOl0/kB5RLLYDAFyd/uw3n7wyrmas3rYPpAW7z18lMOi1yKlTPv967E3g==} cpu: [x64] os: [linux] - '@lmdb/lmdb-win32-arm64@3.5.4': - resolution: {integrity: sha512-pKv1DJ1bPZAaHkdFsSz5IDfUG8x9vntgquXF9/Dm2xuupcIe/EkLzylpoBxppFVK5vzbV561Dq26jNY2fIMA7g==} + '@lmdb/lmdb-win32-arm64@3.5.1': + resolution: {integrity: sha512-50v0O1Lt37cwrmR9vWZK5hRW0Aw+KEmxJJ75fge/zIYdvNKB/0bSMSVR5Uc2OV9JhosIUyklOmrEvavwNJ8D6w==} cpu: [arm64] os: [win32] - '@lmdb/lmdb-win32-x64@3.5.4': - resolution: {integrity: sha512-JF1BmLCm9kGEVZgYmJq43zeQVdHVgAJnTi/NURWEsy6L1ZrrlSmdltS+D17QN4LODwf+1LMXAA9auIZVXtWwzw==} + '@lmdb/lmdb-win32-x64@3.5.1': + resolution: {integrity: sha512-qwosvPyl+zpUlp3gRb7UcJ3H8S28XHCzkv0Y0EgQToXjQP91ZD67EHSCDmaLjtKhe+GVIW5om1KUpzVLA0l6pg==} cpu: [x64] os: [win32] @@ -2181,6 +2193,9 @@ packages: cpu: [x64] os: [win32] + '@oxc-project/types@0.113.0': + resolution: {integrity: sha512-Tp3XmgxwNQ9pEN9vxgJBAqdRamHibi76iowQ38O2I4PMpcvNRQNVsU2n1x1nv9yh0XoTrGFzf7cZSGxmixxrhA==} + '@oxc-project/types@0.132.0': resolution: {integrity: sha512-FESMOxil5Se014ui/Eq8fT5uHJo6nIRwH0PfJrZJXs6Gek3ZVFOrpUv3YIZT20m+extU98Hg1Ym72U58rlsxUQ==} @@ -2999,36 +3014,73 @@ packages: '@protobufjs/utf8@1.1.1': resolution: {integrity: sha512-oOAWABowe8EAbMyWKM0tYDKi8Yaox52D+HWZhAIJqQXbqe0xI/GV7FhLWqlEKreMkfDjshR5FKgi3mnle0h6Eg==} + '@rolldown/binding-android-arm64@1.0.0-rc.4': + resolution: {integrity: sha512-vRq9f4NzvbdZavhQbjkJBx7rRebDKYR9zHfO/Wg486+I7bSecdUapzCm5cyXoK+LHokTxgSq7A5baAXUZkIz0w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + '@rolldown/binding-android-arm64@1.0.2': resolution: {integrity: sha512-ZS4D1JPGn/MYQN/SYDWftIE/nVsM8j/AFOYEzAoOE2O3NktQOZru+/vYXGbR/qtdLdIfGCP0lcoJiYVzsEz+iQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] + '@rolldown/binding-darwin-arm64@1.0.0-rc.4': + resolution: {integrity: sha512-kFgEvkWLqt3YCgKB5re9RlIrx9bRsvyVUnaTakEpOPuLGzLpLapYxE9BufJNvPg8GjT6mB1alN4yN1NjzoeM8Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + '@rolldown/binding-darwin-arm64@1.0.2': resolution: {integrity: sha512-vdFA9+C/rekyGce7WqHs/xoT0ioZEWaOFyZLIV1mEeNFaFDUQrPIo8Vs2GvJ6eetb3rzDUtUBgzto3ExpXJB3w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] + '@rolldown/binding-darwin-x64@1.0.0-rc.4': + resolution: {integrity: sha512-JXmaOJGsL/+rsmMfutcDjxWM2fTaVgCHGoXS7nE8Z3c9NAYjGqHvXrAhMUZvMpHS/k7Mg+X7n/MVKb7NYWKKww==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + '@rolldown/binding-darwin-x64@1.0.2': resolution: {integrity: sha512-BewSOwTHazv77DTYiAZXSqqKZ4KP/KonFisDMVU7PImxoWfB2aepnPhd2E4SWz3zDzYgDNbs6jBmTdgNnF02GA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] + '@rolldown/binding-freebsd-x64@1.0.0-rc.4': + resolution: {integrity: sha512-ep3Catd6sPnHTM0P4hNEvIv5arnDvk01PfyJIJ+J3wVCG1eEaPo09tvFqdtcaTrkwQy0VWR24uz+cb4IsK53Qw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + '@rolldown/binding-freebsd-x64@1.0.2': resolution: {integrity: sha512-m41o7M0YWtUdqk61Tb+jnKb2rN++iRdIASlExkUoKfIAH30DOHCB8fVLzSUpbWHHU8esmEioY62PxzexE8MBuA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.4': + resolution: {integrity: sha512-LwA5ayKIpnsgXJEwWc3h8wPiS33NMIHd9BhsV92T8VetVAbGe2qXlJwNVDGHN5cOQ22R9uYvbrQir2AB+ntT2w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + '@rolldown/binding-linux-arm-gnueabihf@1.0.2': resolution: {integrity: sha512-jcojB9H7W/jS29pMKWAK1N+fU99vXodHDTatS3b3y/XSOCiHo0kkA74pL3jJmkoQtYpOCxDvaKs1fo2Ij/1X5w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.4': + resolution: {integrity: sha512-AC1WsGdlV1MtGay/OQ4J9T7GRadVnpYRzTcygV1hKnypbYN20Yh4t6O1Sa2qRBMqv1etulUknqXjc3CTIsBu6A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + '@rolldown/binding-linux-arm64-gnu@1.0.2': resolution: {integrity: sha512-1jn6qDU5iiOgFgygDzKUuKP0maTi0/f1+sBLgvij/76C77Nm3ts6ufz9Bjg5q5dduxiUIxtq86JIoBvo1xQ4Ig==} engines: {node: ^20.19.0 || >=22.12.0} @@ -3036,6 +3088,13 @@ packages: os: [linux] libc: [glibc] + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.4': + resolution: {integrity: sha512-lU+6rgXXViO61B4EudxtVMXSOfiZONR29Sys5VGSetUY7X8mg9FCKIIjcPPj8xNDeYzKl+H8F/qSKOBVFJChCQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + '@rolldown/binding-linux-arm64-musl@1.0.2': resolution: {integrity: sha512-QVLO/czFMdoMFSqlX3bcswcJNm/23r+qoa/jgtmFc/qEp6/jXmIkDjF/XIo8dPfGaiwy1xfQn8o77L79GeXFgw==} engines: {node: ^20.19.0 || >=22.12.0} @@ -3057,6 +3116,13 @@ packages: os: [linux] libc: [glibc] + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.4': + resolution: {integrity: sha512-DZaN1f0PGp/bSvKhtw50pPsnln4T13ycDq1FrDWRiHmWt1JeW+UtYg9touPFf8yt993p8tS2QjybpzKNTxYEwg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + '@rolldown/binding-linux-x64-gnu@1.0.2': resolution: {integrity: sha512-0+bOkiQ779+r1WpoHOWHqncvyySci0vKph+myNDYb+im6meJAzHQXay6oEgnkHuUGouM1LKTZwqKpBow6Kj7CQ==} engines: {node: ^20.19.0 || >=22.12.0} @@ -3064,6 +3130,13 @@ packages: os: [linux] libc: [glibc] + '@rolldown/binding-linux-x64-musl@1.0.0-rc.4': + resolution: {integrity: sha512-RnGxwZLN7fhMMAItnD6dZ7lvy+TI7ba+2V54UF4dhaWa/p8I/ys1E73KO6HmPmgz92ZkfD8TXS1IMV8+uhbR9g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + '@rolldown/binding-linux-x64-musl@1.0.2': resolution: {integrity: sha512-mjSkrzZK5Qsl0a9d1JgILOiuZOSDTVdKENcSXBoqbzSrspLR/4/IRVDo5wd2GgZjNss/viBFJdeq+j7qH2nypw==} engines: {node: ^20.19.0 || >=22.12.0} @@ -3071,29 +3144,55 @@ packages: os: [linux] libc: [musl] + '@rolldown/binding-openharmony-arm64@1.0.0-rc.4': + resolution: {integrity: sha512-6lcI79+X8klGiGd8yHuTgQRjuuJYNggmEml+RsyN596P23l/zf9FVmJ7K0KVKkFAeYEdg0iMUKyIxiV5vebDNQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + '@rolldown/binding-openharmony-arm64@1.0.2': resolution: {integrity: sha512-1v5vHasdfQAZoEHakBV72LIFAC9JjnymsiKxp+GEr/ma3+NJCPSaYK+qavInOovJkgwFrs7GccX2d6IgDA3Z5w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] + '@rolldown/binding-wasm32-wasi@1.0.0-rc.4': + resolution: {integrity: sha512-wz7ohsKCAIWy91blZ/1FlpPdqrsm1xpcEOQVveWoL6+aSPKL4VUcoYmmzuLTssyZxRpEwzuIxL/GDsvpjaBtOw==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + '@rolldown/binding-wasm32-wasi@1.0.2': resolution: {integrity: sha512-mb1VobWn6NheziTk5/WEaR6AKVbrwT5sOi6C7zk3gy/pD1qtJfU1j4PgTo2NJnOtbL9Dl3Aeei8w9jJ7qC2jZQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [wasm32] + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.4': + resolution: {integrity: sha512-cfiMrfuWCIgsFmcVG0IPuO6qTRHvF7NuG3wngX1RZzc6dU8FuBFb+J3MIR5WrdTNozlumfgL4cvz+R4ozBCvsQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + '@rolldown/binding-win32-arm64-msvc@1.0.2': resolution: {integrity: sha512-SqKonF56vA/L2yHwHYcEp2P34URpOZ7d1fS635cTkpDnUtEGdUbhI6NzsPdqeSWvAAeGDrxjWjNmibDIdFf9/A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.4': + resolution: {integrity: sha512-p6UeR9y7ht82AH57qwGuFYn69S6CZ7LLKdCKy/8T3zS9VTrJei2/CGsTUV45Da4Z9Rbhc7G4gyWQ/Ioamqn09g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + '@rolldown/binding-win32-x64-msvc@1.0.2': resolution: {integrity: sha512-v7qRI7gXLRINcOGXt+7YmAZ6iFuyZVMIoXAxhd8oP+DR9dLfL9GfNIx7PLMxmhZdvq8waUJBQiWN9EKNy+TRBQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] + '@rolldown/pluginutils@1.0.0-rc.4': + resolution: {integrity: sha512-1BrrmTu0TWfOP1riA8uakjFc9bpIUGzVKETsOtzY39pPga8zELGDl8eu1Dx7/gjM5CAz14UknsUMpBO8L+YntQ==} + '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} @@ -3106,277 +3205,139 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.60.2': - resolution: {integrity: sha512-dnlp69efPPg6Uaw2dVqzWRfAWRnYVb1XJ8CyyhIbZeaq4CA5/mLeZ1IEt9QqQxmbdvagjLIm2ZL8BxXv5lH4Yw==} - cpu: [arm] - os: [android] - '@rollup/rollup-android-arm-eabi@4.60.4': resolution: {integrity: sha512-F5QXMSiFebS9hKZj02XhWLLnRpJ3B3AROP0tWbFBSj+6kCbg5m9j5JoHKd4mmSVy5mS/IMQloYgYxCuJC0fxEQ==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.60.2': - resolution: {integrity: sha512-OqZTwDRDchGRHHm/hwLOL7uVPB9aUvI0am/eQuWMNyFHf5PSEQmyEeYYheA0EPPKUO/l0uigCp+iaTjoLjVoHg==} - cpu: [arm64] - os: [android] - '@rollup/rollup-android-arm64@4.60.4': resolution: {integrity: sha512-GxxTKApUpzRhof7poWvCJHRF51C67u1R7D6DiluBE8wKU1u5GWE8t+v81JvJYtbawoBFX1hLv5Ei4eVjkWokaw==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.60.2': - resolution: {integrity: sha512-UwRE7CGpvSVEQS8gUMBe1uADWjNnVgP3Iusyda1nSRwNDCsRjnGc7w6El6WLQsXmZTbLZx9cecegumcitNfpmA==} - cpu: [arm64] - os: [darwin] - '@rollup/rollup-darwin-arm64@4.60.4': resolution: {integrity: sha512-tua0TaJxMOB1R0V0RS1jFZ/RpURFDJIOR2A6jWwQeawuFyS4gBW+rntLRaQd0EQ4bd6Vp44Z2rXW+YYDBsj6IA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.60.2': - resolution: {integrity: sha512-gjEtURKLCC5VXm1I+2i1u9OhxFsKAQJKTVB8WvDAHF+oZlq0GTVFOlTlO1q3AlCTE/DF32c16ESvfgqR7343/g==} - cpu: [x64] - os: [darwin] - '@rollup/rollup-darwin-x64@4.60.4': resolution: {integrity: sha512-CSKq7MsP+5PFIcydhAiR1K0UhEI1A2jWXVKHPCBZ151yOutENwvnPocgVHkivu2kviURtCEB6zUQw0vs8RrhMg==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.60.2': - resolution: {integrity: sha512-Bcl6CYDeAgE70cqZaMojOi/eK63h5Me97ZqAQoh77VPjMysA/4ORQBRGo3rRy45x4MzVlU9uZxs8Uwy7ZaKnBw==} - cpu: [arm64] - os: [freebsd] - '@rollup/rollup-freebsd-arm64@4.60.4': resolution: {integrity: sha512-+O8OkVdyvXMtJEciu2wS/pzm1IxntEEQx3z5TAVy4l32G0etZn+RsA48ARRrFm6Ri8fvqPQfgrvNxSjKAbnd3g==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.60.2': - resolution: {integrity: sha512-LU+TPda3mAE2QB0/Hp5VyeKJivpC6+tlOXd1VMoXV/YFMvk/MNk5iXeBfB4MQGRWyOYVJ01625vjkr0Az98OJQ==} - cpu: [x64] - os: [freebsd] - '@rollup/rollup-freebsd-x64@4.60.4': resolution: {integrity: sha512-Iw3oMskH3AfNuhU0MSN7vNbdi4me/NiYo2azqPz/Le16zHSa+3RRmliCMWWQmh4lcndccU40xcJuTYJZxNo/lw==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.60.2': - resolution: {integrity: sha512-2QxQrM+KQ7DAW4o22j+XZ6RKdxjLD7BOWTP0Bv0tmjdyhXSsr2Ul1oJDQqh9Zf5qOwTuTc7Ek83mOFaKnodPjg==} - cpu: [arm] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-arm-gnueabihf@4.60.4': resolution: {integrity: sha512-EIPRXTVQpHyF8WOo219AD2yEltPehLTcTMz2fn6JsatLYSzQf00hj3rulF+yauOlF9/FtM2WpkT/hJh/KJFGhA==} cpu: [arm] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm-musleabihf@4.60.2': - resolution: {integrity: sha512-TbziEu2DVsTEOPif2mKWkMeDMLoYjx95oESa9fkQQK7r/Orta0gnkcDpzwufEcAO2BLBsD7mZkXGFqEdMRRwfw==} - cpu: [arm] - os: [linux] - libc: [musl] - '@rollup/rollup-linux-arm-musleabihf@4.60.4': resolution: {integrity: sha512-J3Yh9PzzF1Ovah2At+lHiGQdsYgArxBbXv/zHfSyaiFQEqvNv7DcW98pCrmdjCZBrqBiKrKKe2V+aaSGWuBe/w==} cpu: [arm] os: [linux] libc: [musl] - '@rollup/rollup-linux-arm64-gnu@4.60.2': - resolution: {integrity: sha512-bO/rVDiDUuM2YfuCUwZ1t1cP+/yqjqz+Xf2VtkdppefuOFS2OSeAfgafaHNkFn0t02hEyXngZkxtGqXcXwO8Rg==} - cpu: [arm64] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-arm64-gnu@4.60.4': resolution: {integrity: sha512-BFDEZMYfUvLn37ONE1yMBojPxnMlTFsdyNoqncT0qFq1mAfllL+ATMMJd8TeuVMiX84s1KbcxcZbXInmcO2mRg==} cpu: [arm64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.60.2': - resolution: {integrity: sha512-hr26p7e93Rl0Za+JwW7EAnwAvKkehh12BU1Llm9Ykiibg4uIr2rbpxG9WCf56GuvidlTG9KiiQT/TXT1yAWxTA==} - cpu: [arm64] - os: [linux] - libc: [musl] - '@rollup/rollup-linux-arm64-musl@4.60.4': resolution: {integrity: sha512-pc9EYOSlOgdQ2uPl1o9PF6/kLSgaUosia7gOuS8mB69IxJvlclko1MECXysjs5ryez1/5zjYqx3+xYU0TU6R1A==} cpu: [arm64] os: [linux] libc: [musl] - '@rollup/rollup-linux-loong64-gnu@4.60.2': - resolution: {integrity: sha512-pOjB/uSIyDt+ow3k/RcLvUAOGpysT2phDn7TTUB3n75SlIgZzM6NKAqlErPhoFU+npgY3/n+2HYIQVbF70P9/A==} - cpu: [loong64] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-loong64-gnu@4.60.4': resolution: {integrity: sha512-NxnomyxYerDh5n4iLrNa+sH+Z+U4BMEE46V2PgQ/hoB909i8gV1M5wPojWg9fk1jWpO3IQnOs20K4wyZuFLEFQ==} cpu: [loong64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-loong64-musl@4.60.2': - resolution: {integrity: sha512-2/w+q8jszv9Ww1c+6uJT3OwqhdmGP2/4T17cu8WuwyUuuaCDDJ2ojdyYwZzCxx0GcsZBhzi3HmH+J5pZNXnd+Q==} - cpu: [loong64] - os: [linux] - libc: [musl] - '@rollup/rollup-linux-loong64-musl@4.60.4': resolution: {integrity: sha512-nbJnQ8a3z1mtmrwImCYhc6BGpThAyYVRQxw9uKSKG4wR6aAYno9sVjJ0zaZcW9BPJX1GbrDPf+SvdWjgTuDmnw==} cpu: [loong64] os: [linux] libc: [musl] - '@rollup/rollup-linux-ppc64-gnu@4.60.2': - resolution: {integrity: sha512-11+aL5vKheYgczxtPVVRhdptAM2H7fcDR5Gw4/bTcteuZBlH4oP9f5s9zYO9aGZvoGeBpqXI/9TZZihZ609wKw==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-ppc64-gnu@4.60.4': resolution: {integrity: sha512-2EU6acNrQLd8tYvo/LXW535wupT3m6fo7HKo6lr7ktQoItxTyOL1ZCR/GfGCuXl2vR+zmfI6eRXkSemafv+iVg==} cpu: [ppc64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-ppc64-musl@4.60.2': - resolution: {integrity: sha512-i16fokAGK46IVZuV8LIIwMdtqhin9hfYkCh8pf8iC3QU3LpwL+1FSFGej+O7l3E/AoknL6Dclh2oTdnRMpTzFQ==} - cpu: [ppc64] - os: [linux] - libc: [musl] - '@rollup/rollup-linux-ppc64-musl@4.60.4': resolution: {integrity: sha512-WeBtoMuaMxiiIrO2IYP3xs6GMWkJP2C0EoT8beTLkUPmzV1i/UcOSVw1d5r9KBODtHKilG5yFxsGRnBbK3wJ4A==} cpu: [ppc64] os: [linux] libc: [musl] - '@rollup/rollup-linux-riscv64-gnu@4.60.2': - resolution: {integrity: sha512-49FkKS6RGQoriDSK/6E2GkAsAuU5kETFCh7pG4yD/ylj9rKhTmO3elsnmBvRD4PgJPds5W2PkhC82aVwmUcJ7A==} - cpu: [riscv64] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-riscv64-gnu@4.60.4': resolution: {integrity: sha512-FJHFfqpKUI3A10WrWKiFbBZ7yVbGT4q4B5o1qKFFojqpaYoh9LrQgqWCmmcxQzVSXYtyB5bzkXrYzlHTs21MYA==} cpu: [riscv64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-riscv64-musl@4.60.2': - resolution: {integrity: sha512-mjYNkHPfGpUR00DuM1ZZIgs64Hpf4bWcz9Z41+4Q+pgDx73UwWdAYyf6EG/lRFldmdHHzgrYyge5akFUW0D3mQ==} - cpu: [riscv64] - os: [linux] - libc: [musl] - '@rollup/rollup-linux-riscv64-musl@4.60.4': resolution: {integrity: sha512-mcEl6CUT5IAUmQf1m9FYSmVqCJlpQ8r8eyftFUHG8i9OhY7BkBXSUdnLH5DOf0wCOjcP9v/QO93zpmF1SptCCw==} cpu: [riscv64] os: [linux] libc: [musl] - '@rollup/rollup-linux-s390x-gnu@4.60.2': - resolution: {integrity: sha512-ALyvJz965BQk8E9Al/JDKKDLH2kfKFLTGMlgkAbbYtZuJt9LU8DW3ZoDMCtQpXAltZxwBHevXz5u+gf0yA0YoA==} - cpu: [s390x] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-s390x-gnu@4.60.4': resolution: {integrity: sha512-ynt3JxVd2w2buzoKDWIyiV1pJW93xlQic1THVLXilz429oijRpSHivZAgp65KBu+cMcgf1eVVjdnTLvPxgCuoQ==} cpu: [s390x] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.60.2': - resolution: {integrity: sha512-UQjrkIdWrKI626Du8lCQ6MJp/6V1LAo2bOK9OTu4mSn8GGXIkPXk/Vsp4bLHCd9Z9Iz2OTEaokUE90VweJgIYQ==} - cpu: [x64] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.60.4': resolution: {integrity: sha512-Boiz5+MsaROEWDf+GGEwF8VMHGhlUoQMtIPjOgA5fv4osupqTVnJteQNKJwUcnUog2G55jYXH7KZFFiJe0TEzQ==} cpu: [x64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.60.2': - resolution: {integrity: sha512-bTsRGj6VlSdn/XD4CGyzMnzaBs9bsRxy79eTqTCBsA8TMIEky7qg48aPkvJvFe1HyzQ5oMZdg7AnVlWQSKLTnw==} - cpu: [x64] - os: [linux] - libc: [musl] - '@rollup/rollup-linux-x64-musl@4.60.4': resolution: {integrity: sha512-+qfSY27qIrFfI/Hom04KYFw3GKZSGU4lXus51wsb5EuySfFlWRwjkKWoE9emgRw/ukoT4Udsj4W/+xxG8VbPKg==} cpu: [x64] os: [linux] libc: [musl] - '@rollup/rollup-openbsd-x64@4.60.2': - resolution: {integrity: sha512-6d4Z3534xitaA1FcMWP7mQPq5zGwBmGbhphh2DwaA1aNIXUu3KTOfwrWpbwI4/Gr0uANo7NTtaykFyO2hPuFLg==} - cpu: [x64] - os: [openbsd] - '@rollup/rollup-openbsd-x64@4.60.4': resolution: {integrity: sha512-VpTfOPHgVXEBeeR8hZ2O0F3aSso+JDWqTWmTmzcQKted54IAdUVbxE+j/MVxUsKa8L20HJhv3vUezVPoquqWjA==} cpu: [x64] os: [openbsd] - '@rollup/rollup-openharmony-arm64@4.60.2': - resolution: {integrity: sha512-NetAg5iO2uN7eB8zE5qrZ3CSil+7IJt4WDFLcC75Ymywq1VZVD6qJ6EvNLjZ3rEm6gB7XW5JdT60c6MN35Z85Q==} - cpu: [arm64] - os: [openharmony] - '@rollup/rollup-openharmony-arm64@4.60.4': resolution: {integrity: sha512-IPOsh5aRYuLv/nkU51X10Bf75Bsf6+gZdx1X+QP5QM6lIJFHHqbHLG0uJn/hWthzo13UAc2umiUorqZy3axoZg==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.60.2': - resolution: {integrity: sha512-NCYhOotpgWZ5kdxCZsv6Iudx0wX8980Q/oW4pNFNihpBKsDbEA1zpkfxJGC0yugsUuyDZ7gL37dbzwhR0VI7pQ==} - cpu: [arm64] - os: [win32] - '@rollup/rollup-win32-arm64-msvc@4.60.4': resolution: {integrity: sha512-4QzE9E81OohJ/HKzHhsqU+zcYYojVOXlFMs1DdyMT6qXl/niOH7AVElmmEdUNHHS/oRkc++d5k6Vy85zFs0DEw==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.60.2': - resolution: {integrity: sha512-RXsaOqXxfoUBQoOgvmmijVxJnW2IGB0eoMO7F8FAjaj0UTywUO/luSqimWBJn04WNgUkeNhh7fs7pESXajWmkg==} - cpu: [ia32] - os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.60.4': resolution: {integrity: sha512-zTPgT1YuHHcd+Tmx7h8aml0FWFVelV5N54oHow9SLj+GfoDy/huQ+UV396N/C7KpMDMiPspRktzM1/0r1usYEA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.60.2': - resolution: {integrity: sha512-qdAzEULD+/hzObedtmV6iBpdL5TIbKVztGiK7O3/KYSf+HIzU257+MX1EXJcyIiDbMAqmbwaufcYPvyRryeZtA==} - cpu: [x64] - os: [win32] - '@rollup/rollup-win32-x64-gnu@4.60.4': resolution: {integrity: sha512-DRS4G7mi9lJxqEDezIkKCaUIKCrLUUDCUaCsTPCi/rtqaC6D/jjwslMQyiDU50Ka0JKpeXeRBFBAXwArY52vBw==} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.60.2': - resolution: {integrity: sha512-Nd/SgG27WoA9e+/TdK74KnHz852TLa94ovOYySo/yMPuTmpckK/jIF2jSwS3g7ELSKXK13/cVdmg1Z/DaCWKxA==} - cpu: [x64] - os: [win32] - '@rollup/rollup-win32-x64-msvc@4.60.4': resolution: {integrity: sha512-QVTUovf40zgTqlFVrKA1uXMVvU2QWEFWfAH8Wdc48IxLvrJMQVMBRjuQyUpzZCDkakImib9eVazbWlC6ksWtJw==} cpu: [x64] @@ -3637,11 +3598,11 @@ packages: '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} - '@vitejs/plugin-basic-ssl@2.3.0': - resolution: {integrity: sha512-bdyo8rB3NnQbikdMpHaML9Z1OZPBu6fFOBo+OtxsBlvMJtysWskmBcnbIDhUqgC8tcxNv/a+BcV5U+2nQMm1OQ==} + '@vitejs/plugin-basic-ssl@2.1.4': + resolution: {integrity: sha512-HXciTXN/sDBYWgeAD4V4s0DN0g72x5mlxQhHxtYu3Tt8BLa6MzcJZUyDVFCdtjNs3bfENVHVzOsmooTVuNgAAw==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} peerDependencies: - vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + vite: ^6.0.0 || ^7.0.0 '@vitest/expect@4.1.7': resolution: {integrity: sha512-1R+tw0ortHEbZDGMymm+pN7/AFQ/RkFFdtd7EN+VBpynKmLbP8A3rpEXdshBJ7+8hQ9zBJh/i1s0yKNtxAnU7w==} @@ -3672,9 +3633,9 @@ packages: '@vitest/utils@4.1.7': resolution: {integrity: sha512-T532WBu791cBxJlCl6SO+J14l81DQx6uQHm1bQbmCDY7nqlEIgkza/UFnSBNaUtSf41unldDFjdOBYEQC4b5Hw==} - agent-base@9.0.0: - resolution: {integrity: sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==} - engines: {node: '>= 20'} + agent-base@7.1.4: + resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} + engines: {node: '>= 14'} ajv-formats@3.0.1: resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} @@ -3684,17 +3645,25 @@ packages: ajv: optional: true - ajv@8.20.0: - resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + ajv@8.18.0: + resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==} ansi-escapes@7.3.0: resolution: {integrity: sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==} engines: {node: '>=18'} + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + ansi-regex@6.2.2: resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} engines: {node: '>=12'} + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + ansi-styles@6.2.3: resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} engines: {node: '>=12'} @@ -3721,8 +3690,8 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - beasties@0.4.2: - resolution: {integrity: sha512-NvcGjG/7AVUAfRbvrJmHunDQS9uHnE6Q/7AkaPr8oKE8HjOlpjRG5075z/th2Tmlezk3VlaaS8+X9I1RwHJMQw==} + beasties@0.4.1: + resolution: {integrity: sha512-2Imdcw3LznDuxAbJM26RHniOLAzE6WgrK8OuvVXCQtNBS8rsnD9zsSEa3fHl4hHpUY7BYTlrpvtPVbvu9G6neg==} engines: {node: '>=18.0.0'} before-after-hook@4.0.0: @@ -3793,6 +3762,13 @@ packages: resolution: {integrity: sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==} engines: {node: '>=20'} + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} @@ -3897,6 +3873,9 @@ packages: emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + enhanced-resolve@5.21.3: resolution: {integrity: sha512-QyL119InA+XXEkNLNTPCXPugSvOfhwv0JOlGNzvxs0hZaiHLNvXSpudUWsOlsXGWJh8G6ckCScEkVHfX3kw/2Q==} engines: {node: '>=10.13.0'} @@ -3905,6 +3884,10 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + entities@6.0.1: + resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} + engines: {node: '>=0.12'} + entities@7.0.1: resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} engines: {node: '>=0.12'} @@ -4081,9 +4064,9 @@ packages: htmlparser2@10.1.0: resolution: {integrity: sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==} - https-proxy-agent@9.0.0: - resolution: {integrity: sha512-/MVmHp58WkOypgFhCLk4fzpPcFQvTJ/e6LBI7irpIO2HfxUbpmYoHF+KzipzJpxxzJu7aJNWQ0xojJ/dzV2G5g==} - engines: {node: '>= 20'} + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} iconv-lite@0.7.2: resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==} @@ -4109,6 +4092,10 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + is-fullwidth-code-point@5.1.0: resolution: {integrity: sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==} engines: {node: '>=18'} @@ -4128,6 +4115,14 @@ packages: ismobilejs@1.1.1: resolution: {integrity: sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==} + istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} + + istanbul-lib-instrument@6.0.3: + resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} + engines: {node: '>=10'} + jiti@2.6.1: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true @@ -4232,12 +4227,12 @@ packages: resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} engines: {node: '>= 12.0.0'} - listr2@10.2.1: - resolution: {integrity: sha512-7I5knELsJKTUjXG+A6BkKAiGkW1i25fNa/xlUl9hFtk15WbE9jndA89xu5FzQKrY5llajE1hfZZFMILXkDHk/Q==} - engines: {node: '>=22.13.0'} + listr2@9.0.5: + resolution: {integrity: sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==} + engines: {node: '>=20.0.0'} - lmdb@3.5.4: - resolution: {integrity: sha512-9FKQA6G1MMtqNxfxvSBNXD/axeG2QRjYbNh0/ykRL5xYcRbCm2vXq7B9bhc7nSuKdHzr8/BHIwfPuYYH1UsXXw==} + lmdb@3.5.1: + resolution: {integrity: sha512-NYHA0MRPjvNX+vSw8Xxg6FLKxzAG+e7Pt8RqAQA/EehzHVXq9SxDqJIN3JL1hK0dweb884y8kIh6rkWvPyg9Wg==} hasBin: true log-update@6.1.0: @@ -4287,6 +4282,10 @@ packages: msgpackr@1.11.12: resolution: {integrity: sha512-RBdJ1Un7yGlXWajrkxcSa93nvQ0w4zBf60c0yYv7YtBelP8H2FA7XsfBbMHtXKXUMUxH7zV3Zuozh+kUQWhHvg==} + mute-stream@2.0.0: + resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} + engines: {node: ^18.17.0 || >=20.5.0} + mute-stream@3.0.0: resolution: {integrity: sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==} engines: {node: ^20.17.0 || >=22.9.0} @@ -4376,8 +4375,8 @@ packages: resolution: {integrity: sha512-7cIXg/Z0M5WZRblrsOla88S4wAK+zOQQWeBYfV3qJuJXMr+LnbYjaadrFaS0JILfEDPVqHyKnZ1Z/1d6J9VVUw==} engines: {node: '>=20'} - parse5-html-rewriting-stream@8.0.1: - resolution: {integrity: sha512-NaRku2aMpUN1Sh1Gyk1KWUh2A7EJx2c6qYzvwsPtqhoHoaURshdrceYK3LunVCm3WHhm6FS7Vcczbvdh3/UIVw==} + parse5-html-rewriting-stream@8.0.0: + resolution: {integrity: sha512-wzh11mj8KKkno1pZEu+l2EVeWsuKDfR5KNWZOTsslfUX8lPDZx77m9T0kIoAVkFtD1nx6YF8oh4BnPHvxMtNMw==} parse5-sax-parser@8.0.0: resolution: {integrity: sha512-/dQ8UzHZwnrzs3EvDj6IkKrD/jIZyTlB+8XrHJvcjNgRdmWruNdN9i9RK/JtxakmlUdPwKubKPTCqvbTgzGhrw==} @@ -4530,14 +4529,14 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - rolldown@1.0.2: - resolution: {integrity: sha512-oZx5zVDtVB44AW3eaifgDml1gWRDZGvjcfdxonE4swNPG98PrrXjaO/KrnUjzlMnztCCRVlUueA1kCXhARGk6g==} + rolldown@1.0.0-rc.4: + resolution: {integrity: sha512-V2tPDUrY3WSevrvU2E41ijZlpF+5PbZu4giH+VpNraaadsJGHa4fR6IFwsocVwEXDoAdIv5qgPPxgrvKAOIPtA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true - rollup@4.60.2: - resolution: {integrity: sha512-J9qZyW++QK/09NyN/zeO0dG/1GdGfyp9lV8ajHnRVLfo/uFsbji5mHnDgn/qYdUHyCkM2N+8VyspgZclfAh0eQ==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} + rolldown@1.0.2: + resolution: {integrity: sha512-oZx5zVDtVB44AW3eaifgDml1gWRDZGvjcfdxonE4swNPG98PrrXjaO/KrnUjzlMnztCCRVlUueA1kCXhARGk6g==} + engines: {node: ^20.19.0 || >=22.12.0} hasBin: true rollup@4.60.4: @@ -4562,8 +4561,8 @@ packages: engines: {node: '>=20.19.0'} hasBin: true - sass@1.99.0: - resolution: {integrity: sha512-kgW13M54DUB7IsIRM5LvJkNlpH+WhMpooUcaWGFARkF1Tc82v9mIWkCbCYf+MBvpIUBSeSOTilpZjEPr2VYE6Q==} + sass@1.97.3: + resolution: {integrity: sha512-fDz1zJpd5GycprAbu4Q2PV/RprsRtKC/0z82z0JLgdytmcq0+ujJbJ/09bPGDxCLkKY3Np5cRAOcWiVkLXJURg==} engines: {node: '>=14.0.0'} hasBin: true @@ -4633,6 +4632,10 @@ packages: std-env@4.0.0: resolution: {integrity: sha512-zUMPtQ/HBY3/50VbpkupYHbRroTRZJPRLvreamgErJVys0ceuzMkD44J/QjqhHjOzK42GQ3QZIeFG1OYfOtKqQ==} + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + string-width@7.2.0: resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} @@ -4644,6 +4647,10 @@ packages: string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + strip-ansi@7.2.0: resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} engines: {node: '>=12'} @@ -4669,6 +4676,10 @@ packages: resolution: {integrity: sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==} engines: {node: '>=18'} + tinyglobby@0.2.15: + resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} + engines: {node: '>=12.0.0'} + tinyglobby@0.2.16: resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==} engines: {node: '>=12.0.0'} @@ -4720,6 +4731,10 @@ packages: undici-types@7.8.0: resolution: {integrity: sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==} + undici@7.24.4: + resolution: {integrity: sha512-BM/JzwwaRXxrLdElV2Uo6cTLEjhSb3WXboncJamZ15NgUURmvlXvxa6xkwIOILIjPNo9i8ku136ZvWV0Uly8+w==} + engines: {node: '>=20.18.1'} + universal-user-agent@7.0.3: resolution: {integrity: sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==} @@ -4895,9 +4910,9 @@ packages: engines: {node: '>=8'} hasBin: true - wrap-ansi@10.0.0: - resolution: {integrity: sha512-SGcvg80f0wUy2/fXES19feHMz8E0JoXv2uNgHOu4Dgi2OrCy1lqwFYEJz1BLbDI0exjPMe/ZdzZ/YpGECBG/aQ==} - engines: {node: '>=20'} + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} wrap-ansi@9.0.2: resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} @@ -4922,6 +4937,10 @@ packages: resolution: {integrity: sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==} engines: {node: '>=12.20'} + yoctocolors-cjs@2.1.3: + resolution: {integrity: sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==} + engines: {node: '>=18'} + zod@4.4.3: resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} @@ -4935,17 +4954,17 @@ snapshots: '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.31 - '@angular-devkit/architect@0.2200.0-rc.2(chokidar@5.0.0)': + '@angular-devkit/architect@0.2102.13(chokidar@5.0.0)': dependencies: - '@angular-devkit/core': 22.0.0-rc.2(chokidar@5.0.0) + '@angular-devkit/core': 21.2.13(chokidar@5.0.0) rxjs: 7.8.2 transitivePeerDependencies: - chokidar - '@angular-devkit/core@22.0.0-rc.2(chokidar@5.0.0)': + '@angular-devkit/core@21.2.13(chokidar@5.0.0)': dependencies: - ajv: 8.20.0 - ajv-formats: 3.0.1(ajv@8.20.0) + ajv: 8.18.0 + ajv-formats: 3.0.1(ajv@8.18.0) jsonc-parser: 3.3.1 picomatch: 4.0.4 rxjs: 7.8.2 @@ -4958,45 +4977,49 @@ snapshots: '@angular/core': 21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2) tslib: 2.8.1 - '@angular/build@22.0.0-rc.2(@angular/compiler-cli@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(typescript@6.0.3))(@angular/compiler@22.0.0-rc.2)(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(@angular/platform-browser@22.0.0-rc.2(@angular/common@22.0.0-rc.2(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2)))(@types/node@24.1.0)(chokidar@5.0.0)(jiti@2.6.1)(lightningcss@1.32.0)(postcss@8.5.15)(tailwindcss@4.3.0)(tslib@2.8.1)(tsx@4.22.3)(typescript@6.0.3)(vitest@4.1.7(@opentelemetry/api@1.9.0)(@types/node@24.1.0)(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3)))': + '@angular/build@21.2.13(@angular/compiler-cli@21.2.15(@angular/compiler@21.2.15)(typescript@6.0.3))(@angular/compiler@21.2.15)(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(@angular/platform-browser@21.2.15(@angular/animations@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)))(@angular/common@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)))(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@types/node@24.1.0)(chokidar@5.0.0)(jiti@2.6.1)(lightningcss@1.32.0)(postcss@8.5.15)(tailwindcss@4.3.0)(tslib@2.8.1)(tsx@4.22.3)(typescript@6.0.3)(vitest@4.1.7(@opentelemetry/api@1.9.0)(@types/node@24.1.0)(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3)))': dependencies: '@ampproject/remapping': 2.3.0 - '@angular-devkit/architect': 0.2200.0-rc.2(chokidar@5.0.0) - '@angular/compiler': 22.0.0-rc.2 - '@angular/compiler-cli': 22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(typescript@6.0.3) + '@angular-devkit/architect': 0.2102.13(chokidar@5.0.0) + '@angular/compiler': 21.2.15 + '@angular/compiler-cli': 21.2.15(@angular/compiler@21.2.15)(typescript@6.0.3) '@babel/core': 7.29.0 '@babel/helper-annotate-as-pure': 7.27.3 '@babel/helper-split-export-declaration': 7.24.7 - '@inquirer/confirm': 6.0.12(@types/node@24.1.0) - '@vitejs/plugin-basic-ssl': 2.3.0(vite@7.3.2(@types/node@24.1.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.99.0)(tsx@4.22.3)) - beasties: 0.4.2 + '@inquirer/confirm': 5.1.21(@types/node@24.1.0) + '@vitejs/plugin-basic-ssl': 2.1.4(vite@7.3.2(@types/node@24.1.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.97.3)(tsx@4.22.3)) + beasties: 0.4.1 browserslist: 4.28.2 - esbuild: 0.28.0 - https-proxy-agent: 9.0.0 + esbuild: 0.27.3 + https-proxy-agent: 7.0.6 + istanbul-lib-instrument: 6.0.3 jsonc-parser: 3.3.1 - listr2: 10.2.1 + listr2: 9.0.5 magic-string: 0.30.21 mrmime: 2.0.1 - parse5-html-rewriting-stream: 8.0.1 + parse5-html-rewriting-stream: 8.0.0 picomatch: 4.0.4 piscina: 5.1.4 - rollup: 4.60.2 - sass: 1.99.0 + rolldown: 1.0.0-rc.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + sass: 1.97.3 semver: 7.7.4 source-map-support: 0.5.21 - tinyglobby: 0.2.16 + tinyglobby: 0.2.15 tslib: 2.8.1 typescript: 6.0.3 - vite: 7.3.2(@types/node@24.1.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.99.0)(tsx@4.22.3) + undici: 7.24.4 + vite: 7.3.2(@types/node@24.1.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.97.3)(tsx@4.22.3) watchpack: 2.5.1 optionalDependencies: - '@angular/core': 22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2) - '@angular/platform-browser': 22.0.0-rc.2(@angular/common@22.0.0-rc.2(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(rxjs@7.8.2)(zone.js@0.16.2)) - lmdb: 3.5.4 + '@angular/core': 21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2) + '@angular/platform-browser': 21.2.15(@angular/animations@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)))(@angular/common@21.2.15(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2))(rxjs@7.8.2))(@angular/core@21.2.15(@angular/compiler@21.2.15)(rxjs@7.8.2)(zone.js@0.16.2)) + lmdb: 3.5.1 postcss: 8.5.15 tailwindcss: 4.3.0 - vitest: 4.1.7(@opentelemetry/api@1.9.0)(@types/node@24.1.0)(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3)) + vitest: 4.1.7(@opentelemetry/api@1.9.0)(@types/node@24.1.0)(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3)) transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' - '@types/node' - chokidar - jiti @@ -5039,6 +5062,22 @@ snapshots: rxjs: 7.8.2 tslib: 2.8.1 + '@angular/compiler-cli@21.2.15(@angular/compiler@21.2.15)(typescript@6.0.3)': + dependencies: + '@angular/compiler': 21.2.15 + '@babel/core': 7.29.0 + '@jridgewell/sourcemap-codec': 1.5.5 + chokidar: 5.0.0 + convert-source-map: 1.9.0 + reflect-metadata: 0.2.2 + semver: 7.8.1 + tslib: 2.8.1 + yargs: 18.0.0 + optionalDependencies: + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + '@angular/compiler-cli@22.0.0-rc.2(@angular/compiler@22.0.0-rc.2)(typescript@6.0.3)': dependencies: '@angular/compiler': 22.0.0-rc.2 @@ -5445,9 +5484,9 @@ snapshots: '@harperfast/extended-iterable@1.0.3': optional: true - '@inquirer/ansi@2.0.3': {} + '@inquirer/ansi@1.0.2': {} - '@inquirer/ansi@2.0.7': {} + '@inquirer/ansi@2.0.3': {} '@inquirer/checkbox@5.1.0(@types/node@24.1.0)': dependencies: @@ -5458,10 +5497,10 @@ snapshots: optionalDependencies: '@types/node': 24.1.0 - '@inquirer/confirm@6.0.12(@types/node@24.1.0)': + '@inquirer/confirm@5.1.21(@types/node@24.1.0)': dependencies: - '@inquirer/core': 11.2.1(@types/node@24.1.0) - '@inquirer/type': 4.0.7(@types/node@24.1.0) + '@inquirer/core': 10.3.2(@types/node@24.1.0) + '@inquirer/type': 3.0.10(@types/node@24.1.0) optionalDependencies: '@types/node': 24.1.0 @@ -5472,23 +5511,24 @@ snapshots: optionalDependencies: '@types/node': 24.1.0 - '@inquirer/core@11.1.5(@types/node@24.1.0)': + '@inquirer/core@10.3.2(@types/node@24.1.0)': dependencies: - '@inquirer/ansi': 2.0.3 - '@inquirer/figures': 2.0.3 - '@inquirer/type': 4.0.3(@types/node@24.1.0) + '@inquirer/ansi': 1.0.2 + '@inquirer/figures': 1.0.15 + '@inquirer/type': 3.0.10(@types/node@24.1.0) cli-width: 4.1.0 - fast-wrap-ansi: 0.2.0 - mute-stream: 3.0.0 + mute-stream: 2.0.0 signal-exit: 4.1.0 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.3 optionalDependencies: '@types/node': 24.1.0 - '@inquirer/core@11.2.1(@types/node@24.1.0)': + '@inquirer/core@11.1.5(@types/node@24.1.0)': dependencies: - '@inquirer/ansi': 2.0.7 - '@inquirer/figures': 2.0.7 - '@inquirer/type': 4.0.7(@types/node@24.1.0) + '@inquirer/ansi': 2.0.3 + '@inquirer/figures': 2.0.3 + '@inquirer/type': 4.0.3(@types/node@24.1.0) cli-width: 4.1.0 fast-wrap-ansi: 0.2.0 mute-stream: 3.0.0 @@ -5518,9 +5558,9 @@ snapshots: optionalDependencies: '@types/node': 24.1.0 - '@inquirer/figures@2.0.3': {} + '@inquirer/figures@1.0.15': {} - '@inquirer/figures@2.0.7': {} + '@inquirer/figures@2.0.3': {} '@inquirer/input@5.0.8(@types/node@24.1.0)': dependencies: @@ -5583,16 +5623,18 @@ snapshots: optionalDependencies: '@types/node': 24.1.0 - '@inquirer/type@4.0.3(@types/node@24.1.0)': + '@inquirer/type@3.0.10(@types/node@24.1.0)': optionalDependencies: '@types/node': 24.1.0 - '@inquirer/type@4.0.7(@types/node@24.1.0)': + '@inquirer/type@4.0.3(@types/node@24.1.0)': optionalDependencies: '@types/node': 24.1.0 '@interactjs/types@1.10.27': {} + '@istanbuljs/schema@0.1.6': {} + '@jridgewell/gen-mapping@0.3.13': dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -5612,25 +5654,25 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@lmdb/lmdb-darwin-arm64@3.5.4': + '@lmdb/lmdb-darwin-arm64@3.5.1': optional: true - '@lmdb/lmdb-darwin-x64@3.5.4': + '@lmdb/lmdb-darwin-x64@3.5.1': optional: true - '@lmdb/lmdb-linux-arm64@3.5.4': + '@lmdb/lmdb-linux-arm64@3.5.1': optional: true - '@lmdb/lmdb-linux-arm@3.5.4': + '@lmdb/lmdb-linux-arm@3.5.1': optional: true - '@lmdb/lmdb-linux-x64@3.5.4': + '@lmdb/lmdb-linux-x64@3.5.1': optional: true - '@lmdb/lmdb-win32-arm64@3.5.4': + '@lmdb/lmdb-win32-arm64@3.5.1': optional: true - '@lmdb/lmdb-win32-x64@3.5.4': + '@lmdb/lmdb-win32-x64@3.5.1': optional: true '@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.4': @@ -6296,6 +6338,8 @@ snapshots: '@oxc-parser/binding-win32-x64-msvc@0.133.0': optional: true + '@oxc-project/types@0.113.0': {} + '@oxc-project/types@0.132.0': {} '@oxc-project/types@0.133.0': {} @@ -6851,24 +6895,45 @@ snapshots: '@protobufjs/utf8@1.1.1': {} + '@rolldown/binding-android-arm64@1.0.0-rc.4': + optional: true + '@rolldown/binding-android-arm64@1.0.2': optional: true + '@rolldown/binding-darwin-arm64@1.0.0-rc.4': + optional: true + '@rolldown/binding-darwin-arm64@1.0.2': optional: true + '@rolldown/binding-darwin-x64@1.0.0-rc.4': + optional: true + '@rolldown/binding-darwin-x64@1.0.2': optional: true + '@rolldown/binding-freebsd-x64@1.0.0-rc.4': + optional: true + '@rolldown/binding-freebsd-x64@1.0.2': optional: true + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.4': + optional: true + '@rolldown/binding-linux-arm-gnueabihf@1.0.2': optional: true + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.4': + optional: true + '@rolldown/binding-linux-arm64-gnu@1.0.2': optional: true + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.4': + optional: true + '@rolldown/binding-linux-arm64-musl@1.0.2': optional: true @@ -6878,15 +6943,32 @@ snapshots: '@rolldown/binding-linux-s390x-gnu@1.0.2': optional: true + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.4': + optional: true + '@rolldown/binding-linux-x64-gnu@1.0.2': optional: true + '@rolldown/binding-linux-x64-musl@1.0.0-rc.4': + optional: true + '@rolldown/binding-linux-x64-musl@1.0.2': optional: true + '@rolldown/binding-openharmony-arm64@1.0.0-rc.4': + optional: true + '@rolldown/binding-openharmony-arm64@1.0.2': optional: true + '@rolldown/binding-wasm32-wasi@1.0.0-rc.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + dependencies: + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + optional: true + '@rolldown/binding-wasm32-wasi@1.0.2': dependencies: '@emnapi/core': 1.10.0 @@ -6894,165 +6976,98 @@ snapshots: '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) optional: true + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.4': + optional: true + '@rolldown/binding-win32-arm64-msvc@1.0.2': optional: true + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.4': + optional: true + '@rolldown/binding-win32-x64-msvc@1.0.2': optional: true + '@rolldown/pluginutils@1.0.0-rc.4': {} + '@rolldown/pluginutils@1.0.1': {} '@rollup/plugin-virtual@3.0.2(rollup@4.60.4)': optionalDependencies: rollup: 4.60.4 - '@rollup/rollup-android-arm-eabi@4.60.2': - optional: true - '@rollup/rollup-android-arm-eabi@4.60.4': optional: true - '@rollup/rollup-android-arm64@4.60.2': - optional: true - '@rollup/rollup-android-arm64@4.60.4': optional: true - '@rollup/rollup-darwin-arm64@4.60.2': - optional: true - '@rollup/rollup-darwin-arm64@4.60.4': optional: true - '@rollup/rollup-darwin-x64@4.60.2': - optional: true - '@rollup/rollup-darwin-x64@4.60.4': optional: true - '@rollup/rollup-freebsd-arm64@4.60.2': - optional: true - '@rollup/rollup-freebsd-arm64@4.60.4': optional: true - '@rollup/rollup-freebsd-x64@4.60.2': - optional: true - '@rollup/rollup-freebsd-x64@4.60.4': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.60.2': - optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.60.4': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.60.2': - optional: true - '@rollup/rollup-linux-arm-musleabihf@4.60.4': optional: true - '@rollup/rollup-linux-arm64-gnu@4.60.2': - optional: true - '@rollup/rollup-linux-arm64-gnu@4.60.4': optional: true - '@rollup/rollup-linux-arm64-musl@4.60.2': - optional: true - '@rollup/rollup-linux-arm64-musl@4.60.4': optional: true - '@rollup/rollup-linux-loong64-gnu@4.60.2': - optional: true - '@rollup/rollup-linux-loong64-gnu@4.60.4': optional: true - '@rollup/rollup-linux-loong64-musl@4.60.2': - optional: true - '@rollup/rollup-linux-loong64-musl@4.60.4': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.60.2': - optional: true - '@rollup/rollup-linux-ppc64-gnu@4.60.4': optional: true - '@rollup/rollup-linux-ppc64-musl@4.60.2': - optional: true - '@rollup/rollup-linux-ppc64-musl@4.60.4': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.60.2': - optional: true - '@rollup/rollup-linux-riscv64-gnu@4.60.4': optional: true - '@rollup/rollup-linux-riscv64-musl@4.60.2': - optional: true - '@rollup/rollup-linux-riscv64-musl@4.60.4': optional: true - '@rollup/rollup-linux-s390x-gnu@4.60.2': - optional: true - '@rollup/rollup-linux-s390x-gnu@4.60.4': optional: true - '@rollup/rollup-linux-x64-gnu@4.60.2': - optional: true - '@rollup/rollup-linux-x64-gnu@4.60.4': optional: true - '@rollup/rollup-linux-x64-musl@4.60.2': - optional: true - '@rollup/rollup-linux-x64-musl@4.60.4': optional: true - '@rollup/rollup-openbsd-x64@4.60.2': - optional: true - '@rollup/rollup-openbsd-x64@4.60.4': optional: true - '@rollup/rollup-openharmony-arm64@4.60.2': - optional: true - '@rollup/rollup-openharmony-arm64@4.60.4': optional: true - '@rollup/rollup-win32-arm64-msvc@4.60.2': - optional: true - '@rollup/rollup-win32-arm64-msvc@4.60.4': optional: true - '@rollup/rollup-win32-ia32-msvc@4.60.2': - optional: true - '@rollup/rollup-win32-ia32-msvc@4.60.4': optional: true - '@rollup/rollup-win32-x64-gnu@4.60.2': - optional: true - '@rollup/rollup-win32-x64-gnu@4.60.4': optional: true - '@rollup/rollup-win32-x64-msvc@4.60.2': - optional: true - '@rollup/rollup-win32-x64-msvc@4.60.4': optional: true @@ -7210,12 +7225,12 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.3.0 '@tailwindcss/oxide-win32-x64-msvc': 4.3.0 - '@tailwindcss/vite@4.3.0(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3))': + '@tailwindcss/vite@4.3.0(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3))': dependencies: '@tailwindcss/node': 4.3.0 '@tailwindcss/oxide': 4.3.0 tailwindcss: 4.3.0 - vite: 8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3) + vite: 8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3) '@tybys/wasm-util@0.10.1': dependencies: @@ -7260,9 +7275,9 @@ snapshots: '@types/trusted-types@2.0.7': optional: true - '@vitejs/plugin-basic-ssl@2.3.0(vite@7.3.2(@types/node@24.1.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.99.0)(tsx@4.22.3))': + '@vitejs/plugin-basic-ssl@2.1.4(vite@7.3.2(@types/node@24.1.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.97.3)(tsx@4.22.3))': dependencies: - vite: 7.3.2(@types/node@24.1.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.99.0)(tsx@4.22.3) + vite: 7.3.2(@types/node@24.1.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.97.3)(tsx@4.22.3) '@vitest/expect@4.1.7': dependencies: @@ -7281,13 +7296,13 @@ snapshots: optionalDependencies: vite: 8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.100.0)(tsx@4.22.3) - '@vitest/mocker@4.1.7(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3))': + '@vitest/mocker@4.1.7(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3))': dependencies: '@vitest/spy': 4.1.7 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3) + vite: 8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3) optional: true '@vitest/pretty-format@4.1.7': @@ -7314,13 +7329,13 @@ snapshots: convert-source-map: 2.0.0 tinyrainbow: 3.1.0 - agent-base@9.0.0: {} + agent-base@7.1.4: {} - ajv-formats@3.0.1(ajv@8.20.0): + ajv-formats@3.0.1(ajv@8.18.0): optionalDependencies: - ajv: 8.20.0 + ajv: 8.18.0 - ajv@8.20.0: + ajv@8.18.0: dependencies: fast-deep-equal: 3.1.3 fast-uri: 3.1.2 @@ -7331,8 +7346,14 @@ snapshots: dependencies: environment: 1.1.0 + ansi-regex@5.0.1: {} + ansi-regex@6.2.2: {} + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + ansi-styles@6.2.3: {} argparse@2.0.1: {} @@ -7352,7 +7373,7 @@ snapshots: baseline-browser-mapping@2.10.20: {} - beasties@0.4.2: + beasties@0.4.1: dependencies: css-select: 6.0.0 css-what: 7.0.0 @@ -7432,6 +7453,12 @@ snapshots: strip-ansi: 7.2.0 wrap-ansi: 9.0.2 + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + colorette@2.0.20: {} convert-source-map@1.9.0: {} @@ -7518,6 +7545,8 @@ snapshots: emoji-regex@10.6.0: {} + emoji-regex@8.0.0: {} + enhanced-resolve@5.21.3: dependencies: graceful-fs: 4.2.11 @@ -7525,6 +7554,8 @@ snapshots: entities@4.5.0: {} + entities@6.0.1: {} + entities@7.0.1: {} entities@8.0.0: {} @@ -7723,9 +7754,9 @@ snapshots: domutils: 3.2.2 entities: 7.0.1 - https-proxy-agent@9.0.0: + https-proxy-agent@7.0.6: dependencies: - agent-base: 9.0.0 + agent-base: 7.1.4 debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -7750,6 +7781,8 @@ snapshots: is-extglob@2.1.1: {} + is-fullwidth-code-point@3.0.0: {} + is-fullwidth-code-point@5.1.0: dependencies: get-east-asian-width: 1.6.0 @@ -7764,6 +7797,18 @@ snapshots: ismobilejs@1.1.1: {} + istanbul-lib-coverage@3.2.2: {} + + istanbul-lib-instrument@6.0.3: + dependencies: + '@babel/core': 7.29.0 + '@babel/parser': 7.29.7 + '@istanbuljs/schema': 0.1.6 + istanbul-lib-coverage: 3.2.2 + semver: 7.8.1 + transitivePeerDependencies: + - supports-color + jiti@2.6.1: {} js-tokens@4.0.0: {} @@ -7831,15 +7876,16 @@ snapshots: lightningcss-win32-arm64-msvc: 1.32.0 lightningcss-win32-x64-msvc: 1.32.0 - listr2@10.2.1: + listr2@9.0.5: dependencies: cli-truncate: 5.2.0 + colorette: 2.0.20 eventemitter3: 5.0.4 log-update: 6.1.0 rfdc: 1.4.1 - wrap-ansi: 10.0.0 + wrap-ansi: 9.0.2 - lmdb@3.5.4: + lmdb@3.5.1: dependencies: '@harperfast/extended-iterable': 1.0.3 msgpackr: 1.11.12 @@ -7848,13 +7894,13 @@ snapshots: ordered-binary: 1.6.1 weak-lru-cache: 1.2.2 optionalDependencies: - '@lmdb/lmdb-darwin-arm64': 3.5.4 - '@lmdb/lmdb-darwin-x64': 3.5.4 - '@lmdb/lmdb-linux-arm': 3.5.4 - '@lmdb/lmdb-linux-arm64': 3.5.4 - '@lmdb/lmdb-linux-x64': 3.5.4 - '@lmdb/lmdb-win32-arm64': 3.5.4 - '@lmdb/lmdb-win32-x64': 3.5.4 + '@lmdb/lmdb-darwin-arm64': 3.5.1 + '@lmdb/lmdb-darwin-x64': 3.5.1 + '@lmdb/lmdb-linux-arm': 3.5.1 + '@lmdb/lmdb-linux-arm64': 3.5.1 + '@lmdb/lmdb-linux-x64': 3.5.1 + '@lmdb/lmdb-win32-arm64': 3.5.1 + '@lmdb/lmdb-win32-x64': 3.5.1 optional: true log-update@6.1.0: @@ -7909,6 +7955,8 @@ snapshots: msgpackr-extract: 3.0.4 optional: true + mute-stream@2.0.0: {} + mute-stream@3.0.0: {} nanoid@3.3.12: {} @@ -8057,9 +8105,9 @@ snapshots: dependencies: yocto-queue: 1.2.2 - parse5-html-rewriting-stream@8.0.1: + parse5-html-rewriting-stream@8.0.0: dependencies: - entities: 8.0.0 + entities: 6.0.1 parse5: 8.0.1 parse5-sax-parser: 8.0.0 @@ -8267,6 +8315,28 @@ snapshots: rfdc@1.4.1: {} + rolldown@1.0.0-rc.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0): + dependencies: + '@oxc-project/types': 0.113.0 + '@rolldown/pluginutils': 1.0.0-rc.4 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.0.0-rc.4 + '@rolldown/binding-darwin-arm64': 1.0.0-rc.4 + '@rolldown/binding-darwin-x64': 1.0.0-rc.4 + '@rolldown/binding-freebsd-x64': 1.0.0-rc.4 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.4 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.4 + '@rolldown/binding-linux-arm64-musl': 1.0.0-rc.4 + '@rolldown/binding-linux-x64-gnu': 1.0.0-rc.4 + '@rolldown/binding-linux-x64-musl': 1.0.0-rc.4 + '@rolldown/binding-openharmony-arm64': 1.0.0-rc.4 + '@rolldown/binding-wasm32-wasi': 1.0.0-rc.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.4 + '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.4 + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + rolldown@1.0.2: dependencies: '@oxc-project/types': 0.132.0 @@ -8288,37 +8358,6 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.0.2 '@rolldown/binding-win32-x64-msvc': 1.0.2 - rollup@4.60.2: - dependencies: - '@types/estree': 1.0.8 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.60.2 - '@rollup/rollup-android-arm64': 4.60.2 - '@rollup/rollup-darwin-arm64': 4.60.2 - '@rollup/rollup-darwin-x64': 4.60.2 - '@rollup/rollup-freebsd-arm64': 4.60.2 - '@rollup/rollup-freebsd-x64': 4.60.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.60.2 - '@rollup/rollup-linux-arm-musleabihf': 4.60.2 - '@rollup/rollup-linux-arm64-gnu': 4.60.2 - '@rollup/rollup-linux-arm64-musl': 4.60.2 - '@rollup/rollup-linux-loong64-gnu': 4.60.2 - '@rollup/rollup-linux-loong64-musl': 4.60.2 - '@rollup/rollup-linux-ppc64-gnu': 4.60.2 - '@rollup/rollup-linux-ppc64-musl': 4.60.2 - '@rollup/rollup-linux-riscv64-gnu': 4.60.2 - '@rollup/rollup-linux-riscv64-musl': 4.60.2 - '@rollup/rollup-linux-s390x-gnu': 4.60.2 - '@rollup/rollup-linux-x64-gnu': 4.60.2 - '@rollup/rollup-linux-x64-musl': 4.60.2 - '@rollup/rollup-openbsd-x64': 4.60.2 - '@rollup/rollup-openharmony-arm64': 4.60.2 - '@rollup/rollup-win32-arm64-msvc': 4.60.2 - '@rollup/rollup-win32-ia32-msvc': 4.60.2 - '@rollup/rollup-win32-x64-gnu': 4.60.2 - '@rollup/rollup-win32-x64-msvc': 4.60.2 - fsevents: 2.3.3 - rollup@4.60.4: dependencies: '@types/estree': 1.0.8 @@ -8370,7 +8409,7 @@ snapshots: optionalDependencies: '@parcel/watcher': 2.5.6 - sass@1.99.0: + sass@1.97.3: dependencies: chokidar: 4.0.3 immutable: 5.1.6 @@ -8441,6 +8480,12 @@ snapshots: std-env@4.0.0: {} + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + string-width@7.2.0: dependencies: emoji-regex: 10.6.0 @@ -8456,6 +8501,10 @@ snapshots: dependencies: safe-buffer: 5.2.1 + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + strip-ansi@7.2.0: dependencies: ansi-regex: 6.2.2 @@ -8474,6 +8523,11 @@ snapshots: tinyexec@1.0.2: {} + tinyglobby@0.2.15: + dependencies: + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + tinyglobby@0.2.16: dependencies: fdir: 6.5.0(picomatch@4.0.4) @@ -8511,6 +8565,8 @@ snapshots: undici-types@7.8.0: {} + undici@7.24.4: {} + universal-user-agent@7.0.3: {} update-browserslist-db@1.2.3(browserslist@4.28.2): @@ -8553,7 +8609,7 @@ snapshots: - supports-color - typescript - vite@7.3.2(@types/node@24.1.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.99.0)(tsx@4.22.3): + vite@7.3.2(@types/node@24.1.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.97.3)(tsx@4.22.3): dependencies: esbuild: 0.27.3 fdir: 6.5.0(picomatch@4.0.4) @@ -8566,7 +8622,7 @@ snapshots: fsevents: 2.3.3 jiti: 2.6.1 lightningcss: 1.32.0 - sass: 1.99.0 + sass: 1.97.3 tsx: 4.22.3 vite@8.0.14(@types/node@22.19.15)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.100.0)(tsx@4.22.3): @@ -8599,7 +8655,7 @@ snapshots: sass: 1.100.0 tsx: 4.22.3 - vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3): + vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3): dependencies: lightningcss: 1.32.0 picomatch: 4.0.4 @@ -8611,7 +8667,7 @@ snapshots: esbuild: 0.28.0 fsevents: 2.3.3 jiti: 2.6.1 - sass: 1.99.0 + sass: 1.97.3 tsx: 4.22.3 vitest@4.1.7(@opentelemetry/api@1.9.0)(@types/node@24.1.0)(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.100.0)(tsx@4.22.3)): @@ -8642,10 +8698,10 @@ snapshots: transitivePeerDependencies: - msw - vitest@4.1.7(@opentelemetry/api@1.9.0)(@types/node@24.1.0)(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3)): + vitest@4.1.7(@opentelemetry/api@1.9.0)(@types/node@24.1.0)(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3)): dependencies: '@vitest/expect': 4.1.7 - '@vitest/mocker': 4.1.7(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3)) + '@vitest/mocker': 4.1.7(vite@8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3)) '@vitest/pretty-format': 4.1.7 '@vitest/runner': 4.1.7 '@vitest/snapshot': 4.1.7 @@ -8662,7 +8718,7 @@ snapshots: tinyexec: 1.0.2 tinyglobby: 0.2.16 tinyrainbow: 3.1.0 - vite: 8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.99.0)(tsx@4.22.3) + vite: 8.0.14(@types/node@24.1.0)(esbuild@0.28.0)(jiti@2.6.1)(sass@1.97.3)(tsx@4.22.3) why-is-node-running: 2.3.0 optionalDependencies: '@opentelemetry/api': 1.9.0 @@ -8686,11 +8742,11 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 - wrap-ansi@10.0.0: + wrap-ansi@6.2.0: dependencies: - ansi-styles: 6.2.3 - string-width: 8.2.1 - strip-ansi: 7.2.0 + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 wrap-ansi@9.0.2: dependencies: @@ -8715,6 +8771,8 @@ snapshots: yocto-queue@1.2.2: {} + yoctocolors-cjs@2.1.3: {} + zod@4.4.3: {} zone.js@0.16.2: {}