@angular/core 19.2.2 → 19.2.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/fesm2022/core.mjs +74 -59
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +9 -3
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +2 -2
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/weak_ref-DrMdAIDh.mjs +1 -1
- package/index.d.ts +2 -2
- package/navigation_types.d-u4EOrrdZ.d.ts +1 -1
- package/package.json +1 -1
- package/primitives/di/index.d.ts +24 -10
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +3 -3
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/{apply_import_manager-C8MABThs.js → apply_import_manager-BynuozbO.js} +2 -2
- package/schematics/bundles/checker-DP-zos5Q.js +2 -2
- package/schematics/bundles/cleanup-unused-imports.js +5 -5
- package/schematics/bundles/compiler_host-DzM2hemp.js +1 -1
- package/schematics/bundles/control-flow-migration.js +1 -1
- package/schematics/bundles/explicit-standalone-flag.js +1 -1
- package/schematics/bundles/imports-CIX-JgAN.js +1 -1
- package/schematics/bundles/{index-CrKEaRj_.js → index-BPqwMr5d.js} +3 -3
- package/schematics/bundles/{index-CEdDCtp8.js → index-CPpyW--c.js} +3 -3
- package/schematics/bundles/inject-migration.js +1 -1
- package/schematics/bundles/leading_space-D9nQ8UQC.js +1 -1
- package/schematics/bundles/{migrate_ts_type_references-C0325A9V.js → migrate_ts_type_references-Ri-K4P_1.js} +4 -4
- package/schematics/bundles/ng_decorators-DznZ5jMl.js +1 -1
- package/schematics/bundles/nodes-B16H9JUd.js +1 -1
- package/schematics/bundles/output-migration.js +5 -5
- package/schematics/bundles/pending-tasks.js +1 -1
- package/schematics/bundles/{program-CRYsSwIq.js → program-BmLi-Vxz.js} +34 -12
- package/schematics/bundles/{project_paths-BoRVJPjW.js → project_paths-CXXqWSoY.js} +2 -2
- package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.js +1 -1
- package/schematics/bundles/property_name-BBwFuqMe.js +1 -1
- package/schematics/bundles/provide-initializer.js +1 -1
- package/schematics/bundles/route-lazy-loading.js +1 -1
- package/schematics/bundles/self-closing-tags-migration.js +3 -3
- package/schematics/bundles/signal-input-migration.js +6 -6
- package/schematics/bundles/signal-queries-migration.js +6 -6
- package/schematics/bundles/signals.js +6 -6
- package/schematics/bundles/standalone-migration.js +3 -3
- package/testing/index.d.ts +1 -1
- package/weak_ref.d-ttyj86RV.d.ts +1 -1
package/fesm2022/core.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.2.
|
|
2
|
+
* @license Angular v19.2.3
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { SIGNAL_NODE, signalSetFn, SIGNAL, producerAccessed, getActiveConsumer, setActiveConsumer, createSignal, signalUpdateFn, consumerDestroy, REACTIVE_NODE, consumerPollProducersForChange, consumerBeforeComputation, consumerAfterComputation, createComputed, setThrowInvalidWriteToSignalError, createWatch, isInNotificationPhase, createLinkedSignal, linkedSignalSetFn, linkedSignalUpdateFn } from '@angular/core/primitives/signals';
|
|
7
|
+
import { SIGNAL_NODE, signalSetFn, SIGNAL, producerAccessed, getActiveConsumer, setActiveConsumer, createSignal, signalUpdateFn, consumerDestroy, REACTIVE_NODE, consumerPollProducersForChange, consumerBeforeComputation, consumerAfterComputation, createComputed, setThrowInvalidWriteToSignalError, untracked as untracked$1, createWatch, isInNotificationPhase, createLinkedSignal, linkedSignalSetFn, linkedSignalUpdateFn } from '@angular/core/primitives/signals';
|
|
8
8
|
export { SIGNAL as ɵSIGNAL } from '@angular/core/primitives/signals';
|
|
9
9
|
import { getCurrentInjector, NOT_FOUND as NOT_FOUND$1, setCurrentInjector } from '@angular/core/primitives/di';
|
|
10
10
|
export { setCurrentInjector as ɵsetCurrentInjector } from '@angular/core/primitives/di';
|
|
@@ -99,7 +99,12 @@ function createInputSignal(initialValue, options) {
|
|
|
99
99
|
// Record that someone looked at this signal.
|
|
100
100
|
producerAccessed(node);
|
|
101
101
|
if (node.value === REQUIRED_UNSET_VALUE) {
|
|
102
|
-
|
|
102
|
+
let message = null;
|
|
103
|
+
if (ngDevMode) {
|
|
104
|
+
const name = options?.debugName ?? options?.alias;
|
|
105
|
+
message = `Input${name ? ` "${name}"` : ''} is required but no value is available yet.`;
|
|
106
|
+
}
|
|
107
|
+
throw new RuntimeError(-950 /* RuntimeErrorCode.REQUIRED_INPUT_NO_VALUE */, message);
|
|
103
108
|
}
|
|
104
109
|
return node.value;
|
|
105
110
|
}
|
|
@@ -7010,11 +7015,8 @@ function ɵunwrapWritableSignal(value) {
|
|
|
7010
7015
|
* Create a `Signal` that can be set or updated directly.
|
|
7011
7016
|
*/
|
|
7012
7017
|
function signal(initialValue, options) {
|
|
7013
|
-
const signalFn = createSignal(initialValue);
|
|
7018
|
+
const signalFn = createSignal(initialValue, options?.equal);
|
|
7014
7019
|
const node = signalFn[SIGNAL];
|
|
7015
|
-
if (options?.equal) {
|
|
7016
|
-
node.equal = options.equal;
|
|
7017
|
-
}
|
|
7018
7020
|
signalFn.set = (newValue) => signalSetFn(node, newValue);
|
|
7019
7021
|
signalFn.update = (updateFn) => signalUpdateFn(node, updateFn);
|
|
7020
7022
|
signalFn.asReadonly = signalAsReadonlyFn.bind(signalFn);
|
|
@@ -9972,6 +9974,56 @@ function processBlockData(injector) {
|
|
|
9972
9974
|
}
|
|
9973
9975
|
return blockDetails;
|
|
9974
9976
|
}
|
|
9977
|
+
function isSsrContentsIntegrity(node) {
|
|
9978
|
+
return (!!node &&
|
|
9979
|
+
node.nodeType === Node.COMMENT_NODE &&
|
|
9980
|
+
node.textContent?.trim() === SSR_CONTENT_INTEGRITY_MARKER);
|
|
9981
|
+
}
|
|
9982
|
+
function skipTextNodes(node) {
|
|
9983
|
+
// Ignore whitespace. Before the <body>, we shouldn't find text nodes that aren't whitespace.
|
|
9984
|
+
while (node && node.nodeType === Node.TEXT_NODE) {
|
|
9985
|
+
node = node.previousSibling;
|
|
9986
|
+
}
|
|
9987
|
+
return node;
|
|
9988
|
+
}
|
|
9989
|
+
/**
|
|
9990
|
+
* Verifies whether the DOM contains a special marker added during SSR time to make sure
|
|
9991
|
+
* there is no SSR'ed contents transformations happen after SSR is completed. Typically that
|
|
9992
|
+
* happens either by CDN or during the build process as an optimization to remove comment nodes.
|
|
9993
|
+
* Hydration process requires comment nodes produced by Angular to locate correct DOM segments.
|
|
9994
|
+
* When this special marker is *not* present - throw an error and do not proceed with hydration,
|
|
9995
|
+
* since it will not be able to function correctly.
|
|
9996
|
+
*
|
|
9997
|
+
* Note: this function is invoked only on the client, so it's safe to use DOM APIs.
|
|
9998
|
+
*/
|
|
9999
|
+
function verifySsrContentsIntegrity(doc) {
|
|
10000
|
+
for (const node of doc.body.childNodes) {
|
|
10001
|
+
if (isSsrContentsIntegrity(node)) {
|
|
10002
|
+
return;
|
|
10003
|
+
}
|
|
10004
|
+
}
|
|
10005
|
+
// Check if the HTML parser may have moved the marker to just before the <body> tag,
|
|
10006
|
+
// e.g. because the body tag was implicit and not present in the markup. An implicit body
|
|
10007
|
+
// tag is unlikely to interfer with whitespace/comments inside of the app's root element.
|
|
10008
|
+
// Case 1: Implicit body. Example:
|
|
10009
|
+
// <!doctype html><head><title>Hi</title></head><!--nghm--><app-root></app-root>
|
|
10010
|
+
const beforeBody = skipTextNodes(doc.body.previousSibling);
|
|
10011
|
+
if (isSsrContentsIntegrity(beforeBody)) {
|
|
10012
|
+
return;
|
|
10013
|
+
}
|
|
10014
|
+
// Case 2: Implicit body & head. Example:
|
|
10015
|
+
// <!doctype html><head><title>Hi</title><!--nghm--><app-root></app-root>
|
|
10016
|
+
let endOfHead = skipTextNodes(doc.head.lastChild);
|
|
10017
|
+
if (isSsrContentsIntegrity(endOfHead)) {
|
|
10018
|
+
return;
|
|
10019
|
+
}
|
|
10020
|
+
throw new RuntimeError(-507 /* RuntimeErrorCode.MISSING_SSR_CONTENT_INTEGRITY_MARKER */, typeof ngDevMode !== 'undefined' &&
|
|
10021
|
+
ngDevMode &&
|
|
10022
|
+
'Angular hydration logic detected that HTML content of this page was modified after it ' +
|
|
10023
|
+
'was produced during server side rendering. Make sure that there are no optimizations ' +
|
|
10024
|
+
'that remove comment nodes from HTML enabled on your CDN. Angular hydration ' +
|
|
10025
|
+
'relies on HTML produced by the server, including whitespaces and comment nodes.');
|
|
10026
|
+
}
|
|
9975
10027
|
|
|
9976
10028
|
/** Refreshes all content queries declared by directives in a given view */
|
|
9977
10029
|
function refreshContentQueries(tView, lView) {
|
|
@@ -17864,7 +17916,7 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
17864
17916
|
const cmpDef = this.componentDef;
|
|
17865
17917
|
ngDevMode && verifyNotAnOrphanComponent(cmpDef);
|
|
17866
17918
|
const tAttributes = rootSelectorOrNode
|
|
17867
|
-
? ['ng-version', '19.2.
|
|
17919
|
+
? ['ng-version', '19.2.3']
|
|
17868
17920
|
: // Extract attributes and classes from the first selector only to match VE behavior.
|
|
17869
17921
|
extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]);
|
|
17870
17922
|
// Create the root view. Uses empty TView and ContentTemplate.
|
|
@@ -20792,8 +20844,9 @@ function onTimer(delay) {
|
|
|
20792
20844
|
*/
|
|
20793
20845
|
function scheduleTimerTrigger(delay, callback, injector) {
|
|
20794
20846
|
const scheduler = injector.get(TimerScheduler);
|
|
20847
|
+
const ngZone = injector.get(NgZone);
|
|
20795
20848
|
const cleanupFn = () => scheduler.remove(callback);
|
|
20796
|
-
scheduler.add(delay, callback);
|
|
20849
|
+
scheduler.add(delay, callback, ngZone);
|
|
20797
20850
|
return cleanupFn;
|
|
20798
20851
|
}
|
|
20799
20852
|
/**
|
|
@@ -20819,10 +20872,10 @@ class TimerScheduler {
|
|
|
20819
20872
|
// the current callback invocation. The shape of this list is the same
|
|
20820
20873
|
// as the shape of the `current` list.
|
|
20821
20874
|
deferred = [];
|
|
20822
|
-
add(delay, callback) {
|
|
20875
|
+
add(delay, callback, ngZone) {
|
|
20823
20876
|
const target = this.executingCallbacks ? this.deferred : this.current;
|
|
20824
20877
|
this.addToQueue(target, Date.now() + delay, callback);
|
|
20825
|
-
this.scheduleTimer();
|
|
20878
|
+
this.scheduleTimer(ngZone);
|
|
20826
20879
|
}
|
|
20827
20880
|
remove(callback) {
|
|
20828
20881
|
const { current, deferred } = this;
|
|
@@ -20868,7 +20921,7 @@ class TimerScheduler {
|
|
|
20868
20921
|
}
|
|
20869
20922
|
return index;
|
|
20870
20923
|
}
|
|
20871
|
-
scheduleTimer() {
|
|
20924
|
+
scheduleTimer(ngZone) {
|
|
20872
20925
|
const callback = () => {
|
|
20873
20926
|
this.clearTimeout();
|
|
20874
20927
|
this.executingCallbacks = true;
|
|
@@ -20918,7 +20971,7 @@ class TimerScheduler {
|
|
|
20918
20971
|
}
|
|
20919
20972
|
this.deferred.length = 0;
|
|
20920
20973
|
}
|
|
20921
|
-
this.scheduleTimer();
|
|
20974
|
+
this.scheduleTimer(ngZone);
|
|
20922
20975
|
};
|
|
20923
20976
|
// Avoid running timer callbacks more than once per
|
|
20924
20977
|
// average frame duration. This is needed for better
|
|
@@ -20941,7 +20994,9 @@ class TimerScheduler {
|
|
|
20941
20994
|
this.clearTimeout();
|
|
20942
20995
|
const timeout = Math.max(invokeAt - now, FRAME_DURATION_MS);
|
|
20943
20996
|
this.invokeTimerAt = invokeAt;
|
|
20944
|
-
this.timeoutId =
|
|
20997
|
+
this.timeoutId = ngZone.runOutsideAngular(() => {
|
|
20998
|
+
return setTimeout(() => ngZone.run(callback), timeout);
|
|
20999
|
+
});
|
|
20945
21000
|
}
|
|
20946
21001
|
}
|
|
20947
21002
|
}
|
|
@@ -34572,7 +34627,7 @@ class Version {
|
|
|
34572
34627
|
/**
|
|
34573
34628
|
* @publicApi
|
|
34574
34629
|
*/
|
|
34575
|
-
const VERSION = new Version('19.2.
|
|
34630
|
+
const VERSION = new Version('19.2.3');
|
|
34576
34631
|
|
|
34577
34632
|
/**
|
|
34578
34633
|
* Combination of NgModuleFactory and ComponentFactories.
|
|
@@ -34814,7 +34869,7 @@ function internalProvideZoneChangeDetection({ ngZoneFactory, ignoreChangesOutsid
|
|
|
34814
34869
|
* ```
|
|
34815
34870
|
*
|
|
34816
34871
|
* @publicApi
|
|
34817
|
-
* @see {@link /api/
|
|
34872
|
+
* @see {@link /api/platform-browser/bootstrapApplication bootstrapApplication}
|
|
34818
34873
|
* @see {@link NgZoneOptions}
|
|
34819
34874
|
*/
|
|
34820
34875
|
function provideZoneChangeDetection(options) {
|
|
@@ -39068,7 +39123,7 @@ function withDomHydration() {
|
|
|
39068
39123
|
return;
|
|
39069
39124
|
}
|
|
39070
39125
|
if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
|
|
39071
|
-
verifySsrContentsIntegrity();
|
|
39126
|
+
verifySsrContentsIntegrity(getDocument());
|
|
39072
39127
|
enableHydrationRuntimeSupport();
|
|
39073
39128
|
}
|
|
39074
39129
|
else if (typeof ngDevMode !== 'undefined' && ngDevMode && !isClientRenderModeEnabled()) {
|
|
@@ -39210,35 +39265,6 @@ function logWarningOnStableTimedout(time, console) {
|
|
|
39210
39265
|
`as a signal to complete hydration process.`;
|
|
39211
39266
|
console.warn(formatRuntimeError(-506 /* RuntimeErrorCode.HYDRATION_STABLE_TIMEDOUT */, message));
|
|
39212
39267
|
}
|
|
39213
|
-
/**
|
|
39214
|
-
* Verifies whether the DOM contains a special marker added during SSR time to make sure
|
|
39215
|
-
* there is no SSR'ed contents transformations happen after SSR is completed. Typically that
|
|
39216
|
-
* happens either by CDN or during the build process as an optimization to remove comment nodes.
|
|
39217
|
-
* Hydration process requires comment nodes produced by Angular to locate correct DOM segments.
|
|
39218
|
-
* When this special marker is *not* present - throw an error and do not proceed with hydration,
|
|
39219
|
-
* since it will not be able to function correctly.
|
|
39220
|
-
*
|
|
39221
|
-
* Note: this function is invoked only on the client, so it's safe to use DOM APIs.
|
|
39222
|
-
*/
|
|
39223
|
-
function verifySsrContentsIntegrity() {
|
|
39224
|
-
const doc = getDocument();
|
|
39225
|
-
let hydrationMarker;
|
|
39226
|
-
for (const node of doc.body.childNodes) {
|
|
39227
|
-
if (node.nodeType === Node.COMMENT_NODE &&
|
|
39228
|
-
node.textContent?.trim() === SSR_CONTENT_INTEGRITY_MARKER) {
|
|
39229
|
-
hydrationMarker = node;
|
|
39230
|
-
break;
|
|
39231
|
-
}
|
|
39232
|
-
}
|
|
39233
|
-
if (!hydrationMarker) {
|
|
39234
|
-
throw new RuntimeError(-507 /* RuntimeErrorCode.MISSING_SSR_CONTENT_INTEGRITY_MARKER */, typeof ngDevMode !== 'undefined' &&
|
|
39235
|
-
ngDevMode &&
|
|
39236
|
-
'Angular hydration logic detected that HTML content of this page was modified after it ' +
|
|
39237
|
-
'was produced during server side rendering. Make sure that there are no optimizations ' +
|
|
39238
|
-
'that remove comment nodes from HTML enabled on your CDN. Angular hydration ' +
|
|
39239
|
-
'relies on HTML produced by the server, including whitespaces and comment nodes.');
|
|
39240
|
-
}
|
|
39241
|
-
}
|
|
39242
39268
|
|
|
39243
39269
|
/**
|
|
39244
39270
|
* Transforms a value (typically a string) to a boolean.
|
|
@@ -39339,25 +39365,14 @@ function disableProfiling() {
|
|
|
39339
39365
|
* can, optionally, return a value.
|
|
39340
39366
|
*/
|
|
39341
39367
|
function untracked(nonReactiveReadsFn) {
|
|
39342
|
-
|
|
39343
|
-
// We are not trying to catch any particular errors here, just making sure that the consumers
|
|
39344
|
-
// stack is restored in case of errors.
|
|
39345
|
-
try {
|
|
39346
|
-
return nonReactiveReadsFn();
|
|
39347
|
-
}
|
|
39348
|
-
finally {
|
|
39349
|
-
setActiveConsumer(prevConsumer);
|
|
39350
|
-
}
|
|
39368
|
+
return untracked$1(nonReactiveReadsFn);
|
|
39351
39369
|
}
|
|
39352
39370
|
|
|
39353
39371
|
/**
|
|
39354
39372
|
* Create a computed `Signal` which derives a reactive value from an expression.
|
|
39355
39373
|
*/
|
|
39356
39374
|
function computed(computation, options) {
|
|
39357
|
-
const getter = createComputed(computation);
|
|
39358
|
-
if (options?.equal) {
|
|
39359
|
-
getter[SIGNAL].equal = options.equal;
|
|
39360
|
-
}
|
|
39375
|
+
const getter = createComputed(computation, options?.equal);
|
|
39361
39376
|
if (ngDevMode) {
|
|
39362
39377
|
getter.toString = () => `[Computed: ${getter()}]`;
|
|
39363
39378
|
getter[SIGNAL].debugName = options?.debugName;
|