@angular/core 18.0.0 → 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.
- package/esm2022/primitives/event-dispatch/index.mjs +3 -2
- package/esm2022/primitives/event-dispatch/src/action_resolver.mjs +51 -35
- package/esm2022/primitives/event-dispatch/src/dispatcher.mjs +5 -4
- package/esm2022/primitives/event-dispatch/src/event.mjs +3 -7
- package/esm2022/primitives/event-dispatch/src/event_dispatcher.mjs +130 -0
- package/esm2022/primitives/event-dispatch/src/event_type.mjs +85 -1
- package/esm2022/primitives/event-dispatch/src/eventcontract.mjs +5 -8
- package/esm2022/src/application/create_application.mjs +8 -3
- package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +4 -11
- package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +2 -2
- package/esm2022/src/core_private_export.mjs +2 -1
- package/esm2022/src/core_render3_private_export.mjs +1 -1
- package/esm2022/src/error_details_base_url.mjs +2 -2
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/hydration/annotate.mjs +11 -6
- package/esm2022/src/hydration/event_replay.mjs +23 -26
- package/esm2022/src/image_performance_warning.mjs +3 -3
- package/esm2022/src/linker/view_ref.mjs +2 -2
- package/esm2022/src/platform/platform_ref.mjs +10 -3
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/hooks.mjs +1 -1
- package/esm2022/src/render3/instructions/listener.mjs +4 -7
- package/esm2022/src/render3/instructions/shared.mjs +1 -1
- package/esm2022/src/render3/node_manipulation.mjs +1 -1
- package/esm2022/src/render3/profiler.mjs +1 -1
- package/esm2022/src/render3/profiler_types.mjs +9 -0
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed_compiler.mjs +7 -3
- package/fesm2022/core.mjs +231 -230
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1402 -1188
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +7 -3
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +43 -7
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +45 -117
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/http-providers/bundle.js +1 -1
- package/schematics/migrations/http-providers/bundle.js.map +2 -2
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +4 -2
- package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +2 -2
- package/schematics/ng-generate/control-flow-migration/bundle.js +5 -3
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +2 -2
- package/schematics/ng-generate/standalone-migration/bundle.js +47 -21
- package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
- package/testing/index.d.ts +1 -1
- package/esm2022/src/change_detection/scheduling/flags.mjs +0 -10
|
@@ -21478,7 +21478,7 @@ function optimizeTrackFns(job) {
|
|
|
21478
21478
|
}
|
|
21479
21479
|
}
|
|
21480
21480
|
function isTrackByFunctionCall(rootView, expr) {
|
|
21481
|
-
if (!(expr instanceof InvokeFunctionExpr) || expr.args.length
|
|
21481
|
+
if (!(expr instanceof InvokeFunctionExpr) || expr.args.length === 0 || expr.args.length > 2) {
|
|
21482
21482
|
return false;
|
|
21483
21483
|
}
|
|
21484
21484
|
if (!(expr.receiver instanceof ReadPropExpr && expr.receiver.receiver instanceof ContextExpr) || expr.receiver.receiver.view !== rootView) {
|
|
@@ -21487,6 +21487,8 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
21487
21487
|
const [arg0, arg1] = expr.args;
|
|
21488
21488
|
if (!(arg0 instanceof ReadVarExpr) || arg0.name !== "$index") {
|
|
21489
21489
|
return false;
|
|
21490
|
+
} else if (expr.args.length === 1) {
|
|
21491
|
+
return true;
|
|
21490
21492
|
}
|
|
21491
21493
|
if (!(arg1 instanceof ReadVarExpr) || arg1.name !== "$item") {
|
|
21492
21494
|
return false;
|
|
@@ -26290,7 +26292,7 @@ function publishFacade(global) {
|
|
|
26290
26292
|
}
|
|
26291
26293
|
|
|
26292
26294
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
26293
|
-
var VERSION2 = new Version("18.0.0");
|
|
26295
|
+
var VERSION2 = new Version("18.1.0-next.0");
|
|
26294
26296
|
|
|
26295
26297
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
26296
26298
|
var _I18N_ATTR = "i18n";
|
|
@@ -27384,7 +27386,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
|
|
|
27384
27386
|
function compileDeclareClassMetadata(metadata) {
|
|
27385
27387
|
const definitionMap = new DefinitionMap();
|
|
27386
27388
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
27387
|
-
definitionMap.set("version", literal("18.0.0"));
|
|
27389
|
+
definitionMap.set("version", literal("18.1.0-next.0"));
|
|
27388
27390
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27389
27391
|
definitionMap.set("type", metadata.type);
|
|
27390
27392
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -27403,7 +27405,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
27403
27405
|
callbackReturnDefinitionMap.set("ctorParameters", (_a2 = metadata.ctorParameters) != null ? _a2 : literal(null));
|
|
27404
27406
|
callbackReturnDefinitionMap.set("propDecorators", (_b2 = metadata.propDecorators) != null ? _b2 : literal(null));
|
|
27405
27407
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
27406
|
-
definitionMap.set("version", literal("18.0.0"));
|
|
27408
|
+
definitionMap.set("version", literal("18.1.0-next.0"));
|
|
27407
27409
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27408
27410
|
definitionMap.set("type", metadata.type);
|
|
27409
27411
|
definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -27471,7 +27473,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
27471
27473
|
const definitionMap = new DefinitionMap();
|
|
27472
27474
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
27473
27475
|
definitionMap.set("minVersion", literal(minVersion));
|
|
27474
|
-
definitionMap.set("version", literal("18.0.0"));
|
|
27476
|
+
definitionMap.set("version", literal("18.1.0-next.0"));
|
|
27475
27477
|
definitionMap.set("type", meta.type.value);
|
|
27476
27478
|
if (meta.isStandalone) {
|
|
27477
27479
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -27789,7 +27791,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION2 = "12.0.0";
|
|
|
27789
27791
|
function compileDeclareFactoryFunction(meta) {
|
|
27790
27792
|
const definitionMap = new DefinitionMap();
|
|
27791
27793
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION2));
|
|
27792
|
-
definitionMap.set("version", literal("18.0.0"));
|
|
27794
|
+
definitionMap.set("version", literal("18.1.0-next.0"));
|
|
27793
27795
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27794
27796
|
definitionMap.set("type", meta.type.value);
|
|
27795
27797
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -27812,7 +27814,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
27812
27814
|
function createInjectableDefinitionMap(meta) {
|
|
27813
27815
|
const definitionMap = new DefinitionMap();
|
|
27814
27816
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
|
|
27815
|
-
definitionMap.set("version", literal("18.0.0"));
|
|
27817
|
+
definitionMap.set("version", literal("18.1.0-next.0"));
|
|
27816
27818
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27817
27819
|
definitionMap.set("type", meta.type.value);
|
|
27818
27820
|
if (meta.providedIn !== void 0) {
|
|
@@ -27850,7 +27852,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
27850
27852
|
function createInjectorDefinitionMap(meta) {
|
|
27851
27853
|
const definitionMap = new DefinitionMap();
|
|
27852
27854
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
|
|
27853
|
-
definitionMap.set("version", literal("18.0.0"));
|
|
27855
|
+
definitionMap.set("version", literal("18.1.0-next.0"));
|
|
27854
27856
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27855
27857
|
definitionMap.set("type", meta.type.value);
|
|
27856
27858
|
definitionMap.set("providers", meta.providers);
|
|
@@ -27874,7 +27876,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
27874
27876
|
throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
|
|
27875
27877
|
}
|
|
27876
27878
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
|
|
27877
|
-
definitionMap.set("version", literal("18.0.0"));
|
|
27879
|
+
definitionMap.set("version", literal("18.1.0-next.0"));
|
|
27878
27880
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27879
27881
|
definitionMap.set("type", meta.type.value);
|
|
27880
27882
|
if (meta.bootstrap.length > 0) {
|
|
@@ -27909,7 +27911,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
27909
27911
|
function createPipeDefinitionMap(meta) {
|
|
27910
27912
|
const definitionMap = new DefinitionMap();
|
|
27911
27913
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
|
|
27912
|
-
definitionMap.set("version", literal("18.0.0"));
|
|
27914
|
+
definitionMap.set("version", literal("18.1.0-next.0"));
|
|
27913
27915
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27914
27916
|
definitionMap.set("type", meta.type.value);
|
|
27915
27917
|
if (meta.isStandalone) {
|
|
@@ -27926,7 +27928,7 @@ function createPipeDefinitionMap(meta) {
|
|
|
27926
27928
|
publishFacade(_global);
|
|
27927
27929
|
|
|
27928
27930
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/version.mjs
|
|
27929
|
-
var VERSION3 = new Version("18.0.0");
|
|
27931
|
+
var VERSION3 = new Version("18.1.0-next.0");
|
|
27930
27932
|
|
|
27931
27933
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
|
|
27932
27934
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
@@ -28103,7 +28105,7 @@ function isFatalDiagnosticError(err) {
|
|
|
28103
28105
|
}
|
|
28104
28106
|
|
|
28105
28107
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.mjs
|
|
28106
|
-
var ERROR_DETAILS_PAGE_BASE_URL = "https://angular.
|
|
28108
|
+
var ERROR_DETAILS_PAGE_BASE_URL = "https://angular.dev/errors";
|
|
28107
28109
|
|
|
28108
28110
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.mjs
|
|
28109
28111
|
var ExtendedTemplateDiagnosticName;
|
|
@@ -28740,6 +28742,9 @@ function typeToValue(typeNode, checker, isLocalCompilation) {
|
|
|
28740
28742
|
if (firstDecl.isTypeOnly) {
|
|
28741
28743
|
return typeOnlyImport(typeNode, firstDecl);
|
|
28742
28744
|
}
|
|
28745
|
+
if (!import_typescript10.default.isImportDeclaration(firstDecl.parent)) {
|
|
28746
|
+
return unsupportedType(typeNode);
|
|
28747
|
+
}
|
|
28743
28748
|
return {
|
|
28744
28749
|
kind: 0,
|
|
28745
28750
|
expression: firstDecl.name,
|
|
@@ -28754,7 +28759,11 @@ function typeToValue(typeNode, checker, isLocalCompilation) {
|
|
|
28754
28759
|
}
|
|
28755
28760
|
const importedName = (firstDecl.propertyName || firstDecl.name).text;
|
|
28756
28761
|
const [_localName, ...nestedPath] = symbols.symbolNames;
|
|
28757
|
-
const
|
|
28762
|
+
const importDeclaration = firstDecl.parent.parent.parent;
|
|
28763
|
+
if (!import_typescript10.default.isImportDeclaration(importDeclaration)) {
|
|
28764
|
+
return unsupportedType(typeNode);
|
|
28765
|
+
}
|
|
28766
|
+
const moduleName = extractModuleName(importDeclaration);
|
|
28758
28767
|
return {
|
|
28759
28768
|
kind: 1,
|
|
28760
28769
|
valueDeclaration: (_a2 = decl.valueDeclaration) != null ? _a2 : null,
|
|
@@ -28770,7 +28779,11 @@ function typeToValue(typeNode, checker, isLocalCompilation) {
|
|
|
28770
28779
|
return namespaceImport(typeNode, firstDecl.parent);
|
|
28771
28780
|
}
|
|
28772
28781
|
const [_ns, importedName, ...nestedPath] = symbols.symbolNames;
|
|
28773
|
-
const
|
|
28782
|
+
const importDeclaration = firstDecl.parent.parent;
|
|
28783
|
+
if (!import_typescript10.default.isImportDeclaration(importDeclaration)) {
|
|
28784
|
+
return unsupportedType(typeNode);
|
|
28785
|
+
}
|
|
28786
|
+
const moduleName = extractModuleName(importDeclaration);
|
|
28774
28787
|
return {
|
|
28775
28788
|
kind: 1,
|
|
28776
28789
|
valueDeclaration: (_b2 = decl.valueDeclaration) != null ? _b2 : null,
|
|
@@ -29091,13 +29104,13 @@ var TypeScriptReflectionHost = class {
|
|
|
29091
29104
|
return null;
|
|
29092
29105
|
}
|
|
29093
29106
|
const importDeclaration = namespaceDeclaration.parent.parent;
|
|
29094
|
-
if (!import_typescript12.default.isStringLiteral(importDeclaration.moduleSpecifier)) {
|
|
29107
|
+
if (!import_typescript12.default.isImportDeclaration(importDeclaration) || !import_typescript12.default.isStringLiteral(importDeclaration.moduleSpecifier)) {
|
|
29095
29108
|
return null;
|
|
29096
29109
|
}
|
|
29097
29110
|
return {
|
|
29098
29111
|
from: importDeclaration.moduleSpecifier.text,
|
|
29099
29112
|
name: id.text,
|
|
29100
|
-
node:
|
|
29113
|
+
node: importDeclaration
|
|
29101
29114
|
};
|
|
29102
29115
|
}
|
|
29103
29116
|
getDeclarationOfSymbol(symbol, originalId) {
|
|
@@ -29587,6 +29600,10 @@ var LocalCompilationExtraImportsTracker = class {
|
|
|
29587
29600
|
this.typeChecker = typeChecker;
|
|
29588
29601
|
this.localImportsMap = /* @__PURE__ */ new Map();
|
|
29589
29602
|
this.globalImportsSet = /* @__PURE__ */ new Set();
|
|
29603
|
+
this.markedFilesSet = /* @__PURE__ */ new Set();
|
|
29604
|
+
}
|
|
29605
|
+
markFileForExtraImportGeneration(sf) {
|
|
29606
|
+
this.markedFilesSet.add(sf.fileName);
|
|
29590
29607
|
}
|
|
29591
29608
|
addImportForFile(sf, moduleName) {
|
|
29592
29609
|
if (!this.localImportsMap.has(sf.fileName)) {
|
|
@@ -29617,6 +29634,9 @@ var LocalCompilationExtraImportsTracker = class {
|
|
|
29617
29634
|
}
|
|
29618
29635
|
getImportsForFile(sf) {
|
|
29619
29636
|
var _a2;
|
|
29637
|
+
if (!this.markedFilesSet.has(sf.fileName)) {
|
|
29638
|
+
return [];
|
|
29639
|
+
}
|
|
29620
29640
|
return [...this.globalImportsSet, ...(_a2 = this.localImportsMap.get(sf.fileName)) != null ? _a2 : []];
|
|
29621
29641
|
}
|
|
29622
29642
|
};
|
|
@@ -38352,7 +38372,7 @@ var ComponentDecoratorHandler = class {
|
|
|
38352
38372
|
return templateSemanticsChecker.getDiagnosticsForComponent(component);
|
|
38353
38373
|
}
|
|
38354
38374
|
resolve(node, analysis, symbol) {
|
|
38355
|
-
var _a2;
|
|
38375
|
+
var _a2, _b2;
|
|
38356
38376
|
const metadata = analysis.meta;
|
|
38357
38377
|
const diagnostics = [];
|
|
38358
38378
|
const context = getSourceFile(node);
|
|
@@ -38398,6 +38418,9 @@ var ComponentDecoratorHandler = class {
|
|
|
38398
38418
|
const isModuleScope = scope.kind === ComponentScopeKind.NgModule;
|
|
38399
38419
|
const dependencies = isModuleScope ? scope.compilation.dependencies : scope.dependencies;
|
|
38400
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
|
+
}
|
|
38401
38424
|
if (metadata.isStandalone && analysis.rawDeferredImports !== null && explicitlyDeferredDependencies.length > 0) {
|
|
38402
38425
|
const diagnostic = validateNoImportOverlap(dependencies, explicitlyDeferredDependencies, analysis.rawDeferredImports);
|
|
38403
38426
|
if (diagnostic !== null) {
|
|
@@ -39414,7 +39437,7 @@ function compareVersions(v1, v2) {
|
|
|
39414
39437
|
|
|
39415
39438
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
39416
39439
|
var MIN_TS_VERSION = "5.4.0";
|
|
39417
|
-
var MAX_TS_VERSION = "5.
|
|
39440
|
+
var MAX_TS_VERSION = "5.6.0";
|
|
39418
39441
|
var tsVersion = import_typescript72.default.version;
|
|
39419
39442
|
function checkVersion(version, minVersion, maxVersion) {
|
|
39420
39443
|
if (compareVersions(version, minVersion) < 0 || compareVersions(version, maxVersion) >= 0) {
|
|
@@ -40917,7 +40940,10 @@ var TsCreateProgramDriver = class {
|
|
|
40917
40940
|
this.sfMap.clear();
|
|
40918
40941
|
}
|
|
40919
40942
|
for (const [filePath, { newText, originalFile }] of contents.entries()) {
|
|
40920
|
-
const sf = import_typescript89.default.createSourceFile(filePath, newText,
|
|
40943
|
+
const sf = import_typescript89.default.createSourceFile(filePath, newText, {
|
|
40944
|
+
impliedNodeFormat: void 0,
|
|
40945
|
+
languageVersion: import_typescript89.default.ScriptTarget.Latest
|
|
40946
|
+
}, true);
|
|
40921
40947
|
if (originalFile !== null) {
|
|
40922
40948
|
sf[NgOriginalFile] = originalFile;
|
|
40923
40949
|
}
|
|
@@ -47924,7 +47950,7 @@ var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
|
|
|
47924
47950
|
if (symbol !== null && symbol.kind === SymbolKind.Input) {
|
|
47925
47951
|
return [];
|
|
47926
47952
|
}
|
|
47927
|
-
if (node.type === BindingType.Property && node.value instanceof ASTWithSource && node.value.ast instanceof PropertyRead) {
|
|
47953
|
+
if ((node.type === BindingType.Property || node.type === BindingType.Class || node.type === BindingType.Style || node.type === BindingType.Attribute || node.type === BindingType.Animation) && node.value instanceof ASTWithSource && node.value.ast instanceof PropertyRead) {
|
|
47928
47954
|
return buildDiagnosticForSignal(ctx, node.value.ast, component);
|
|
47929
47955
|
}
|
|
47930
47956
|
}
|
|
@@ -50082,7 +50108,7 @@ function getImportOfIdentifier(typeChecker, node) {
|
|
|
50082
50108
|
return null;
|
|
50083
50109
|
}
|
|
50084
50110
|
const importDecl = decl.parent.parent.parent;
|
|
50085
|
-
if (!import_typescript130.default.isStringLiteral(importDecl.moduleSpecifier)) {
|
|
50111
|
+
if (!import_typescript130.default.isImportDeclaration(importDecl) || !import_typescript130.default.isStringLiteral(importDecl.moduleSpecifier)) {
|
|
50086
50112
|
return null;
|
|
50087
50113
|
}
|
|
50088
50114
|
return {
|