@angular/compiler-cli 20.2.0-next.4 → 20.2.0-next.6

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.
@@ -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 = "20.2.0-next.4";
458
+ var PLACEHOLDER_VERSION = "20.2.0-next.6";
459
459
  function wrapReference(wrapped) {
460
460
  return { value: wrapped, type: wrapped };
461
461
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  import {
6
6
  angularJitApplicationTransform
7
- } from "./chunk-YY2EEYJQ.js";
7
+ } from "./chunk-FX2ZPVFW.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-UJ4H6WFJ.js";
95
+ } from "./chunk-OQ7T4N5O.js";
96
96
  import {
97
97
  LogicalFileSystem,
98
98
  absoluteFrom,
@@ -4388,6 +4388,7 @@ var NgCompiler = class _NgCompiler {
4388
4388
  const useInlineTypeConstructors = this.programDriver.supportsInlineOperations;
4389
4389
  const checkTwoWayBoundEvents = this.options["_checkTwoWayBoundEvents"] ?? false;
4390
4390
  const allowSignalsInTwoWayBindings = this.angularCoreVersion === null || coreVersionSupportsFeature(this.angularCoreVersion, ">= 17.2.0-0");
4391
+ const allowDomEventAssertion = this.angularCoreVersion === null || coreVersionSupportsFeature(this.angularCoreVersion, ">= 20.2.0");
4391
4392
  let typeCheckingConfig;
4392
4393
  if (this.fullTemplateTypeCheck) {
4393
4394
  typeCheckingConfig = {
@@ -4426,7 +4427,8 @@ var NgCompiler = class _NgCompiler {
4426
4427
  controlFlowPreventingContentProjection: this.options.extendedDiagnostics?.defaultCategory || DiagnosticCategoryLabel.Warning,
4427
4428
  unusedStandaloneImports: this.options.extendedDiagnostics?.defaultCategory || DiagnosticCategoryLabel.Warning,
4428
4429
  allowSignalsInTwoWayBindings,
4429
- checkTwoWayBoundEvents
4430
+ checkTwoWayBoundEvents,
4431
+ allowDomEventAssertion
4430
4432
  };
4431
4433
  } else {
4432
4434
  typeCheckingConfig = {
@@ -4459,7 +4461,8 @@ var NgCompiler = class _NgCompiler {
4459
4461
  controlFlowPreventingContentProjection: this.options.extendedDiagnostics?.defaultCategory || DiagnosticCategoryLabel.Warning,
4460
4462
  unusedStandaloneImports: this.options.extendedDiagnostics?.defaultCategory || DiagnosticCategoryLabel.Warning,
4461
4463
  allowSignalsInTwoWayBindings,
4462
- checkTwoWayBoundEvents
4464
+ checkTwoWayBoundEvents,
4465
+ allowDomEventAssertion
4463
4466
  };
4464
4467
  }
4465
4468
  if (this.options.strictInputTypes !== void 0) {
@@ -16,7 +16,7 @@ import {
16
16
  tryParseSignalInputMapping,
17
17
  tryParseSignalModelMapping,
18
18
  tryParseSignalQueryFromInitializer
19
- } from "./chunk-UJ4H6WFJ.js";
19
+ } from "./chunk-OQ7T4N5O.js";
20
20
 
21
21
  // packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.js
22
22
  import ts from "typescript";
@@ -13743,6 +13743,7 @@ var TcbTemplateBodyOp = class extends TcbOp {
13743
13743
  if (this.tcb.env.config.applyTemplateContextGuards) {
13744
13744
  const ctx = this.scope.resolve(hostNode);
13745
13745
  const guardInvoke = tsCallMethod(dirId, "ngTemplateContextGuard", [dirInstId, ctx]);
13746
+ markIgnoreDiagnostics(guardInvoke);
13746
13747
  addParseSpanInfo(guardInvoke, hostNode.sourceSpan);
13747
13748
  guards.push(guardInvoke);
13748
13749
  } else if (isTemplate && hostNode.variables.length > 0 && this.tcb.env.config.suggestionsForSuboptimalTypeInference) {
@@ -14382,7 +14383,7 @@ var TcbUnclaimedOutputsOp = class extends TcbOp {
14382
14383
  } else {
14383
14384
  target = elId;
14384
14385
  }
14385
- if (this.target instanceof TmplAstElement2 && this.target.isVoid && ts60.isIdentifier(target)) {
14386
+ if (this.target instanceof TmplAstElement2 && this.target.isVoid && ts60.isIdentifier(target) && this.tcb.env.config.allowDomEventAssertion) {
14386
14387
  domEventAssertion = ts60.factory.createCallExpression(this.tcb.env.referenceExternalSymbol("@angular/core", "\u0275assertType"), [ts60.factory.createTypeQueryNode(target)], [
14387
14388
  ts60.factory.createPropertyAccessExpression(ts60.factory.createIdentifier(EVENT_PARAMETER), "target")
14388
14389
  ]);
@@ -17803,11 +17804,11 @@ function getClassDeclFromSymbol(symbol, checker) {
17803
17804
  return null;
17804
17805
  }
17805
17806
  if (ts64.isExportAssignment(decl)) {
17806
- const symbol2 = checker.getTypeAtLocation(decl.expression).symbol;
17807
+ const symbol2 = checker.getTypeAtLocation(decl.expression).getSymbol();
17807
17808
  return getClassDeclFromSymbol(symbol2, checker);
17808
17809
  }
17809
17810
  if (ts64.isExportSpecifier(decl)) {
17810
- const symbol2 = checker.getTypeAtLocation(decl).symbol;
17811
+ const symbol2 = checker.getTypeAtLocation(decl).getSymbol();
17811
17812
  return getClassDeclFromSymbol(symbol2, checker);
17812
17813
  }
17813
17814
  if (isNamedClassDeclaration(decl)) {
@@ -17837,7 +17838,7 @@ function getTheElementTagDeprecatedSuggestionDiagnostics(shimPath, program, file
17837
17838
  for (const tsDiag of diags) {
17838
17839
  const diagNode = getTokenAtPosition(sourceFile, tsDiag.start);
17839
17840
  const nodeType = typeChecker.getTypeAtLocation(diagNode);
17840
- const nodeSymbolDeclarations = nodeType.symbol.declarations;
17841
+ const nodeSymbolDeclarations = nodeType.getSymbol()?.declarations;
17841
17842
  const decl = nodeSymbolDeclarations !== void 0 && nodeSymbolDeclarations.length > 0 ? nodeSymbolDeclarations[0] : void 0;
17842
17843
  if (decl === void 0 || !ts64.isClassDeclaration(decl)) {
17843
17844
  continue;
@@ -17854,7 +17855,7 @@ function getTheElementTagDeprecatedSuggestionDiagnostics(shimPath, program, file
17854
17855
  const templateDiagnostics = [];
17855
17856
  for (const directive of directiveNodesInTcb) {
17856
17857
  const directiveType = typeChecker.getTypeAtLocation(directive);
17857
- const directiveSymbolDeclarations = directiveType.symbol.declarations;
17858
+ const directiveSymbolDeclarations = directiveType.getSymbol()?.declarations;
17858
17859
  const decl = directiveSymbolDeclarations !== void 0 && directiveSymbolDeclarations.length > 0 ? directiveSymbolDeclarations[0] : void 0;
17859
17860
  if (decl === void 0) {
17860
17861
  continue;
@@ -20221,7 +20222,7 @@ var ComponentDecoratorHandler = class {
20221
20222
  diagnostics.push(makeResourceNotFoundError(styleUrl.url, styleUrl.expression, resourceType).toDiagnostic());
20222
20223
  }
20223
20224
  }
20224
- if (encapsulation === ViewEncapsulation2.ShadowDom && metadata.selector !== null) {
20225
+ if ((encapsulation === ViewEncapsulation2.ShadowDom || encapsulation === ViewEncapsulation2.IsolatedShadowDom) && metadata.selector !== null) {
20225
20226
  const selectorError = checkCustomElementSelectorForErrors(metadata.selector);
20226
20227
  if (selectorError !== null) {
20227
20228
  if (diagnostics === void 0) {
@@ -12,7 +12,7 @@ import {
12
12
  formatDiagnostics,
13
13
  performCompilation,
14
14
  readConfiguration
15
- } from "./chunk-5F2CCT3V.js";
15
+ } from "./chunk-CUS65HPI.js";
16
16
 
17
17
  // packages/compiler-cli/src/main.js
18
18
  import ts2 from "typescript";
package/bundles/index.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  isTsDiagnostic,
29
29
  performCompilation,
30
30
  readConfiguration
31
- } from "./chunk-5F2CCT3V.js";
31
+ } from "./chunk-CUS65HPI.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-YY2EEYJQ.js";
40
+ } from "./chunk-FX2ZPVFW.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-UJ4H6WFJ.js";
49
+ } from "./chunk-OQ7T4N5O.js";
50
50
  import "./chunk-I2BHWRAU.js";
51
51
  import {
52
52
  InvalidFileSystem,
@@ -77,7 +77,7 @@ import "./chunk-DWRM7PIK.js";
77
77
 
78
78
  // packages/compiler-cli/src/version.js
79
79
  import { Version } from "@angular/compiler";
80
- var VERSION = new Version("20.2.0-next.4");
80
+ var VERSION = new Version("20.2.0-next.6");
81
81
 
82
82
  // packages/compiler-cli/private/tooling.js
83
83
  var GLOBAL_DEFS_FOR_TERSER = {
@@ -13,7 +13,7 @@ import {
13
13
  TypeScriptReflectionHost,
14
14
  createForwardRefResolver,
15
15
  reflectObjectLiteral
16
- } from "../chunk-UJ4H6WFJ.js";
16
+ } from "../chunk-OQ7T4N5O.js";
17
17
  import "../chunk-I2BHWRAU.js";
18
18
  import "../chunk-GWZQLAGK.js";
19
19
  import "../chunk-SZY7NM6F.js";
@@ -4,8 +4,8 @@
4
4
 
5
5
  import {
6
6
  angularJitApplicationTransform
7
- } from "../chunk-YY2EEYJQ.js";
8
- import "../chunk-UJ4H6WFJ.js";
7
+ } from "../chunk-FX2ZPVFW.js";
8
+ import "../chunk-OQ7T4N5O.js";
9
9
  import "../chunk-I2BHWRAU.js";
10
10
  import "../chunk-GWZQLAGK.js";
11
11
  import "../chunk-SZY7NM6F.js";
@@ -6,12 +6,12 @@
6
6
  import {
7
7
  main,
8
8
  readCommandLineAndConfiguration
9
- } from "../../chunk-45U5FWGN.js";
9
+ } from "../../chunk-T7J4JWJ3.js";
10
10
  import {
11
11
  EmitFlags
12
- } from "../../chunk-5F2CCT3V.js";
13
- import "../../chunk-YY2EEYJQ.js";
14
- import "../../chunk-UJ4H6WFJ.js";
12
+ } from "../../chunk-CUS65HPI.js";
13
+ import "../../chunk-FX2ZPVFW.js";
14
+ import "../../chunk-OQ7T4N5O.js";
15
15
  import "../../chunk-I2BHWRAU.js";
16
16
  import {
17
17
  setFileSystem
@@ -5,10 +5,10 @@
5
5
 
6
6
  import {
7
7
  main
8
- } from "../../chunk-45U5FWGN.js";
9
- import "../../chunk-5F2CCT3V.js";
10
- import "../../chunk-YY2EEYJQ.js";
11
- import "../../chunk-UJ4H6WFJ.js";
8
+ } from "../../chunk-T7J4JWJ3.js";
9
+ import "../../chunk-CUS65HPI.js";
10
+ import "../../chunk-FX2ZPVFW.js";
11
+ import "../../chunk-OQ7T4N5O.js";
12
12
  import "../../chunk-I2BHWRAU.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 = "20.2.0-next.4";
10
+ export declare const PLACEHOLDER_VERSION = "20.2.0-next.6";
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": "20.2.0-next.4",
3
+ "version": "20.2.0-next.6",
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": "20.2.0-next.4",
51
+ "@angular/compiler": "20.2.0-next.6",
52
52
  "typescript": ">=5.8 <6.0"
53
53
  },
54
54
  "peerDependenciesMeta": {
@@ -300,6 +300,10 @@ export interface TypeCheckingConfig {
300
300
  * Whether the type of two-way bindings should be widened to allow `WritableSignal`.
301
301
  */
302
302
  allowSignalsInTwoWayBindings: boolean;
303
+ /**
304
+ * Whether the type of DOM events should be asserted with '@angular/core' 'ɵassertType' (see TCB implementation).
305
+ */
306
+ allowDomEventAssertion: boolean;
303
307
  /**
304
308
  * Whether to descend into the bodies of control flow blocks (`@if`, `@switch` and `@for`).
305
309
  */