@angular/core 21.0.0 → 21.1.0-next.0
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/_attribute-chunk.mjs +1 -1
- package/fesm2022/_attribute-chunk.mjs.map +1 -1
- package/fesm2022/_debug_node-chunk.mjs +254 -170
- package/fesm2022/_debug_node-chunk.mjs.map +1 -1
- package/fesm2022/_effect-chunk.mjs +1 -1
- package/fesm2022/_effect-chunk.mjs.map +1 -1
- package/fesm2022/_linked_signal-chunk.mjs +1 -1
- package/fesm2022/_linked_signal-chunk.mjs.map +1 -1
- package/fesm2022/_not_found-chunk.mjs +1 -1
- package/fesm2022/_not_found-chunk.mjs.map +1 -1
- package/fesm2022/_resource-chunk.mjs +33 -19
- package/fesm2022/_resource-chunk.mjs.map +1 -1
- package/fesm2022/_untracked-chunk.mjs +14 -6
- package/fesm2022/_untracked-chunk.mjs.map +1 -1
- package/fesm2022/_weak_ref-chunk.mjs +1 -1
- package/fesm2022/_weak_ref-chunk.mjs.map +1 -1
- package/fesm2022/core.mjs +27 -16
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives-di.mjs +1 -1
- package/fesm2022/primitives-di.mjs.map +1 -1
- package/fesm2022/primitives-event-dispatch.mjs +1 -1
- package/fesm2022/primitives-event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives-signals.mjs +1 -1
- package/fesm2022/primitives-signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +12 -4
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/best-practices.md +0 -1
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +1 -1
- package/schematics/bundles/application-config-core.cjs +1 -1
- package/schematics/bundles/apply_import_manager-1Zs_gpB6.cjs +1 -1
- package/schematics/bundles/bootstrap-options-migration.cjs +2 -1
- package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
- package/schematics/bundles/common-to-standalone-migration.cjs +5 -3
- package/schematics/bundles/compiler_host-DBwYMlTo.cjs +1 -1
- package/schematics/bundles/control-flow-migration.cjs +1 -1
- package/schematics/bundles/imports-DP72APSx.cjs +1 -1
- package/schematics/bundles/index-B7I9sIUx.cjs +1 -1
- package/schematics/bundles/inject-migration.cjs +1 -1
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/migrate_ts_type_references-UGIUl7En.cjs +1 -1
- package/schematics/bundles/ng_component_template-Dsuq1Lw7.cjs +1 -1
- package/schematics/bundles/ng_decorators-DSFlWYQY.cjs +1 -1
- package/schematics/bundles/ngclass-to-class-migration.cjs +1 -1
- package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +1 -1
- package/schematics/bundles/parse_html-8VLCL37B.cjs +1 -1
- package/schematics/bundles/project_paths-DvD50ouC.cjs +1 -1
- package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.cjs +1 -1
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +1 -1
- package/schematics/bundles/router-current-navigation.cjs +1 -1
- package/schematics/bundles/router-last-successful-navigation.cjs +1 -1
- package/schematics/bundles/router-testing-module-migration.cjs +1 -1
- package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
- package/schematics/bundles/signal-input-migration.cjs +1 -1
- package/schematics/bundles/signal-queries-migration.cjs +1 -1
- package/schematics/bundles/signals.cjs +1 -1
- package/schematics/bundles/standalone-migration.cjs +4 -4
- package/schematics/bundles/symbol-BObKoqes.cjs +1 -1
- package/types/_api-chunk.d.ts +7 -2
- package/types/_chrome_dev_tools_performance-chunk.d.ts +9 -1
- package/types/_discovery-chunk.d.ts +28 -21
- package/types/_effect-chunk.d.ts +1 -1
- package/types/_event_dispatcher-chunk.d.ts +1 -1
- package/types/_formatter-chunk.d.ts +1 -1
- package/types/_weak_ref-chunk.d.ts +1 -1
- package/types/core.d.ts +160 -139
- package/types/primitives-di.d.ts +1 -1
- package/types/primitives-event-dispatch.d.ts +1 -1
- package/types/primitives-signals.d.ts +1 -1
- package/types/rxjs-interop.d.ts +5 -1
- package/types/testing.d.ts +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/core",
|
|
3
|
-
"version": "21.0.0",
|
|
3
|
+
"version": "21.1.0-next.0",
|
|
4
4
|
"description": "Angular - the core framework",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"tslib": "^2.3.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@angular/compiler": "21.0.0",
|
|
49
|
+
"@angular/compiler": "21.1.0-next.0",
|
|
50
50
|
"rxjs": "^6.5.3 || ^7.4.0",
|
|
51
|
-
"zone.js": "~0.15.0"
|
|
51
|
+
"zone.js": "~0.15.0 || ~0.16.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependenciesMeta": {
|
|
54
54
|
"@angular/compiler": {
|
|
@@ -47,7 +47,6 @@ You are an expert in TypeScript, Angular, and scalable web application developme
|
|
|
47
47
|
- Use the async pipe to handle observables
|
|
48
48
|
- Do not assume globals like (`new Date()`) are available.
|
|
49
49
|
- Do not write arrow functions in templates (they are not supported).
|
|
50
|
-
- Do not write Regular expressions in templates (they are not supported).
|
|
51
50
|
|
|
52
51
|
## Services
|
|
53
52
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0
|
|
3
|
+
* @license Angular v21.1.0-next.0
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -533,6 +533,7 @@ function getSpecifiers(sourceFile) {
|
|
|
533
533
|
if (!createApplicationSpecifier &&
|
|
534
534
|
!bootstrapAppSpecifier &&
|
|
535
535
|
!platformBrowserSpecifier &&
|
|
536
|
+
!platformBrowserDynamicSpecifier &&
|
|
536
537
|
!testBedSpecifier &&
|
|
537
538
|
!ngModuleSpecifier &&
|
|
538
539
|
!getTestBedSpecifier) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0
|
|
3
|
+
* @license Angular v21.1.0-next.0
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -39,8 +39,10 @@ const PATTERN_IMPORTS = [
|
|
|
39
39
|
{ pattern: /\[ngStyle\]/g, imports: ['NgStyle'] },
|
|
40
40
|
// Match ngSwitch as property binding [ngSwitch] or attribute ngSwitch="value"
|
|
41
41
|
{ pattern: /(\[ngSwitch\]|\s+ngSwitch\s*=)/g, imports: ['NgSwitch'] },
|
|
42
|
-
|
|
43
|
-
{ pattern:
|
|
42
|
+
// Match ngTemplateOutlet as structural (*ngTemplateOutlet) or property binding [ngTemplateOutlet]
|
|
43
|
+
{ pattern: /(\*ngTemplateOutlet\b|\[ngTemplateOutlet\])/g, imports: ['NgTemplateOutlet'] },
|
|
44
|
+
// Match ngComponentOutlet as structural (*ngComponentOutlet) or property binding [ngComponentOutlet]
|
|
45
|
+
{ pattern: /(\*ngComponentOutlet\b|\[ngComponentOutlet\])/g, imports: ['NgComponentOutlet'] },
|
|
44
46
|
// Common pipes
|
|
45
47
|
{ pattern: /\|\s*async\b/g, imports: ['AsyncPipe'] },
|
|
46
48
|
{ pattern: /\|\s*json\b/g, imports: ['JsonPipe'] },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0
|
|
3
|
+
* @license Angular v21.1.0-next.0
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -1125,9 +1125,9 @@ function replaceInTestImportsArray(testImportArrays, removalLocations, classesTo
|
|
|
1125
1125
|
if (moduleMeta) {
|
|
1126
1126
|
// Since we don't have access to the template type checker in tests,
|
|
1127
1127
|
// we copy over all the `exports` that aren't flagged for removal.
|
|
1128
|
-
const exports = moduleMeta.exports.filter((exp) => !classesToRemove.has(exp.node));
|
|
1129
|
-
if (exports.length > 0) {
|
|
1130
|
-
exports.forEach((exp) => replacements.track(node, exp));
|
|
1128
|
+
const exports$1 = moduleMeta.exports.filter((exp) => !classesToRemove.has(exp.node));
|
|
1129
|
+
if (exports$1.length > 0) {
|
|
1130
|
+
exports$1.forEach((exp) => replacements.track(node, exp));
|
|
1131
1131
|
// Track the import statement for removal when replacing with exports
|
|
1132
1132
|
if (ts.isIdentifier(node)) {
|
|
1133
1133
|
const symbol = typeChecker.getSymbolAtLocation(node);
|
package/types/_api-chunk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0
|
|
2
|
+
* @license Angular v21.1.0-next.0
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -278,7 +278,12 @@ interface StreamingResourceOptions<T, R> extends BaseResourceOptions<T, R> {
|
|
|
278
278
|
/**
|
|
279
279
|
* @experimental
|
|
280
280
|
*/
|
|
281
|
-
type ResourceOptions<T, R> = PromiseResourceOptions<T, R> | StreamingResourceOptions<T, R
|
|
281
|
+
type ResourceOptions<T, R> = (PromiseResourceOptions<T, R> | StreamingResourceOptions<T, R>) & {
|
|
282
|
+
/**
|
|
283
|
+
* A debug name for the reactive node. Used in Angular DevTools to identify the node.
|
|
284
|
+
*/
|
|
285
|
+
debugName?: string;
|
|
286
|
+
};
|
|
282
287
|
/**
|
|
283
288
|
* @experimental
|
|
284
289
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0
|
|
2
|
+
* @license Angular v21.1.0-next.0
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -66,6 +66,8 @@ declare function signal<T>(initialValue: T, options?: CreateSignalOptions<T>): W
|
|
|
66
66
|
*
|
|
67
67
|
* Ordinary values can be turned into `Signal`s with the `signal` function.
|
|
68
68
|
*
|
|
69
|
+
* @see [What are signals?](guide/signals#what-are-signals)
|
|
70
|
+
*
|
|
69
71
|
* @publicApi 17.0
|
|
70
72
|
*/
|
|
71
73
|
type Signal<T> = (() => T) & {
|
|
@@ -74,18 +76,24 @@ type Signal<T> = (() => T) & {
|
|
|
74
76
|
/**
|
|
75
77
|
* Checks if the given `value` is a reactive `Signal`.
|
|
76
78
|
*
|
|
79
|
+
* @see [Type checking signals](guide/signals#type-checking-signals)
|
|
80
|
+
*
|
|
77
81
|
* @publicApi 17.0
|
|
78
82
|
*/
|
|
79
83
|
declare function isSignal(value: unknown): value is Signal<unknown>;
|
|
80
84
|
/**
|
|
81
85
|
* A comparison function which can determine if two values are equal.
|
|
82
86
|
*
|
|
87
|
+
* @see [Signal equality functions](guide/signals#signal-equality-functions)
|
|
88
|
+
*
|
|
83
89
|
* @publicApi 17.0
|
|
84
90
|
*/
|
|
85
91
|
type ValueEqualityFn<T> = (a: T, b: T) => boolean;
|
|
86
92
|
/**
|
|
87
93
|
* Checks if the given `value` is a writeable signal.
|
|
88
94
|
*
|
|
95
|
+
* @see [Type checking signals](guide/signals#type-checking-signals)
|
|
96
|
+
*
|
|
89
97
|
* @publicApi 21.1
|
|
90
98
|
*/
|
|
91
99
|
declare function isWritableSignal(value: unknown): value is WritableSignal<unknown>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0
|
|
2
|
+
* @license Angular v21.1.0-next.0
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1165,49 +1165,42 @@ declare const enum TNodeFlags {
|
|
|
1165
1165
|
*/
|
|
1166
1166
|
isInControlFlow = 512,
|
|
1167
1167
|
/**
|
|
1168
|
-
* Bit #11 - This bit is set if the node
|
|
1169
|
-
*
|
|
1170
|
-
* True when the node has an input binding to a `ɵControl` directive (but not also to a custom
|
|
1171
|
-
* component).
|
|
1172
|
-
*/
|
|
1173
|
-
isFormControl = 1024,
|
|
1174
|
-
/**
|
|
1175
|
-
* Bit #12 - This bit is set if the node hosts a custom control component.
|
|
1168
|
+
* Bit #11 - This bit is set if the node hosts a custom control component.
|
|
1176
1169
|
*
|
|
1177
1170
|
* A custom control component's model property is named `value`.
|
|
1178
1171
|
*/
|
|
1179
|
-
isFormValueControl =
|
|
1172
|
+
isFormValueControl = 1024,
|
|
1180
1173
|
/**
|
|
1181
|
-
* Bit #
|
|
1174
|
+
* Bit #12 - This bit is set if the node hosts a custom checkbox component.
|
|
1182
1175
|
*
|
|
1183
1176
|
* A custom checkbox component's model property is named `checked`.
|
|
1184
1177
|
*/
|
|
1185
|
-
isFormCheckboxControl =
|
|
1178
|
+
isFormCheckboxControl = 2048,
|
|
1186
1179
|
/**
|
|
1187
|
-
* Bit #
|
|
1180
|
+
* Bit #13 - This bit is set if the node hosts an interoperable control implementation.
|
|
1188
1181
|
*
|
|
1189
1182
|
* This is used to bind to a `ControlValueAccessor` from `@angular/forms`.
|
|
1190
1183
|
*/
|
|
1191
|
-
isInteropControl =
|
|
1184
|
+
isInteropControl = 4096,
|
|
1192
1185
|
/**
|
|
1193
|
-
* Bit #
|
|
1186
|
+
* Bit #14 - This bit is set if the node is a native control.
|
|
1194
1187
|
*
|
|
1195
1188
|
* This is used to determine whether we can bind common control properties to the host element of
|
|
1196
1189
|
* a custom control when it doesn't define a corresponding input.
|
|
1197
1190
|
*/
|
|
1198
|
-
isNativeControl =
|
|
1191
|
+
isNativeControl = 8192,
|
|
1199
1192
|
/**
|
|
1200
|
-
* Bit #
|
|
1193
|
+
* Bit #15 - This bit is set if the node is a native control with a numeric type.
|
|
1201
1194
|
*
|
|
1202
1195
|
* This is used to determine whether the control supports the `min` and `max` properties.
|
|
1203
1196
|
*/
|
|
1204
|
-
isNativeNumericControl =
|
|
1197
|
+
isNativeNumericControl = 16384,
|
|
1205
1198
|
/**
|
|
1206
|
-
* Bit #
|
|
1199
|
+
* Bit #16 - This bit is set if the node is a native text control.
|
|
1207
1200
|
*
|
|
1208
1201
|
* This is used to determine whether control supports the `minLength` and `maxLength` properties.
|
|
1209
1202
|
*/
|
|
1210
|
-
isNativeTextControl =
|
|
1203
|
+
isNativeTextControl = 32768
|
|
1211
1204
|
}
|
|
1212
1205
|
/**
|
|
1213
1206
|
* Corresponds to the TNode.providerIndexes property.
|
|
@@ -1354,6 +1347,16 @@ interface TNode {
|
|
|
1354
1347
|
* `directiveStart + componentOffset`.
|
|
1355
1348
|
*/
|
|
1356
1349
|
componentOffset: number;
|
|
1350
|
+
/**
|
|
1351
|
+
* Index at which the signal forms field directive is stored.
|
|
1352
|
+
* Value is set to -1 if there are no field directives.
|
|
1353
|
+
*/
|
|
1354
|
+
fieldIndex: number;
|
|
1355
|
+
/**
|
|
1356
|
+
* Index at which the custom control directive is stored.
|
|
1357
|
+
* Value is set to -1 if there is no custom control directive.
|
|
1358
|
+
*/
|
|
1359
|
+
customControlIndex: number;
|
|
1357
1360
|
/**
|
|
1358
1361
|
* Stores the last directive which had a styling instruction.
|
|
1359
1362
|
*
|
|
@@ -2987,6 +2990,8 @@ declare enum SecurityContext {
|
|
|
2987
2990
|
/**
|
|
2988
2991
|
* Sanitizer is used by the views to sanitize potentially dangerous values.
|
|
2989
2992
|
*
|
|
2993
|
+
* @see [Sanitization and security contexts](best-practices/security#sanitization-and-security-contexts)
|
|
2994
|
+
*
|
|
2990
2995
|
* @publicApi
|
|
2991
2996
|
*/
|
|
2992
2997
|
declare abstract class Sanitizer {
|
|
@@ -3236,7 +3241,7 @@ interface EffectNode extends BaseEffectNode, SchedulableEffect {
|
|
|
3236
3241
|
cleanupFns: EffectCleanupFn[] | undefined;
|
|
3237
3242
|
injector: Injector;
|
|
3238
3243
|
notifier: ChangeDetectionScheduler;
|
|
3239
|
-
|
|
3244
|
+
onDestroyFns: (() => void)[] | null;
|
|
3240
3245
|
}
|
|
3241
3246
|
interface ViewEffectNode extends EffectNode {
|
|
3242
3247
|
view: LView;
|
|
@@ -6067,6 +6072,8 @@ declare abstract class EmbeddedViewRef<C> extends ViewRef {
|
|
|
6067
6072
|
* Provides access to the component instance and related objects,
|
|
6068
6073
|
* and provides the means of destroying the instance.
|
|
6069
6074
|
*
|
|
6075
|
+
* @see [Programmatically rendering components](guide/components/programmatic-rendering)
|
|
6076
|
+
*
|
|
6070
6077
|
* @publicApi
|
|
6071
6078
|
*/
|
|
6072
6079
|
declare abstract class ComponentRef<C> {
|
package/types/_effect-chunk.d.ts
CHANGED