@angular/compiler-cli 21.0.0-next.5 → 21.0.0-next.7

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.
@@ -4,7 +4,7 @@
4
4
 
5
5
  import {
6
6
  angularJitApplicationTransform
7
- } from "./chunk-FO6ETSOL.js";
7
+ } from "./chunk-WX6HCNBV.js";
8
8
  import {
9
9
  AbsoluteModuleStrategy,
10
10
  ActivePerfRecorder,
@@ -92,7 +92,7 @@ import {
92
92
  toUnredirectedSourceFile,
93
93
  tryParseInitializerApi,
94
94
  untagAllTsFiles
95
- } from "./chunk-WXM53XCM.js";
95
+ } from "./chunk-O7L4BBZY.js";
96
96
  import {
97
97
  LogicalFileSystem,
98
98
  absoluteFrom,
@@ -12,7 +12,7 @@ import {
12
12
  formatDiagnostics,
13
13
  performCompilation,
14
14
  readConfiguration
15
- } from "./chunk-PAVVB3HR.js";
15
+ } from "./chunk-3I7LEC2O.js";
16
16
 
17
17
  // packages/compiler-cli/src/main.js
18
18
  import ts2 from "typescript";
@@ -446,7 +446,7 @@ function toR3ClassMetadata(metaObj) {
446
446
  }
447
447
 
448
448
  // packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_component_linker_1.js
449
- import { ChangeDetectionStrategy, compileComponentFromMetadata, DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, makeBindingParser as makeBindingParser2, parseTemplate, R3TargetBinder, R3TemplateDependencyKind, ViewEncapsulation } from "@angular/compiler";
449
+ import { ChangeDetectionStrategy, compileComponentFromMetadata, makeBindingParser as makeBindingParser2, parseTemplate, R3TargetBinder, R3TemplateDependencyKind, ViewEncapsulation } from "@angular/compiler";
450
450
  import semver2 from "semver";
451
451
 
452
452
  // packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_directive_linker_1.js
@@ -455,7 +455,7 @@ import { compileDirectiveFromMetadata, makeBindingParser, ParseLocation, ParseSo
455
455
  // packages/compiler-cli/linker/src/file_linker/partial_linkers/util.js
456
456
  import { createMayBeForwardRefExpression, outputAst as o2 } from "@angular/compiler";
457
457
  import semver from "semver";
458
- var PLACEHOLDER_VERSION = "21.0.0-next.5";
458
+ var PLACEHOLDER_VERSION = "21.0.0-next.7";
459
459
  function wrapReference(wrapped) {
460
460
  return { value: wrapped, type: wrapped };
461
461
  }
@@ -694,7 +694,6 @@ var PartialComponentLinkerVersion1 = class {
694
694
  * This function derives the `R3ComponentMetadata` from the provided AST object.
695
695
  */
696
696
  toR3ComponentMeta(metaObj, version) {
697
- const interpolation = parseInterpolationConfig(metaObj);
698
697
  const templateSource = metaObj.getValue("template");
699
698
  const isInline = metaObj.has("isInline") ? metaObj.getBoolean("isInline") : false;
700
699
  const templateInfo = this.getTemplateInfo(templateSource, isInline);
@@ -703,7 +702,6 @@ var PartialComponentLinkerVersion1 = class {
703
702
  const enableLetSyntax = major > 18 || major === 18 && minor >= 1 || version === PLACEHOLDER_VERSION;
704
703
  const template = parseTemplate(templateInfo.code, templateInfo.sourceUrl, {
705
704
  escapedString: templateInfo.isEscaped,
706
- interpolationConfig: interpolation,
707
705
  range: templateInfo.range,
708
706
  enableI18nLegacyMessageIdFormat: false,
709
707
  preserveWhitespaces: metaObj.has("preserveWhitespaces") ? metaObj.getBoolean("preserveWhitespaces") : false,
@@ -807,7 +805,6 @@ ${errors}`);
807
805
  styles: metaObj.has("styles") ? metaObj.getArray("styles").map((entry) => entry.getString()) : [],
808
806
  defer: deferBlockDependencies,
809
807
  encapsulation: metaObj.has("encapsulation") ? parseEncapsulation(metaObj.getValue("encapsulation")) : ViewEncapsulation.Emulated,
810
- interpolation,
811
808
  changeDetection: metaObj.has("changeDetection") ? parseChangeDetectionStrategy(metaObj.getValue("changeDetection")) : ChangeDetectionStrategy.Default,
812
809
  animations: metaObj.has("animations") ? metaObj.getOpaque("animations") : null,
813
810
  relativeContextFilePath: this.sourceUrl,
@@ -880,17 +877,6 @@ ${errors}`);
880
877
  return result;
881
878
  }
882
879
  };
883
- function parseInterpolationConfig(metaObj) {
884
- if (!metaObj.has("interpolation")) {
885
- return DEFAULT_INTERPOLATION_CONFIG;
886
- }
887
- const interpolationExpr = metaObj.getValue("interpolation");
888
- const values = interpolationExpr.getArray().map((entry) => entry.getString());
889
- if (values.length !== 2) {
890
- throw new FatalLinkerError(interpolationExpr.expression, "Unsupported interpolation config, expected an array containing exactly two strings");
891
- }
892
- return InterpolationConfig.fromArray(values);
893
- }
894
880
  function parseEncapsulation(encapsulation) {
895
881
  const symbolName = encapsulation.getSymbolName();
896
882
  if (symbolName === null) {
@@ -6825,13 +6825,15 @@ function nodeArrayFromDecoratorsArray(decorators) {
6825
6825
  // packages/compiler-cli/src/ngtsc/transform/src/implicit_signal_debug_name_transform.js
6826
6826
  import ts32 from "typescript";
6827
6827
  function insertDebugNameIntoCallExpression(callExpression, debugName) {
6828
- const signalExpressionHasNoArguments = callExpression.arguments.length === 0;
6829
6828
  const signalExpressionIsRequired = isRequiredSignalFunction(callExpression.expression);
6830
6829
  let configPosition = signalExpressionIsRequired ? 0 : 1;
6831
- if (signalExpressionHasNoArguments) {
6830
+ const nodeArgs = Array.from(callExpression.arguments);
6831
+ const signalExpressionHasNoArguments = callExpression.arguments.length === 0;
6832
+ const isLinkedSignal = callExpression.expression.getText() === "linkedSignal";
6833
+ const isComputationLinkedSignal = isLinkedSignal && nodeArgs[0].kind === ts32.SyntaxKind.ObjectLiteralExpression;
6834
+ if (signalExpressionHasNoArguments || isComputationLinkedSignal) {
6832
6835
  configPosition = 0;
6833
6836
  }
6834
- const nodeArgs = Array.from(callExpression.arguments);
6835
6837
  let existingArgument = nodeArgs[configPosition];
6836
6838
  if (existingArgument === void 0) {
6837
6839
  existingArgument = ts32.factory.createObjectLiteralExpression([]);
@@ -6873,7 +6875,7 @@ function insertDebugNameIntoCallExpression(callExpression, debugName) {
6873
6875
  nonDevModeCase
6874
6876
  )));
6875
6877
  let transformedSignalArgs;
6876
- if (signalExpressionIsRequired || signalExpressionHasNoArguments) {
6878
+ if (signalExpressionIsRequired || signalExpressionHasNoArguments || isComputationLinkedSignal) {
6877
6879
  transformedSignalArgs = ts32.factory.createNodeArray([spreadElementContainingUpdatedOptions]);
6878
6880
  } else {
6879
6881
  transformedSignalArgs = ts32.factory.createNodeArray([
@@ -6963,6 +6965,7 @@ function expressionIsUsingAngularCoreImportedSymbol(program, expression) {
6963
6965
  var signalFunctions = /* @__PURE__ */ new Set([
6964
6966
  "signal",
6965
6967
  "computed",
6968
+ "linkedSignal",
6966
6969
  "input",
6967
6970
  "model",
6968
6971
  "viewChild",
@@ -7521,7 +7524,7 @@ var JitDeclarationRegistry = class {
7521
7524
  };
7522
7525
 
7523
7526
  // packages/compiler-cli/src/ngtsc/annotations/component/src/handler.js
7524
- import { compileClassDebugInfo, compileHmrInitializer, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareComponentFromMetadata, compileDeferResolverFunction, ConstantPool as ConstantPool2, CssSelector as CssSelector5, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry as DomElementSchemaRegistry3, ExternalExpr as ExternalExpr10, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser3, outputAst as o5, R3TargetBinder as R3TargetBinder2, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher3, ViewEncapsulation as ViewEncapsulation2, SelectorlessMatcher as SelectorlessMatcher2 } from "@angular/compiler";
7527
+ import { compileClassDebugInfo, compileHmrInitializer, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareComponentFromMetadata, compileDeferResolverFunction, ConstantPool as ConstantPool2, CssSelector as CssSelector5, DomElementSchemaRegistry as DomElementSchemaRegistry3, ExternalExpr as ExternalExpr10, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser3, outputAst as o5, R3TargetBinder as R3TargetBinder2, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher3, ViewEncapsulation as ViewEncapsulation2, SelectorlessMatcher as SelectorlessMatcher2 } from "@angular/compiler";
7525
7528
  import ts73 from "typescript";
7526
7529
 
7527
7530
  // packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.js
@@ -19158,7 +19161,7 @@ function checkCustomElementSelectorForErrors(selector) {
19158
19161
  }
19159
19162
 
19160
19163
  // packages/compiler-cli/src/ngtsc/annotations/component/src/resources.js
19161
- import { DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, ParseSourceFile as ParseSourceFile3, parseTemplate } from "@angular/compiler";
19164
+ import { ParseSourceFile as ParseSourceFile3, parseTemplate } from "@angular/compiler";
19162
19165
  import ts68 from "typescript";
19163
19166
  function getTemplateDeclarationNodeForError(declaration) {
19164
19167
  return declaration.isInline ? declaration.expression : declaration.templateUrlExpression;
@@ -19254,14 +19257,12 @@ function createEmptyTemplate(componentClass, component, containingFile) {
19254
19257
  },
19255
19258
  declaration: templateUrl ? {
19256
19259
  isInline: false,
19257
- interpolationConfig: InterpolationConfig.fromArray(null),
19258
19260
  preserveWhitespaces: false,
19259
19261
  templateUrlExpression: templateUrl,
19260
19262
  templateUrl: "missing.ng.html",
19261
19263
  resolvedTemplateUrl: "/missing.ng.html"
19262
19264
  } : {
19263
19265
  isInline: true,
19264
- interpolationConfig: InterpolationConfig.fromArray(null),
19265
19266
  preserveWhitespaces: false,
19266
19267
  expression: template,
19267
19268
  templateUrl: containingFile,
@@ -19272,7 +19273,6 @@ function createEmptyTemplate(componentClass, component, containingFile) {
19272
19273
  function parseExtractedTemplate(template, sourceStr, sourceParseRange, escapedString, sourceMapUrl, options) {
19273
19274
  const i18nNormalizeLineEndingsInICUs = escapedString || options.i18nNormalizeLineEndingsInICUs;
19274
19275
  const commonParseOptions = {
19275
- interpolationConfig: template.interpolationConfig,
19276
19276
  range: sourceParseRange ?? void 0,
19277
19277
  enableI18nLegacyMessageIdFormat: options.enableI18nLegacyMessageIdFormat,
19278
19278
  i18nNormalizeLineEndingsInICUs,
@@ -19310,14 +19310,12 @@ function parseTemplateDeclaration(node, decorator, component, containingFile, ev
19310
19310
  }
19311
19311
  preserveWhitespaces = value;
19312
19312
  }
19313
- let interpolationConfig = DEFAULT_INTERPOLATION_CONFIG;
19314
19313
  if (component.has("interpolation")) {
19315
19314
  const expr = component.get("interpolation");
19316
19315
  const value = evaluator.evaluate(expr);
19317
19316
  if (!Array.isArray(value) || value.length !== 2 || !value.every((element) => typeof element === "string")) {
19318
19317
  throw createValueHasWrongTypeError(expr, value, "interpolation must be an array with 2 elements of string type");
19319
19318
  }
19320
- interpolationConfig = InterpolationConfig.fromArray(value);
19321
19319
  }
19322
19320
  if (component.has("templateUrl")) {
19323
19321
  const templateUrlExpr = component.get("templateUrl");
@@ -19329,7 +19327,6 @@ function parseTemplateDeclaration(node, decorator, component, containingFile, ev
19329
19327
  const resourceUrl = resourceLoader.resolve(templateUrl, containingFile);
19330
19328
  return {
19331
19329
  isInline: false,
19332
- interpolationConfig,
19333
19330
  preserveWhitespaces,
19334
19331
  templateUrl,
19335
19332
  templateUrlExpression: templateUrlExpr,
@@ -19349,7 +19346,6 @@ function parseTemplateDeclaration(node, decorator, component, containingFile, ev
19349
19346
  } else if (component.has("template")) {
19350
19347
  return {
19351
19348
  isInline: true,
19352
- interpolationConfig,
19353
19349
  preserveWhitespaces,
19354
19350
  expression: component.get("template"),
19355
19351
  templateUrl: containingFile,
@@ -20467,7 +20463,6 @@ var ComponentDecoratorHandler = class {
20467
20463
  template,
20468
20464
  encapsulation,
20469
20465
  changeDetection,
20470
- interpolation: template.interpolationConfig ?? DEFAULT_INTERPOLATION_CONFIG2,
20471
20466
  styles,
20472
20467
  externalStyles,
20473
20468
  // These will be replaced during the compilation step, after all `NgModule`s have been
@@ -20692,7 +20687,7 @@ var ComponentDecoratorHandler = class {
20692
20687
  return { data };
20693
20688
  }
20694
20689
  xi18n(ctx, node, analysis) {
20695
- ctx.updateFromTemplate(analysis.template.content, analysis.template.declaration.resolvedTemplateUrl, analysis.template.interpolationConfig ?? DEFAULT_INTERPOLATION_CONFIG2);
20690
+ ctx.updateFromTemplate(analysis.template.content, analysis.template.declaration.resolvedTemplateUrl);
20696
20691
  }
20697
20692
  updateResources(node, analysis) {
20698
20693
  const containingFile = node.getSourceFile().fileName;
@@ -21272,7 +21267,7 @@ var ComponentDecoratorHandler = class {
21272
21267
  }
21273
21268
  /** Creates a new binding parser. */
21274
21269
  getNewBindingParser() {
21275
- return makeBindingParser3(void 0, this.enableSelectorless);
21270
+ return makeBindingParser3(this.enableSelectorless);
21276
21271
  }
21277
21272
  };
21278
21273
  function createMatcherFromScope(scope, hostDirectivesResolver) {
@@ -16,7 +16,7 @@ import {
16
16
  tryParseSignalInputMapping,
17
17
  tryParseSignalModelMapping,
18
18
  tryParseSignalQueryFromInitializer
19
- } from "./chunk-WXM53XCM.js";
19
+ } from "./chunk-O7L4BBZY.js";
20
20
 
21
21
  // packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.js
22
22
  import ts from "typescript";
package/bundles/index.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  isTsDiagnostic,
29
29
  performCompilation,
30
30
  readConfiguration
31
- } from "./chunk-PAVVB3HR.js";
31
+ } from "./chunk-3I7LEC2O.js";
32
32
  import {
33
33
  ConsoleLogger,
34
34
  LogLevel
@@ -37,7 +37,7 @@ import {
37
37
  angularJitApplicationTransform,
38
38
  getDownlevelDecoratorsTransform,
39
39
  getInitializerApiJitTransform
40
- } from "./chunk-FO6ETSOL.js";
40
+ } from "./chunk-WX6HCNBV.js";
41
41
  import {
42
42
  ActivePerfRecorder,
43
43
  ErrorCode,
@@ -46,7 +46,7 @@ import {
46
46
  TsCreateProgramDriver,
47
47
  isLocalCompilationDiagnostics,
48
48
  ngErrorCode
49
- } from "./chunk-WXM53XCM.js";
49
+ } from "./chunk-O7L4BBZY.js";
50
50
  import "./chunk-LS5RJ5CS.js";
51
51
  import {
52
52
  InvalidFileSystem,
@@ -77,7 +77,7 @@ import "./chunk-G7GFT6BU.js";
77
77
 
78
78
  // packages/compiler-cli/src/version.js
79
79
  import { Version } from "@angular/compiler";
80
- var VERSION = new Version("21.0.0-next.5");
80
+ var VERSION = new Version("21.0.0-next.7");
81
81
 
82
82
  // packages/compiler-cli/private/tooling.js
83
83
  var GLOBAL_DEFS_FOR_TERSER = {
@@ -8,7 +8,7 @@ import {
8
8
  LinkerEnvironment,
9
9
  assert,
10
10
  isFatalLinkerError
11
- } from "../../chunk-KZHANLEJ.js";
11
+ } from "../../chunk-DT6FD4OE.js";
12
12
  import {
13
13
  ConsoleLogger,
14
14
  LogLevel
@@ -10,7 +10,7 @@ import {
10
10
  assert,
11
11
  isFatalLinkerError,
12
12
  needsLinking
13
- } from "../chunk-KZHANLEJ.js";
13
+ } from "../chunk-DT6FD4OE.js";
14
14
  import "../chunk-HYJ2H3FU.js";
15
15
  import "../chunk-LS5RJ5CS.js";
16
16
  import "../chunk-G7GFT6BU.js";
@@ -13,7 +13,7 @@ import {
13
13
  TypeScriptReflectionHost,
14
14
  createForwardRefResolver,
15
15
  reflectObjectLiteral
16
- } from "../chunk-WXM53XCM.js";
16
+ } from "../chunk-O7L4BBZY.js";
17
17
  import "../chunk-LS5RJ5CS.js";
18
18
  import "../chunk-GWZQLAGK.js";
19
19
  import "../chunk-XYYEESKY.js";
@@ -4,8 +4,8 @@
4
4
 
5
5
  import {
6
6
  angularJitApplicationTransform
7
- } from "../chunk-FO6ETSOL.js";
8
- import "../chunk-WXM53XCM.js";
7
+ } from "../chunk-WX6HCNBV.js";
8
+ import "../chunk-O7L4BBZY.js";
9
9
  import "../chunk-LS5RJ5CS.js";
10
10
  import "../chunk-GWZQLAGK.js";
11
11
  import "../chunk-XYYEESKY.js";
@@ -6,12 +6,12 @@
6
6
  import {
7
7
  main,
8
8
  readCommandLineAndConfiguration
9
- } from "../../chunk-4OZZORXD.js";
9
+ } from "../../chunk-CXWG7H5K.js";
10
10
  import {
11
11
  EmitFlags
12
- } from "../../chunk-PAVVB3HR.js";
13
- import "../../chunk-FO6ETSOL.js";
14
- import "../../chunk-WXM53XCM.js";
12
+ } from "../../chunk-3I7LEC2O.js";
13
+ import "../../chunk-WX6HCNBV.js";
14
+ import "../../chunk-O7L4BBZY.js";
15
15
  import "../../chunk-LS5RJ5CS.js";
16
16
  import {
17
17
  setFileSystem
@@ -5,10 +5,10 @@
5
5
 
6
6
  import {
7
7
  main
8
- } from "../../chunk-4OZZORXD.js";
9
- import "../../chunk-PAVVB3HR.js";
10
- import "../../chunk-FO6ETSOL.js";
11
- import "../../chunk-WXM53XCM.js";
8
+ } from "../../chunk-CXWG7H5K.js";
9
+ import "../../chunk-3I7LEC2O.js";
10
+ import "../../chunk-WX6HCNBV.js";
11
+ import "../../chunk-O7L4BBZY.js";
12
12
  import "../../chunk-LS5RJ5CS.js";
13
13
  import {
14
14
  setFileSystem
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { MaybeForwardRefExpression, outputAst as o, R3DeclareDependencyMetadata, R3DependencyMetadata, R3Reference } from '@angular/compiler';
9
9
  import { AstObject, AstValue } from '../../ast/ast_value';
10
- export declare const PLACEHOLDER_VERSION = "21.0.0-next.5";
10
+ export declare const PLACEHOLDER_VERSION = "21.0.0-next.7";
11
11
  export declare function wrapReference<TExpression>(wrapped: o.WrappedNodeExpr<TExpression>): R3Reference;
12
12
  /**
13
13
  * Parses the value of an enum from the AST value's symbol name.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler-cli",
3
- "version": "21.0.0-next.5",
3
+ "version": "21.0.0-next.7",
4
4
  "description": "Angular - the compiler CLI for Node.js",
5
5
  "typings": "index.d.ts",
6
6
  "bin": {
@@ -48,7 +48,7 @@
48
48
  "yargs": "^18.0.0"
49
49
  },
50
50
  "peerDependencies": {
51
- "@angular/compiler": "21.0.0-next.5",
51
+ "@angular/compiler": "21.0.0-next.7",
52
52
  "typescript": ">=5.9 <6.0"
53
53
  },
54
54
  "peerDependenciesMeta": {
@@ -5,7 +5,7 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
- import { InterpolationConfig, ParsedTemplate, ParseSourceFile, TmplAstNode } from '@angular/compiler';
8
+ import { ParsedTemplate, ParseSourceFile, TmplAstNode } from '@angular/compiler';
9
9
  import ts from 'typescript';
10
10
  import { FatalDiagnosticError } from '../../../diagnostics';
11
11
  import { DependencyTracker } from '../../../incremental/api';
@@ -66,7 +66,6 @@ export interface ParsedTemplateWithSource extends ParsedComponentTemplate {
66
66
  */
67
67
  interface CommonTemplateDeclaration {
68
68
  preserveWhitespaces: boolean;
69
- interpolationConfig: InterpolationConfig;
70
69
  templateUrl: string;
71
70
  resolvedTemplateUrl: string;
72
71
  }
@@ -5,7 +5,6 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
- import { InterpolationConfig } from '@angular/compiler';
9
8
  /**
10
9
  * Captures template information intended for extraction of i18n messages from a template.
11
10
  *
@@ -21,5 +20,5 @@ export interface Xi18nContext {
21
20
  * the return type is declared as `void` for simplicity, since any parse errors would be reported
22
21
  * as diagnostics anyway.
23
22
  */
24
- updateFromTemplate(html: string, url: string, interpolationConfig: InterpolationConfig): void;
23
+ updateFromTemplate(html: string, url: string): void;
25
24
  }