@angular/core 17.0.1 → 17.0.2
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 +2 -2
- 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/instructions/control_flow.mjs +4 -7
- package/esm2022/src/render3/list_reconciliation.mjs +5 -4
- package/esm2022/src/render3/metadata.mjs +20 -20
- 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 +7 -7
- package/fesm2022/core.mjs +44 -46
- 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 +8 -8
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +9 -10
- 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 +1 -1
- package/schematics/migrations/block-template-entities/bundle.js.map +1 -1
- package/schematics/ng-generate/control-flow-migration/bundle.js +1 -1
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +1 -1
- package/schematics/ng-generate/standalone-migration/bundle.js +86 -32
- 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.2
|
|
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
|
}
|
|
@@ -1895,7 +1895,7 @@ class TestBedImpl {
|
|
|
1895
1895
|
const testComponentRenderer = this.inject(TestComponentRenderer);
|
|
1896
1896
|
const rootElId = `root${_nextRootElementId++}`;
|
|
1897
1897
|
testComponentRenderer.insertRootElement(rootElId);
|
|
1898
|
-
if (
|
|
1898
|
+
if (ɵgetAsyncClassMetadataFn(type)) {
|
|
1899
1899
|
throw new Error(`Component '${type.name}' has unresolved metadata. ` +
|
|
1900
1900
|
`Please call \`await TestBed.compileComponents()\` before running this test.`);
|
|
1901
1901
|
}
|