@angular/core 17.0.0-rc.1 → 17.0.0-rc.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.
Files changed (48) hide show
  1. package/esm2022/primitives/signals/index.mjs +2 -2
  2. package/esm2022/primitives/signals/src/graph.mjs +22 -1
  3. package/esm2022/primitives/signals/src/signal.mjs +7 -3
  4. package/esm2022/rxjs-interop/src/to_signal.mjs +9 -2
  5. package/esm2022/src/change_detection/change_detector_ref.mjs +1 -1
  6. package/esm2022/src/defer/instructions.mjs +35 -22
  7. package/esm2022/src/errors.mjs +1 -1
  8. package/esm2022/src/image_performance_warning.mjs +9 -3
  9. package/esm2022/src/metadata/do_bootstrap.mjs +9 -0
  10. package/esm2022/src/metadata.mjs +1 -1
  11. package/esm2022/src/render3/assert.mjs +2 -2
  12. package/esm2022/src/render3/features/standalone_feature.mjs +5 -1
  13. package/esm2022/src/render3/instructions/change_detection.mjs +68 -8
  14. package/esm2022/src/render3/instructions/change_detection_flags.mjs +12 -0
  15. package/esm2022/src/render3/instructions/control_flow.mjs +65 -45
  16. package/esm2022/src/render3/instructions/shared.mjs +22 -42
  17. package/esm2022/src/render3/interfaces/view.mjs +2 -2
  18. package/esm2022/src/render3/node_manipulation.mjs +2 -3
  19. package/esm2022/src/render3/reactive_lview_consumer.mjs +20 -33
  20. package/esm2022/src/render3/reactivity/effect.mjs +22 -6
  21. package/esm2022/src/render3/reactivity/signal.mjs +1 -1
  22. package/esm2022/src/render3/util/injector_discovery_utils.mjs +32 -25
  23. package/esm2022/src/version.mjs +1 -1
  24. package/esm2022/testing/src/component_fixture.mjs +4 -1
  25. package/esm2022/testing/src/logger.mjs +3 -3
  26. package/fesm2022/core.mjs +18287 -18174
  27. package/fesm2022/core.mjs.map +1 -1
  28. package/fesm2022/primitives/signals.mjs +28 -3
  29. package/fesm2022/primitives/signals.mjs.map +1 -1
  30. package/fesm2022/rxjs-interop.mjs +9 -2
  31. package/fesm2022/rxjs-interop.mjs.map +1 -1
  32. package/fesm2022/testing.mjs +4 -1
  33. package/fesm2022/testing.mjs.map +1 -1
  34. package/index.d.ts +17 -10
  35. package/package.json +2 -2
  36. package/primitives/signals/index.d.ts +14 -1
  37. package/rxjs-interop/index.d.ts +10 -1
  38. package/schematics/migrations/block-template-entities/bundle.js +1348 -1013
  39. package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
  40. package/schematics/migrations/compiler-options/bundle.js +13 -13
  41. package/schematics/migrations/transfer-state/bundle.js +13 -13
  42. package/schematics/ng-generate/control-flow-migration/bundle.js +1439 -1077
  43. package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
  44. package/schematics/ng-generate/control-flow-migration/schema.json +9 -2
  45. package/schematics/ng-generate/standalone-migration/bundle.js +2851 -2403
  46. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  47. package/testing/index.d.ts +1 -1
  48. package/esm2022/src/metadata/do_boostrap.mjs +0 -9
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-rc.1
2
+ * @license Angular v17.0.0-rc.2
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1057,6 +1057,10 @@ export declare abstract class ChangeDetectorRef {
1057
1057
  *
1058
1058
  * Use in development mode to verify that running change detection doesn't introduce
1059
1059
  * other changes. Calling it in production mode is a noop.
1060
+ *
1061
+ * @deprecated This is a test-only API that does not have a place in production interface.
1062
+ * `checkNoChanges` is already part of an `ApplicationRef` tick when the app is running in dev
1063
+ * mode. For more granular `checkNoChanges` validation, use `ComponentFixture`.
1060
1064
  */
1061
1065
  abstract checkNoChanges(): void;
1062
1066
  /**
@@ -3384,6 +3388,8 @@ export declare interface EffectRef {
3384
3388
  destroy(): void;
3385
3389
  }
3386
3390
 
3391
+ declare const EFFECTS_TO_SCHEDULE = 22;
3392
+
3387
3393
  /**
3388
3394
  * Keys within serialized view data structure to represent various
3389
3395
  * parts. See the `SerializedView` interface below for additional information.
@@ -5870,6 +5876,10 @@ declare interface LView<T = unknown> extends Array<any> {
5870
5876
  * precedence over the element and module injectors.
5871
5877
  */
5872
5878
  readonly [EMBEDDED_VIEW_INJECTOR]: Injector | null;
5879
+ /**
5880
+ * Effect scheduling operations that need to run during this views's update pass.
5881
+ */
5882
+ [EFFECTS_TO_SCHEDULE]: Array<() => void> | null;
5873
5883
  /**
5874
5884
  * A collection of callbacks functions that are executed when a given LView is destroyed. Those
5875
5885
  * are user defined, LView-specific destroy callbacks that don't have any corresponding TView
@@ -5883,10 +5893,6 @@ declare interface LView<T = unknown> extends Array<any> {
5883
5893
  * if any signals were read.
5884
5894
  */
5885
5895
  [REACTIVE_TEMPLATE_CONSUMER]: ReactiveLViewConsumer | null;
5886
- /**
5887
- * Same as REACTIVE_TEMPLATE_CONSUMER, but for the host bindings of the LView.
5888
- */
5889
- [REACTIVE_HOST_BINDING_CONSUMER]: ReactiveLViewConsumer | null;
5890
5896
  }
5891
5897
 
5892
5898
  /**
@@ -7502,12 +7508,11 @@ declare interface RDomTokenList {
7502
7508
  remove(token: string): void;
7503
7509
  }
7504
7510
 
7505
- declare const REACTIVE_HOST_BINDING_CONSUMER = 24;
7506
-
7507
7511
  declare const REACTIVE_TEMPLATE_CONSUMER = 23;
7508
7512
 
7509
7513
  declare interface ReactiveLViewConsumer extends ReactiveNode {
7510
7514
  lView: LView | null;
7515
+ slot: typeof REACTIVE_TEMPLATE_CONSUMER;
7511
7516
  }
7512
7517
 
7513
7518
  /**
@@ -10559,7 +10564,7 @@ export declare interface WritableSignal<T> extends Signal<T> {
10559
10564
  */
10560
10565
  set(value: T): void;
10561
10566
  /**
10562
- * Update the value of the signal based on itfs current value, and
10567
+ * Update the value of the signal based on its current value, and
10563
10568
  * notify any dependents.
10564
10569
  */
10565
10570
  update(updateFn: (value: T) => T): void;
@@ -12199,7 +12204,7 @@ export declare const enum ɵRuntimeErrorCode {
12199
12204
  INVALID_EVENT_BINDING = 306,
12200
12205
  HOST_DIRECTIVE_UNRESOLVABLE = 307,
12201
12206
  HOST_DIRECTIVE_NOT_STANDALONE = 308,
12202
- DUPLICATE_DIRECTITVE = 309,
12207
+ DUPLICATE_DIRECTIVE = 309,
12203
12208
  HOST_DIRECTIVE_COMPONENT = 310,
12204
12209
  HOST_DIRECTIVE_UNDEFINED_BINDING = 311,
12205
12210
  HOST_DIRECTIVE_CONFLICTING_ALIAS = 312,
@@ -15130,6 +15135,8 @@ export declare function ɵɵrepeater(metadataSlotIdx: number, collection: Iterab
15130
15135
  * @param templateFn Reference to the template of the main repeater block.
15131
15136
  * @param decls The number of nodes, local refs, and pipes for the main block.
15132
15137
  * @param vars The number of bindings for the main block.
15138
+ * @param tagName The name of the container element, if applicable
15139
+ * @param attrsIndex Index of template attributes in the `consts` array.
15133
15140
  * @param trackByFn Reference to the tracking function.
15134
15141
  * @param trackByUsesComponentInstance Whether the tracking function has any references to the
15135
15142
  * component instance. If it doesn't, we can avoid rebinding it.
@@ -15139,7 +15146,7 @@ export declare function ɵɵrepeater(metadataSlotIdx: number, collection: Iterab
15139
15146
  *
15140
15147
  * @codeGenApi
15141
15148
  */
15142
- export declare function ɵɵrepeaterCreate(index: number, templateFn: ComponentTemplate<unknown>, decls: number, vars: number, trackByFn: TrackByFunction<unknown>, trackByUsesComponentInstance?: boolean, emptyTemplateFn?: ComponentTemplate<unknown>, emptyDecls?: number, emptyVars?: number): void;
15149
+ export declare function ɵɵrepeaterCreate(index: number, templateFn: ComponentTemplate<unknown>, decls: number, vars: number, tagName: string | null, attrsIndex: number | null, trackByFn: TrackByFunction<unknown>, trackByUsesComponentInstance?: boolean, emptyTemplateFn?: ComponentTemplate<unknown>, emptyDecls?: number, emptyVars?: number): void;
15143
15150
 
15144
15151
  /**
15145
15152
  * A built-in trackBy function used for situations where users specified collection item reference
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "17.0.0-rc.1",
3
+ "version": "17.0.0-rc.2",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
7
7
  "engines": {
8
- "node": ">=18.13.0"
8
+ "node": "^18.13.0 || >=20.9.0"
9
9
  },
10
10
  "exports": {
11
11
  "./schematics/*": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-rc.1
2
+ * @license Angular v17.0.0-rc.2
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -53,6 +53,12 @@ export declare function consumerBeforeComputation(node: ReactiveNode | null): Re
53
53
  */
54
54
  export declare function consumerDestroy(node: ReactiveNode): void;
55
55
 
56
+ /**
57
+ * Determine whether this consumer has any dependencies which have changed since the last time
58
+ * they were read.
59
+ */
60
+ export declare function consumerPollProducersForChange(node: ReactiveNode): boolean;
61
+
56
62
  /**
57
63
  * Create a computed signal which derives a reactive value from an expression.
58
64
  */
@@ -123,6 +129,13 @@ export declare interface ReactiveNode {
123
129
  * previous value (by whatever definition of equality is in use).
124
130
  */
125
131
  version: Version;
132
+ /**
133
+ * Epoch at which this node is verified to be clean.
134
+ *
135
+ * This allows skipping of some polling operations in the case where no signals have been set
136
+ * since this node was last read.
137
+ */
138
+ lastCleanEpoch: Version;
126
139
  /**
127
140
  * Whether this node (in its consumer capacity) is dirty.
128
141
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-rc.1
2
+ * @license Angular v17.0.0-rc.2
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -108,6 +108,15 @@ export declare interface ToSignalOptions {
108
108
  * until the `Observable` itself completes.
109
109
  */
110
110
  manualCleanup?: boolean;
111
+ /**
112
+ * Whether `toSignal` should throw errors from the Observable error channel back to RxJS, where
113
+ * they'll be processed as uncaught exceptions.
114
+ *
115
+ * In practice, this means that the signal returned by `toSignal` will keep returning the last
116
+ * good value forever, as Observables which error produce no further values. This option emulates
117
+ * the behavior of the `async` pipe.
118
+ */
119
+ rejectErrors?: boolean;
111
120
  }
112
121
 
113
122
  export { }