@angular/compiler-cli 21.0.0 → 21.0.1

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.
@@ -87,7 +87,7 @@ import {
87
87
  toUnredirectedSourceFile,
88
88
  tryParseInitializerApi,
89
89
  untagAllTsFiles
90
- } from "./chunk-67N3I5R2.js";
90
+ } from "./chunk-IJMZQ3RN.js";
91
91
  import {
92
92
  LogicalFileSystem,
93
93
  absoluteFromSourceFile,
@@ -95,7 +95,7 @@ import {
95
95
  getFileSystem,
96
96
  join,
97
97
  resolve
98
- } from "./chunk-GWZQLAGK.js";
98
+ } from "./chunk-JEXAXD23.js";
99
99
 
100
100
  // packages/compiler-cli/src/ngtsc/docs/src/entities.js
101
101
  var EntryType;
@@ -155,7 +155,7 @@ import ts6 from "typescript";
155
155
 
156
156
  // packages/compiler-cli/src/ngtsc/docs/src/jsdoc_extractor.js
157
157
  import ts from "typescript";
158
- var decoratorExpression = /@(?=(Injectable|Component|Directive|Pipe|NgModule|Input|Output|HostBinding|HostListener|Inject|Optional|Self|Host|SkipSelf|ViewChild|ViewChildren|ContentChild|ContentChildren))/g;
158
+ var angularAtExpression = /@(?=(Injectable|Component|Directive|Pipe|NgModule|Input|Output|HostBinding|HostListener|Inject|Optional|Self|Host|SkipSelf|ViewChild|ViewChildren|ContentChild|ContentChildren|if|else|for|switch|case|default|empty|defer|placeholder|loading|error|let)\b)/g;
159
159
  function extractJsDocTags(node) {
160
160
  const escapedNode = getEscapedNode(node);
161
161
  return ts.getJSDocTags(escapedNode).map((t) => {
@@ -188,7 +188,7 @@ function getEscapedNode(node) {
188
188
  return file.statements.find((s) => ts.isClassDeclaration(s));
189
189
  }
190
190
  function escapeAngularDecorators(comment) {
191
- return comment.replace(decoratorExpression, "_NG_AT_");
191
+ return comment.replace(angularAtExpression, "_NG_AT_");
192
192
  }
193
193
  function unescapeAngularDecorators(comment) {
194
194
  return comment.replace(/_NG_AT_/g, "@");
@@ -17,7 +17,7 @@ import {
17
17
  resolve,
18
18
  stripExtension,
19
19
  toRelativeImport
20
- } from "./chunk-GWZQLAGK.js";
20
+ } from "./chunk-JEXAXD23.js";
21
21
 
22
22
  // packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.js
23
23
  var ErrorCode;
@@ -2958,7 +2958,16 @@ function readStringArrayType(type) {
2958
2958
  }
2959
2959
  function extractDirectiveTypeCheckMeta(node, inputs, reflector) {
2960
2960
  const members = reflector.getMembersOfClass(node);
2961
- const staticMembers = members.filter((member) => member.isStatic);
2961
+ const publicMethods = /* @__PURE__ */ new Set();
2962
+ const staticMembers = [];
2963
+ for (const member of members) {
2964
+ if (member.isStatic) {
2965
+ staticMembers.push(member);
2966
+ }
2967
+ if (member.kind === ClassMemberKind.Method && !member.isStatic && (member.accessLevel === ClassMemberAccessLevel.PublicReadonly || member.accessLevel === ClassMemberAccessLevel.PublicWritable)) {
2968
+ publicMethods.add(member.name);
2969
+ }
2970
+ }
2962
2971
  const ngTemplateGuards = staticMembers.map(extractTemplateGuard).filter((guard) => guard !== null);
2963
2972
  const hasNgTemplateContextGuard = staticMembers.some((member) => member.kind === ClassMemberKind.Method && member.name === "ngTemplateContextGuard");
2964
2973
  const coercedInputFields = new Set(staticMembers.map(extractCoercedInput).filter((inputName) => {
@@ -2994,6 +3003,7 @@ function extractDirectiveTypeCheckMeta(node, inputs, reflector) {
2994
3003
  restrictedInputFields,
2995
3004
  stringLiteralInputFields,
2996
3005
  undeclaredInputFields,
3006
+ publicMethods,
2997
3007
  isGeneric: arity !== null && arity > 0
2998
3008
  };
2999
3009
  }
@@ -3325,6 +3335,7 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
3325
3335
  const undeclaredInputFields = /* @__PURE__ */ new Set();
3326
3336
  const restrictedInputFields = /* @__PURE__ */ new Set();
3327
3337
  const stringLiteralInputFields = /* @__PURE__ */ new Set();
3338
+ const publicMethods = /* @__PURE__ */ new Set();
3328
3339
  let hostDirectives = null;
3329
3340
  let isDynamic = false;
3330
3341
  let inputs = ClassPropertyMapping.empty();
@@ -3356,6 +3367,9 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
3356
3367
  for (const field of meta.stringLiteralInputFields) {
3357
3368
  stringLiteralInputFields.add(field);
3358
3369
  }
3370
+ for (const name of meta.publicMethods) {
3371
+ publicMethods.add(name);
3372
+ }
3359
3373
  if (meta.hostDirectives !== null && meta.hostDirectives.length > 0) {
3360
3374
  hostDirectives ??= [];
3361
3375
  hostDirectives.push(...meta.hostDirectives);
@@ -3370,6 +3384,7 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
3370
3384
  undeclaredInputFields,
3371
3385
  restrictedInputFields,
3372
3386
  stringLiteralInputFields,
3387
+ publicMethods,
3373
3388
  baseClass: isDynamic ? "dynamic" : null,
3374
3389
  isStructural,
3375
3390
  hostDirectives
@@ -6939,13 +6954,12 @@ import ts32 from "typescript";
6939
6954
  function insertDebugNameIntoCallExpression(callExpression, debugName) {
6940
6955
  const signalExpressionIsRequired = isRequiredSignalFunction(callExpression.expression);
6941
6956
  let configPosition = signalExpressionIsRequired ? 0 : 1;
6942
- const nodeArgs = Array.from(callExpression.arguments);
6943
6957
  const signalExpressionHasNoArguments = callExpression.arguments.length === 0;
6944
- const isLinkedSignal = callExpression.expression.getText() === "linkedSignal";
6945
- const isComputationLinkedSignal = isLinkedSignal && nodeArgs[0].kind === ts32.SyntaxKind.ObjectLiteralExpression;
6946
- if (signalExpressionHasNoArguments || isComputationLinkedSignal) {
6958
+ const signalWithObjectOnlyDefinition = isSignalWithObjectOnlyDefinition(callExpression);
6959
+ if (signalExpressionHasNoArguments || signalWithObjectOnlyDefinition) {
6947
6960
  configPosition = 0;
6948
6961
  }
6962
+ const nodeArgs = Array.from(callExpression.arguments);
6949
6963
  let existingArgument = nodeArgs[configPosition];
6950
6964
  if (existingArgument === void 0) {
6951
6965
  existingArgument = ts32.factory.createObjectLiteralExpression([]);
@@ -6961,41 +6975,32 @@ function insertDebugNameIntoCallExpression(callExpression, debugName) {
6961
6975
  if (debugNameExists) {
6962
6976
  return callExpression;
6963
6977
  }
6964
- properties.unshift(ts32.factory.createPropertyAssignment("debugName", ts32.factory.createStringLiteral(debugName)));
6965
- const transformedConfigProperties = ts32.factory.createObjectLiteralExpression(properties);
6966
6978
  const ngDevModeIdentifier = ts32.factory.createIdentifier("ngDevMode");
6967
- let devModeCase;
6968
- if (signalExpressionHasNoArguments && !signalExpressionIsRequired) {
6969
- devModeCase = ts32.factory.createArrayLiteralExpression([
6970
- ts32.factory.createIdentifier("undefined"),
6971
- transformedConfigProperties
6972
- ]);
6973
- } else {
6974
- devModeCase = ts32.factory.createArrayLiteralExpression([
6975
- transformedConfigProperties,
6976
- ...nodeArgs.slice(configPosition + 1)
6977
- ]);
6978
- }
6979
- const nonDevModeCase = signalExpressionIsRequired ? ts32.factory.createArrayLiteralExpression(nodeArgs) : ts32.factory.createArrayLiteralExpression(nodeArgs.slice(configPosition));
6980
- const spreadElementContainingUpdatedOptions = ts32.factory.createSpreadElement(ts32.factory.createParenthesizedExpression(ts32.factory.createConditionalExpression(
6979
+ const debugNameProperty = ts32.factory.createPropertyAssignment("debugName", ts32.factory.createStringLiteral(debugName));
6980
+ const debugNameObject = ts32.factory.createObjectLiteralExpression([debugNameProperty]);
6981
+ const emptyObject = ts32.factory.createObjectLiteralExpression();
6982
+ const spreadDebugNameExpression = ts32.factory.createSpreadAssignment(ts32.factory.createParenthesizedExpression(ts32.factory.createConditionalExpression(
6981
6983
  ngDevModeIdentifier,
6982
- /* question token */
6983
6984
  void 0,
6984
- devModeCase,
6985
- /* colon token */
6985
+ // Question token
6986
+ debugNameObject,
6986
6987
  void 0,
6987
- nonDevModeCase
6988
+ // Colon token
6989
+ emptyObject
6988
6990
  )));
6989
- let transformedSignalArgs;
6990
- if (signalExpressionIsRequired || signalExpressionHasNoArguments || isComputationLinkedSignal) {
6991
- transformedSignalArgs = ts32.factory.createNodeArray([spreadElementContainingUpdatedOptions]);
6991
+ const transformedConfigProperties = ts32.factory.createObjectLiteralExpression([
6992
+ spreadDebugNameExpression,
6993
+ ...properties
6994
+ ]);
6995
+ let transformedSignalArgs = [];
6996
+ if (signalExpressionHasNoArguments && !signalExpressionIsRequired) {
6997
+ transformedSignalArgs = [ts32.factory.createIdentifier("undefined"), transformedConfigProperties];
6998
+ } else if (signalWithObjectOnlyDefinition || signalExpressionIsRequired) {
6999
+ transformedSignalArgs = [transformedConfigProperties];
6992
7000
  } else {
6993
- transformedSignalArgs = ts32.factory.createNodeArray([
6994
- nodeArgs[0],
6995
- spreadElementContainingUpdatedOptions
6996
- ]);
7001
+ transformedSignalArgs = [nodeArgs[0], transformedConfigProperties];
6997
7002
  }
6998
- return ts32.factory.updateCallExpression(callExpression, callExpression.expression, callExpression.typeArguments, transformedSignalArgs);
7003
+ return ts32.factory.updateCallExpression(callExpression, callExpression.expression, callExpression.typeArguments, ts32.factory.createNodeArray(transformedSignalArgs));
6999
7004
  }
7000
7005
  function isVariableDeclarationCase(node) {
7001
7006
  if (!ts32.isVariableDeclaration(node)) {
@@ -7046,7 +7051,21 @@ function isPropertyDeclarationCase(node) {
7046
7051
  }
7047
7052
  return ts32.isIdentifier(expression) && isSignalFunction(expression);
7048
7053
  }
7049
- function expressionIsUsingAngularCoreImportedSymbol(program, expression) {
7054
+ var signalFunctions = /* @__PURE__ */ new Map([
7055
+ ["signal", "core"],
7056
+ ["computed", "core"],
7057
+ ["linkedSignal", "core"],
7058
+ ["input", "core"],
7059
+ ["model", "core"],
7060
+ ["viewChild", "core"],
7061
+ ["viewChildren", "core"],
7062
+ ["contentChild", "core"],
7063
+ ["contentChildren", "core"],
7064
+ ["effect", "core"],
7065
+ ["resource", "core"],
7066
+ ["httpResource", "common"]
7067
+ ]);
7068
+ function expressionIsUsingAngularImportedSymbol(program, expression) {
7050
7069
  const symbol = program.getTypeChecker().getSymbolAtLocation(expression);
7051
7070
  if (symbol === void 0) {
7052
7071
  return false;
@@ -7072,20 +7091,9 @@ function expressionIsUsingAngularCoreImportedSymbol(program, expression) {
7072
7091
  return false;
7073
7092
  }
7074
7093
  const specifier = importDeclaration.moduleSpecifier.text;
7075
- return specifier !== void 0 && (specifier === "@angular/core" || specifier.startsWith("@angular/core/"));
7076
- }
7077
- var signalFunctions = /* @__PURE__ */ new Set([
7078
- "signal",
7079
- "computed",
7080
- "linkedSignal",
7081
- "input",
7082
- "model",
7083
- "viewChild",
7084
- "viewChildren",
7085
- "contentChild",
7086
- "contentChildren",
7087
- "effect"
7088
- ]);
7094
+ const packageName = signalFunctions.get(expression.getText());
7095
+ return specifier !== void 0 && packageName !== void 0 && (specifier === `@angular/${packageName}` || specifier.startsWith(`@angular/${packageName}/`));
7096
+ }
7089
7097
  function isSignalFunction(expression) {
7090
7098
  const text = expression.text;
7091
7099
  return signalFunctions.has(text);
@@ -7104,10 +7112,10 @@ function transformVariableDeclaration(program, node) {
7104
7112
  return node;
7105
7113
  const expression = node.initializer.expression;
7106
7114
  if (ts32.isPropertyAccessExpression(expression)) {
7107
- if (!expressionIsUsingAngularCoreImportedSymbol(program, expression.expression)) {
7115
+ if (!expressionIsUsingAngularImportedSymbol(program, expression.expression)) {
7108
7116
  return node;
7109
7117
  }
7110
- } else if (!expressionIsUsingAngularCoreImportedSymbol(program, expression)) {
7118
+ } else if (!expressionIsUsingAngularImportedSymbol(program, expression)) {
7111
7119
  return node;
7112
7120
  }
7113
7121
  try {
@@ -7120,10 +7128,10 @@ function transformVariableDeclaration(program, node) {
7120
7128
  function transformPropertyAssignment(program, node) {
7121
7129
  const expression = node.expression.right.expression;
7122
7130
  if (ts32.isPropertyAccessExpression(expression)) {
7123
- if (!expressionIsUsingAngularCoreImportedSymbol(program, expression.expression)) {
7131
+ if (!expressionIsUsingAngularImportedSymbol(program, expression.expression)) {
7124
7132
  return node;
7125
7133
  }
7126
- } else if (!expressionIsUsingAngularCoreImportedSymbol(program, expression)) {
7134
+ } else if (!expressionIsUsingAngularImportedSymbol(program, expression)) {
7127
7135
  return node;
7128
7136
  }
7129
7137
  return ts32.factory.updateExpressionStatement(node, ts32.factory.createBinaryExpression(node.expression.left, node.expression.operatorToken, insertDebugNameIntoCallExpression(node.expression.right, node.expression.left.name.text)));
@@ -7133,10 +7141,10 @@ function transformPropertyDeclaration(program, node) {
7133
7141
  return node;
7134
7142
  const expression = node.initializer.expression;
7135
7143
  if (ts32.isPropertyAccessExpression(expression)) {
7136
- if (!expressionIsUsingAngularCoreImportedSymbol(program, expression.expression)) {
7144
+ if (!expressionIsUsingAngularImportedSymbol(program, expression.expression)) {
7137
7145
  return node;
7138
7146
  }
7139
- } else if (!expressionIsUsingAngularCoreImportedSymbol(program, expression)) {
7147
+ } else if (!expressionIsUsingAngularImportedSymbol(program, expression)) {
7140
7148
  return node;
7141
7149
  }
7142
7150
  try {
@@ -7146,6 +7154,14 @@ function transformPropertyDeclaration(program, node) {
7146
7154
  return node;
7147
7155
  }
7148
7156
  }
7157
+ function isSignalWithObjectOnlyDefinition(callExpression) {
7158
+ const callExpressionText = callExpression.expression.getText();
7159
+ const nodeArgs = Array.from(callExpression.arguments);
7160
+ const isLinkedSignal = callExpressionText === "linkedSignal";
7161
+ const isComputationLinkedSignal = isLinkedSignal && nodeArgs[0].kind === ts32.SyntaxKind.ObjectLiteralExpression;
7162
+ const isResource = callExpressionText === "resource";
7163
+ return isComputationLinkedSignal || isResource;
7164
+ }
7149
7165
  function signalMetadataTransform(program) {
7150
7166
  return (context) => (rootNode) => {
7151
7167
  const visit2 = (node) => {
@@ -15187,7 +15203,6 @@ var TcbNativeFieldDirectiveTypeOp = class extends TcbOp {
15187
15203
  ...formControlInputFields,
15188
15204
  "value",
15189
15205
  "checked",
15190
- "type",
15191
15206
  "maxlength",
15192
15207
  "minlength"
15193
15208
  ]);
@@ -15329,6 +15344,20 @@ function getCustomFieldDirectiveType(meta) {
15329
15344
  }
15330
15345
  return null;
15331
15346
  }
15347
+ function isNativeField(dir, node, allDirectiveMatches) {
15348
+ if (!isFieldDirective(dir)) {
15349
+ return false;
15350
+ }
15351
+ if (!(node instanceof TmplAstElement3) || node.name !== "input" && node.name !== "select" && node.name !== "textarea") {
15352
+ return false;
15353
+ }
15354
+ return allDirectiveMatches.every((meta) => {
15355
+ return getCustomFieldDirectiveType(meta) === null && !isControlValueAccessorLike(meta);
15356
+ });
15357
+ }
15358
+ function isControlValueAccessorLike(meta) {
15359
+ return meta.publicMethods.has("writeValue") && meta.publicMethods.has("registerOnChange") && meta.publicMethods.has("registerOnTouched");
15360
+ }
15332
15361
  function checkUnsupportedFieldBindings(node, unsupportedBindingFields, tcb) {
15333
15362
  const inputs = node instanceof TmplAstHostElement2 ? node.bindings : node.inputs;
15334
15363
  for (const input of inputs) {
@@ -15340,8 +15369,7 @@ function checkUnsupportedFieldBindings(node, unsupportedBindingFields, tcb) {
15340
15369
  }
15341
15370
  if (!(node instanceof TmplAstHostElement2)) {
15342
15371
  for (const attr of node.attributes) {
15343
- const name = attr.name.toLowerCase();
15344
- if (name !== "type" && unsupportedBindingFields.has(name)) {
15372
+ if (unsupportedBindingFields.has(attr.name.toLowerCase())) {
15345
15373
  tcb.oobRecorder.formFieldUnsupportedBinding(tcb.id, attr);
15346
15374
  }
15347
15375
  }
@@ -16687,7 +16715,7 @@ var Scope = class _Scope {
16687
16715
  const directiveOp = this.getDirectiveOp(dir, node, customFieldType);
16688
16716
  const dirIndex = this.opQueue.push(directiveOp) - 1;
16689
16717
  dirMap.set(dir, dirIndex);
16690
- if (isFieldDirective(dir) && node instanceof TmplAstElement8 && (node.name === "input" || node.name === "select" || node.name === "textarea") && !allDirectiveMatches.some(getCustomFieldDirectiveType)) {
16718
+ if (isNativeField(dir, node, allDirectiveMatches)) {
16691
16719
  this.opQueue.push(new TcbNativeFieldDirectiveTypeOp(this.tcb, this, node));
16692
16720
  }
16693
16721
  this.opQueue.push(new TcbDirectiveInputsOp(this.tcb, this, node, dir, customFieldType));
@@ -323,10 +323,17 @@ function createFileSystemTsReadDirectoryFn(fs2) {
323
323
  const files = [];
324
324
  const directories = [];
325
325
  for (const child of children) {
326
- if (fs2.stat(fs2.join(resolvedPath, child))?.isDirectory()) {
327
- directories.push(child);
328
- } else {
329
- files.push(child);
326
+ try {
327
+ if (fs2.stat(fs2.join(resolvedPath, child))?.isDirectory()) {
328
+ directories.push(child);
329
+ } else {
330
+ files.push(child);
331
+ }
332
+ } catch (error) {
333
+ if (error instanceof Error && error.message.includes("ENOENT")) {
334
+ continue;
335
+ }
336
+ throw error;
330
337
  }
331
338
  }
332
339
  return { files, directories };
@@ -12,7 +12,7 @@ import {
12
12
  formatDiagnostics,
13
13
  performCompilation,
14
14
  readConfiguration
15
- } from "./chunk-EZPRBQ4S.js";
15
+ } from "./chunk-Z6AENWVT.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-3UWOVJPM.js";
11
+ } from "./chunk-I3BPPTZC.js";
12
12
  import {
13
13
  ActivePerfRecorder,
14
14
  OptimizeFor,
@@ -18,13 +18,13 @@ import {
18
18
  TsCreateProgramDriver,
19
19
  replaceTsWithNgInErrors,
20
20
  retagAllTsFiles
21
- } from "./chunk-67N3I5R2.js";
21
+ } from "./chunk-IJMZQ3RN.js";
22
22
  import {
23
23
  absoluteFrom,
24
24
  createFileSystemTsReadDirectoryFn,
25
25
  getFileSystem,
26
26
  resolve
27
- } from "./chunk-GWZQLAGK.js";
27
+ } from "./chunk-JEXAXD23.js";
28
28
 
29
29
  // packages/compiler-cli/src/transformers/api.js
30
30
  var DEFAULT_ERROR_CODE = 100;
@@ -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";
458
+ var PLACEHOLDER_VERSION = "21.0.1";
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-EZPRBQ4S.js";
20
+ } from "./chunk-Z6AENWVT.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-3UWOVJPM.js";
37
+ } from "./chunk-I3BPPTZC.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-67N3I5R2.js";
49
+ } from "./chunk-IJMZQ3RN.js";
50
50
  import "./chunk-LS5RJ5CS.js";
51
51
  import {
52
52
  InvalidFileSystem,
@@ -69,7 +69,7 @@ import {
69
69
  resolve,
70
70
  setFileSystem,
71
71
  toRelativeImport
72
- } from "./chunk-GWZQLAGK.js";
72
+ } from "./chunk-JEXAXD23.js";
73
73
  import {
74
74
  NodeJSFileSystem
75
75
  } from "./chunk-XYYEESKY.js";
@@ -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");
80
+ var VERSION = new Version("21.0.1");
81
81
 
82
82
  // packages/compiler-cli/private/tooling.js
83
83
  var GLOBAL_DEFS_FOR_TERSER = {
@@ -31,7 +31,7 @@ import {
31
31
  resolve,
32
32
  setFileSystem,
33
33
  toRelativeImport
34
- } from "../chunk-GWZQLAGK.js";
34
+ } from "../chunk-JEXAXD23.js";
35
35
  import {
36
36
  NodeJSFileSystem
37
37
  } from "../chunk-XYYEESKY.js";
@@ -5,7 +5,7 @@
5
5
  import {
6
6
  DiagnosticCategoryLabel,
7
7
  NgCompiler
8
- } from "../chunk-3UWOVJPM.js";
8
+ } from "../chunk-I3BPPTZC.js";
9
9
  import {
10
10
  CompilationMode,
11
11
  DtsMetadataReader,
@@ -32,12 +32,12 @@ import {
32
32
  queryDecoratorNames,
33
33
  reflectObjectLiteral,
34
34
  unwrapExpression
35
- } from "../chunk-67N3I5R2.js";
35
+ } from "../chunk-IJMZQ3RN.js";
36
36
  import "../chunk-LS5RJ5CS.js";
37
37
  import {
38
38
  getFileSystem,
39
39
  isLocalRelativePath
40
- } from "../chunk-GWZQLAGK.js";
40
+ } from "../chunk-JEXAXD23.js";
41
41
  import {
42
42
  NodeJSFileSystem
43
43
  } from "../chunk-XYYEESKY.js";
@@ -6,7 +6,7 @@ import {
6
6
  ImportedSymbolsTracker,
7
7
  TypeScriptReflectionHost,
8
8
  getInitializerApiJitTransform
9
- } from "../chunk-67N3I5R2.js";
9
+ } from "../chunk-IJMZQ3RN.js";
10
10
  import "../chunk-LS5RJ5CS.js";
11
11
  import {
12
12
  InvalidFileSystem,
@@ -15,7 +15,7 @@ import {
15
15
  dirname,
16
16
  resolve,
17
17
  setFileSystem
18
- } from "../chunk-GWZQLAGK.js";
18
+ } from "../chunk-JEXAXD23.js";
19
19
  import {
20
20
  NodeJSFileSystem
21
21
  } from "../chunk-XYYEESKY.js";
@@ -4,9 +4,9 @@
4
4
 
5
5
  import {
6
6
  angularJitApplicationTransform
7
- } from "../chunk-67N3I5R2.js";
7
+ } from "../chunk-IJMZQ3RN.js";
8
8
  import "../chunk-LS5RJ5CS.js";
9
- import "../chunk-GWZQLAGK.js";
9
+ import "../chunk-JEXAXD23.js";
10
10
  import "../chunk-XYYEESKY.js";
11
11
  import "../chunk-G7GFT6BU.js";
12
12
 
@@ -6,16 +6,16 @@
6
6
  import {
7
7
  main,
8
8
  readCommandLineAndConfiguration
9
- } from "../../chunk-IUWOX36C.js";
9
+ } from "../../chunk-TQDACBKM.js";
10
10
  import {
11
11
  EmitFlags
12
- } from "../../chunk-EZPRBQ4S.js";
13
- import "../../chunk-3UWOVJPM.js";
14
- import "../../chunk-67N3I5R2.js";
12
+ } from "../../chunk-Z6AENWVT.js";
13
+ import "../../chunk-I3BPPTZC.js";
14
+ import "../../chunk-IJMZQ3RN.js";
15
15
  import "../../chunk-LS5RJ5CS.js";
16
16
  import {
17
17
  setFileSystem
18
- } from "../../chunk-GWZQLAGK.js";
18
+ } from "../../chunk-JEXAXD23.js";
19
19
  import {
20
20
  NodeJSFileSystem
21
21
  } from "../../chunk-XYYEESKY.js";
@@ -5,14 +5,14 @@
5
5
 
6
6
  import {
7
7
  main
8
- } from "../../chunk-IUWOX36C.js";
9
- import "../../chunk-EZPRBQ4S.js";
10
- import "../../chunk-3UWOVJPM.js";
11
- import "../../chunk-67N3I5R2.js";
8
+ } from "../../chunk-TQDACBKM.js";
9
+ import "../../chunk-Z6AENWVT.js";
10
+ import "../../chunk-I3BPPTZC.js";
11
+ import "../../chunk-IJMZQ3RN.js";
12
12
  import "../../chunk-LS5RJ5CS.js";
13
13
  import {
14
14
  setFileSystem
15
- } from "../../chunk-GWZQLAGK.js";
15
+ } from "../../chunk-JEXAXD23.js";
16
16
  import {
17
17
  NodeJSFileSystem
18
18
  } from "../../chunk-XYYEESKY.js";
@@ -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";
10
+ export declare const PLACEHOLDER_VERSION = "21.0.1";
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",
3
+ "version": "21.0.1",
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.0",
43
+ "@angular/compiler": "21.0.1",
44
44
  "typescript": ">=5.9 <6.0"
45
45
  },
46
46
  "peerDependenciesMeta": {
@@ -94,6 +94,8 @@ export interface DirectiveTypeCheckMeta {
94
94
  * The set of input fields which do not have corresponding members in the Directive's class.
95
95
  */
96
96
  undeclaredInputFields: Set<ClassPropertyName>;
97
+ /** Names of the public methods of the class. */
98
+ publicMethods: Set<string>;
97
99
  /**
98
100
  * Whether the Directive's class is generic, i.e. `class MyDir<T> {...}`.
99
101
  */
@@ -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 { DirectiveOwner, TmplAstComponent, TmplAstDirective, TmplAstElement, TmplAstTemplate } from '@angular/compiler';
8
+ import { DirectiveOwner, TmplAstComponent, TmplAstDirective, TmplAstElement, TmplAstNode, TmplAstTemplate } from '@angular/compiler';
9
9
  import { TcbOp } from './base';
10
10
  import type { Context } from './context';
11
11
  import type { Scope } from './scope';
@@ -36,5 +36,7 @@ export declare function expandBoundAttributesForField(directive: TypeCheckableDi
36
36
  export declare function isFieldDirective(meta: TypeCheckableDirectiveMeta): boolean;
37
37
  /** Determines if a directive is a custom field and its type. */
38
38
  export declare function getCustomFieldDirectiveType(meta: TypeCheckableDirectiveMeta): CustomFieldType | null;
39
+ /** Determines if a directive usage is on a native field. */
40
+ export declare function isNativeField(dir: TypeCheckableDirectiveMeta, node: TmplAstNode, allDirectiveMatches: TypeCheckableDirectiveMeta[]): boolean;
39
41
  /** Checks whether a node has bindings that aren't supported on fields. */
40
42
  export declare function checkUnsupportedFieldBindings(node: DirectiveOwner, unsupportedBindingFields: Set<string>, tcb: Context): void;