@angular/core 17.0.1 → 17.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/src/core_private_export.mjs +2 -2
- package/esm2022/src/core_render3_private_export.mjs +3 -3
- package/esm2022/src/defer/instructions.mjs +3 -3
- package/esm2022/src/hydration/api.mjs +3 -3
- package/esm2022/src/image_performance_warning.mjs +4 -4
- package/esm2022/src/linker/component_factory.mjs +1 -3
- package/esm2022/src/render3/after_render_hooks.mjs +4 -4
- package/esm2022/src/render3/features/standalone_feature.mjs +3 -6
- package/esm2022/src/render3/index.mjs +2 -2
- package/esm2022/src/render3/instructions/change_detection.mjs +9 -19
- package/esm2022/src/render3/instructions/control_flow.mjs +4 -7
- package/esm2022/src/render3/instructions/shared.mjs +4 -5
- package/esm2022/src/render3/interfaces/container.mjs +22 -17
- package/esm2022/src/render3/interfaces/view.mjs +2 -2
- package/esm2022/src/render3/list_reconciliation.mjs +5 -4
- package/esm2022/src/render3/metadata.mjs +20 -20
- package/esm2022/src/render3/node_manipulation.mjs +3 -3
- package/esm2022/src/render3/util/change_detection_utils.mjs +13 -2
- package/esm2022/src/render3/util/injector_discovery_utils.mjs +10 -13
- package/esm2022/src/render3/util/view_utils.mjs +4 -4
- package/esm2022/src/render3/view_ref.mjs +3 -3
- package/esm2022/src/util/performance.mjs +9 -4
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed.mjs +3 -3
- package/esm2022/testing/src/test_bed_compiler.mjs +10 -7
- package/fesm2022/core.mjs +100 -99
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +11 -8
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +35 -45
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +187 -98
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/ng-generate/control-flow-migration/bundle.js +518 -232
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +253 -129
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
package/fesm2022/testing.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v17.0.
|
|
2
|
+
* @license Angular v17.0.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { ɵDeferBlockState, ɵtriggerResourceLoading, ɵrenderDeferBlockState, ɵCONTAINER_HEADER_OFFSET, ɵgetDeferBlocks, getDebugNode, RendererFactory2, InjectionToken, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule,
|
|
7
|
+
import { ɵDeferBlockState, ɵtriggerResourceLoading, ɵrenderDeferBlockState, ɵCONTAINER_HEADER_OFFSET, ɵgetDeferBlocks, getDebugNode, RendererFactory2, InjectionToken, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule, ɵgetAsyncClassMetadataFn, ɵgenerateStandaloneInDeclarationsError, ɵDeferBlockBehavior, ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT, ɵdepsTracker, ɵgetInjectableDef, resolveForwardRef, ɵNG_COMP_DEF, ɵisComponentDefPendingResolution, ɵresolveComponentResources, ɵRender3NgModuleRef, ApplicationInitStatus, LOCALE_ID, ɵDEFAULT_LOCALE_ID, ɵsetLocaleId, ɵRender3ComponentFactory, ɵcompileComponent, ɵNG_DIR_DEF, ɵcompileDirective, ɵNG_PIPE_DEF, ɵcompilePipe, ɵNG_MOD_DEF, ɵtransitiveScopesFor, ɵpatchComponentDefWithScope, ɵNG_INJ_DEF, ɵcompileNgModuleDefs, ɵclearResolutionOfComponentResourcesQueue, ɵrestoreComponentResolutionQueue, provideZoneChangeDetection, Compiler, ɵDEFER_BLOCK_CONFIG, COMPILER_OPTIONS, Injector, ɵisEnvironmentProviders, ɵNgModuleFactory, ModuleWithComponentFactories, ɵconvertToBitFlags, InjectFlags, ɵsetAllowDuplicateNgModuleIdsForTest, ɵresetCompiledComponents, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, EnvironmentInjector, NgZone, ɵZoneAwareQueueingScheduler, ɵflushModuleScopingQueueAsMuchAsPossible } from '@angular/core';
|
|
8
8
|
export { ɵDeferBlockBehavior as DeferBlockBehavior, ɵDeferBlockState as DeferBlockState } from '@angular/core';
|
|
9
9
|
import { ResourceLoader } from '@angular/compiler';
|
|
10
10
|
|
|
@@ -722,7 +722,7 @@ function isTestingModuleOverride(value) {
|
|
|
722
722
|
}
|
|
723
723
|
function assertNoStandaloneComponents(types, resolver, location) {
|
|
724
724
|
types.forEach(type => {
|
|
725
|
-
if (!ɵ
|
|
725
|
+
if (!ɵgetAsyncClassMetadataFn(type)) {
|
|
726
726
|
const component = resolver.resolve(type);
|
|
727
727
|
if (component && component.standalone) {
|
|
728
728
|
throw new Error(ɵgenerateStandaloneInDeclarationsError(type, location));
|
|
@@ -901,9 +901,9 @@ class TestBedCompiler {
|
|
|
901
901
|
return;
|
|
902
902
|
const promises = [];
|
|
903
903
|
for (const component of this.pendingComponents) {
|
|
904
|
-
const
|
|
905
|
-
if (
|
|
906
|
-
promises.push(
|
|
904
|
+
const asyncMetadataFn = ɵgetAsyncClassMetadataFn(component);
|
|
905
|
+
if (asyncMetadataFn) {
|
|
906
|
+
promises.push(asyncMetadataFn());
|
|
907
907
|
}
|
|
908
908
|
}
|
|
909
909
|
const resolvedDeps = await Promise.all(promises);
|
|
@@ -999,7 +999,7 @@ class TestBedCompiler {
|
|
|
999
999
|
// Compile all queued components, directives, pipes.
|
|
1000
1000
|
let needsAsyncResources = false;
|
|
1001
1001
|
this.pendingComponents.forEach(declaration => {
|
|
1002
|
-
if (
|
|
1002
|
+
if (ɵgetAsyncClassMetadataFn(declaration)) {
|
|
1003
1003
|
throw new Error(`Component '${declaration.name}' has unresolved metadata. ` +
|
|
1004
1004
|
`Please call \`await TestBed.compileComponents()\` before running this test.`);
|
|
1005
1005
|
}
|
|
@@ -1009,6 +1009,9 @@ class TestBedCompiler {
|
|
|
1009
1009
|
throw invalidTypeError(declaration.name, 'Component');
|
|
1010
1010
|
}
|
|
1011
1011
|
this.maybeStoreNgDef(ɵNG_COMP_DEF, declaration);
|
|
1012
|
+
if (ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT) {
|
|
1013
|
+
ɵdepsTracker.clearScopeCacheFor(declaration);
|
|
1014
|
+
}
|
|
1012
1015
|
ɵcompileComponent(declaration, metadata);
|
|
1013
1016
|
});
|
|
1014
1017
|
this.pendingComponents.clear();
|
|
@@ -1895,7 +1898,7 @@ class TestBedImpl {
|
|
|
1895
1898
|
const testComponentRenderer = this.inject(TestComponentRenderer);
|
|
1896
1899
|
const rootElId = `root${_nextRootElementId++}`;
|
|
1897
1900
|
testComponentRenderer.insertRootElement(rootElId);
|
|
1898
|
-
if (
|
|
1901
|
+
if (ɵgetAsyncClassMetadataFn(type)) {
|
|
1899
1902
|
throw new Error(`Component '${type.name}' has unresolved metadata. ` +
|
|
1900
1903
|
`Please call \`await TestBed.compileComponents()\` before running this test.`);
|
|
1901
1904
|
}
|