@angular/compiler-cli 20.2.0-next.5 → 20.2.0-rc.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/bundles/{chunk-O4DJC7UC.js → chunk-B64MJ47E.js} +1 -1
- package/bundles/chunk-BPDNYZBC.js +1 -1
- package/bundles/{chunk-WLT4GJPA.js → chunk-LRXHLPJA.js} +1 -1
- package/bundles/{chunk-7DWCEZ6T.js → chunk-O2J2FHVK.js} +24 -15
- package/bundles/{chunk-EVMG2NVT.js → chunk-ZLMD23VK.js} +7 -4
- package/bundles/index.js +4 -4
- package/bundles/private/migrations.js +1 -1
- package/bundles/private/tooling.js +2 -2
- package/bundles/src/bin/ng_xi18n.js +4 -4
- package/bundles/src/bin/ngc.js +4 -4
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/typecheck/api/api.d.ts +4 -0
- package/src/ngtsc/typecheck/src/type_check_block.d.ts +1 -0
|
@@ -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-
|
|
458
|
+
var PLACEHOLDER_VERSION = "20.2.0-rc.0";
|
|
459
459
|
function wrapReference(wrapped) {
|
|
460
460
|
return { value: wrapped, type: wrapped };
|
|
461
461
|
}
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
tryParseSignalInputMapping,
|
|
17
17
|
tryParseSignalModelMapping,
|
|
18
18
|
tryParseSignalQueryFromInitializer
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-O2J2FHVK.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) {
|
|
@@ -13899,11 +13900,19 @@ var TcbDirectiveCtorOp = class extends TcbOp {
|
|
|
13899
13900
|
return true;
|
|
13900
13901
|
}
|
|
13901
13902
|
execute() {
|
|
13903
|
+
const genericInputs = /* @__PURE__ */ new Map();
|
|
13902
13904
|
const id = this.tcb.allocateId();
|
|
13905
|
+
let boundAttrs;
|
|
13906
|
+
let span;
|
|
13907
|
+
if (this.node instanceof TmplAstHostElement2) {
|
|
13908
|
+
boundAttrs = [];
|
|
13909
|
+
span = this.node.sourceSpan;
|
|
13910
|
+
} else {
|
|
13911
|
+
boundAttrs = getBoundAttributes(this.dir, this.node);
|
|
13912
|
+
span = this.node.startSourceSpan || this.node.sourceSpan;
|
|
13913
|
+
}
|
|
13903
13914
|
addExpressionIdentifier(id, ExpressionIdentifier.DIRECTIVE);
|
|
13904
|
-
addParseSpanInfo(id,
|
|
13905
|
-
const genericInputs = /* @__PURE__ */ new Map();
|
|
13906
|
-
const boundAttrs = getBoundAttributes(this.dir, this.node);
|
|
13915
|
+
addParseSpanInfo(id, span);
|
|
13907
13916
|
for (const attr of boundAttrs) {
|
|
13908
13917
|
if (!this.tcb.env.config.checkTypeOfAttributes && attr.attribute instanceof TmplAstTextAttribute2) {
|
|
13909
13918
|
continue;
|
|
@@ -14382,7 +14391,7 @@ var TcbUnclaimedOutputsOp = class extends TcbOp {
|
|
|
14382
14391
|
} else {
|
|
14383
14392
|
target = elId;
|
|
14384
14393
|
}
|
|
14385
|
-
if (this.target instanceof TmplAstElement2 && this.target.isVoid && ts60.isIdentifier(target)) {
|
|
14394
|
+
if (this.target instanceof TmplAstElement2 && this.target.isVoid && ts60.isIdentifier(target) && this.tcb.env.config.allowDomEventAssertion) {
|
|
14386
14395
|
domEventAssertion = ts60.factory.createCallExpression(this.tcb.env.referenceExternalSymbol("@angular/core", "\u0275assertType"), [ts60.factory.createTypeQueryNode(target)], [
|
|
14387
14396
|
ts60.factory.createPropertyAccessExpression(ts60.factory.createIdentifier(EVENT_PARAMETER), "target")
|
|
14388
14397
|
]);
|
|
@@ -15123,20 +15132,20 @@ var Scope = class _Scope {
|
|
|
15123
15132
|
}
|
|
15124
15133
|
}
|
|
15125
15134
|
appendDirectiveInputs(dir, node, dirMap) {
|
|
15126
|
-
|
|
15127
|
-
const host = this.tcb.env.reflector;
|
|
15128
|
-
const dirRef = dir.ref;
|
|
15129
|
-
if (!dir.isGeneric) {
|
|
15130
|
-
directiveOp = new TcbNonGenericDirectiveTypeOp(this.tcb, this, node, dir);
|
|
15131
|
-
} else if (!requiresInlineTypeCtor(dirRef.node, host, this.tcb.env) || this.tcb.env.config.useInlineTypeConstructors) {
|
|
15132
|
-
directiveOp = new TcbDirectiveCtorOp(this.tcb, this, node, dir);
|
|
15133
|
-
} else {
|
|
15134
|
-
directiveOp = new TcbGenericDirectiveTypeWithAnyParamsOp(this.tcb, this, node, dir);
|
|
15135
|
-
}
|
|
15135
|
+
const directiveOp = this.getDirectiveOp(dir, node);
|
|
15136
15136
|
const dirIndex = this.opQueue.push(directiveOp) - 1;
|
|
15137
15137
|
dirMap.set(dir, dirIndex);
|
|
15138
15138
|
this.opQueue.push(new TcbDirectiveInputsOp(this.tcb, this, node, dir));
|
|
15139
15139
|
}
|
|
15140
|
+
getDirectiveOp(dir, node) {
|
|
15141
|
+
const dirRef = dir.ref;
|
|
15142
|
+
if (!dir.isGeneric) {
|
|
15143
|
+
return new TcbNonGenericDirectiveTypeOp(this.tcb, this, node, dir);
|
|
15144
|
+
} else if (!requiresInlineTypeCtor(dirRef.node, this.tcb.env.reflector, this.tcb.env) || this.tcb.env.config.useInlineTypeConstructors) {
|
|
15145
|
+
return new TcbDirectiveCtorOp(this.tcb, this, node, dir);
|
|
15146
|
+
}
|
|
15147
|
+
return new TcbGenericDirectiveTypeWithAnyParamsOp(this.tcb, this, node, dir);
|
|
15148
|
+
}
|
|
15140
15149
|
appendSelectorlessDirectives(node) {
|
|
15141
15150
|
for (const directive of node.directives) {
|
|
15142
15151
|
if (!this.tcb.boundTarget.referencedDirectiveExists(directive.name)) {
|
|
@@ -15261,7 +15270,7 @@ var Scope = class _Scope {
|
|
|
15261
15270
|
if (directives !== null && directives.length > 0) {
|
|
15262
15271
|
const directiveOpMap = /* @__PURE__ */ new Map();
|
|
15263
15272
|
for (const directive of directives) {
|
|
15264
|
-
const directiveOp =
|
|
15273
|
+
const directiveOp = this.getDirectiveOp(directive, node);
|
|
15265
15274
|
directiveOpMap.set(directive, this.opQueue.push(directiveOp) - 1);
|
|
15266
15275
|
}
|
|
15267
15276
|
this.directiveOpMap.set(node, directiveOpMap);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
angularJitApplicationTransform
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LRXHLPJA.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-
|
|
95
|
+
} from "./chunk-O2J2FHVK.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) {
|
package/bundles/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
isTsDiagnostic,
|
|
29
29
|
performCompilation,
|
|
30
30
|
readConfiguration
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ZLMD23VK.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-
|
|
40
|
+
} from "./chunk-LRXHLPJA.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-
|
|
49
|
+
} from "./chunk-O2J2FHVK.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-
|
|
80
|
+
var VERSION = new Version("20.2.0-rc.0");
|
|
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-
|
|
16
|
+
} from "../chunk-O2J2FHVK.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-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-LRXHLPJA.js";
|
|
8
|
+
import "../chunk-O2J2FHVK.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-
|
|
9
|
+
} from "../../chunk-B64MJ47E.js";
|
|
10
10
|
import {
|
|
11
11
|
EmitFlags
|
|
12
|
-
} from "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
12
|
+
} from "../../chunk-ZLMD23VK.js";
|
|
13
|
+
import "../../chunk-LRXHLPJA.js";
|
|
14
|
+
import "../../chunk-O2J2FHVK.js";
|
|
15
15
|
import "../../chunk-I2BHWRAU.js";
|
|
16
16
|
import {
|
|
17
17
|
setFileSystem
|
package/bundles/src/bin/ngc.js
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
main
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-B64MJ47E.js";
|
|
9
|
+
import "../../chunk-ZLMD23VK.js";
|
|
10
|
+
import "../../chunk-LRXHLPJA.js";
|
|
11
|
+
import "../../chunk-O2J2FHVK.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-
|
|
10
|
+
export declare const PLACEHOLDER_VERSION = "20.2.0-rc.0";
|
|
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-
|
|
3
|
+
"version": "20.2.0-rc.0",
|
|
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-
|
|
51
|
+
"@angular/compiler": "20.2.0-rc.0",
|
|
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
|
*/
|
|
@@ -296,6 +296,7 @@ declare class Scope {
|
|
|
296
296
|
private appendInputsOfSelectorlessNode;
|
|
297
297
|
private appendOutputsOfSelectorlessNode;
|
|
298
298
|
private appendDirectiveInputs;
|
|
299
|
+
private getDirectiveOp;
|
|
299
300
|
private appendSelectorlessDirectives;
|
|
300
301
|
private appendDeepSchemaChecks;
|
|
301
302
|
private appendIcuExpressions;
|