@angular/core 21.0.0-next.4 → 21.0.0-next.5
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/api.d.d.ts +7 -4
- package/chrome_dev_tools_performance.d.d.ts +1 -1
- package/discovery.d.d.ts +6 -5
- package/effect.d.d.ts +1 -2
- package/event_dispatcher.d.d.ts +1 -1
- package/fesm2022/attribute.mjs +1 -1
- package/fesm2022/core.mjs +10 -11
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/debug_node.mjs +56 -65
- package/fesm2022/debug_node.mjs.map +1 -1
- package/fesm2022/effect.mjs +3 -4
- package/fesm2022/effect.mjs.map +1 -1
- package/fesm2022/not_found.mjs +1 -1
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +3 -4
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/resource.mjs +5 -4
- package/fesm2022/resource.mjs.map +1 -1
- package/fesm2022/root_effect_scheduler.mjs +8 -8
- package/fesm2022/root_effect_scheduler.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/signal.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/fesm2022/weak_ref.mjs +1 -1
- package/graph.d.d.ts +1 -1
- package/index.d.ts +9 -12
- package/package.json +2 -2
- package/primitives/di/index.d.ts +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -2
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +5 -5
- package/schematics/bundles/application-config-core.cjs +5 -5
- package/schematics/bundles/{apply_import_manager-DroqamMP.cjs → apply_import_manager-Bx60Uquz.cjs} +3 -3
- package/schematics/bundles/bootstrap-options-migration.cjs +13 -91
- package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
- package/schematics/bundles/{compiler_host-aKaS4KRz.cjs → compiler_host-Aouk-n4F.cjs} +2 -2
- package/schematics/bundles/control-flow-migration.cjs +71 -39
- package/schematics/bundles/imports-DwPXlGFl.cjs +1 -1
- package/schematics/bundles/{index-DaB-z4lP.cjs → index-BZQb51Qf.cjs} +4 -4
- package/schematics/bundles/{index-BI97t1U8.cjs → index-Bb6iejCd.cjs} +35 -21
- package/schematics/bundles/inject-migration.cjs +3 -3
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-DPuwhGod.cjs → migrate_ts_type_references-By2ZtKls.cjs} +5 -5
- package/schematics/bundles/{ng_component_template-CytqBs-q.cjs → ng_component_template-B4M8mTyv.cjs} +2 -2
- package/schematics/bundles/ng_decorators-BI0uV7KI.cjs +1 -1
- package/schematics/bundles/ngclass-to-class-migration.cjs +108 -96
- package/schematics/bundles/ngstyle-to-style-migration.cjs +7 -7
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +6 -6
- package/schematics/bundles/{parse_html-CeQjkdOK.cjs → parse_html-7Wl_HDnw.cjs} +2 -2
- package/schematics/bundles/{project_paths-Cz4x-QiT.cjs → project_paths-Dr2s3Pq3.cjs} +3 -3
- package/schematics/bundles/{project_tsconfig_paths-Clg7WX1w.cjs → project_tsconfig_paths-DX9KHLn9.cjs} +258 -41
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +3 -3
- package/schematics/bundles/router-current-navigation.cjs +4 -4
- package/schematics/bundles/router-last-successful-navigation.cjs +4 -4
- package/schematics/bundles/self-closing-tags-migration.cjs +6 -6
- package/schematics/bundles/signal-input-migration.cjs +7 -7
- package/schematics/bundles/signal-queries-migration.cjs +7 -7
- package/schematics/bundles/signals.cjs +7 -7
- package/schematics/bundles/standalone-migration.cjs +14 -7
- package/schematics/bundles/symbol-BObKoqes.cjs +1 -1
- package/testing/index.d.ts +1 -1
- package/weak_ref.d.d.ts +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-next.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
9
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DX9KHLn9.cjs');
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* parses the template string into the Html AST
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-next.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var index = require('./index-
|
|
9
|
+
var index = require('./index-Bb6iejCd.cjs');
|
|
10
10
|
var schematics = require('@angular-devkit/schematics');
|
|
11
11
|
var core = require('@angular-devkit/core');
|
|
12
12
|
var posixPath = require('node:path/posix');
|
|
13
13
|
var os = require('os');
|
|
14
14
|
var ts = require('typescript');
|
|
15
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
15
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DX9KHLn9.cjs');
|
|
16
16
|
require('path');
|
|
17
17
|
var path = require('node:path');
|
|
18
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-next.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -1233,6 +1233,27 @@ class InstantiateExpr extends Expression {
|
|
|
1233
1233
|
return new InstantiateExpr(this.classExpr.clone(), this.args.map((arg) => arg.clone()), this.type, this.sourceSpan);
|
|
1234
1234
|
}
|
|
1235
1235
|
}
|
|
1236
|
+
let RegularExpressionLiteral$1 = class RegularExpressionLiteral extends Expression {
|
|
1237
|
+
body;
|
|
1238
|
+
flags;
|
|
1239
|
+
constructor(body, flags, sourceSpan) {
|
|
1240
|
+
super(null, sourceSpan);
|
|
1241
|
+
this.body = body;
|
|
1242
|
+
this.flags = flags;
|
|
1243
|
+
}
|
|
1244
|
+
isEquivalent(e) {
|
|
1245
|
+
return e instanceof RegularExpressionLiteral && this.body === e.body && this.flags === e.flags;
|
|
1246
|
+
}
|
|
1247
|
+
isConstant() {
|
|
1248
|
+
return true;
|
|
1249
|
+
}
|
|
1250
|
+
visitExpression(visitor, context) {
|
|
1251
|
+
return visitor.visitRegularExpressionLiteral(this, context);
|
|
1252
|
+
}
|
|
1253
|
+
clone() {
|
|
1254
|
+
return new RegularExpressionLiteral(this.body, this.flags, this.sourceSpan);
|
|
1255
|
+
}
|
|
1256
|
+
};
|
|
1236
1257
|
class LiteralExpr extends Expression {
|
|
1237
1258
|
value;
|
|
1238
1259
|
constructor(value, type, sourceSpan) {
|
|
@@ -2007,6 +2028,9 @@ let RecursiveAstVisitor$1 = class RecursiveAstVisitor {
|
|
|
2007
2028
|
visitLiteralExpr(ast, context) {
|
|
2008
2029
|
return this.visitExpression(ast, context);
|
|
2009
2030
|
}
|
|
2031
|
+
visitRegularExpressionLiteral(ast, context) {
|
|
2032
|
+
return this.visitExpression(ast, context);
|
|
2033
|
+
}
|
|
2010
2034
|
visitLocalizedString(ast, context) {
|
|
2011
2035
|
return this.visitExpression(ast, context);
|
|
2012
2036
|
}
|
|
@@ -2447,6 +2471,9 @@ class GenericKeyFn {
|
|
|
2447
2471
|
else if (expr instanceof LiteralExpr) {
|
|
2448
2472
|
return String(expr.value);
|
|
2449
2473
|
}
|
|
2474
|
+
else if (expr instanceof RegularExpressionLiteral$1) {
|
|
2475
|
+
return `/${expr.body}/${expr.flags ?? ''}`;
|
|
2476
|
+
}
|
|
2450
2477
|
else if (expr instanceof LiteralArrayExpr) {
|
|
2451
2478
|
const entries = [];
|
|
2452
2479
|
for (const entry of expr.entries) {
|
|
@@ -3441,6 +3468,10 @@ class AbstractEmitterVisitor {
|
|
|
3441
3468
|
}
|
|
3442
3469
|
return null;
|
|
3443
3470
|
}
|
|
3471
|
+
visitRegularExpressionLiteral(ast, ctx) {
|
|
3472
|
+
ctx.print(ast, `/${ast.body}/${ast.flags || ''}`);
|
|
3473
|
+
return null;
|
|
3474
|
+
}
|
|
3444
3475
|
visitLocalizedString(ast, ctx) {
|
|
3445
3476
|
const head = ast.serializeI18nHead();
|
|
3446
3477
|
ctx.print(ast, '$localize `' + head.raw);
|
|
@@ -4249,6 +4280,18 @@ class ParenthesizedExpression extends AST {
|
|
|
4249
4280
|
return visitor.visitParenthesizedExpression(this, context);
|
|
4250
4281
|
}
|
|
4251
4282
|
}
|
|
4283
|
+
class RegularExpressionLiteral extends AST {
|
|
4284
|
+
body;
|
|
4285
|
+
flags;
|
|
4286
|
+
constructor(span, sourceSpan, body, flags) {
|
|
4287
|
+
super(span, sourceSpan);
|
|
4288
|
+
this.body = body;
|
|
4289
|
+
this.flags = flags;
|
|
4290
|
+
}
|
|
4291
|
+
visit(visitor, context) {
|
|
4292
|
+
return visitor.visitRegularExpressionLiteral(this, context);
|
|
4293
|
+
}
|
|
4294
|
+
}
|
|
4252
4295
|
/**
|
|
4253
4296
|
* Records the absolute position of a text span in a source file, where `start` and `end` are the
|
|
4254
4297
|
* starting and ending byte offsets, respectively, of the text span in a source file.
|
|
@@ -4409,6 +4452,7 @@ class RecursiveAstVisitor {
|
|
|
4409
4452
|
visitParenthesizedExpression(ast, context) {
|
|
4410
4453
|
this.visit(ast.expression, context);
|
|
4411
4454
|
}
|
|
4455
|
+
visitRegularExpressionLiteral(ast, context) { }
|
|
4412
4456
|
// This is not part of the AstVisitor interface, just a helper method
|
|
4413
4457
|
visitAll(asts, context) {
|
|
4414
4458
|
for (const ast of asts) {
|
|
@@ -10324,7 +10368,8 @@ function transformExpressionsInExpression(expr, transform, flags) {
|
|
|
10324
10368
|
}
|
|
10325
10369
|
else if (expr instanceof ReadVarExpr ||
|
|
10326
10370
|
expr instanceof ExternalExpr ||
|
|
10327
|
-
expr instanceof LiteralExpr
|
|
10371
|
+
expr instanceof LiteralExpr ||
|
|
10372
|
+
expr instanceof RegularExpressionLiteral$1) ;
|
|
10328
10373
|
else {
|
|
10329
10374
|
throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);
|
|
10330
10375
|
}
|
|
@@ -11702,6 +11747,16 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
11702
11747
|
}
|
|
11703
11748
|
}
|
|
11704
11749
|
|
|
11750
|
+
const ARIA_PREFIX = 'aria-';
|
|
11751
|
+
/**
|
|
11752
|
+
* Returns whether `name` is an ARIA attribute name.
|
|
11753
|
+
*
|
|
11754
|
+
* This is a heuristic based on whether name begins with and is longer than `aria-`.
|
|
11755
|
+
*/
|
|
11756
|
+
function isAriaAttribute(name) {
|
|
11757
|
+
return name.startsWith(ARIA_PREFIX) && name.length > ARIA_PREFIX.length;
|
|
11758
|
+
}
|
|
11759
|
+
|
|
11705
11760
|
/**
|
|
11706
11761
|
* Looks up an element in the given map by xref ID.
|
|
11707
11762
|
*/
|
|
@@ -11747,7 +11802,15 @@ function specializeBindings(job) {
|
|
|
11747
11802
|
break;
|
|
11748
11803
|
case BindingKind.Property:
|
|
11749
11804
|
case BindingKind.LegacyAnimation:
|
|
11750
|
-
|
|
11805
|
+
// Convert a property binding targeting an ARIA attribute (e.g. [aria-label]) into an
|
|
11806
|
+
// attribute binding when we know it can't also target an input. Note that a `Host` job is
|
|
11807
|
+
// always `DomOnly`, so this condition must be checked first.
|
|
11808
|
+
if (job.mode === TemplateCompilationMode.DomOnly && isAriaAttribute(op.name)) {
|
|
11809
|
+
OpList.replace(op, createAttributeOp(op.target,
|
|
11810
|
+
/* namespace= */ null, op.name, op.expression, op.securityContext,
|
|
11811
|
+
/* isTextAttribute= */ false, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
|
|
11812
|
+
}
|
|
11813
|
+
else if (job.kind === CompilationJobKind.Host) {
|
|
11751
11814
|
OpList.replace(op, createDomPropertyOp(op.name, op.expression, op.bindingKind, op.i18nContext, op.securityContext, op.sourceSpan));
|
|
11752
11815
|
}
|
|
11753
11816
|
else {
|
|
@@ -18133,7 +18196,9 @@ var TokenType;
|
|
|
18133
18196
|
TokenType[TokenType["String"] = 4] = "String";
|
|
18134
18197
|
TokenType[TokenType["Operator"] = 5] = "Operator";
|
|
18135
18198
|
TokenType[TokenType["Number"] = 6] = "Number";
|
|
18136
|
-
TokenType[TokenType["
|
|
18199
|
+
TokenType[TokenType["RegExpBody"] = 7] = "RegExpBody";
|
|
18200
|
+
TokenType[TokenType["RegExpFlags"] = 8] = "RegExpFlags";
|
|
18201
|
+
TokenType[TokenType["Error"] = 9] = "Error";
|
|
18137
18202
|
})(TokenType || (TokenType = {}));
|
|
18138
18203
|
var StringTokenKind;
|
|
18139
18204
|
(function (StringTokenKind) {
|
|
@@ -18228,6 +18293,12 @@ class Token {
|
|
|
18228
18293
|
isError() {
|
|
18229
18294
|
return this.type === TokenType.Error;
|
|
18230
18295
|
}
|
|
18296
|
+
isRegExpBody() {
|
|
18297
|
+
return this.type === TokenType.RegExpBody;
|
|
18298
|
+
}
|
|
18299
|
+
isRegExpFlags() {
|
|
18300
|
+
return this.type === TokenType.RegExpFlags;
|
|
18301
|
+
}
|
|
18231
18302
|
toNumber() {
|
|
18232
18303
|
return this.type === TokenType.Number ? this.numValue : -1;
|
|
18233
18304
|
}
|
|
@@ -18254,6 +18325,8 @@ class Token {
|
|
|
18254
18325
|
case TokenType.PrivateIdentifier:
|
|
18255
18326
|
case TokenType.String:
|
|
18256
18327
|
case TokenType.Error:
|
|
18328
|
+
case TokenType.RegExpBody:
|
|
18329
|
+
case TokenType.RegExpFlags:
|
|
18257
18330
|
return this.strValue;
|
|
18258
18331
|
case TokenType.Number:
|
|
18259
18332
|
return this.numValue.toString();
|
|
@@ -18290,6 +18363,12 @@ function newNumberToken(index, end, n) {
|
|
|
18290
18363
|
function newErrorToken(index, end, message) {
|
|
18291
18364
|
return new Token(index, end, TokenType.Error, 0, message);
|
|
18292
18365
|
}
|
|
18366
|
+
function newRegExpBodyToken(index, end, text) {
|
|
18367
|
+
return new Token(index, end, TokenType.RegExpBody, 0, text);
|
|
18368
|
+
}
|
|
18369
|
+
function newRegExpFlagsToken(index, end, text) {
|
|
18370
|
+
return new Token(index, end, TokenType.RegExpFlags, 0, text);
|
|
18371
|
+
}
|
|
18293
18372
|
const EOF = new Token(-1, -1, TokenType.Character, 0, '');
|
|
18294
18373
|
class _Scanner {
|
|
18295
18374
|
input;
|
|
@@ -18373,7 +18452,9 @@ class _Scanner {
|
|
|
18373
18452
|
case $MINUS:
|
|
18374
18453
|
return this.scanComplexOperator(start, '-', $EQ, '=');
|
|
18375
18454
|
case $SLASH:
|
|
18376
|
-
return this.
|
|
18455
|
+
return this.isStartOfRegex()
|
|
18456
|
+
? this.scanRegex(index)
|
|
18457
|
+
: this.scanComplexOperator(start, '/', $EQ, '=');
|
|
18377
18458
|
case $PERCENT:
|
|
18378
18459
|
return this.scanComplexOperator(start, '%', $EQ, '=');
|
|
18379
18460
|
case $CARET:
|
|
@@ -18636,6 +18717,81 @@ class _Scanner {
|
|
|
18636
18717
|
}
|
|
18637
18718
|
return newOperatorToken(start, this.index, operator);
|
|
18638
18719
|
}
|
|
18720
|
+
isStartOfRegex() {
|
|
18721
|
+
if (this.tokens.length === 0) {
|
|
18722
|
+
return true;
|
|
18723
|
+
}
|
|
18724
|
+
const prevToken = this.tokens[this.tokens.length - 1];
|
|
18725
|
+
// If a slash is preceded by a `!` operator, we need to distinguish whether it's a
|
|
18726
|
+
// negation or a non-null assertion. Regexes can only be precded by negations.
|
|
18727
|
+
if (prevToken.isOperator('!')) {
|
|
18728
|
+
const beforePrevToken = this.tokens.length > 1 ? this.tokens[this.tokens.length - 2] : null;
|
|
18729
|
+
const isNegation = beforePrevToken === null ||
|
|
18730
|
+
(beforePrevToken.type !== TokenType.Identifier &&
|
|
18731
|
+
!beforePrevToken.isCharacter($RPAREN) &&
|
|
18732
|
+
!beforePrevToken.isCharacter($RBRACKET));
|
|
18733
|
+
return isNegation;
|
|
18734
|
+
}
|
|
18735
|
+
// Only consider the slash a regex if it's preceded either by:
|
|
18736
|
+
// - Any operator, aside from `!` which is special-cased above.
|
|
18737
|
+
// - Opening paren (e.g. `(/a/)`).
|
|
18738
|
+
// - Opening bracket (e.g. `[/a/]`).
|
|
18739
|
+
// - A comma (e.g. `[1, /a/]`).
|
|
18740
|
+
// - A colon (e.g. `{foo: /a/}`).
|
|
18741
|
+
return (prevToken.type === TokenType.Operator ||
|
|
18742
|
+
prevToken.isCharacter($LPAREN) ||
|
|
18743
|
+
prevToken.isCharacter($LBRACKET) ||
|
|
18744
|
+
prevToken.isCharacter($COMMA) ||
|
|
18745
|
+
prevToken.isCharacter($COLON));
|
|
18746
|
+
}
|
|
18747
|
+
scanRegex(tokenStart) {
|
|
18748
|
+
this.advance();
|
|
18749
|
+
const textStart = this.index;
|
|
18750
|
+
let inEscape = false;
|
|
18751
|
+
let inCharacterClass = false;
|
|
18752
|
+
while (true) {
|
|
18753
|
+
const peek = this.peek;
|
|
18754
|
+
if (peek === $EOF) {
|
|
18755
|
+
return this.error('Unterminated regular expression', 0);
|
|
18756
|
+
}
|
|
18757
|
+
if (inEscape) {
|
|
18758
|
+
inEscape = false;
|
|
18759
|
+
}
|
|
18760
|
+
else if (peek === $BACKSLASH) {
|
|
18761
|
+
inEscape = true;
|
|
18762
|
+
}
|
|
18763
|
+
else if (peek === $LBRACKET) {
|
|
18764
|
+
inCharacterClass = true;
|
|
18765
|
+
}
|
|
18766
|
+
else if (peek === $RBRACKET) {
|
|
18767
|
+
inCharacterClass = false;
|
|
18768
|
+
}
|
|
18769
|
+
else if (peek === $SLASH && !inCharacterClass) {
|
|
18770
|
+
break;
|
|
18771
|
+
}
|
|
18772
|
+
this.advance();
|
|
18773
|
+
}
|
|
18774
|
+
// Note that we want the text without the slashes,
|
|
18775
|
+
// but we still want the slashes to be part of the span.
|
|
18776
|
+
const value = this.input.substring(textStart, this.index);
|
|
18777
|
+
this.advance();
|
|
18778
|
+
const bodyToken = newRegExpBodyToken(tokenStart, this.index, value);
|
|
18779
|
+
const flagsToken = this.scanRegexFlags(this.index);
|
|
18780
|
+
if (flagsToken !== null) {
|
|
18781
|
+
this.tokens.push(bodyToken);
|
|
18782
|
+
return flagsToken;
|
|
18783
|
+
}
|
|
18784
|
+
return bodyToken;
|
|
18785
|
+
}
|
|
18786
|
+
scanRegexFlags(start) {
|
|
18787
|
+
if (!isAsciiLetter(this.peek)) {
|
|
18788
|
+
return null;
|
|
18789
|
+
}
|
|
18790
|
+
while (isAsciiLetter(this.peek)) {
|
|
18791
|
+
this.advance();
|
|
18792
|
+
}
|
|
18793
|
+
return newRegExpFlagsToken(start, this.index, this.input.substring(start, this.index));
|
|
18794
|
+
}
|
|
18639
18795
|
}
|
|
18640
18796
|
function isIdentifierStart(code) {
|
|
18641
18797
|
return (($a <= code && code <= $z) ||
|
|
@@ -18987,6 +19143,8 @@ var ParseContextFlags;
|
|
|
18987
19143
|
*/
|
|
18988
19144
|
ParseContextFlags[ParseContextFlags["Writable"] = 1] = "Writable";
|
|
18989
19145
|
})(ParseContextFlags || (ParseContextFlags = {}));
|
|
19146
|
+
/** Possible flags that can be used in a regex literal. */
|
|
19147
|
+
const SUPPORTED_REGEX_FLAGS = new Set(['d', 'g', 'i', 'm', 's', 'u', 'v', 'y']);
|
|
18990
19148
|
class _ParseAST {
|
|
18991
19149
|
input;
|
|
18992
19150
|
parseSourceSpan;
|
|
@@ -19556,6 +19714,9 @@ class _ParseAST {
|
|
|
19556
19714
|
this._reportErrorForPrivateIdentifier(this.next, null);
|
|
19557
19715
|
return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
|
|
19558
19716
|
}
|
|
19717
|
+
else if (this.next.isRegExpBody()) {
|
|
19718
|
+
return this.parseRegularExpressionLiteral();
|
|
19719
|
+
}
|
|
19559
19720
|
else if (this.index >= this.tokens.length) {
|
|
19560
19721
|
this.error(`Unexpected end of expression: ${this.input}`);
|
|
19561
19722
|
return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
|
|
@@ -19925,6 +20086,35 @@ class _ParseAST {
|
|
|
19925
20086
|
}
|
|
19926
20087
|
return new TemplateLiteral(this.span(start), this.sourceSpan(start), elements, expressions);
|
|
19927
20088
|
}
|
|
20089
|
+
parseRegularExpressionLiteral() {
|
|
20090
|
+
const bodyToken = this.next;
|
|
20091
|
+
this.advance();
|
|
20092
|
+
if (!bodyToken.isRegExpBody()) {
|
|
20093
|
+
return new EmptyExpr$1(this.span(this.inputIndex), this.sourceSpan(this.inputIndex));
|
|
20094
|
+
}
|
|
20095
|
+
let flagsToken = null;
|
|
20096
|
+
if (this.next.isRegExpFlags()) {
|
|
20097
|
+
flagsToken = this.next;
|
|
20098
|
+
this.advance();
|
|
20099
|
+
const seenFlags = new Set();
|
|
20100
|
+
for (let i = 0; i < flagsToken.strValue.length; i++) {
|
|
20101
|
+
const char = flagsToken.strValue[i];
|
|
20102
|
+
if (!SUPPORTED_REGEX_FLAGS.has(char)) {
|
|
20103
|
+
this.error(`Unsupported regular expression flag "${char}". The supported flags are: ` +
|
|
20104
|
+
Array.from(SUPPORTED_REGEX_FLAGS, (f) => `"${f}"`).join(', '), flagsToken.index + i);
|
|
20105
|
+
}
|
|
20106
|
+
else if (seenFlags.has(char)) {
|
|
20107
|
+
this.error(`Duplicate regular expression flag "${char}"`, flagsToken.index + i);
|
|
20108
|
+
}
|
|
20109
|
+
else {
|
|
20110
|
+
seenFlags.add(char);
|
|
20111
|
+
}
|
|
20112
|
+
}
|
|
20113
|
+
}
|
|
20114
|
+
const start = bodyToken.index;
|
|
20115
|
+
const end = flagsToken ? flagsToken.end : bodyToken.end;
|
|
20116
|
+
return new RegularExpressionLiteral(this.span(start, end), this.sourceSpan(start, end), bodyToken.strValue, flagsToken ? flagsToken.strValue : null);
|
|
20117
|
+
}
|
|
19928
20118
|
/**
|
|
19929
20119
|
* Consume the optional statement terminator: semicolon or comma.
|
|
19930
20120
|
*/
|
|
@@ -20138,6 +20328,9 @@ class SerializeExpressionVisitor {
|
|
|
20138
20328
|
visitVoidExpression(ast, context) {
|
|
20139
20329
|
return `void ${ast.expression.visit(this, context)}`;
|
|
20140
20330
|
}
|
|
20331
|
+
visitRegularExpressionLiteral(ast, context) {
|
|
20332
|
+
return `/${ast.body}/${ast.flags || ''}`;
|
|
20333
|
+
}
|
|
20141
20334
|
visitASTWithSource(ast, context) {
|
|
20142
20335
|
return ast.ast.visit(this, context);
|
|
20143
20336
|
}
|
|
@@ -23240,6 +23433,27 @@ function transformLiteralMap(expr) {
|
|
|
23240
23433
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
23241
23434
|
}
|
|
23242
23435
|
|
|
23436
|
+
/** Optimizes regular expressions used in expressions. */
|
|
23437
|
+
function optimizeRegularExpressions(job) {
|
|
23438
|
+
for (const view of job.units) {
|
|
23439
|
+
for (const op of view.ops()) {
|
|
23440
|
+
transformExpressionsInOp(op, (expr) => {
|
|
23441
|
+
if (expr instanceof RegularExpressionLiteral$1 &&
|
|
23442
|
+
// We can't optimize global regexes, because they're stateful.
|
|
23443
|
+
(expr.flags === null || !expr.flags.includes('g'))) {
|
|
23444
|
+
return job.pool.getSharedConstant(new RegularExpressionConstant(), expr);
|
|
23445
|
+
}
|
|
23446
|
+
return expr;
|
|
23447
|
+
}, VisitorContextFlag.None);
|
|
23448
|
+
}
|
|
23449
|
+
}
|
|
23450
|
+
}
|
|
23451
|
+
class RegularExpressionConstant extends GenericKeyFn {
|
|
23452
|
+
toSharedConstantDeclaration(declName, keyExpr) {
|
|
23453
|
+
return new DeclareVarStmt(declName, keyExpr, undefined, exports.StmtModifier.Final);
|
|
23454
|
+
}
|
|
23455
|
+
}
|
|
23456
|
+
|
|
23243
23457
|
// This file contains helpers for generating calls to Ivy instructions. In particular, each
|
|
23244
23458
|
// instruction type is represented as a function, which may select a specific instruction variant
|
|
23245
23459
|
// depending on the exact arguments.
|
|
@@ -23853,7 +24067,6 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
23853
24067
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
23854
24068
|
}
|
|
23855
24069
|
|
|
23856
|
-
const ARIA_PREFIX = 'aria';
|
|
23857
24070
|
/**
|
|
23858
24071
|
* Map of target resolvers for event listeners.
|
|
23859
24072
|
*/
|
|
@@ -24232,33 +24445,6 @@ function reifyUpdateOperations(unit, ops) {
|
|
|
24232
24445
|
}
|
|
24233
24446
|
}
|
|
24234
24447
|
}
|
|
24235
|
-
/**
|
|
24236
|
-
* Converts an ARIA property name to its corresponding attribute name, if necessary.
|
|
24237
|
-
*
|
|
24238
|
-
* For example, converts `ariaLabel` to `aria-label`.
|
|
24239
|
-
*
|
|
24240
|
-
* https://www.w3.org/TR/wai-aria-1.2/#accessibilityroleandproperties-correspondence
|
|
24241
|
-
*
|
|
24242
|
-
* This must be kept in sync with the the function of the same name in
|
|
24243
|
-
* packages/core/src/render3/instructions/aria_property.ts.
|
|
24244
|
-
*
|
|
24245
|
-
* @param name A property name that starts with `aria`.
|
|
24246
|
-
* @returns The corresponding attribute name.
|
|
24247
|
-
*/
|
|
24248
|
-
function ariaAttrName(name) {
|
|
24249
|
-
return name.charAt(ARIA_PREFIX.length) !== '-'
|
|
24250
|
-
? ARIA_PREFIX + '-' + name.slice(ARIA_PREFIX.length).toLowerCase()
|
|
24251
|
-
: name; // Property already has attribute name.
|
|
24252
|
-
}
|
|
24253
|
-
/**
|
|
24254
|
-
* Returns whether `name` is an ARIA property (or attribute) name.
|
|
24255
|
-
*
|
|
24256
|
-
* This is a heuristic based on whether name begins with and is longer than `aria`. For example,
|
|
24257
|
-
* this returns true for both `ariaLabel` and `aria-label`.
|
|
24258
|
-
*/
|
|
24259
|
-
function isAriaProperty(name) {
|
|
24260
|
-
return name.startsWith(ARIA_PREFIX) && name.length > ARIA_PREFIX.length;
|
|
24261
|
-
}
|
|
24262
24448
|
/**
|
|
24263
24449
|
* Reifies a DOM property binding operation.
|
|
24264
24450
|
*
|
|
@@ -24269,9 +24455,7 @@ function isAriaProperty(name) {
|
|
|
24269
24455
|
* @returns A statement to update the property at runtime.
|
|
24270
24456
|
*/
|
|
24271
24457
|
function reifyDomProperty(op) {
|
|
24272
|
-
return
|
|
24273
|
-
? attribute(ariaAttrName(op.name), op.expression, null, null, op.sourceSpan)
|
|
24274
|
-
: domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan);
|
|
24458
|
+
return domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan);
|
|
24275
24459
|
}
|
|
24276
24460
|
/**
|
|
24277
24461
|
* Reifies a property binding operation.
|
|
@@ -24283,7 +24467,7 @@ function reifyDomProperty(op) {
|
|
|
24283
24467
|
* @returns A statement to update the property at runtime.
|
|
24284
24468
|
*/
|
|
24285
24469
|
function reifyProperty(op) {
|
|
24286
|
-
return
|
|
24470
|
+
return isAriaAttribute(op.name)
|
|
24287
24471
|
? ariaProperty(op.name, op.expression, op.sourceSpan)
|
|
24288
24472
|
: property(op.name, op.expression, op.sanitizer, op.sourceSpan);
|
|
24289
24473
|
}
|
|
@@ -26331,6 +26515,7 @@ function wrapI18nIcus(job) {
|
|
|
26331
26515
|
*/
|
|
26332
26516
|
const phases = [
|
|
26333
26517
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
26518
|
+
{ kind: CompilationJobKind.Both, fn: optimizeRegularExpressions },
|
|
26334
26519
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
26335
26520
|
{ kind: CompilationJobKind.Tmpl, fn: emitNamespaceChanges },
|
|
26336
26521
|
{ kind: CompilationJobKind.Tmpl, fn: propagateI18nBlocks },
|
|
@@ -27177,6 +27362,9 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
27177
27362
|
else if (ast instanceof ParenthesizedExpression) {
|
|
27178
27363
|
return new ParenthesizedExpr(convertAst(ast.expression, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));
|
|
27179
27364
|
}
|
|
27365
|
+
else if (ast instanceof RegularExpressionLiteral) {
|
|
27366
|
+
return new RegularExpressionLiteral$1(ast.body, ast.flags, baseSourceSpan);
|
|
27367
|
+
}
|
|
27180
27368
|
else {
|
|
27181
27369
|
throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan?.start.file.url}"`);
|
|
27182
27370
|
}
|
|
@@ -32776,7 +32964,7 @@ function isAttrNode(ast) {
|
|
|
32776
32964
|
* @description
|
|
32777
32965
|
* Entry point for all public APIs of the compiler package.
|
|
32778
32966
|
*/
|
|
32779
|
-
const VERSION = new Version('21.0.0-next.
|
|
32967
|
+
const VERSION = new Version('21.0.0-next.5');
|
|
32780
32968
|
|
|
32781
32969
|
//////////////////////////////////////
|
|
32782
32970
|
// THIS FILE HAS GLOBAL SIDE EFFECT //
|
|
@@ -33839,7 +34027,7 @@ class NodeJSPathManipulation {
|
|
|
33839
34027
|
// G3-ESM-MARKER: G3 uses CommonJS, but externally everything in ESM.
|
|
33840
34028
|
// CommonJS/ESM interop for determining the current file name and containing dir.
|
|
33841
34029
|
const isCommonJS = typeof __filename !== 'undefined';
|
|
33842
|
-
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('project_tsconfig_paths-
|
|
34030
|
+
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('project_tsconfig_paths-DX9KHLn9.cjs', document.baseURI).href));
|
|
33843
34031
|
// Note, when this code loads in the browser, `url` may be an empty `{}` due to the Closure shims.
|
|
33844
34032
|
const currentFileName = isCommonJS
|
|
33845
34033
|
? __filename
|
|
@@ -38239,6 +38427,9 @@ class ExpressionTranslatorVisitor {
|
|
|
38239
38427
|
visitLiteralExpr(ast, _context) {
|
|
38240
38428
|
return this.setSourceMapRange(this.factory.createLiteral(ast.value), ast.sourceSpan);
|
|
38241
38429
|
}
|
|
38430
|
+
visitRegularExpressionLiteral(ast, context) {
|
|
38431
|
+
return this.setSourceMapRange(this.factory.createRegularExpressionLiteral(ast.body, ast.flags), ast.sourceSpan);
|
|
38432
|
+
}
|
|
38242
38433
|
visitLocalizedString(ast, context) {
|
|
38243
38434
|
// A `$localize` message consists of `messageParts` and `expressions`, which get interleaved
|
|
38244
38435
|
// together. The interleaved pieces look like:
|
|
@@ -38736,6 +38927,9 @@ class TypeTranslatorVisitor {
|
|
|
38736
38927
|
visitDynamicImportExpr(ast, context) {
|
|
38737
38928
|
throw new Error('Method not implemented.');
|
|
38738
38929
|
}
|
|
38930
|
+
visitRegularExpressionLiteral(ast, context) {
|
|
38931
|
+
throw new Error('Method not implemented.');
|
|
38932
|
+
}
|
|
38739
38933
|
visitNotExpr(ast, context) {
|
|
38740
38934
|
throw new Error('Method not implemented.');
|
|
38741
38935
|
}
|
|
@@ -39039,6 +39233,9 @@ class TypeScriptAstFactory {
|
|
|
39039
39233
|
ts.factory.createVariableDeclaration(variableName, undefined, undefined, initializer ?? undefined),
|
|
39040
39234
|
], this.VAR_TYPES[type]));
|
|
39041
39235
|
}
|
|
39236
|
+
createRegularExpressionLiteral(body, flags) {
|
|
39237
|
+
return ts.factory.createRegularExpressionLiteral(`/${body}/${flags ?? ''}`);
|
|
39238
|
+
}
|
|
39042
39239
|
setSourceMapRange(node, sourceMapRange) {
|
|
39043
39240
|
if (sourceMapRange === null) {
|
|
39044
39241
|
return node;
|
|
@@ -42438,6 +42635,10 @@ class MagicString {
|
|
|
42438
42635
|
if (chunk.outro.length) mappings.advance(chunk.outro);
|
|
42439
42636
|
});
|
|
42440
42637
|
|
|
42638
|
+
if (this.outro) {
|
|
42639
|
+
mappings.advance(this.outro);
|
|
42640
|
+
}
|
|
42641
|
+
|
|
42441
42642
|
return {
|
|
42442
42643
|
file: options.file ? options.file.split(/[/\\]/).pop() : undefined,
|
|
42443
42644
|
sources: [
|
|
@@ -43103,7 +43304,12 @@ class MagicString {
|
|
|
43103
43304
|
const index = original.indexOf(string);
|
|
43104
43305
|
|
|
43105
43306
|
if (index !== -1) {
|
|
43106
|
-
|
|
43307
|
+
if (typeof replacement === 'function') {
|
|
43308
|
+
replacement = replacement(string, index, original);
|
|
43309
|
+
}
|
|
43310
|
+
if (string !== replacement) {
|
|
43311
|
+
this.overwrite(index, index + string.length, replacement);
|
|
43312
|
+
}
|
|
43107
43313
|
}
|
|
43108
43314
|
|
|
43109
43315
|
return this;
|
|
@@ -43126,7 +43332,11 @@ class MagicString {
|
|
|
43126
43332
|
index = original.indexOf(string, index + stringLength)
|
|
43127
43333
|
) {
|
|
43128
43334
|
const previous = original.slice(index, index + stringLength);
|
|
43129
|
-
|
|
43335
|
+
let _replacement = replacement;
|
|
43336
|
+
if (typeof replacement === 'function') {
|
|
43337
|
+
_replacement = replacement(previous, index, original);
|
|
43338
|
+
}
|
|
43339
|
+
if (previous !== _replacement) this.overwrite(index, index + stringLength, _replacement);
|
|
43130
43340
|
}
|
|
43131
43341
|
|
|
43132
43342
|
return this;
|
|
@@ -44807,6 +45017,9 @@ class AstTranslator {
|
|
|
44807
45017
|
visitThisReceiver(ast) {
|
|
44808
45018
|
throw new Error('Method not implemented.');
|
|
44809
45019
|
}
|
|
45020
|
+
visitRegularExpressionLiteral(ast, context) {
|
|
45021
|
+
return wrapForTypeChecker(ts.factory.createRegularExpressionLiteral(`/${ast.body}/${ast.flags ?? ''}`));
|
|
45022
|
+
}
|
|
44810
45023
|
visitInterpolation(ast) {
|
|
44811
45024
|
// Build up a chain of binary + operations to simulate the string concatenation of the
|
|
44812
45025
|
// interpolation's expressions. The chain is started using an actual string literal to ensure
|
|
@@ -45133,6 +45346,9 @@ class VeSafeLhsInferenceBugDetector {
|
|
|
45133
45346
|
visitParenthesizedExpression(ast, context) {
|
|
45134
45347
|
return ast.expression.visit(this);
|
|
45135
45348
|
}
|
|
45349
|
+
visitRegularExpressionLiteral(ast, context) {
|
|
45350
|
+
return false;
|
|
45351
|
+
}
|
|
45136
45352
|
}
|
|
45137
45353
|
|
|
45138
45354
|
/**
|
|
@@ -50857,6 +51073,7 @@ exports.ImportManager = ImportManager;
|
|
|
50857
51073
|
exports.Interpolation = Interpolation$1;
|
|
50858
51074
|
exports.InterpolationConfig = InterpolationConfig;
|
|
50859
51075
|
exports.InvokeFunctionExpr = InvokeFunctionExpr;
|
|
51076
|
+
exports.KeyedRead = KeyedRead;
|
|
50860
51077
|
exports.KnownFn = KnownFn;
|
|
50861
51078
|
exports.LetDeclaration = LetDeclaration$1;
|
|
50862
51079
|
exports.LiteralArrayExpr = LiteralArrayExpr;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-next.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var fs = require('fs');
|
|
11
11
|
var p = require('path');
|
|
12
|
-
var compiler_host = require('./compiler_host-
|
|
13
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
12
|
+
var compiler_host = require('./compiler_host-Aouk-n4F.cjs');
|
|
13
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DX9KHLn9.cjs');
|
|
14
14
|
var ts = require('typescript');
|
|
15
15
|
var property_name = require('./property_name-BBwFuqMe.cjs');
|
|
16
16
|
require('os');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-next.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
require('./project_tsconfig_paths-
|
|
12
|
-
require('./index-
|
|
11
|
+
require('./project_tsconfig_paths-DX9KHLn9.cjs');
|
|
12
|
+
require('./index-Bb6iejCd.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
15
|
+
var project_paths = require('./project_paths-Dr2s3Pq3.cjs');
|
|
16
16
|
var imports = require('./imports-DwPXlGFl.cjs');
|
|
17
17
|
var symbol = require('./symbol-BObKoqes.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v21.0.0-next.
|
|
3
|
+
* @license Angular v21.0.0-next.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
require('./project_tsconfig_paths-
|
|
12
|
-
require('./index-
|
|
11
|
+
require('./project_tsconfig_paths-DX9KHLn9.cjs');
|
|
12
|
+
require('./index-Bb6iejCd.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
15
|
+
var project_paths = require('./project_paths-Dr2s3Pq3.cjs');
|
|
16
16
|
var imports = require('./imports-DwPXlGFl.cjs');
|
|
17
17
|
var symbol = require('./symbol-BObKoqes.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|