@angular/compiler-cli 19.2.1 → 20.0.0-next.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.
- package/bundles/{chunk-YDD3LCLX.js → chunk-O2OVHMWL.js} +5 -5
- package/bundles/{chunk-J2ZUZS7X.js → chunk-PLKJMRGZ.js} +18 -2
- package/bundles/{chunk-J2ZUZS7X.js.map → chunk-PLKJMRGZ.js.map} +1 -1
- package/bundles/{chunk-OZ2WSYWM.js → chunk-QYORKQDN.js} +17 -2
- package/bundles/{chunk-OZ2WSYWM.js.map → chunk-QYORKQDN.js.map} +1 -1
- package/bundles/{chunk-GYTY2X5V.js → chunk-SEPXPBD2.js} +3 -3
- package/bundles/{chunk-ZWSJXDI6.js → chunk-SNXU6YPZ.js} +2 -2
- package/bundles/{chunk-J7S5XIBF.js → chunk-UAA7BTBW.js} +6 -6
- package/bundles/{chunk-RQP5TAHR.js → chunk-YSSSYIZJ.js} +2 -2
- package/bundles/index.js +10 -10
- package/bundles/linker/babel/index.js +5 -2
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +2 -2
- package/bundles/private/migrations.js +2 -2
- package/bundles/private/tooling.js +4 -4
- package/bundles/src/bin/ng_xi18n.js +5 -5
- package/bundles/src/bin/ngc.js +5 -5
- package/bundles_metadata.json +1 -1
- package/linker/babel/src/ast/babel_ast_factory.d.ts +1 -0
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +3 -4
- package/src/ngtsc/translator/src/api/ast_factory.d.ts +7 -1
- package/src/ngtsc/translator/src/translator.d.ts +2 -0
- package/src/ngtsc/translator/src/typescript_ast_factory.d.ts +1 -0
- package/bundles/ngcc/index.js +0 -52
- package/bundles/ngcc/index.js.map +0 -6
- package/ngcc/index.d.ts +0 -11
- /package/bundles/{chunk-YDD3LCLX.js.map → chunk-O2OVHMWL.js.map} +0 -0
- /package/bundles/{chunk-GYTY2X5V.js.map → chunk-SEPXPBD2.js.map} +0 -0
- /package/bundles/{chunk-ZWSJXDI6.js.map → chunk-SNXU6YPZ.js.map} +0 -0
- /package/bundles/{chunk-J7S5XIBF.js.map → chunk-UAA7BTBW.js.map} +0 -0
- /package/bundles/{chunk-RQP5TAHR.js.map → chunk-YSSSYIZJ.js.map} +0 -0
|
@@ -41,6 +41,7 @@ export declare class BabelAstFactory implements AstFactory<t.Statement, t.Expres
|
|
|
41
41
|
createTemplateLiteral(template: TemplateLiteral<t.Expression>): t.TemplateLiteral;
|
|
42
42
|
createThrowStatement: typeof t.throwStatement;
|
|
43
43
|
createTypeOfExpression(expression: t.Expression): t.Expression;
|
|
44
|
+
createVoidExpression(expression: t.Expression): t.Expression;
|
|
44
45
|
createUnaryExpression: typeof t.unaryExpression;
|
|
45
46
|
createVariableDeclaration(variableName: string, initializer: t.Expression | null, type: VariableDeclarationType): t.Statement;
|
|
46
47
|
setSourceMapRange<T extends t.Statement | t.Expression | t.TemplateElement>(node: T, sourceMapRange: SourceMapRange | null): T;
|
|
@@ -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 = "
|
|
10
|
+
export declare const PLACEHOLDER_VERSION = "20.0.0-next.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,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/compiler-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0-next.1",
|
|
4
4
|
"description": "Angular - the compiler CLI for Node.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"bin": {
|
|
7
|
-
"ngcc": "./bundles/ngcc/index.js",
|
|
8
7
|
"ngc": "./bundles/src/bin/ngc.js",
|
|
9
8
|
"ng-xi18n": "./bundles/src/bin/ng_xi18n.js"
|
|
10
9
|
},
|
|
@@ -53,8 +52,8 @@
|
|
|
53
52
|
"yargs": "^17.2.1"
|
|
54
53
|
},
|
|
55
54
|
"peerDependencies": {
|
|
56
|
-
"@angular/compiler": "
|
|
57
|
-
"typescript": ">=5.
|
|
55
|
+
"@angular/compiler": "20.0.0-next.1",
|
|
56
|
+
"typescript": ">=5.8 <5.9"
|
|
58
57
|
},
|
|
59
58
|
"repository": {
|
|
60
59
|
"type": "git",
|
|
@@ -197,6 +197,12 @@ export interface AstFactory<TStatement, TExpression> {
|
|
|
197
197
|
* @param expression the expression whose type we want.
|
|
198
198
|
*/
|
|
199
199
|
createTypeOfExpression(expression: TExpression): TExpression;
|
|
200
|
+
/**
|
|
201
|
+
* Create an expression that evaluates an expression and returns `undefined`.
|
|
202
|
+
*
|
|
203
|
+
* @param expression the expression whose type we want.
|
|
204
|
+
*/
|
|
205
|
+
createVoidExpression(expression: TExpression): TExpression;
|
|
200
206
|
/**
|
|
201
207
|
* Prefix the `operand` with the given `operator` (e.g. `-expr`).
|
|
202
208
|
*
|
|
@@ -232,7 +238,7 @@ export type UnaryOperator = '+' | '-' | '!';
|
|
|
232
238
|
/**
|
|
233
239
|
* The binary operators supported by the `AstFactory`.
|
|
234
240
|
*/
|
|
235
|
-
export type BinaryOperator = '&&' | '>' | '>=' | '&' | '|' | '/' | '==' | '===' | '<' | '<=' | '-' | '%' | '*' | '!=' | '!==' | '||' | '+' | '??';
|
|
241
|
+
export type BinaryOperator = '&&' | '>' | '>=' | '&' | '|' | '/' | '==' | '===' | '<' | '<=' | '-' | '%' | '*' | '**' | '!=' | '!==' | '||' | '+' | '??';
|
|
236
242
|
/**
|
|
237
243
|
* The original location of the start or end of a node created by the `AstFactory`.
|
|
238
244
|
*/
|
|
@@ -60,7 +60,9 @@ export declare class ExpressionTranslatorVisitor<TFile, TStatement, TExpression>
|
|
|
60
60
|
visitTemplateLiteralElementExpr(ast: o.TemplateLiteralElementExpr, context: any): void;
|
|
61
61
|
visitWrappedNodeExpr(ast: o.WrappedNodeExpr<any>, _context: Context): any;
|
|
62
62
|
visitTypeofExpr(ast: o.TypeofExpr, context: Context): TExpression;
|
|
63
|
+
visitVoidExpr(ast: o.VoidExpr, context: Context): TExpression;
|
|
63
64
|
visitUnaryOperatorExpr(ast: o.UnaryOperatorExpr, context: Context): TExpression;
|
|
65
|
+
visitParenthesizedExpr(ast: o.ParenthesizedExpr, context: any): TExpression;
|
|
64
66
|
private visitStatements;
|
|
65
67
|
private setSourceMapRange;
|
|
66
68
|
private attachComments;
|
|
@@ -39,6 +39,7 @@ export declare class TypeScriptAstFactory implements AstFactory<ts.Statement, ts
|
|
|
39
39
|
createTemplateLiteral(template: TemplateLiteral<ts.Expression>): ts.TemplateLiteral;
|
|
40
40
|
createThrowStatement: (expression: ts.Expression) => ts.ThrowStatement;
|
|
41
41
|
createTypeOfExpression: (expression: ts.Expression) => ts.TypeOfExpression;
|
|
42
|
+
createVoidExpression: (expression: ts.Expression) => ts.VoidExpression;
|
|
42
43
|
createUnaryExpression(operator: UnaryOperator, operand: ts.Expression): ts.Expression;
|
|
43
44
|
createVariableDeclaration(variableName: string, initializer: ts.Expression | null, type: VariableDeclarationType): ts.Statement;
|
|
44
45
|
setSourceMapRange<T extends ts.Node>(node: T, sourceMapRange: SourceMapRange | null): T;
|
package/bundles/ngcc/index.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import {createRequire as __cjsCompatRequire} from 'module';
|
|
4
|
-
const require = __cjsCompatRequire(import.meta.url);
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/ngcc/index.mjs
|
|
8
|
-
function stringEncaseCRLFWithFirstIndex(value, prefix, postfix, index) {
|
|
9
|
-
let endIndex = 0;
|
|
10
|
-
let returnValue = "";
|
|
11
|
-
do {
|
|
12
|
-
const gotCR = value[index - 1] === "\r";
|
|
13
|
-
returnValue += value.substring(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
14
|
-
endIndex = index + 1;
|
|
15
|
-
index = value.indexOf("\n", endIndex);
|
|
16
|
-
} while (index !== -1);
|
|
17
|
-
returnValue += value.substring(endIndex);
|
|
18
|
-
return returnValue;
|
|
19
|
-
}
|
|
20
|
-
function styleMessage(message) {
|
|
21
|
-
const open = "\x1B[31m\x1B[1m";
|
|
22
|
-
const close = "\x1B[22m\x1B[39m";
|
|
23
|
-
let styledMessage = message;
|
|
24
|
-
const lfIndex = styledMessage.indexOf("\n");
|
|
25
|
-
if (lfIndex !== -1) {
|
|
26
|
-
styledMessage = stringEncaseCRLFWithFirstIndex(styledMessage, close, open, lfIndex);
|
|
27
|
-
}
|
|
28
|
-
return open + styledMessage + close;
|
|
29
|
-
}
|
|
30
|
-
var warningMsg = `
|
|
31
|
-
|
|
32
|
-
==========================================
|
|
33
|
-
|
|
34
|
-
ALERT: As of Angular 16, "ngcc" is no longer required and not invoked during CLI builds. You are seeing this message because the current operation invoked the "ngcc" command directly. This "ngcc" invocation can be safely removed.
|
|
35
|
-
|
|
36
|
-
A common reason for this is invoking "ngcc" from a "postinstall" hook in package.json.
|
|
37
|
-
|
|
38
|
-
In Angular 17, this command will be removed. Remove this and any other invocations to prevent errors in later versions.
|
|
39
|
-
|
|
40
|
-
==========================================
|
|
41
|
-
|
|
42
|
-
`;
|
|
43
|
-
console.warn(styleMessage(warningMsg));
|
|
44
|
-
process.exit(0);
|
|
45
|
-
/**
|
|
46
|
-
* @license
|
|
47
|
-
* Copyright Google LLC All Rights Reserved.
|
|
48
|
-
*
|
|
49
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
50
|
-
* found in the LICENSE file at https://angular.dev/license
|
|
51
|
-
*/
|
|
52
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../packages/compiler-cli/ngcc/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;AAUA,SAAS,+BACP,OACA,QACA,SACA,OAAa;AAEb,MAAI,WAAW;AACf,MAAI,cAAc;AAElB,KAAG;AACD,UAAM,QAAQ,MAAM,QAAQ,OAAO;AACnC,mBACE,MAAM,UAAU,UAAU,QAAQ,QAAQ,IAAI,KAAK,IACnD,UACC,QAAQ,SAAS,QAClB;AACF,eAAW,QAAQ;AACnB,YAAQ,MAAM,QAAQ,MAAM,QAAQ;EACtC,SAAS,UAAU;AAEnB,iBAAe,MAAM,UAAU,QAAQ;AACvC,SAAO;AACT;AAIA,SAAS,aAAa,SAAe;AAEnC,QAAM,OAAO;AACb,QAAM,QAAQ;AAEd,MAAI,gBAAgB;AACpB,QAAM,UAAU,cAAc,QAAQ,IAAI;AAC1C,MAAI,YAAY,IAAI;AAClB,oBAAgB,+BAA+B,eAAe,OAAO,MAAM,OAAO;EACpF;AAEA,SAAO,OAAO,gBAAgB;AAChC;AAEA,IAAM,aAAa;;;;;;;;;;;;;AAcnB,QAAQ,KAAK,aAAa,UAAU,CAAC;AACrC,QAAQ,KAAK,CAAC;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
package/ngcc/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright Google LLC All Rights Reserved.
|
|
5
|
-
*
|
|
6
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
-
*/
|
|
9
|
-
declare function stringEncaseCRLFWithFirstIndex(value: string, prefix: string, postfix: string, index: number): string;
|
|
10
|
-
declare function styleMessage(message: string): string;
|
|
11
|
-
declare const warningMsg = "\n\n==========================================\n\nALERT: As of Angular 16, \"ngcc\" is no longer required and not invoked during CLI builds. You are seeing this message because the current operation invoked the \"ngcc\" command directly. This \"ngcc\" invocation can be safely removed.\n\nA common reason for this is invoking \"ngcc\" from a \"postinstall\" hook in package.json.\n\nIn Angular 17, this command will be removed. Remove this and any other invocations to prevent errors in later versions.\n\n==========================================\n\n";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|