@angular/core 18.0.3 → 18.0.4

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 (35) hide show
  1. package/esm2022/src/authoring/model/model_signal.mjs +2 -3
  2. package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +2 -2
  3. package/esm2022/src/core_render3_private_export.mjs +2 -2
  4. package/esm2022/src/defer/instructions.mjs +2 -10
  5. package/esm2022/src/errors.mjs +1 -1
  6. package/esm2022/src/hydration/event_replay.mjs +32 -14
  7. package/esm2022/src/render3/chained_injector.mjs +34 -0
  8. package/esm2022/src/render3/component_ref.mjs +3 -28
  9. package/esm2022/src/render3/index.mjs +2 -2
  10. package/esm2022/src/render3/instructions/all.mjs +2 -1
  11. package/esm2022/src/render3/instructions/let_declaration.mjs +39 -0
  12. package/esm2022/src/render3/jit/environment.mjs +4 -1
  13. package/esm2022/src/render3/util/injector_discovery_utils.mjs +14 -5
  14. package/esm2022/src/render3/util/injector_utils.mjs +10 -1
  15. package/esm2022/src/version.mjs +1 -1
  16. package/esm2022/testing/src/logger.mjs +3 -3
  17. package/fesm2022/core.mjs +140 -71
  18. package/fesm2022/core.mjs.map +1 -1
  19. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  20. package/fesm2022/primitives/signals.mjs +1 -1
  21. package/fesm2022/rxjs-interop.mjs +1 -1
  22. package/fesm2022/testing.mjs +1 -1
  23. package/index.d.ts +28 -5
  24. package/package.json +1 -1
  25. package/primitives/event-dispatch/index.d.ts +1 -1
  26. package/primitives/signals/index.d.ts +1 -1
  27. package/rxjs-interop/index.d.ts +1 -1
  28. package/schematics/migrations/http-providers/bundle.js +15 -15
  29. package/schematics/migrations/invalid-two-way-bindings/bundle.js +422 -218
  30. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +4 -4
  31. package/schematics/ng-generate/control-flow-migration/bundle.js +437 -226
  32. package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
  33. package/schematics/ng-generate/standalone-migration/bundle.js +711 -505
  34. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  35. package/testing/index.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.3
2
+ * @license Angular v18.0.4
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.3
2
+ * @license Angular v18.0.4
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.3
2
+ * @license Angular v18.0.4
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.3
2
+ * @license Angular v18.0.4
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.3
2
+ * @license Angular v18.0.4
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -6993,10 +6993,8 @@ export declare interface ModelOptions {
6993
6993
  *
6994
6994
  * @developerPreview
6995
6995
  */
6996
- export declare interface ModelSignal<T> extends WritableSignal<T>, OutputRef<T> {
6996
+ export declare interface ModelSignal<T> extends WritableSignal<T>, InputSignal<T>, OutputRef<T> {
6997
6997
  [SIGNAL]: InputSignalNode<T, T>;
6998
- [ɵINPUT_SIGNAL_BRAND_READ_TYPE]: T;
6999
- [ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: T;
7000
6998
  }
7001
6999
 
7002
7000
  /**
@@ -13609,7 +13607,7 @@ export declare const enum ɵRuntimeErrorCode {
13609
13607
  UNEXPECTED_ZONEJS_PRESENT_IN_ZONELESS_MODE = 914,
13610
13608
  REQUIRED_INPUT_NO_VALUE = -950,
13611
13609
  REQUIRED_QUERY_NO_VALUE = -951,
13612
- REQUIRED_MODEL_NO_VALUE = -952,
13610
+ REQUIRED_MODEL_NO_VALUE = 952,
13613
13611
  OUTPUT_REF_DESTROYED = 953,
13614
13612
  LOOP_TRACK_DUPLICATE_KEYS = -955,
13615
13613
  LOOP_TRACK_RECREATE = -956,
@@ -14848,6 +14846,15 @@ export declare function ɵɵcontentQuerySignal<T>(directiveIndex: number, target
14848
14846
  */
14849
14847
  export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
14850
14848
 
14849
+ /**
14850
+ * Declares an `@let` at a specific data slot.
14851
+ *
14852
+ * @param index Index at which to declare the `@let`.
14853
+ *
14854
+ * @codeGenApi
14855
+ */
14856
+ export declare function ɵɵdeclareLet(index: number): typeof ɵɵdeclareLet;
14857
+
14851
14858
  /**
14852
14859
  * Creates runtime data structures for defer blocks.
14853
14860
  *
@@ -16526,6 +16533,15 @@ export declare function ɵɵqueryAdvance(indexOffset?: number): void;
16526
16533
  */
16527
16534
  export declare function ɵɵqueryRefresh(queryList: QueryList<any>): boolean;
16528
16535
 
16536
+ /**
16537
+ * Retrieves the value of a `@let` declaration defined within the same view.
16538
+ *
16539
+ * @param index Index of the declaration within the view.
16540
+ *
16541
+ * @codeGenApi
16542
+ */
16543
+ export declare function ɵɵreadContextLet<T>(index: number): T;
16544
+
16529
16545
  /**
16530
16546
  * Retrieves a local reference from the current contextViewData.
16531
16547
  *
@@ -16779,6 +16795,13 @@ export declare function ɵɵsetNgModuleScope(type: any, scope: NgModuleScopeInfo
16779
16795
  */
16780
16796
  export declare function ɵɵStandaloneFeature(definition: ɵComponentDef<unknown>): void;
16781
16797
 
16798
+ /**
16799
+ * Instruction that stores the value of a `@let` declaration on the current view.
16800
+ *
16801
+ * @codeGenApi
16802
+ */
16803
+ export declare function ɵɵstoreLet<T>(value: T): T;
16804
+
16782
16805
  /**
16783
16806
  * Update style bindings using an object literal on an element.
16784
16807
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "18.0.3",
3
+ "version": "18.0.4",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.3
2
+ * @license Angular v18.0.4
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.3
2
+ * @license Angular v18.0.4
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.3
2
+ * @license Angular v18.0.4
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -60,7 +60,7 @@ var __async = (__this, __arguments, generator) => {
60
60
  });
61
61
  };
62
62
 
63
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/http-providers/index.mjs
63
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/http-providers/index.mjs
64
64
  var http_providers_exports = {};
65
65
  __export(http_providers_exports, {
66
66
  default: () => http_providers_default
@@ -69,7 +69,7 @@ module.exports = __toCommonJS(http_providers_exports);
69
69
  var import_schematics = require("@angular-devkit/schematics");
70
70
  var import_path3 = require("path");
71
71
 
72
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
72
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
73
73
  var import_core = require("@angular-devkit/core");
74
74
  function getProjectTsConfigPaths(tree) {
75
75
  return __async(this, null, function* () {
@@ -149,11 +149,11 @@ function getWorkspace(tree) {
149
149
  });
150
150
  }
151
151
 
152
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
152
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
153
153
  var import_path = require("path");
154
154
  var import_typescript2 = __toESM(require("typescript"), 1);
155
155
 
156
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
156
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
157
157
  var path = __toESM(require("path"), 1);
158
158
  var import_typescript = __toESM(require("typescript"), 1);
159
159
  function parseTsconfigFile(tsconfigPath, basePath) {
@@ -170,7 +170,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
170
170
  return import_typescript.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
171
171
  }
172
172
 
173
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
173
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
174
174
  function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
175
175
  const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
176
176
  return import_typescript2.default.createProgram(rootNames, options, host);
@@ -203,13 +203,13 @@ function canMigrateFile(basePath, sourceFile, program) {
203
203
  return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
204
204
  }
205
205
 
206
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/http-providers/utils.mjs
206
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/http-providers/utils.mjs
207
207
  var import_typescript7 = __toESM(require("typescript"), 1);
208
208
 
209
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
209
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
210
210
  var import_typescript4 = __toESM(require("typescript"), 1);
211
211
 
212
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/import_manager.mjs
212
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/import_manager.mjs
213
213
  var import_path2 = require("path");
214
214
  var import_typescript3 = __toESM(require("typescript"), 1);
215
215
  var ImportManager = class {
@@ -393,7 +393,7 @@ ${text}`;
393
393
  }
394
394
  };
395
395
 
396
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
396
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
397
397
  var ChangeTracker = class {
398
398
  constructor(_printer, _importRemapper) {
399
399
  __publicField(this, "_printer");
@@ -456,10 +456,10 @@ function normalizePath(path2) {
456
456
  return path2.replace(/\\/g, "/");
457
457
  }
458
458
 
459
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/decorators.mjs
459
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/decorators.mjs
460
460
  var import_typescript6 = __toESM(require("typescript"), 1);
461
461
 
462
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/imports.mjs
462
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/imports.mjs
463
463
  var import_typescript5 = __toESM(require("typescript"), 1);
464
464
  function getImportOfIdentifier(typeChecker, node) {
465
465
  const symbol = typeChecker.getSymbolAtLocation(node);
@@ -519,7 +519,7 @@ function findImportSpecifier(nodes, specifierName) {
519
519
  });
520
520
  }
521
521
 
522
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/decorators.mjs
522
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/decorators.mjs
523
523
  function getCallDecoratorImport(typeChecker, decorator) {
524
524
  if (!import_typescript6.default.isCallExpression(decorator.expression) || !import_typescript6.default.isIdentifier(decorator.expression.expression)) {
525
525
  return null;
@@ -528,7 +528,7 @@ function getCallDecoratorImport(typeChecker, decorator) {
528
528
  return getImportOfIdentifier(typeChecker, identifier);
529
529
  }
530
530
 
531
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/ng_decorators.mjs
531
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/ng_decorators.mjs
532
532
  function getAngularDecorators(typeChecker, decorators) {
533
533
  return decorators.map((node) => ({ node, importData: getCallDecoratorImport(typeChecker, node) })).filter(({ importData }) => importData && importData.importModule.startsWith("@angular/")).map(({ node, importData }) => ({
534
534
  node,
@@ -538,7 +538,7 @@ function getAngularDecorators(typeChecker, decorators) {
538
538
  }));
539
539
  }
540
540
 
541
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/http-providers/utils.mjs
541
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/http-providers/utils.mjs
542
542
  var HTTP_CLIENT_MODULE = "HttpClientModule";
543
543
  var HTTP_CLIENT_XSRF_MODULE = "HttpClientXsrfModule";
544
544
  var HTTP_CLIENT_JSONP_MODULE = "HttpClientJsonpModule";
@@ -826,7 +826,7 @@ function updateTestBedConfiguration(configureTestingModuleArgs, newImports, newP
826
826
  ]);
827
827
  }
828
828
 
829
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/http-providers/index.mjs
829
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/http-providers/index.mjs
830
830
  function http_providers_default() {
831
831
  return (tree) => __async(this, null, function* () {
832
832
  const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);