@angular/core 14.0.0-next.5 → 14.0.0-next.8
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/core.d.ts +32 -33
- package/esm2020/src/core_private_export.mjs +1 -1
- package/esm2020/src/core_render3_private_export.mjs +3 -3
- package/esm2020/src/debug/debug_node.mjs +1 -1
- package/esm2020/src/di/injector_compatibility.mjs +2 -2
- package/esm2020/src/di/reflective_provider.mjs +4 -4
- package/esm2020/src/i18n/tokens.mjs +5 -5
- package/esm2020/src/linker/ng_module_factory_loader.mjs +2 -2
- package/esm2020/src/linker/ng_module_registration.mjs +55 -0
- package/esm2020/src/reflection/platform_reflection_capabilities.mjs +1 -1
- package/esm2020/src/reflection/reflection_capabilities.mjs +1 -37
- package/esm2020/src/render3/i18n/i18n_parse.mjs +3 -3
- package/esm2020/src/render3/index.mjs +2 -2
- package/esm2020/src/render3/instructions/lview_debug.mjs +2 -2
- package/esm2020/src/render3/interfaces/renderer_dom.mjs +1 -1
- package/esm2020/src/render3/jit/environment.mjs +4 -1
- package/esm2020/src/render3/jit/module.mjs +7 -1
- package/esm2020/src/render3/jit/module_patch.mjs +11 -0
- package/esm2020/src/render3/ng_module_ref.mjs +1 -29
- package/esm2020/src/render3/node_manipulation.mjs +9 -3
- package/esm2020/src/render3/state.mjs +14 -2
- package/esm2020/src/render3/styling/styling_parser.mjs +2 -2
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/fake_async.mjs +3 -2
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/esm2020/testing/src/r3_test_bed.mjs +8 -2
- package/fesm2015/core.mjs +106 -204
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +10 -3
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +106 -204
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +10 -3
- package/fesm2020/testing.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/migrations/typed-forms/index.d.ts +1 -5
- package/schematics/migrations/typed-forms/index.js +12 -34
- package/schematics/migrations/typed-forms/util.d.ts +8 -10
- package/schematics/migrations/typed-forms/util.js +99 -47
- package/schematics/utils/import_manager.js +3 -15
- package/schematics/utils/typescript/imports.js +2 -7
- package/schematics/utils/typescript/parse_tsconfig.js +6 -2
- package/schematics/utils/typescript/symbol.js +4 -3
- package/testing/testing.d.ts +3 -2
- package/esm2020/src/di/util.mjs +0 -51
- package/esm2020/src/linker/ng_module_factory_registration.mjs +0 -59
- package/esm2020/src/reflection/reflection.mjs +0 -16
- package/esm2020/src/reflection/reflector.mjs +0 -56
- package/esm2020/src/reflection/types.mjs +0 -9
package/fesm2020/testing.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-next.
|
|
2
|
+
* @license Angular v14.0.0-next.8
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { getDebugNode, RendererFactory2, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule, ɵgetInjectableDef, resolveForwardRef, ɵNG_COMP_DEF, ɵ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, NgZone, Compiler, COMPILER_OPTIONS, ɵNgModuleFactory, ModuleWithComponentFactories, InjectionToken, Injector, InjectFlags, ɵresetCompiledComponents, ɵflushModuleScopingQueueAsMuchAsPossible } from '@angular/core';
|
|
7
|
+
import { getDebugNode, RendererFactory2, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule, ɵgetInjectableDef, resolveForwardRef, ɵNG_COMP_DEF, ɵ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, NgZone, Compiler, COMPILER_OPTIONS, ɵNgModuleFactory, ModuleWithComponentFactories, InjectionToken, Injector, InjectFlags, ɵsetAllowDuplicateNgModuleIdsForTest, ɵresetCompiledComponents, ɵflushModuleScopingQueueAsMuchAsPossible } from '@angular/core';
|
|
8
8
|
import { ResourceLoader } from '@angular/compiler';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -373,7 +373,8 @@ function tick(millis = 0, tickOptions = {
|
|
|
373
373
|
throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);
|
|
374
374
|
}
|
|
375
375
|
/**
|
|
376
|
-
*
|
|
376
|
+
* Flushes any pending microtasks and simulates the asynchronous passage of time for the timers in
|
|
377
|
+
* the `fakeAsync` zone by
|
|
377
378
|
* draining the macrotask queue until it is empty.
|
|
378
379
|
*
|
|
379
380
|
* @param maxTurns The maximum number of times the scheduler attempts to clear its queue before
|
|
@@ -1647,6 +1648,11 @@ class TestBedRender3 {
|
|
|
1647
1648
|
this.platform = platform;
|
|
1648
1649
|
this.ngModule = ngModule;
|
|
1649
1650
|
this._compiler = new R3TestBedCompiler(this.platform, this.ngModule);
|
|
1651
|
+
// TestBed does not have an API which can reliably detect the start of a test, and thus could be
|
|
1652
|
+
// used to track the state of the NgModule registry and reset it correctly. Instead, when we
|
|
1653
|
+
// know we're in a testing scenario, we disable the check for duplicate NgModule registration
|
|
1654
|
+
// completely.
|
|
1655
|
+
ɵsetAllowDuplicateNgModuleIdsForTest(true);
|
|
1650
1656
|
}
|
|
1651
1657
|
/**
|
|
1652
1658
|
* Reset the providers for the test injector.
|
|
@@ -1659,6 +1665,7 @@ class TestBedRender3 {
|
|
|
1659
1665
|
this.platform = null;
|
|
1660
1666
|
this.ngModule = null;
|
|
1661
1667
|
TestBedRender3._environmentTeardownOptions = undefined;
|
|
1668
|
+
ɵsetAllowDuplicateNgModuleIdsForTest(false);
|
|
1662
1669
|
}
|
|
1663
1670
|
resetTestingModule() {
|
|
1664
1671
|
this.checkGlobalCompilationFinished();
|