@angular/compiler-cli 21.0.8 → 21.0.9

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.
@@ -12,7 +12,7 @@ import {
12
12
  formatDiagnostics,
13
13
  performCompilation,
14
14
  readConfiguration
15
- } from "./chunk-SGVDYEOA.js";
15
+ } from "./chunk-CFSUVBJB.js";
16
16
 
17
17
  // packages/compiler-cli/src/main.js
18
18
  import ts2 from "typescript";
@@ -8,7 +8,7 @@ import {
8
8
  TrackedIncrementalBuildStrategy,
9
9
  freshCompilationTicket,
10
10
  incrementalFromCompilerTicket
11
- } from "./chunk-IVLAY5II.js";
11
+ } from "./chunk-VKWJIB5P.js";
12
12
  import {
13
13
  ActivePerfRecorder,
14
14
  OptimizeFor,
@@ -18,7 +18,7 @@ import {
18
18
  TsCreateProgramDriver,
19
19
  replaceTsWithNgInErrors,
20
20
  retagAllTsFiles
21
- } from "./chunk-ULL25HYK.js";
21
+ } from "./chunk-RIZLEUXC.js";
22
22
  import {
23
23
  absoluteFrom,
24
24
  createFileSystemTsReadDirectoryFn,
@@ -227,9 +227,14 @@ var COMPILER_ERRORS_WITH_GUIDES = /* @__PURE__ */ new Set([
227
227
 
228
228
  // packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.js
229
229
  import { VERSION } from "@angular/compiler";
230
+ var DOC_PAGE_BASE_URL = (() => {
231
+ const full = VERSION.full;
232
+ const isPreRelease = full.includes("-next") || full.includes("-rc") || full === "21.0.9";
233
+ const prefix = isPreRelease ? "next" : `v${VERSION.major}`;
234
+ return `https://${prefix}.angular.dev`;
235
+ })();
230
236
  var ERROR_DETAILS_PAGE_BASE_URL = (() => {
231
- const versionSubDomain = VERSION.major !== "0" ? `v${VERSION.major}.` : "";
232
- return `https://${versionSubDomain}angular.dev/errors`;
237
+ return `${DOC_PAGE_BASE_URL}/errors`;
233
238
  })();
234
239
 
235
240
  // packages/compiler-cli/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.js
@@ -13684,7 +13689,7 @@ var Environment = class extends ReferenceEmitEnvironment {
13684
13689
  };
13685
13690
 
13686
13691
  // packages/compiler-cli/src/ngtsc/typecheck/src/oob.js
13687
- import { AbsoluteSourceSpan as AbsoluteSourceSpan3, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent as TmplAstBoundEvent2, TmplAstComponent, TmplAstDirective, TmplAstElement, ParseSourceSpan as ParseSourceSpan2, BindingType as BindingType2 } from "@angular/compiler";
13692
+ import { AbsoluteSourceSpan as AbsoluteSourceSpan3, BindingType as BindingType2, ParseSourceSpan as ParseSourceSpan2, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent as TmplAstBoundEvent2, TmplAstComponent, TmplAstDirective, TmplAstElement } from "@angular/compiler";
13688
13693
  import ts58 from "typescript";
13689
13694
  var OutOfBandDiagnosticRecorderImpl = class {
13690
13695
  resolver;
@@ -13819,7 +13824,7 @@ Consider enabling the 'strictTemplates' option in your tsconfig.json for better
13819
13824
  splitTwoWayBinding(id, input, output, inputConsumer, outputConsumer) {
13820
13825
  const mapping = this.resolver.getTemplateSourceMapping(id);
13821
13826
  const errorMsg = `The property and event halves of the two-way binding '${input.name}' are not bound to the same target.
13822
- Find more at https://angular.dev/guide/templates/two-way-binding#how-two-way-binding-works`;
13827
+ Find more at ${DOC_PAGE_BASE_URL}/guide/templates/two-way-binding`;
13823
13828
  const relatedMessages = [];
13824
13829
  relatedMessages.push({
13825
13830
  text: `The property half of the binding is to the '${inputConsumer.name.text}' component.`,
@@ -13959,9 +13964,9 @@ Deferred blocks can only access triggers in same view, a parent embedded view or
13959
13964
  } else {
13960
13965
  name = node.name;
13961
13966
  }
13962
- message = `Binding to '${name}' is not allowed on nodes using the '[field]' directive`;
13967
+ message = `Binding to '${name}' is not allowed on nodes using the '[formField]' directive`;
13963
13968
  } else {
13964
- message = `Setting the '${node.name}' attribute is not allowed on nodes using the '[field]' directive`;
13969
+ message = `Setting the '${node.name}' attribute is not allowed on nodes using the '[formField]' directive`;
13965
13970
  }
13966
13971
  this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), node.sourceSpan, ts58.DiagnosticCategory.Error, ngErrorCode(ErrorCode.FORM_FIELD_UNSUPPORTED_BINDING), message));
13967
13972
  }
@@ -15204,7 +15209,7 @@ var TcbNativeFieldOp = class extends TcbOp {
15204
15209
  }
15205
15210
  execute() {
15206
15211
  const inputs = this.node instanceof TmplAstHostElement2 ? this.node.bindings : this.node.inputs;
15207
- const fieldBinding = inputs.find((input) => input.type === BindingType3.Property && (input.name === "field" || input.name === "formField")) ?? null;
15212
+ const fieldBinding = inputs.find((input) => input.type === BindingType3.Property && input.name === "formField") ?? null;
15208
15213
  if (fieldBinding === null) {
15209
15214
  return null;
15210
15215
  }
@@ -15284,7 +15289,7 @@ var TcbNativeRadioButtonFieldOp = class extends TcbNativeFieldOp {
15284
15289
  }
15285
15290
  };
15286
15291
  function expandBoundAttributesForField(directive, node, customFormControlType) {
15287
- const fieldBinding = node.inputs.find((input) => input.type === BindingType3.Property && (input.name === "field" || input.name === "formField"));
15292
+ const fieldBinding = node.inputs.find((input) => input.type === BindingType3.Property && input.name === "formField");
15288
15293
  if (!fieldBinding) {
15289
15294
  return null;
15290
15295
  }
@@ -15311,7 +15316,7 @@ function expandBoundAttributesForField(directive, node, customFormControlType) {
15311
15316
  return boundInputs;
15312
15317
  }
15313
15318
  function isFieldDirective(meta) {
15314
- if (meta.name !== "Field" && meta.name !== "FormField") {
15319
+ if (meta.name !== "FormField") {
15315
15320
  return false;
15316
15321
  }
15317
15322
  if (meta.ref.bestGuessOwningModule?.specifier === "@angular/forms/signals") {
@@ -15399,7 +15404,7 @@ function hasModelInput(name, meta) {
15399
15404
  function isFormControl(allDirectiveMatches) {
15400
15405
  let result = false;
15401
15406
  for (const match of allDirectiveMatches) {
15402
- if (match.inputs.hasBindingPropertyName("field")) {
15407
+ if (match.inputs.hasBindingPropertyName("formField")) {
15403
15408
  if (!isFieldDirective(match)) {
15404
15409
  return false;
15405
15410
  }
@@ -22953,6 +22958,7 @@ export {
22953
22958
  makeDiagnostic,
22954
22959
  isFatalDiagnosticError,
22955
22960
  isLocalCompilationDiagnostics,
22961
+ DOC_PAGE_BASE_URL,
22956
22962
  ERROR_DETAILS_PAGE_BASE_URL,
22957
22963
  ExtendedTemplateDiagnosticName,
22958
22964
  isDtsPath,
@@ -13,6 +13,7 @@ import {
13
13
  CompoundComponentScopeReader,
14
14
  CompoundMetadataReader,
15
15
  CompoundMetadataRegistry,
16
+ DOC_PAGE_BASE_URL,
16
17
  DefaultImportTracker,
17
18
  DeferredSymbolTracker,
18
19
  DelegatingPerfRecorder,
@@ -87,7 +88,7 @@ import {
87
88
  toUnredirectedSourceFile,
88
89
  tryParseInitializerApi,
89
90
  untagAllTsFiles
90
- } from "./chunk-ULL25HYK.js";
91
+ } from "./chunk-RIZLEUXC.js";
91
92
  import {
92
93
  LogicalFileSystem,
93
94
  absoluteFromSourceFile,
@@ -3042,7 +3043,7 @@ var InvalidBananaInBoxCheck = class extends TemplateCheckWithVisitor {
3042
3043
  const boundSyntax = node.sourceSpan.toString();
3043
3044
  const expectedBoundSyntax = boundSyntax.replace(`(${name})`, `[(${name.slice(1, -1)})]`);
3044
3045
  const diagnostic = ctx.makeTemplateDiagnostic(node.sourceSpan, `In the two-way binding syntax the parentheses should be inside the brackets, ex. '${expectedBoundSyntax}'.
3045
- Find more at https://angular.dev/guide/templates/two-way-binding`);
3046
+ Find more at ${DOC_PAGE_BASE_URL}/guide/templates/two-way-binding`);
3046
3047
  return [diagnostic];
3047
3048
  }
3048
3049
  };
@@ -4965,7 +4966,7 @@ One of the following actions is required:
4965
4966
  2. Remove "strictTemplates" or set it to 'false'.
4966
4967
 
4967
4968
  More information about the template type checking compiler options can be found in the documentation:
4968
- https://angular.dev/tools/cli/template-typecheck
4969
+ ${DOC_PAGE_BASE_URL}/tools/cli/template-typecheck
4969
4970
  `.trim()
4970
4971
  });
4971
4972
  }
@@ -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.8";
458
+ var PLACEHOLDER_VERSION = "21.0.9";
459
459
  function wrapReference(wrapped) {
460
460
  return { value: wrapped, type: wrapped };
461
461
  }
package/bundles/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  isTsDiagnostic,
18
18
  performCompilation,
19
19
  readConfiguration
20
- } from "./chunk-SGVDYEOA.js";
20
+ } from "./chunk-CFSUVBJB.js";
21
21
  import {
22
22
  ConsoleLogger,
23
23
  LogLevel
@@ -34,7 +34,7 @@ import {
34
34
  freshCompilationTicket,
35
35
  incrementalFromStateTicket,
36
36
  isDocEntryWithSourceInfo
37
- } from "./chunk-IVLAY5II.js";
37
+ } from "./chunk-VKWJIB5P.js";
38
38
  import {
39
39
  ActivePerfRecorder,
40
40
  ErrorCode,
@@ -46,7 +46,7 @@ import {
46
46
  getInitializerApiJitTransform,
47
47
  isLocalCompilationDiagnostics,
48
48
  ngErrorCode
49
- } from "./chunk-ULL25HYK.js";
49
+ } from "./chunk-RIZLEUXC.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.8");
80
+ var VERSION = new Version("21.0.9");
81
81
 
82
82
  // packages/compiler-cli/private/tooling.js
83
83
  var GLOBAL_DEFS_FOR_TERSER = {
@@ -5,7 +5,7 @@
5
5
  import {
6
6
  DiagnosticCategoryLabel,
7
7
  NgCompiler
8
- } from "../chunk-IVLAY5II.js";
8
+ } from "../chunk-VKWJIB5P.js";
9
9
  import {
10
10
  CompilationMode,
11
11
  DtsMetadataReader,
@@ -32,7 +32,7 @@ import {
32
32
  queryDecoratorNames,
33
33
  reflectObjectLiteral,
34
34
  unwrapExpression
35
- } from "../chunk-ULL25HYK.js";
35
+ } from "../chunk-RIZLEUXC.js";
36
36
  import "../chunk-LS5RJ5CS.js";
37
37
  import {
38
38
  getFileSystem,
@@ -6,7 +6,7 @@ import {
6
6
  ImportedSymbolsTracker,
7
7
  TypeScriptReflectionHost,
8
8
  getInitializerApiJitTransform
9
- } from "../chunk-ULL25HYK.js";
9
+ } from "../chunk-RIZLEUXC.js";
10
10
  import "../chunk-LS5RJ5CS.js";
11
11
  import {
12
12
  InvalidFileSystem,
@@ -4,7 +4,7 @@
4
4
 
5
5
  import {
6
6
  angularJitApplicationTransform
7
- } from "../chunk-ULL25HYK.js";
7
+ } from "../chunk-RIZLEUXC.js";
8
8
  import "../chunk-LS5RJ5CS.js";
9
9
  import "../chunk-JEXAXD23.js";
10
10
  import "../chunk-XYYEESKY.js";
@@ -6,12 +6,12 @@
6
6
  import {
7
7
  main,
8
8
  readCommandLineAndConfiguration
9
- } from "../../chunk-OQOYWATZ.js";
9
+ } from "../../chunk-3M5JDMHF.js";
10
10
  import {
11
11
  EmitFlags
12
- } from "../../chunk-SGVDYEOA.js";
13
- import "../../chunk-IVLAY5II.js";
14
- import "../../chunk-ULL25HYK.js";
12
+ } from "../../chunk-CFSUVBJB.js";
13
+ import "../../chunk-VKWJIB5P.js";
14
+ import "../../chunk-RIZLEUXC.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-OQOYWATZ.js";
9
- import "../../chunk-SGVDYEOA.js";
10
- import "../../chunk-IVLAY5II.js";
11
- import "../../chunk-ULL25HYK.js";
8
+ } from "../../chunk-3M5JDMHF.js";
9
+ import "../../chunk-CFSUVBJB.js";
10
+ import "../../chunk-VKWJIB5P.js";
11
+ import "../../chunk-RIZLEUXC.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.8";
10
+ export declare const PLACEHOLDER_VERSION = "21.0.9";
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.8",
3
+ "version": "21.0.9",
4
4
  "description": "Angular - the compiler CLI for Node.js",
5
5
  "typings": "index.d.ts",
6
6
  "bin": {
@@ -40,7 +40,7 @@
40
40
  "yargs": "^18.0.0"
41
41
  },
42
42
  "peerDependencies": {
43
- "@angular/compiler": "21.0.8",
43
+ "@angular/compiler": "21.0.9",
44
44
  "typescript": ">=5.9 <6.0"
45
45
  },
46
46
  "peerDependenciesMeta": {
@@ -8,6 +8,6 @@
8
8
  export { COMPILER_ERRORS_WITH_GUIDES } from './src/docs';
9
9
  export { addDiagnosticChain, FatalDiagnosticError, isFatalDiagnosticError, isLocalCompilationDiagnostics, makeDiagnostic, makeDiagnosticChain, makeRelatedInformation, } from './src/error';
10
10
  export { ErrorCode } from './src/error_code';
11
- export { ERROR_DETAILS_PAGE_BASE_URL } from './src/error_details_base_url';
11
+ export { ERROR_DETAILS_PAGE_BASE_URL, DOC_PAGE_BASE_URL } from './src/error_details_base_url';
12
12
  export { ExtendedTemplateDiagnosticName } from './src/extended_template_diagnostic_name';
13
13
  export { ngErrorCode, replaceTsWithNgInErrors } from './src/util';
@@ -365,7 +365,7 @@ export declare enum ErrorCode {
365
365
  * prefetch timer delay that is not earlier than the main timer, or an identical prefetch
366
366
  */
367
367
  DEFER_TRIGGER_MISCONFIGURATION = 8021,
368
- /** Raised when the user has an unsupported binding on a `Field` directive. */
368
+ /** Raised when the user has an unsupported binding on a `FormField` directive. */
369
369
  FORM_FIELD_UNSUPPORTED_BINDING = 8022,
370
370
  /**
371
371
  * A two way binding in a template has an incorrect syntax,
@@ -5,6 +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
+ export declare const DOC_PAGE_BASE_URL: string;
8
9
  /**
9
10
  * Base URL for the error details page.
10
11
  *
@@ -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 { BindingPipe, PropertyRead, AST, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstComponent, TmplAstDirective, TmplAstElement, TmplAstForLoopBlock, TmplAstForLoopBlockEmpty, TmplAstHoverDeferredTrigger, TmplAstIfBlockBranch, TmplAstInteractionDeferredTrigger, TmplAstLetDeclaration, TmplAstReference, TmplAstSwitchBlockCase, TmplAstTemplate, TmplAstTextAttribute, TmplAstVariable, TmplAstViewportDeferredTrigger } from '@angular/compiler';
8
+ import { AST, BindingPipe, PropertyRead, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstComponent, TmplAstDirective, TmplAstElement, TmplAstForLoopBlock, TmplAstForLoopBlockEmpty, TmplAstHoverDeferredTrigger, TmplAstIfBlockBranch, TmplAstInteractionDeferredTrigger, TmplAstLetDeclaration, TmplAstReference, TmplAstSwitchBlockCase, TmplAstTemplate, TmplAstTextAttribute, TmplAstVariable, TmplAstViewportDeferredTrigger } from '@angular/compiler';
9
9
  import ts from 'typescript';
10
10
  import { ClassDeclaration } from '../../reflection';
11
11
  import { TemplateDiagnostic, TypeCheckId } from '../api';
@@ -130,7 +130,7 @@ export interface OutOfBandDiagnosticRecorder {
130
130
  */
131
131
  deferImplicitTriggerInvalidPlaceholder(id: TypeCheckId, trigger: TmplAstHoverDeferredTrigger | TmplAstInteractionDeferredTrigger | TmplAstViewportDeferredTrigger): void;
132
132
  /**
133
- * Reports an unsupported binding on a form `Field` node.
133
+ * Reports an unsupported binding on a form `FormField` node.
134
134
  */
135
135
  formFieldUnsupportedBinding(id: TypeCheckId, node: TmplAstBoundAttribute | TmplAstTextAttribute): void;
136
136
  }
@@ -16,7 +16,7 @@ export type CustomFormControlType = 'value' | 'checkbox';
16
16
  /** Names of input fields to which users aren't allowed to bind when using a `field` directive. */
17
17
  export declare const customFormControlBannedInputFields: Set<string>;
18
18
  /**
19
- * A `TcbOp` which constructs an instance of the signal forms `Field` directive on a native element.
19
+ * A `TcbOp` which constructs an instance of the signal forms `FormField` directive on a native element.
20
20
  */
21
21
  export declare class TcbNativeFieldOp extends TcbOp {
22
22
  protected tcb: Context;
@@ -52,7 +52,7 @@ export declare function checkUnsupportedFieldBindings(node: DirectiveOwner, unsu
52
52
  /**
53
53
  * Determines whether a node is a form control based on its matching directives.
54
54
  *
55
- * A node is a form control if it has a matching `Field` directive, and no other directives match
55
+ * A node is a form control if it has a matching `FormField` directive, and no other directives match
56
56
  * the `field` input.
57
57
  */
58
58
  export declare function isFormControl(allDirectiveMatches: TypeCheckableDirectiveMeta[]): boolean;