angular/packages/compiler-cli/test/compliance/test_cases
Kristiyan Kostadinov 3441f7b914 fix(compiler): error if rawText isn't estimated correctly (#60529) (#60753)
The `TemplateLiteralElementExpr` has some logic where it tries to estimate the `rawText` if one isn't provided by looking at the node's source span. The problem with this approach is that we have some long-standing issues with our expression AST parser (see https://github.com/angular/angular/pull/60267#discussion_r1986402524) where it might not produce accurate spans if escape sequences are involved. This in turn can lead to unrecoverable errors, because TypeScript will throw an error if the raw string doesn't match the cooked one when constructing a TypeScript AST node.

These changes remove the logic that depends on the source span and relies purely on the secondary fallback that inserts escaped characters manually.

It's also worth noting that the `rawText` doesn't seem to matter much at this point, because the main usage of it is when downlevelling template literals to ES5 which we no longer support.

Fixes #60528.

PR Close #60529

PR Close #60753
2025-04-07 13:15:02 -07:00
..
model_inputs refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
output_function refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
r3_compiler_compliance fix(compiler): error if rawText isn't estimated correctly (#60529) (#60753) 2025-04-07 13:15:02 -07:00
r3_view_compiler build: clean up pipeline-specific tests (#59450) 2025-01-09 09:56:06 -05:00
r3_view_compiler_bindings build: clean up pipeline-specific tests (#59450) 2025-01-09 09:56:06 -05:00
r3_view_compiler_control_flow fix(compiler): handle tracking expressions requiring temporary variables (#58520) 2025-02-12 09:56:08 -08:00
r3_view_compiler_deferred fix(compiler-cli): handle deferred blocks with shared dependencies correctly (#59926) 2025-02-12 09:15:53 -08:00
r3_view_compiler_di/di refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
r3_view_compiler_directives refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
r3_view_compiler_i18n build: clean up pipeline-specific tests (#59450) 2025-01-09 09:56:06 -05:00
r3_view_compiler_input_outputs refactor(compiler): remove input transforms feature (#59980) 2025-02-18 19:27:59 +00:00
r3_view_compiler_let refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
r3_view_compiler_listener build: clean up pipeline-specific tests (#59450) 2025-01-09 09:56:06 -05:00
r3_view_compiler_providers refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
r3_view_compiler_styling build: clean up pipeline-specific tests (#59450) 2025-01-09 09:56:06 -05:00
r3_view_compiler_template build: clean up pipeline-specific tests (#59450) 2025-01-09 09:56:06 -05:00
signal_inputs refactor(compiler): remove input transforms feature (#59980) 2025-02-18 19:27:59 +00:00
signal_queries refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
source_mapping build: clean up pipeline-specific tests (#59450) 2025-01-09 09:56:06 -05:00
BUILD.bazel test: refactor compiler-cli compliance test to work on windows (#45431) 2022-03-25 12:18:34 -07:00
list_golden_update_rules.ts refactor(compiler-cli): use semver range checking for partial versions (#39847) 2020-12-04 10:26:17 -08:00
test_case_schema.json refactor(compiler): Delete TemplateDefinitionBuilder acceptance test expectations (#54757) 2024-03-08 16:51:01 -08:00