angular/packages/compiler-cli/test/compliance/test_cases
Kristiyan Kostadinov 8b990a31c3 fix(compiler): error if rawText isn't estimated correctly (#60529)
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
2025-03-26 20:37:31 -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) 2025-03-26 20:37:31 -07:00
r3_view_compiler refactor(compiler): remove empty empty string suffix from interpolation instructions (#60066) 2025-03-10 16:31:34 -07:00
r3_view_compiler_bindings fix(core): remove unused parameter from listener instruction (#60406) 2025-03-17 12:16:03 +01:00
r3_view_compiler_control_flow refactor(compiler): Add conditionalCreate instruction (#60425) 2025-03-21 14:45:23 -07: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 refactor(compiler): Add conditionalCreate instruction (#60425) 2025-03-21 14:45:23 -07: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): Add conditionalCreate instruction (#60425) 2025-03-21 14:45:23 -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 refactor(compiler): remove empty empty string suffix from interpolation instructions (#60066) 2025-03-10 16:31:34 -07:00
r3_view_compiler_template refactor(compiler): remove empty empty string suffix from interpolation instructions (#60066) 2025-03-10 16:31:34 -07: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 refactor(compiler): remove empty empty string suffix from interpolation instructions (#60066) 2025-03-10 16:31:34 -07: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