@angular-eslint/bundled-angular-compiler 21.0.2-alpha.3 → 21.0.2-alpha.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/dist/index.js +20 -63
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53,7 +53,6 @@ __export(index_exports, {
|
|
|
53
53
|
ConditionalExpr: () => ConditionalExpr,
|
|
54
54
|
ConstantPool: () => ConstantPool,
|
|
55
55
|
CssSelector: () => CssSelector,
|
|
56
|
-
DEFAULT_INTERPOLATION_CONFIG: () => DEFAULT_INTERPOLATION_CONFIG,
|
|
57
56
|
DYNAMIC_TYPE: () => DYNAMIC_TYPE,
|
|
58
57
|
DeclareFunctionStmt: () => DeclareFunctionStmt,
|
|
59
58
|
DeclareVarStmt: () => DeclareVarStmt,
|
|
@@ -82,7 +81,6 @@ __export(index_exports, {
|
|
|
82
81
|
ImplicitReceiver: () => ImplicitReceiver,
|
|
83
82
|
InstantiateExpr: () => InstantiateExpr,
|
|
84
83
|
Interpolation: () => Interpolation$1,
|
|
85
|
-
InterpolationConfig: () => InterpolationConfig,
|
|
86
84
|
InvokeFunctionExpr: () => InvokeFunctionExpr,
|
|
87
85
|
JSDocComment: () => JSDocComment,
|
|
88
86
|
JitEvaluator: () => JitEvaluator,
|
|
@@ -283,7 +281,7 @@ __export(index_exports, {
|
|
|
283
281
|
});
|
|
284
282
|
module.exports = __toCommonJS(index_exports);
|
|
285
283
|
|
|
286
|
-
// ../../node_modules/.pnpm/@angular+compiler@21.0.
|
|
284
|
+
// ../../node_modules/.pnpm/@angular+compiler@21.0.1/node_modules/@angular/compiler/fesm2022/compiler.mjs
|
|
287
285
|
var _SELECTOR_REGEXP = new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`, "g");
|
|
288
286
|
var CssSelector = class _CssSelector {
|
|
289
287
|
static {
|
|
@@ -18982,8 +18980,8 @@ var PlaceholderRegistry = class {
|
|
|
18982
18980
|
}
|
|
18983
18981
|
};
|
|
18984
18982
|
var _expParser = new Parser2(new Lexer());
|
|
18985
|
-
function createI18nMessageFactory(
|
|
18986
|
-
const visitor = new _I18nVisitor(_expParser,
|
|
18983
|
+
function createI18nMessageFactory(retainEmptyTokens, preserveExpressionWhitespace) {
|
|
18984
|
+
const visitor = new _I18nVisitor(_expParser, retainEmptyTokens, preserveExpressionWhitespace);
|
|
18987
18985
|
return (nodes, meaning, description, customId, visitNodeFn) => visitor.toI18nMessage(nodes, meaning, description, customId, visitNodeFn);
|
|
18988
18986
|
}
|
|
18989
18987
|
__name(createI18nMessageFactory, "createI18nMessageFactory");
|
|
@@ -18996,12 +18994,10 @@ var _I18nVisitor = class {
|
|
|
18996
18994
|
__name(this, "_I18nVisitor");
|
|
18997
18995
|
}
|
|
18998
18996
|
_expressionParser;
|
|
18999
|
-
_containerBlocks;
|
|
19000
18997
|
_retainEmptyTokens;
|
|
19001
18998
|
_preserveExpressionWhitespace;
|
|
19002
|
-
constructor(_expressionParser,
|
|
18999
|
+
constructor(_expressionParser, _retainEmptyTokens, _preserveExpressionWhitespace) {
|
|
19003
19000
|
this._expressionParser = _expressionParser;
|
|
19004
|
-
this._containerBlocks = _containerBlocks;
|
|
19005
19001
|
this._retainEmptyTokens = _retainEmptyTokens;
|
|
19006
19002
|
this._preserveExpressionWhitespace = _preserveExpressionWhitespace;
|
|
19007
19003
|
}
|
|
@@ -19064,7 +19060,7 @@ var _I18nVisitor = class {
|
|
|
19064
19060
|
}
|
|
19065
19061
|
visitBlock(block, context) {
|
|
19066
19062
|
const children = visitAll(this, block.children, context);
|
|
19067
|
-
if (
|
|
19063
|
+
if (block.name === "switch") {
|
|
19068
19064
|
return new Container(children, block.sourceSpan);
|
|
19069
19065
|
}
|
|
19070
19066
|
const parameters = block.parameters.map((param) => param.expression);
|
|
@@ -19218,41 +19214,6 @@ function extractPlaceholderName(input) {
|
|
|
19218
19214
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
19219
19215
|
}
|
|
19220
19216
|
__name(extractPlaceholderName, "extractPlaceholderName");
|
|
19221
|
-
var UNUSABLE_INTERPOLATION_REGEXPS = [/@/, /^\s*$/, /[<>]/, /^[{}]$/, /&(#|[a-z])/i, /^\/\//];
|
|
19222
|
-
function assertInterpolationSymbols(identifier, value) {
|
|
19223
|
-
if (value != null && !(Array.isArray(value) && value.length == 2)) {
|
|
19224
|
-
throw new Error(`Expected '${identifier}' to be an array, [start, end].`);
|
|
19225
|
-
} else if (value != null) {
|
|
19226
|
-
const start = value[0];
|
|
19227
|
-
const end = value[1];
|
|
19228
|
-
UNUSABLE_INTERPOLATION_REGEXPS.forEach((regexp) => {
|
|
19229
|
-
if (regexp.test(start) || regexp.test(end)) {
|
|
19230
|
-
throw new Error(`['${start}', '${end}'] contains unusable interpolation symbol.`);
|
|
19231
|
-
}
|
|
19232
|
-
});
|
|
19233
|
-
}
|
|
19234
|
-
}
|
|
19235
|
-
__name(assertInterpolationSymbols, "assertInterpolationSymbols");
|
|
19236
|
-
var InterpolationConfig = class _InterpolationConfig {
|
|
19237
|
-
static {
|
|
19238
|
-
__name(this, "InterpolationConfig");
|
|
19239
|
-
}
|
|
19240
|
-
start;
|
|
19241
|
-
end;
|
|
19242
|
-
static fromArray(markers) {
|
|
19243
|
-
if (!markers) {
|
|
19244
|
-
return DEFAULT_INTERPOLATION_CONFIG;
|
|
19245
|
-
}
|
|
19246
|
-
assertInterpolationSymbols("interpolation", markers);
|
|
19247
|
-
return new _InterpolationConfig(markers[0], markers[1]);
|
|
19248
|
-
}
|
|
19249
|
-
constructor(start, end) {
|
|
19250
|
-
this.start = start;
|
|
19251
|
-
this.end = end;
|
|
19252
|
-
}
|
|
19253
|
-
};
|
|
19254
|
-
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
19255
|
-
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
19256
19217
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set(["iframe|srcdoc", "*|innerhtml", "*|outerhtml", "embed|src", "object|codebase", "object|data"]);
|
|
19257
19218
|
function isTrustedTypesSink(tagName, propName) {
|
|
19258
19219
|
tagName = tagName.toLowerCase();
|
|
@@ -19278,15 +19239,13 @@ var I18nMetaVisitor = class {
|
|
|
19278
19239
|
}
|
|
19279
19240
|
keepI18nAttrs;
|
|
19280
19241
|
enableI18nLegacyMessageIdFormat;
|
|
19281
|
-
containerBlocks;
|
|
19282
19242
|
preserveSignificantWhitespace;
|
|
19283
19243
|
retainEmptyTokens;
|
|
19284
19244
|
hasI18nMeta = false;
|
|
19285
19245
|
_errors = [];
|
|
19286
|
-
constructor(keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false,
|
|
19246
|
+
constructor(keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false, preserveSignificantWhitespace = true, retainEmptyTokens = !preserveSignificantWhitespace) {
|
|
19287
19247
|
this.keepI18nAttrs = keepI18nAttrs;
|
|
19288
19248
|
this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;
|
|
19289
|
-
this.containerBlocks = containerBlocks;
|
|
19290
19249
|
this.preserveSignificantWhitespace = preserveSignificantWhitespace;
|
|
19291
19250
|
this.retainEmptyTokens = retainEmptyTokens;
|
|
19292
19251
|
}
|
|
@@ -19296,7 +19255,7 @@ var I18nMetaVisitor = class {
|
|
|
19296
19255
|
description,
|
|
19297
19256
|
customId
|
|
19298
19257
|
} = this._parseMetadata(meta);
|
|
19299
|
-
const createI18nMessage2 = createI18nMessageFactory(this.
|
|
19258
|
+
const createI18nMessage2 = createI18nMessageFactory(this.retainEmptyTokens, this.preserveSignificantWhitespace);
|
|
19300
19259
|
const message = createI18nMessage2(nodes, meaning, description, customId, visitNodeFn);
|
|
19301
19260
|
this._setMessageId(message, meta);
|
|
19302
19261
|
this._setLegacyIds(message, meta);
|
|
@@ -26239,7 +26198,7 @@ function parseTemplate(template2, templateUrl, options = {}) {
|
|
|
26239
26198
|
}
|
|
26240
26199
|
let rootNodes = parseResult.rootNodes;
|
|
26241
26200
|
const retainEmptyTokens = !(options.preserveSignificantWhitespace ?? true);
|
|
26242
|
-
const i18nMetaVisitor = new I18nMetaVisitor(!preserveWhitespaces, enableI18nLegacyMessageIdFormat,
|
|
26201
|
+
const i18nMetaVisitor = new I18nMetaVisitor(!preserveWhitespaces, enableI18nLegacyMessageIdFormat, options.preserveSignificantWhitespace, retainEmptyTokens);
|
|
26243
26202
|
const i18nMetaResult = i18nMetaVisitor.visitAllWithErrors(rootNodes);
|
|
26244
26203
|
if (!options.alwaysAttemptHtmlToR3AstConversion && i18nMetaResult.errors && i18nMetaResult.errors.length > 0) {
|
|
26245
26204
|
const parsedTemplate2 = {
|
|
@@ -26259,7 +26218,7 @@ function parseTemplate(template2, templateUrl, options = {}) {
|
|
|
26259
26218
|
if (!preserveWhitespaces) {
|
|
26260
26219
|
rootNodes = visitAll(new WhitespaceVisitor(true, void 0, false), rootNodes);
|
|
26261
26220
|
if (i18nMetaVisitor.hasI18nMeta) {
|
|
26262
|
-
rootNodes = visitAll(new I18nMetaVisitor(false, void 0,
|
|
26221
|
+
rootNodes = visitAll(new I18nMetaVisitor(false, void 0, true, retainEmptyTokens), rootNodes);
|
|
26263
26222
|
}
|
|
26264
26223
|
}
|
|
26265
26224
|
const {
|
|
@@ -28452,7 +28411,7 @@ var _Visitor3 = class {
|
|
|
28452
28411
|
this._errors = [];
|
|
28453
28412
|
this._messages = [];
|
|
28454
28413
|
this._inImplicitNode = false;
|
|
28455
|
-
this._createI18nMessage = createI18nMessageFactory(
|
|
28414
|
+
this._createI18nMessage = createI18nMessageFactory(!this._preserveSignificantWhitespace, this._preserveSignificantWhitespace);
|
|
28456
28415
|
}
|
|
28457
28416
|
_visitElementLike(node, context) {
|
|
28458
28417
|
this._mayBeAddBlockChildren(node);
|
|
@@ -29950,7 +29909,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
|
|
|
29950
29909
|
function compileDeclareClassMetadata(metadata) {
|
|
29951
29910
|
const definitionMap = new DefinitionMap();
|
|
29952
29911
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
29953
|
-
definitionMap.set("version", literal("21.0.
|
|
29912
|
+
definitionMap.set("version", literal("21.0.1"));
|
|
29954
29913
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
29955
29914
|
definitionMap.set("type", metadata.type);
|
|
29956
29915
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -29969,7 +29928,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
29969
29928
|
callbackReturnDefinitionMap.set("ctorParameters", metadata.ctorParameters ?? literal(null));
|
|
29970
29929
|
callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
|
|
29971
29930
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
29972
|
-
definitionMap.set("version", literal("21.0.
|
|
29931
|
+
definitionMap.set("version", literal("21.0.1"));
|
|
29973
29932
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
29974
29933
|
definitionMap.set("type", metadata.type);
|
|
29975
29934
|
definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -30046,7 +30005,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
30046
30005
|
const definitionMap = new DefinitionMap();
|
|
30047
30006
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
30048
30007
|
definitionMap.set("minVersion", literal(minVersion));
|
|
30049
|
-
definitionMap.set("version", literal("21.0.
|
|
30008
|
+
definitionMap.set("version", literal("21.0.1"));
|
|
30050
30009
|
definitionMap.set("type", meta.type.value);
|
|
30051
30010
|
if (meta.isStandalone !== void 0) {
|
|
30052
30011
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -30392,7 +30351,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$4 = "12.0.0";
|
|
|
30392
30351
|
function compileDeclareFactoryFunction(meta) {
|
|
30393
30352
|
const definitionMap = new DefinitionMap();
|
|
30394
30353
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
30395
|
-
definitionMap.set("version", literal("21.0.
|
|
30354
|
+
definitionMap.set("version", literal("21.0.1"));
|
|
30396
30355
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30397
30356
|
definitionMap.set("type", meta.type.value);
|
|
30398
30357
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -30419,7 +30378,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
|
|
|
30419
30378
|
function createInjectableDefinitionMap(meta) {
|
|
30420
30379
|
const definitionMap = new DefinitionMap();
|
|
30421
30380
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
30422
|
-
definitionMap.set("version", literal("21.0.
|
|
30381
|
+
definitionMap.set("version", literal("21.0.1"));
|
|
30423
30382
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30424
30383
|
definitionMap.set("type", meta.type.value);
|
|
30425
30384
|
if (meta.providedIn !== void 0) {
|
|
@@ -30461,7 +30420,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
|
|
|
30461
30420
|
function createInjectorDefinitionMap(meta) {
|
|
30462
30421
|
const definitionMap = new DefinitionMap();
|
|
30463
30422
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
30464
|
-
definitionMap.set("version", literal("21.0.
|
|
30423
|
+
definitionMap.set("version", literal("21.0.1"));
|
|
30465
30424
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30466
30425
|
definitionMap.set("type", meta.type.value);
|
|
30467
30426
|
definitionMap.set("providers", meta.providers);
|
|
@@ -30489,7 +30448,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
30489
30448
|
throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
|
|
30490
30449
|
}
|
|
30491
30450
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
30492
|
-
definitionMap.set("version", literal("21.0.
|
|
30451
|
+
definitionMap.set("version", literal("21.0.1"));
|
|
30493
30452
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30494
30453
|
definitionMap.set("type", meta.type.value);
|
|
30495
30454
|
if (meta.bootstrap.length > 0) {
|
|
@@ -30528,7 +30487,7 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
|
|
|
30528
30487
|
function createPipeDefinitionMap(meta) {
|
|
30529
30488
|
const definitionMap = new DefinitionMap();
|
|
30530
30489
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
30531
|
-
definitionMap.set("version", literal("21.0.
|
|
30490
|
+
definitionMap.set("version", literal("21.0.1"));
|
|
30532
30491
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30533
30492
|
definitionMap.set("type", meta.type.value);
|
|
30534
30493
|
if (meta.isStandalone !== void 0) {
|
|
@@ -30603,7 +30562,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
30603
30562
|
return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
|
|
30604
30563
|
}
|
|
30605
30564
|
__name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
|
|
30606
|
-
var VERSION = new Version("21.0.
|
|
30565
|
+
var VERSION = new Version("21.0.1");
|
|
30607
30566
|
publishFacade(_global);
|
|
30608
30567
|
// Annotate the CommonJS export names for ESM import in node:
|
|
30609
30568
|
0 && (module.exports = {
|
|
@@ -30639,7 +30598,6 @@ publishFacade(_global);
|
|
|
30639
30598
|
ConditionalExpr,
|
|
30640
30599
|
ConstantPool,
|
|
30641
30600
|
CssSelector,
|
|
30642
|
-
DEFAULT_INTERPOLATION_CONFIG,
|
|
30643
30601
|
DYNAMIC_TYPE,
|
|
30644
30602
|
DeclareFunctionStmt,
|
|
30645
30603
|
DeclareVarStmt,
|
|
@@ -30668,7 +30626,6 @@ publishFacade(_global);
|
|
|
30668
30626
|
ImplicitReceiver,
|
|
30669
30627
|
InstantiateExpr,
|
|
30670
30628
|
Interpolation,
|
|
30671
|
-
InterpolationConfig,
|
|
30672
30629
|
InvokeFunctionExpr,
|
|
30673
30630
|
JSDocComment,
|
|
30674
30631
|
JitEvaluator,
|
|
@@ -30871,7 +30828,7 @@ publishFacade(_global);
|
|
|
30871
30828
|
|
|
30872
30829
|
@angular/compiler/fesm2022/compiler.mjs:
|
|
30873
30830
|
(**
|
|
30874
|
-
* @license Angular v21.0.
|
|
30831
|
+
* @license Angular v21.0.1
|
|
30875
30832
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
30876
30833
|
* License: MIT
|
|
30877
30834
|
*)
|