angular/packages/core/test
Pete Bacon Darwin 393efa54e6 fix(compiler): ensure that partially compiled queries can handle forward references (#44113)
When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See https://github.com/angular/components/pull/23882 and https://github.com/angular/components/issues/23907

PR Close #44113
2021-11-10 18:25:16 +00:00
..
acceptance fix(core): do not use Function constructors in development mode to avoid CSP violations (#43587) 2021-11-09 18:02:13 +00:00
animation fix(platform-browser): improve error message for missing animation trigger (#41356) 2021-09-15 21:09:21 +00:00
bundling refactor: simplify the LOCALE_ID provider (#43913) 2021-10-28 11:19:12 -07:00
change_detection test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
compiler refactor(core): expand error logging when the JIT compiler is not available (#42693) 2021-07-15 13:19:05 -07:00
debug fix(core): error if DebugRenderer2.destroyNode is called twice in a row (#41565) 2021-04-12 10:30:11 -07:00
di refactor(core): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:15 -07:00
dom test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
i18n build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
linker test(core): fix failing unit test (#43714) 2021-10-05 09:47:34 -07:00
metadata build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
reflection refactor(core): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:15 -07:00
render3 fix(compiler): ensure that partially compiled queries can handle forward references (#44113) 2021-11-10 18:25:16 +00:00
sanitization test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
strict_types refactor(core): rename ...WithMeta types to ...Declaration and alias to unknown (#41119) 2021-03-22 08:57:18 -07:00
testability refactor(core): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:15 -07:00
util fix(core): fix possible XSS attack in development through SSR (#40525) 2021-01-26 09:32:27 -08:00
view build: rename "no-ivy-aot" tag to "view-engine-only" (#43862) 2021-10-19 10:06:55 -07:00
zone test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
application_init_spec.ts test(core): refactor ApplicationInitStatus tests to avoid TestBed side-effects (#33222) 2021-02-22 08:41:49 -08:00
application_module_spec.ts test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
application_ref_integration_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
application_ref_spec.ts perf(common): remove unused methods from DomAdapter (#41102) 2021-03-10 11:48:24 -08:00
BUILD.bazel fix(core): detect synthesized constructors that have been downleveled using TS 4.2 (#41305) 2021-03-23 11:23:04 -07:00
component_fixture_spec.ts feat(core): update reference and doc to change async to waitAsync. (#37583) 2020-08-03 12:54:13 -07:00
dev_mode_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
directive_lifecycle_integration_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
error_handler_spec.ts fix(core): correctly handle null or undefined in ErrorHandler#handleError() (#42881) 2021-07-21 22:35:34 +00:00
event_emitter_spec.ts test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
fake_async_spec.ts test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
forward_ref_integration_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
test_bed_spec.ts fix(core): don't rethrow errors if test teardown has been disabled (#43635) 2021-10-04 17:31:26 -07:00
util_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00