@angular/core 17.0.0-rc.1 → 17.0.0-rc.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.
Files changed (53) 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 +11 -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/core_private_export.mjs +2 -1
  7. package/esm2022/src/core_reactivity_export_internal.mjs +1 -1
  8. package/esm2022/src/defer/instructions.mjs +37 -23
  9. package/esm2022/src/errors.mjs +1 -1
  10. package/esm2022/src/hydration/api.mjs +3 -2
  11. package/esm2022/src/image_performance_warning.mjs +9 -3
  12. package/esm2022/src/metadata/do_bootstrap.mjs +9 -0
  13. package/esm2022/src/metadata.mjs +1 -1
  14. package/esm2022/src/render3/after_render_hooks.mjs +4 -3
  15. package/esm2022/src/render3/assert.mjs +2 -2
  16. package/esm2022/src/render3/debug/framework_injector_profiler.mjs +13 -4
  17. package/esm2022/src/render3/features/standalone_feature.mjs +6 -1
  18. package/esm2022/src/render3/instructions/change_detection.mjs +65 -8
  19. package/esm2022/src/render3/instructions/control_flow.mjs +66 -45
  20. package/esm2022/src/render3/instructions/shared.mjs +22 -42
  21. package/esm2022/src/render3/interfaces/view.mjs +2 -2
  22. package/esm2022/src/render3/node_manipulation.mjs +3 -4
  23. package/esm2022/src/render3/reactive_lview_consumer.mjs +20 -33
  24. package/esm2022/src/render3/reactivity/effect.mjs +24 -6
  25. package/esm2022/src/render3/reactivity/signal.mjs +1 -1
  26. package/esm2022/src/render3/util/injector_discovery_utils.mjs +33 -26
  27. package/esm2022/src/util/performance.mjs +19 -0
  28. package/esm2022/src/version.mjs +1 -1
  29. package/esm2022/testing/src/component_fixture.mjs +4 -1
  30. package/esm2022/testing/src/logger.mjs +3 -3
  31. package/fesm2022/core.mjs +18209 -18076
  32. package/fesm2022/core.mjs.map +1 -1
  33. package/fesm2022/primitives/signals.mjs +32 -3
  34. package/fesm2022/primitives/signals.mjs.map +1 -1
  35. package/fesm2022/rxjs-interop.mjs +9 -2
  36. package/fesm2022/rxjs-interop.mjs.map +1 -1
  37. package/fesm2022/testing.mjs +4 -1
  38. package/fesm2022/testing.mjs.map +1 -1
  39. package/index.d.ts +38 -11
  40. package/package.json +2 -2
  41. package/primitives/signals/index.d.ts +14 -1
  42. package/rxjs-interop/index.d.ts +10 -1
  43. package/schematics/migrations/block-template-entities/bundle.js +1623 -1075
  44. package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
  45. package/schematics/migrations/compiler-options/bundle.js +13 -13
  46. package/schematics/migrations/transfer-state/bundle.js +13 -13
  47. package/schematics/ng-generate/control-flow-migration/bundle.js +1735 -1120
  48. package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
  49. package/schematics/ng-generate/control-flow-migration/schema.json +9 -2
  50. package/schematics/ng-generate/standalone-migration/bundle.js +3123 -2462
  51. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  52. package/testing/index.d.ts +1 -1
  53. 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.3
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
  /**
@@ -2128,6 +2132,8 @@ export declare interface CreateComputedOptions<T> {
2128
2132
 
2129
2133
  /**
2130
2134
  * Options passed to the `effect` function.
2135
+ *
2136
+ * @developerPreview
2131
2137
  */
2132
2138
  export declare interface CreateEffectOptions {
2133
2139
  /**
@@ -3359,6 +3365,8 @@ export declare interface DoCheck {
3359
3365
 
3360
3366
  /**
3361
3367
  * Create a global `Effect` for the given reactive function.
3368
+ *
3369
+ * @developerPreview
3362
3370
  */
3363
3371
  export declare function effect(effectFn: (onCleanup: EffectCleanupRegisterFn) => void, options?: CreateEffectOptions): EffectRef;
3364
3372
 
@@ -3366,16 +3374,22 @@ export declare function effect(effectFn: (onCleanup: EffectCleanupRegisterFn) =>
3366
3374
  * An effect can, optionally, register a cleanup function. If registered, the cleanup is executed
3367
3375
  * before the next effect run. The cleanup function makes it possible to "cancel" any work that the
3368
3376
  * previous effect run might have started.
3377
+ *
3378
+ * @developerPreview
3369
3379
  */
3370
3380
  export declare type EffectCleanupFn = () => void;
3371
3381
 
3372
3382
  /**
3373
3383
  * A callback passed to the effect function that makes it possible to register cleanup logic.
3384
+ *
3385
+ * @developerPreview
3374
3386
  */
3375
- declare type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;
3387
+ export declare type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;
3376
3388
 
3377
3389
  /**
3378
3390
  * A global reactive effect, which can be manually destroyed.
3391
+ *
3392
+ * @developerPreview
3379
3393
  */
3380
3394
  export declare interface EffectRef {
3381
3395
  /**
@@ -3384,6 +3398,8 @@ export declare interface EffectRef {
3384
3398
  destroy(): void;
3385
3399
  }
3386
3400
 
3401
+ declare const EFFECTS_TO_SCHEDULE = 22;
3402
+
3387
3403
  /**
3388
3404
  * Keys within serialized view data structure to represent various
3389
3405
  * parts. See the `SerializedView` interface below for additional information.
@@ -5870,6 +5886,10 @@ declare interface LView<T = unknown> extends Array<any> {
5870
5886
  * precedence over the element and module injectors.
5871
5887
  */
5872
5888
  readonly [EMBEDDED_VIEW_INJECTOR]: Injector | null;
5889
+ /**
5890
+ * Effect scheduling operations that need to run during this views's update pass.
5891
+ */
5892
+ [EFFECTS_TO_SCHEDULE]: Array<() => void> | null;
5873
5893
  /**
5874
5894
  * A collection of callbacks functions that are executed when a given LView is destroyed. Those
5875
5895
  * are user defined, LView-specific destroy callbacks that don't have any corresponding TView
@@ -5883,10 +5903,6 @@ declare interface LView<T = unknown> extends Array<any> {
5883
5903
  * if any signals were read.
5884
5904
  */
5885
5905
  [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
5906
  }
5891
5907
 
5892
5908
  /**
@@ -7502,12 +7518,11 @@ declare interface RDomTokenList {
7502
7518
  remove(token: string): void;
7503
7519
  }
7504
7520
 
7505
- declare const REACTIVE_HOST_BINDING_CONSUMER = 24;
7506
-
7507
7521
  declare const REACTIVE_TEMPLATE_CONSUMER = 23;
7508
7522
 
7509
7523
  declare interface ReactiveLViewConsumer extends ReactiveNode {
7510
7524
  lView: LView | null;
7525
+ slot: typeof REACTIVE_TEMPLATE_CONSUMER;
7511
7526
  }
7512
7527
 
7513
7528
  /**
@@ -10559,7 +10574,7 @@ export declare interface WritableSignal<T> extends Signal<T> {
10559
10574
  */
10560
10575
  set(value: T): void;
10561
10576
  /**
10562
- * Update the value of the signal based on itfs current value, and
10577
+ * Update the value of the signal based on its current value, and
10563
10578
  * notify any dependents.
10564
10579
  */
10565
10580
  update(updateFn: (value: T) => T): void;
@@ -11866,6 +11881,16 @@ export declare const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
11866
11881
  */
11867
11882
  export declare function ɵpatchComponentDefWithScope<C>(componentDef: ɵComponentDef<C>, transitiveScopes: ɵNgModuleTransitiveScopes): void;
11868
11883
 
11884
+
11885
+ /**
11886
+ * A guarded `performance.mark`.
11887
+ *
11888
+ * This method exists because while all supported browser and node.js version supported by Angular
11889
+ * support performance.mark API. This is not the case for other environments such as JSDOM and
11890
+ * Cloudflare workers.
11891
+ */
11892
+ export declare function ɵperformanceMark(markName: string, markOptions?: PerformanceMarkOptions | undefined): PerformanceMark | undefined;
11893
+
11869
11894
  /**
11870
11895
  * Runtime link information for Pipes.
11871
11896
  *
@@ -12199,7 +12224,7 @@ export declare const enum ɵRuntimeErrorCode {
12199
12224
  INVALID_EVENT_BINDING = 306,
12200
12225
  HOST_DIRECTIVE_UNRESOLVABLE = 307,
12201
12226
  HOST_DIRECTIVE_NOT_STANDALONE = 308,
12202
- DUPLICATE_DIRECTITVE = 309,
12227
+ DUPLICATE_DIRECTIVE = 309,
12203
12228
  HOST_DIRECTIVE_COMPONENT = 310,
12204
12229
  HOST_DIRECTIVE_UNDEFINED_BINDING = 311,
12205
12230
  HOST_DIRECTIVE_CONFLICTING_ALIAS = 312,
@@ -15130,6 +15155,8 @@ export declare function ɵɵrepeater(metadataSlotIdx: number, collection: Iterab
15130
15155
  * @param templateFn Reference to the template of the main repeater block.
15131
15156
  * @param decls The number of nodes, local refs, and pipes for the main block.
15132
15157
  * @param vars The number of bindings for the main block.
15158
+ * @param tagName The name of the container element, if applicable
15159
+ * @param attrsIndex Index of template attributes in the `consts` array.
15133
15160
  * @param trackByFn Reference to the tracking function.
15134
15161
  * @param trackByUsesComponentInstance Whether the tracking function has any references to the
15135
15162
  * component instance. If it doesn't, we can avoid rebinding it.
@@ -15139,7 +15166,7 @@ export declare function ɵɵrepeater(metadataSlotIdx: number, collection: Iterab
15139
15166
  *
15140
15167
  * @codeGenApi
15141
15168
  */
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;
15169
+ 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
15170
 
15144
15171
  /**
15145
15172
  * 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.3",
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.3
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.3
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 { }