@angular/core 18.0.1 → 18.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.
Files changed (31) hide show
  1. package/esm2022/src/core_render3_private_export.mjs +1 -1
  2. package/esm2022/src/linker/view_ref.mjs +2 -2
  3. package/esm2022/src/render3/component_ref.mjs +1 -1
  4. package/esm2022/src/render3/hooks.mjs +1 -1
  5. package/esm2022/src/render3/instructions/listener.mjs +1 -1
  6. package/esm2022/src/render3/instructions/shared.mjs +1 -1
  7. package/esm2022/src/render3/node_manipulation.mjs +1 -1
  8. package/esm2022/src/render3/profiler.mjs +1 -1
  9. package/esm2022/src/render3/profiler_types.mjs +9 -0
  10. package/esm2022/src/version.mjs +1 -1
  11. package/esm2022/testing/src/logger.mjs +3 -3
  12. package/fesm2022/core.mjs +4 -4
  13. package/fesm2022/core.mjs.map +1 -1
  14. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  15. package/fesm2022/primitives/signals.mjs +1 -1
  16. package/fesm2022/rxjs-interop.mjs +1 -1
  17. package/fesm2022/testing.mjs +1 -1
  18. package/index.d.ts +5 -5
  19. package/package.json +1 -1
  20. package/primitives/event-dispatch/index.d.ts +1 -1
  21. package/primitives/signals/index.d.ts +1 -1
  22. package/rxjs-interop/index.d.ts +1 -1
  23. package/schematics/migrations/http-providers/bundle.js +1 -1
  24. package/schematics/migrations/http-providers/bundle.js.map +2 -2
  25. package/schematics/migrations/invalid-two-way-bindings/bundle.js +1 -1
  26. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +1 -1
  27. package/schematics/ng-generate/control-flow-migration/bundle.js +1 -1
  28. package/schematics/ng-generate/control-flow-migration/bundle.js.map +1 -1
  29. package/schematics/ng-generate/standalone-migration/bundle.js +42 -18
  30. package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
  31. package/testing/index.d.ts +1 -1
@@ -26292,7 +26292,7 @@ function publishFacade(global) {
26292
26292
  }
26293
26293
 
26294
26294
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
26295
- var VERSION2 = new Version("18.0.1");
26295
+ var VERSION2 = new Version("18.1.0-next.0");
26296
26296
 
26297
26297
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
26298
26298
  var _I18N_ATTR = "i18n";
@@ -27386,7 +27386,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
27386
27386
  function compileDeclareClassMetadata(metadata) {
27387
27387
  const definitionMap = new DefinitionMap();
27388
27388
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
27389
- definitionMap.set("version", literal("18.0.1"));
27389
+ definitionMap.set("version", literal("18.1.0-next.0"));
27390
27390
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27391
27391
  definitionMap.set("type", metadata.type);
27392
27392
  definitionMap.set("decorators", metadata.decorators);
@@ -27405,7 +27405,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
27405
27405
  callbackReturnDefinitionMap.set("ctorParameters", (_a2 = metadata.ctorParameters) != null ? _a2 : literal(null));
27406
27406
  callbackReturnDefinitionMap.set("propDecorators", (_b2 = metadata.propDecorators) != null ? _b2 : literal(null));
27407
27407
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
27408
- definitionMap.set("version", literal("18.0.1"));
27408
+ definitionMap.set("version", literal("18.1.0-next.0"));
27409
27409
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27410
27410
  definitionMap.set("type", metadata.type);
27411
27411
  definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
@@ -27473,7 +27473,7 @@ function createDirectiveDefinitionMap(meta) {
27473
27473
  const definitionMap = new DefinitionMap();
27474
27474
  const minVersion = getMinimumVersionForPartialOutput(meta);
27475
27475
  definitionMap.set("minVersion", literal(minVersion));
27476
- definitionMap.set("version", literal("18.0.1"));
27476
+ definitionMap.set("version", literal("18.1.0-next.0"));
27477
27477
  definitionMap.set("type", meta.type.value);
27478
27478
  if (meta.isStandalone) {
27479
27479
  definitionMap.set("isStandalone", literal(meta.isStandalone));
@@ -27791,7 +27791,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION2 = "12.0.0";
27791
27791
  function compileDeclareFactoryFunction(meta) {
27792
27792
  const definitionMap = new DefinitionMap();
27793
27793
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION2));
27794
- definitionMap.set("version", literal("18.0.1"));
27794
+ definitionMap.set("version", literal("18.1.0-next.0"));
27795
27795
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27796
27796
  definitionMap.set("type", meta.type.value);
27797
27797
  definitionMap.set("deps", compileDependencies(meta.deps));
@@ -27814,7 +27814,7 @@ function compileDeclareInjectableFromMetadata(meta) {
27814
27814
  function createInjectableDefinitionMap(meta) {
27815
27815
  const definitionMap = new DefinitionMap();
27816
27816
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
27817
- definitionMap.set("version", literal("18.0.1"));
27817
+ definitionMap.set("version", literal("18.1.0-next.0"));
27818
27818
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27819
27819
  definitionMap.set("type", meta.type.value);
27820
27820
  if (meta.providedIn !== void 0) {
@@ -27852,7 +27852,7 @@ function compileDeclareInjectorFromMetadata(meta) {
27852
27852
  function createInjectorDefinitionMap(meta) {
27853
27853
  const definitionMap = new DefinitionMap();
27854
27854
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
27855
- definitionMap.set("version", literal("18.0.1"));
27855
+ definitionMap.set("version", literal("18.1.0-next.0"));
27856
27856
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27857
27857
  definitionMap.set("type", meta.type.value);
27858
27858
  definitionMap.set("providers", meta.providers);
@@ -27876,7 +27876,7 @@ function createNgModuleDefinitionMap(meta) {
27876
27876
  throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
27877
27877
  }
27878
27878
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
27879
- definitionMap.set("version", literal("18.0.1"));
27879
+ definitionMap.set("version", literal("18.1.0-next.0"));
27880
27880
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27881
27881
  definitionMap.set("type", meta.type.value);
27882
27882
  if (meta.bootstrap.length > 0) {
@@ -27911,7 +27911,7 @@ function compileDeclarePipeFromMetadata(meta) {
27911
27911
  function createPipeDefinitionMap(meta) {
27912
27912
  const definitionMap = new DefinitionMap();
27913
27913
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
27914
- definitionMap.set("version", literal("18.0.1"));
27914
+ definitionMap.set("version", literal("18.1.0-next.0"));
27915
27915
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27916
27916
  definitionMap.set("type", meta.type.value);
27917
27917
  if (meta.isStandalone) {
@@ -27928,7 +27928,7 @@ function createPipeDefinitionMap(meta) {
27928
27928
  publishFacade(_global);
27929
27929
 
27930
27930
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/version.mjs
27931
- var VERSION3 = new Version("18.0.1");
27931
+ var VERSION3 = new Version("18.1.0-next.0");
27932
27932
 
27933
27933
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
27934
27934
  var import_typescript5 = __toESM(require("typescript"), 1);
@@ -28742,6 +28742,9 @@ function typeToValue(typeNode, checker, isLocalCompilation) {
28742
28742
  if (firstDecl.isTypeOnly) {
28743
28743
  return typeOnlyImport(typeNode, firstDecl);
28744
28744
  }
28745
+ if (!import_typescript10.default.isImportDeclaration(firstDecl.parent)) {
28746
+ return unsupportedType(typeNode);
28747
+ }
28745
28748
  return {
28746
28749
  kind: 0,
28747
28750
  expression: firstDecl.name,
@@ -28756,7 +28759,11 @@ function typeToValue(typeNode, checker, isLocalCompilation) {
28756
28759
  }
28757
28760
  const importedName = (firstDecl.propertyName || firstDecl.name).text;
28758
28761
  const [_localName, ...nestedPath] = symbols.symbolNames;
28759
- const moduleName = extractModuleName(firstDecl.parent.parent.parent);
28762
+ const importDeclaration = firstDecl.parent.parent.parent;
28763
+ if (!import_typescript10.default.isImportDeclaration(importDeclaration)) {
28764
+ return unsupportedType(typeNode);
28765
+ }
28766
+ const moduleName = extractModuleName(importDeclaration);
28760
28767
  return {
28761
28768
  kind: 1,
28762
28769
  valueDeclaration: (_a2 = decl.valueDeclaration) != null ? _a2 : null,
@@ -28772,7 +28779,11 @@ function typeToValue(typeNode, checker, isLocalCompilation) {
28772
28779
  return namespaceImport(typeNode, firstDecl.parent);
28773
28780
  }
28774
28781
  const [_ns, importedName, ...nestedPath] = symbols.symbolNames;
28775
- const moduleName = extractModuleName(firstDecl.parent.parent);
28782
+ const importDeclaration = firstDecl.parent.parent;
28783
+ if (!import_typescript10.default.isImportDeclaration(importDeclaration)) {
28784
+ return unsupportedType(typeNode);
28785
+ }
28786
+ const moduleName = extractModuleName(importDeclaration);
28776
28787
  return {
28777
28788
  kind: 1,
28778
28789
  valueDeclaration: (_b2 = decl.valueDeclaration) != null ? _b2 : null,
@@ -29093,13 +29104,13 @@ var TypeScriptReflectionHost = class {
29093
29104
  return null;
29094
29105
  }
29095
29106
  const importDeclaration = namespaceDeclaration.parent.parent;
29096
- if (!import_typescript12.default.isStringLiteral(importDeclaration.moduleSpecifier)) {
29107
+ if (!import_typescript12.default.isImportDeclaration(importDeclaration) || !import_typescript12.default.isStringLiteral(importDeclaration.moduleSpecifier)) {
29097
29108
  return null;
29098
29109
  }
29099
29110
  return {
29100
29111
  from: importDeclaration.moduleSpecifier.text,
29101
29112
  name: id.text,
29102
- node: namespaceDeclaration.parent.parent
29113
+ node: importDeclaration
29103
29114
  };
29104
29115
  }
29105
29116
  getDeclarationOfSymbol(symbol, originalId) {
@@ -29589,6 +29600,10 @@ var LocalCompilationExtraImportsTracker = class {
29589
29600
  this.typeChecker = typeChecker;
29590
29601
  this.localImportsMap = /* @__PURE__ */ new Map();
29591
29602
  this.globalImportsSet = /* @__PURE__ */ new Set();
29603
+ this.markedFilesSet = /* @__PURE__ */ new Set();
29604
+ }
29605
+ markFileForExtraImportGeneration(sf) {
29606
+ this.markedFilesSet.add(sf.fileName);
29592
29607
  }
29593
29608
  addImportForFile(sf, moduleName) {
29594
29609
  if (!this.localImportsMap.has(sf.fileName)) {
@@ -29619,6 +29634,9 @@ var LocalCompilationExtraImportsTracker = class {
29619
29634
  }
29620
29635
  getImportsForFile(sf) {
29621
29636
  var _a2;
29637
+ if (!this.markedFilesSet.has(sf.fileName)) {
29638
+ return [];
29639
+ }
29622
29640
  return [...this.globalImportsSet, ...(_a2 = this.localImportsMap.get(sf.fileName)) != null ? _a2 : []];
29623
29641
  }
29624
29642
  };
@@ -38354,7 +38372,7 @@ var ComponentDecoratorHandler = class {
38354
38372
  return templateSemanticsChecker.getDiagnosticsForComponent(component);
38355
38373
  }
38356
38374
  resolve(node, analysis, symbol) {
38357
- var _a2;
38375
+ var _a2, _b2;
38358
38376
  const metadata = analysis.meta;
38359
38377
  const diagnostics = [];
38360
38378
  const context = getSourceFile(node);
@@ -38400,6 +38418,9 @@ var ComponentDecoratorHandler = class {
38400
38418
  const isModuleScope = scope.kind === ComponentScopeKind.NgModule;
38401
38419
  const dependencies = isModuleScope ? scope.compilation.dependencies : scope.dependencies;
38402
38420
  const explicitlyDeferredDependencies = getExplicitlyDeferredDeps(scope);
38421
+ if (isModuleScope && context.fileName !== getSourceFile(scope.ngModule).fileName) {
38422
+ (_b2 = this.localCompilationExtraImportsTracker) == null ? void 0 : _b2.markFileForExtraImportGeneration(context);
38423
+ }
38403
38424
  if (metadata.isStandalone && analysis.rawDeferredImports !== null && explicitlyDeferredDependencies.length > 0) {
38404
38425
  const diagnostic = validateNoImportOverlap(dependencies, explicitlyDeferredDependencies, analysis.rawDeferredImports);
38405
38426
  if (diagnostic !== null) {
@@ -39416,7 +39437,7 @@ function compareVersions(v1, v2) {
39416
39437
 
39417
39438
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
39418
39439
  var MIN_TS_VERSION = "5.4.0";
39419
- var MAX_TS_VERSION = "5.5.0";
39440
+ var MAX_TS_VERSION = "5.6.0";
39420
39441
  var tsVersion = import_typescript72.default.version;
39421
39442
  function checkVersion(version, minVersion, maxVersion) {
39422
39443
  if (compareVersions(version, minVersion) < 0 || compareVersions(version, maxVersion) >= 0) {
@@ -40919,7 +40940,10 @@ var TsCreateProgramDriver = class {
40919
40940
  this.sfMap.clear();
40920
40941
  }
40921
40942
  for (const [filePath, { newText, originalFile }] of contents.entries()) {
40922
- const sf = import_typescript89.default.createSourceFile(filePath, newText, import_typescript89.default.ScriptTarget.Latest, true);
40943
+ const sf = import_typescript89.default.createSourceFile(filePath, newText, {
40944
+ impliedNodeFormat: void 0,
40945
+ languageVersion: import_typescript89.default.ScriptTarget.Latest
40946
+ }, true);
40923
40947
  if (originalFile !== null) {
40924
40948
  sf[NgOriginalFile] = originalFile;
40925
40949
  }
@@ -50084,7 +50108,7 @@ function getImportOfIdentifier(typeChecker, node) {
50084
50108
  return null;
50085
50109
  }
50086
50110
  const importDecl = decl.parent.parent.parent;
50087
- if (!import_typescript130.default.isStringLiteral(importDecl.moduleSpecifier)) {
50111
+ if (!import_typescript130.default.isImportDeclaration(importDecl) || !import_typescript130.default.isStringLiteral(importDecl.moduleSpecifier)) {
50088
50112
  return null;
50089
50113
  }
50090
50114
  return {