@angular/core 19.0.0-next.3 → 19.0.0-next.5
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/fesm2022/core.mjs +13 -13
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +4 -4
- package/index.d.ts +10 -1
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/{compiler_host-bbb5d8fd.js → compiler_host-ca7ba733.js} +15 -15
- package/schematics/bundles/control-flow-migration.js +2 -2
- package/schematics/bundles/explicit-standalone-flag.js +157 -0
- package/schematics/bundles/{nodes-ddfa1613.js → imports-4ac08251.js} +1 -42
- package/schematics/bundles/inject-migration.js +6 -5
- package/schematics/bundles/nodes-0e7d45ca.js +56 -0
- package/schematics/bundles/project_tsconfig_paths-e9ccccbf.js +1 -1
- package/schematics/bundles/route-lazy-loading.js +2 -2
- package/schematics/bundles/standalone-migration.js +871 -769
- package/schematics/migrations.json +7 -1
- package/testing/index.d.ts +1 -1
package/fesm2022/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.0.0-next.
|
|
2
|
+
* @license Angular v19.0.0-next.5
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -3009,7 +3009,7 @@ class R3Injector extends EnvironmentInjector {
|
|
|
3009
3009
|
* hook was found.
|
|
3010
3010
|
*/
|
|
3011
3011
|
destroy() {
|
|
3012
|
-
|
|
3012
|
+
assertNotDestroyed(this);
|
|
3013
3013
|
// Set destroyed = true first, in case lifecycle hooks re-enter destroy().
|
|
3014
3014
|
this._destroyed = true;
|
|
3015
3015
|
const prevConsumer = setActiveConsumer$1(null);
|
|
@@ -3035,12 +3035,12 @@ class R3Injector extends EnvironmentInjector {
|
|
|
3035
3035
|
}
|
|
3036
3036
|
}
|
|
3037
3037
|
onDestroy(callback) {
|
|
3038
|
-
|
|
3038
|
+
assertNotDestroyed(this);
|
|
3039
3039
|
this._onDestroyHooks.push(callback);
|
|
3040
3040
|
return () => this.removeOnDestroy(callback);
|
|
3041
3041
|
}
|
|
3042
3042
|
runInContext(fn) {
|
|
3043
|
-
|
|
3043
|
+
assertNotDestroyed(this);
|
|
3044
3044
|
const previousInjector = setCurrentInjector(this);
|
|
3045
3045
|
const previousInjectImplementation = setInjectImplementation(undefined);
|
|
3046
3046
|
let prevInjectContext;
|
|
@@ -3057,7 +3057,7 @@ class R3Injector extends EnvironmentInjector {
|
|
|
3057
3057
|
}
|
|
3058
3058
|
}
|
|
3059
3059
|
get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) {
|
|
3060
|
-
|
|
3060
|
+
assertNotDestroyed(this);
|
|
3061
3061
|
if (token.hasOwnProperty(NG_ENV_ID)) {
|
|
3062
3062
|
return token[NG_ENV_ID](this);
|
|
3063
3063
|
}
|
|
@@ -3167,11 +3167,6 @@ class R3Injector extends EnvironmentInjector {
|
|
|
3167
3167
|
}
|
|
3168
3168
|
return `R3Injector[${tokens.join(', ')}]`;
|
|
3169
3169
|
}
|
|
3170
|
-
assertNotDestroyed() {
|
|
3171
|
-
if (this._destroyed) {
|
|
3172
|
-
throw new RuntimeError(205 /* RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED */, ngDevMode && 'Injector has already been destroyed.');
|
|
3173
|
-
}
|
|
3174
|
-
}
|
|
3175
3170
|
/**
|
|
3176
3171
|
* Process a `SingleProvider` and add it.
|
|
3177
3172
|
*/
|
|
@@ -3357,6 +3352,11 @@ function providerToFactory(provider, ngModuleType, providers) {
|
|
|
3357
3352
|
}
|
|
3358
3353
|
return factory;
|
|
3359
3354
|
}
|
|
3355
|
+
function assertNotDestroyed(injector) {
|
|
3356
|
+
if (injector.destroyed) {
|
|
3357
|
+
throw new RuntimeError(205 /* RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED */, ngDevMode && 'Injector has already been destroyed.');
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3360
3360
|
function makeRecord(factory, value, multi = false) {
|
|
3361
3361
|
return {
|
|
3362
3362
|
factory: factory,
|
|
@@ -3405,7 +3405,7 @@ function forEachSingleProvider(providers, fn) {
|
|
|
3405
3405
|
*/
|
|
3406
3406
|
function runInInjectionContext(injector, fn) {
|
|
3407
3407
|
if (injector instanceof R3Injector) {
|
|
3408
|
-
|
|
3408
|
+
assertNotDestroyed(injector);
|
|
3409
3409
|
}
|
|
3410
3410
|
let prevInjectorProfilerContext;
|
|
3411
3411
|
if (ngDevMode) {
|
|
@@ -16962,7 +16962,7 @@ function createRootComponent(componentView, rootComponentDef, rootDirectives, ho
|
|
|
16962
16962
|
function setRootNodeAttributes(hostRenderer, componentDef, hostRNode, rootSelectorOrNode) {
|
|
16963
16963
|
if (rootSelectorOrNode) {
|
|
16964
16964
|
// The placeholder will be replaced with the actual version at build time.
|
|
16965
|
-
setUpAttributes(hostRenderer, hostRNode, ['ng-version', '19.0.0-next.
|
|
16965
|
+
setUpAttributes(hostRenderer, hostRNode, ['ng-version', '19.0.0-next.5']);
|
|
16966
16966
|
}
|
|
16967
16967
|
else {
|
|
16968
16968
|
// If host element is created as a part of this function call (i.e. `rootSelectorOrNode`
|
|
@@ -31052,7 +31052,7 @@ class Version {
|
|
|
31052
31052
|
/**
|
|
31053
31053
|
* @publicApi
|
|
31054
31054
|
*/
|
|
31055
|
-
const VERSION = new Version('19.0.0-next.
|
|
31055
|
+
const VERSION = new Version('19.0.0-next.5');
|
|
31056
31056
|
|
|
31057
31057
|
/*
|
|
31058
31058
|
* This file exists to support compilation of @angular/core in Ivy mode.
|