@angular/compiler-cli 21.1.0-rc.0 → 21.1.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-G5W5AISR.js → chunk-ATAZXXPH.js} +2 -2
- package/bundles/{chunk-6LHOU42A.js → chunk-C6LLJPQH.js} +1 -1
- package/bundles/{chunk-B43HGQHK.js → chunk-EWMF72RR.js} +4 -3
- package/bundles/{chunk-G2AK5XJW.js → chunk-TTZRVNVM.js} +16 -10
- package/bundles/chunk-WEF4HIPN.js +1 -1
- package/bundles/index.js +4 -4
- package/bundles/private/migrations.js +2 -2
- package/bundles/private/testing.js +1 -1
- package/bundles/private/tooling.js +1 -1
- 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/diagnostics/index.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/error_code.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/error_details_base_url.d.ts +1 -0
- package/src/ngtsc/typecheck/src/oob.d.ts +2 -2
- package/src/ngtsc/typecheck/src/ops/signal_forms.d.ts +2 -2
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
TrackedIncrementalBuildStrategy,
|
|
9
9
|
freshCompilationTicket,
|
|
10
10
|
incrementalFromCompilerTicket
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EWMF72RR.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-
|
|
21
|
+
} from "./chunk-TTZRVNVM.js";
|
|
22
22
|
import {
|
|
23
23
|
absoluteFrom,
|
|
24
24
|
createFileSystemTsReadDirectoryFn,
|
|
@@ -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-
|
|
91
|
+
} from "./chunk-TTZRVNVM.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
|
|
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
|
-
|
|
4969
|
+
${DOC_PAGE_BASE_URL}/tools/cli/template-typecheck
|
|
4969
4970
|
`.trim()
|
|
4970
4971
|
});
|
|
4971
4972
|
}
|
|
@@ -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.1.0";
|
|
233
|
+
const prefix = isPreRelease ? "next" : `v${VERSION.major}`;
|
|
234
|
+
return `https://${prefix}.angular.dev`;
|
|
235
|
+
})();
|
|
230
236
|
var ERROR_DETAILS_PAGE_BASE_URL = (() => {
|
|
231
|
-
|
|
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
|
|
@@ -13697,7 +13702,7 @@ var Environment = class extends ReferenceEmitEnvironment {
|
|
|
13697
13702
|
};
|
|
13698
13703
|
|
|
13699
13704
|
// packages/compiler-cli/src/ngtsc/typecheck/src/oob.js
|
|
13700
|
-
import { AbsoluteSourceSpan as AbsoluteSourceSpan3, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent as TmplAstBoundEvent2, TmplAstComponent, TmplAstDirective, TmplAstElement
|
|
13705
|
+
import { AbsoluteSourceSpan as AbsoluteSourceSpan3, BindingType as BindingType2, ParseSourceSpan as ParseSourceSpan2, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent as TmplAstBoundEvent2, TmplAstComponent, TmplAstDirective, TmplAstElement } from "@angular/compiler";
|
|
13701
13706
|
import ts58 from "typescript";
|
|
13702
13707
|
var OutOfBandDiagnosticRecorderImpl = class {
|
|
13703
13708
|
resolver;
|
|
@@ -13832,7 +13837,7 @@ Consider enabling the 'strictTemplates' option in your tsconfig.json for better
|
|
|
13832
13837
|
splitTwoWayBinding(id, input, output, inputConsumer, outputConsumer) {
|
|
13833
13838
|
const mapping = this.resolver.getTemplateSourceMapping(id);
|
|
13834
13839
|
const errorMsg = `The property and event halves of the two-way binding '${input.name}' are not bound to the same target.
|
|
13835
|
-
Find more at
|
|
13840
|
+
Find more at ${DOC_PAGE_BASE_URL}/guide/templates/two-way-binding`;
|
|
13836
13841
|
const relatedMessages = [];
|
|
13837
13842
|
relatedMessages.push({
|
|
13838
13843
|
text: `The property half of the binding is to the '${inputConsumer.name.text}' component.`,
|
|
@@ -13972,9 +13977,9 @@ Deferred blocks can only access triggers in same view, a parent embedded view or
|
|
|
13972
13977
|
} else {
|
|
13973
13978
|
name = node.name;
|
|
13974
13979
|
}
|
|
13975
|
-
message = `Binding to '${name}' is not allowed on nodes using the '[
|
|
13980
|
+
message = `Binding to '${name}' is not allowed on nodes using the '[formField]' directive`;
|
|
13976
13981
|
} else {
|
|
13977
|
-
message = `Setting the '${node.name}' attribute is not allowed on nodes using the '[
|
|
13982
|
+
message = `Setting the '${node.name}' attribute is not allowed on nodes using the '[formField]' directive`;
|
|
13978
13983
|
}
|
|
13979
13984
|
this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), node.sourceSpan, ts58.DiagnosticCategory.Error, ngErrorCode(ErrorCode.FORM_FIELD_UNSUPPORTED_BINDING), message));
|
|
13980
13985
|
}
|
|
@@ -15250,7 +15255,7 @@ var TcbNativeFieldOp = class extends TcbOp {
|
|
|
15250
15255
|
}
|
|
15251
15256
|
execute() {
|
|
15252
15257
|
const inputs = this.node instanceof TmplAstHostElement2 ? this.node.bindings : this.node.inputs;
|
|
15253
|
-
const fieldBinding = inputs.find((input) => input.type === BindingType3.Property &&
|
|
15258
|
+
const fieldBinding = inputs.find((input) => input.type === BindingType3.Property && input.name === "formField") ?? null;
|
|
15254
15259
|
if (fieldBinding === null) {
|
|
15255
15260
|
return null;
|
|
15256
15261
|
}
|
|
@@ -15330,7 +15335,7 @@ var TcbNativeRadioButtonFieldOp = class extends TcbNativeFieldOp {
|
|
|
15330
15335
|
}
|
|
15331
15336
|
};
|
|
15332
15337
|
function expandBoundAttributesForField(directive, node, customFormControlType) {
|
|
15333
|
-
const fieldBinding = node.inputs.find((input) => input.type === BindingType3.Property &&
|
|
15338
|
+
const fieldBinding = node.inputs.find((input) => input.type === BindingType3.Property && input.name === "formField");
|
|
15334
15339
|
if (!fieldBinding) {
|
|
15335
15340
|
return null;
|
|
15336
15341
|
}
|
|
@@ -15357,7 +15362,7 @@ function expandBoundAttributesForField(directive, node, customFormControlType) {
|
|
|
15357
15362
|
return boundInputs;
|
|
15358
15363
|
}
|
|
15359
15364
|
function isFieldDirective(meta) {
|
|
15360
|
-
if (meta.name !== "
|
|
15365
|
+
if (meta.name !== "FormField") {
|
|
15361
15366
|
return false;
|
|
15362
15367
|
}
|
|
15363
15368
|
if (meta.ref.bestGuessOwningModule?.specifier === "@angular/forms/signals") {
|
|
@@ -15445,7 +15450,7 @@ function hasModelInput(name, meta) {
|
|
|
15445
15450
|
function isFormControl(allDirectiveMatches) {
|
|
15446
15451
|
let result = false;
|
|
15447
15452
|
for (const match of allDirectiveMatches) {
|
|
15448
|
-
if (match.inputs.hasBindingPropertyName("
|
|
15453
|
+
if (match.inputs.hasBindingPropertyName("formField")) {
|
|
15449
15454
|
if (!isFieldDirective(match)) {
|
|
15450
15455
|
return false;
|
|
15451
15456
|
}
|
|
@@ -22999,6 +23004,7 @@ export {
|
|
|
22999
23004
|
makeDiagnostic,
|
|
23000
23005
|
isFatalDiagnosticError,
|
|
23001
23006
|
isLocalCompilationDiagnostics,
|
|
23007
|
+
DOC_PAGE_BASE_URL,
|
|
23002
23008
|
ERROR_DETAILS_PAGE_BASE_URL,
|
|
23003
23009
|
ExtendedTemplateDiagnosticName,
|
|
23004
23010
|
isDtsPath,
|
|
@@ -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.1.0
|
|
458
|
+
var PLACEHOLDER_VERSION = "21.1.0";
|
|
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-
|
|
20
|
+
} from "./chunk-ATAZXXPH.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-
|
|
37
|
+
} from "./chunk-EWMF72RR.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-
|
|
49
|
+
} from "./chunk-TTZRVNVM.js";
|
|
50
50
|
import "./chunk-FROPOOFC.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.1.0
|
|
80
|
+
var VERSION = new Version("21.1.0");
|
|
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-
|
|
8
|
+
} from "../chunk-EWMF72RR.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-
|
|
35
|
+
} from "../chunk-TTZRVNVM.js";
|
|
36
36
|
import "../chunk-FROPOOFC.js";
|
|
37
37
|
import {
|
|
38
38
|
getFileSystem,
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
import {
|
|
7
7
|
main,
|
|
8
8
|
readCommandLineAndConfiguration
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-C6LLJPQH.js";
|
|
10
10
|
import {
|
|
11
11
|
EmitFlags
|
|
12
|
-
} from "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
12
|
+
} from "../../chunk-ATAZXXPH.js";
|
|
13
|
+
import "../../chunk-EWMF72RR.js";
|
|
14
|
+
import "../../chunk-TTZRVNVM.js";
|
|
15
15
|
import "../../chunk-FROPOOFC.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-C6LLJPQH.js";
|
|
9
|
+
import "../../chunk-ATAZXXPH.js";
|
|
10
|
+
import "../../chunk-EWMF72RR.js";
|
|
11
|
+
import "../../chunk-TTZRVNVM.js";
|
|
12
12
|
import "../../chunk-FROPOOFC.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.1.0
|
|
10
|
+
export declare const PLACEHOLDER_VERSION = "21.1.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": "21.1.0
|
|
3
|
+
"version": "21.1.0",
|
|
4
4
|
"description": "Angular - the compiler CLI for Node.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"bin": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"typescript": "5.9.3"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@angular/compiler": "21.1.0
|
|
46
|
+
"@angular/compiler": "21.1.0",
|
|
47
47
|
"typescript": ">=5.9 <6.0"
|
|
48
48
|
},
|
|
49
49
|
"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 `
|
|
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,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,
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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;
|