@angular-eslint/bundled-angular-compiler 20.6.1-alpha.9 → 20.7.1-alpha.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/dist/index.js +44 -72
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -281,7 +281,7 @@ __export(index_exports, {
|
|
|
281
281
|
});
|
|
282
282
|
module.exports = __toCommonJS(index_exports);
|
|
283
283
|
|
|
284
|
-
// ../../node_modules/.pnpm/@angular+compiler@20.3.
|
|
284
|
+
// ../../node_modules/.pnpm/@angular+compiler@20.3.12/node_modules/@angular/compiler/fesm2022/compiler.mjs
|
|
285
285
|
var _SELECTOR_REGEXP = new RegExp(
|
|
286
286
|
`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
|
|
287
287
|
// 8: ","
|
|
@@ -7830,11 +7830,11 @@ var ShadowCss = class {
|
|
|
7830
7830
|
return cssText.replace(_cssColonHostRe, (_, hostSelectors, otherSelectors) => {
|
|
7831
7831
|
if (hostSelectors) {
|
|
7832
7832
|
const convertedSelectors = [];
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
if (!
|
|
7833
|
+
const hostSelectorArray = hostSelectors.split(",").map((p) => p.trim());
|
|
7834
|
+
for (const hostSelector of hostSelectorArray) {
|
|
7835
|
+
if (!hostSelector)
|
|
7836
7836
|
break;
|
|
7837
|
-
const convertedSelector = _polyfillHostNoCombinator +
|
|
7837
|
+
const convertedSelector = _polyfillHostNoCombinator + hostSelector.replace(_polyfillHost, "") + otherSelectors;
|
|
7838
7838
|
convertedSelectors.push(convertedSelector);
|
|
7839
7839
|
}
|
|
7840
7840
|
return convertedSelectors.join(",");
|
|
@@ -7843,33 +7843,6 @@ var ShadowCss = class {
|
|
|
7843
7843
|
}
|
|
7844
7844
|
});
|
|
7845
7845
|
}
|
|
7846
|
-
/**
|
|
7847
|
-
* Generator function that splits a string on top-level commas (commas that are not inside parentheses).
|
|
7848
|
-
* Yields each part of the string between top-level commas. Terminates if an extra closing paren is found.
|
|
7849
|
-
*
|
|
7850
|
-
* @param text The string to split
|
|
7851
|
-
*/
|
|
7852
|
-
*_splitOnTopLevelCommas(text2) {
|
|
7853
|
-
const length = text2.length;
|
|
7854
|
-
let parens = 0;
|
|
7855
|
-
let prev = 0;
|
|
7856
|
-
for (let i = 0; i < length; i++) {
|
|
7857
|
-
const charCode = text2.charCodeAt(i);
|
|
7858
|
-
if (charCode === $LPAREN) {
|
|
7859
|
-
parens++;
|
|
7860
|
-
} else if (charCode === $RPAREN) {
|
|
7861
|
-
parens--;
|
|
7862
|
-
if (parens < 0) {
|
|
7863
|
-
yield text2.slice(prev, i);
|
|
7864
|
-
return;
|
|
7865
|
-
}
|
|
7866
|
-
} else if (charCode === $COMMA && parens === 0) {
|
|
7867
|
-
yield text2.slice(prev, i);
|
|
7868
|
-
prev = i + 1;
|
|
7869
|
-
}
|
|
7870
|
-
}
|
|
7871
|
-
yield text2.slice(prev);
|
|
7872
|
-
}
|
|
7873
7846
|
/*
|
|
7874
7847
|
* convert a rule like :host-context(.foo) > .bar { }
|
|
7875
7848
|
*
|
|
@@ -7886,32 +7859,35 @@ var ShadowCss = class {
|
|
|
7886
7859
|
* .foo<scopeName> .bar { ... }
|
|
7887
7860
|
*/
|
|
7888
7861
|
_convertColonHostContext(cssText) {
|
|
7889
|
-
const
|
|
7890
|
-
|
|
7891
|
-
|
|
7862
|
+
const length = cssText.length;
|
|
7863
|
+
let parens = 0;
|
|
7864
|
+
let prev = 0;
|
|
7865
|
+
let result = "";
|
|
7866
|
+
for (let i = 0; i < length; i++) {
|
|
7867
|
+
const char = cssText[i];
|
|
7868
|
+
if (char === "," && parens === 0) {
|
|
7869
|
+
result += this._convertColonHostContextInSelectorPart(cssText.slice(prev, i)) + ",";
|
|
7870
|
+
prev = i + 1;
|
|
7871
|
+
continue;
|
|
7872
|
+
}
|
|
7873
|
+
if (i === length - 1) {
|
|
7874
|
+
result += this._convertColonHostContextInSelectorPart(cssText.slice(prev));
|
|
7875
|
+
break;
|
|
7876
|
+
}
|
|
7877
|
+
if (char === "(") {
|
|
7878
|
+
parens++;
|
|
7879
|
+
} else if (char === ")") {
|
|
7880
|
+
parens--;
|
|
7881
|
+
}
|
|
7892
7882
|
}
|
|
7893
|
-
return
|
|
7883
|
+
return result;
|
|
7894
7884
|
}
|
|
7895
7885
|
_convertColonHostContextInSelectorPart(cssText) {
|
|
7896
7886
|
return cssText.replace(_cssColonHostContextReGlobal, (selectorText, pseudoPrefix) => {
|
|
7897
7887
|
const contextSelectorGroups = [[]];
|
|
7898
|
-
let
|
|
7899
|
-
while (
|
|
7900
|
-
const
|
|
7901
|
-
if (!afterPrefix || afterPrefix[0] !== "(") {
|
|
7902
|
-
selectorText = afterPrefix;
|
|
7903
|
-
startIndex = selectorText.indexOf(_polyfillHostContext);
|
|
7904
|
-
continue;
|
|
7905
|
-
}
|
|
7906
|
-
const newContextSelectors = [];
|
|
7907
|
-
let endIndex = 0;
|
|
7908
|
-
for (const selector of this._splitOnTopLevelCommas(afterPrefix.substring(1))) {
|
|
7909
|
-
endIndex = endIndex + selector.length + 1;
|
|
7910
|
-
const trimmed = selector.trim();
|
|
7911
|
-
if (trimmed) {
|
|
7912
|
-
newContextSelectors.push(trimmed);
|
|
7913
|
-
}
|
|
7914
|
-
}
|
|
7888
|
+
let match;
|
|
7889
|
+
while (match = _cssColonHostContextRe.exec(selectorText)) {
|
|
7890
|
+
const newContextSelectors = (match[1] ?? "").trim().split(",").map((m) => m.trim()).filter((m) => m !== "");
|
|
7915
7891
|
const contextSelectorGroupsLength = contextSelectorGroups.length;
|
|
7916
7892
|
repeatGroups(contextSelectorGroups, newContextSelectors.length);
|
|
7917
7893
|
for (let i = 0; i < newContextSelectors.length; i++) {
|
|
@@ -7919,8 +7895,7 @@ var ShadowCss = class {
|
|
|
7919
7895
|
contextSelectorGroups[j + i * contextSelectorGroupsLength].push(newContextSelectors[i]);
|
|
7920
7896
|
}
|
|
7921
7897
|
}
|
|
7922
|
-
selectorText =
|
|
7923
|
-
startIndex = selectorText.indexOf(_polyfillHostContext);
|
|
7898
|
+
selectorText = match[2];
|
|
7924
7899
|
}
|
|
7925
7900
|
return contextSelectorGroups.map((contextSelectors) => _combineHostContextSelectors(contextSelectors, selectorText, pseudoPrefix)).join(", ");
|
|
7926
7901
|
});
|
|
@@ -8149,9 +8124,9 @@ var SafeSelector = class {
|
|
|
8149
8124
|
this.index++;
|
|
8150
8125
|
return replaceBy;
|
|
8151
8126
|
});
|
|
8152
|
-
this._content = selector.replace(
|
|
8127
|
+
this._content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
|
|
8153
8128
|
const replaceBy = `__ph-${this.index}__`;
|
|
8154
|
-
this.placeholders.push(
|
|
8129
|
+
this.placeholders.push(exp);
|
|
8155
8130
|
this.index++;
|
|
8156
8131
|
return pseudo + replaceBy;
|
|
8157
8132
|
});
|
|
@@ -8182,14 +8157,11 @@ var _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[
|
|
|
8182
8157
|
var _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
|
|
8183
8158
|
var _polyfillHost = "-shadowcsshost";
|
|
8184
8159
|
var _polyfillHostContext = "-shadowcsscontext";
|
|
8185
|
-
var
|
|
8186
|
-
var _level1Parens = String.raw`(?:\(${_noParens}\)|${_noParens})+?`;
|
|
8187
|
-
var _level2Parens = String.raw`(?:\(${_level1Parens}\)|${_noParens})+?`;
|
|
8188
|
-
var _parenSuffix = String.raw`(?:\((${_level2Parens})\))`;
|
|
8189
|
-
var nthRegex = new RegExp(String.raw`(:nth-[-\w]+)` + _parenSuffix, "g");
|
|
8160
|
+
var _parenSuffix = "(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))";
|
|
8190
8161
|
var _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix + "?([^,{]*)", "gim");
|
|
8191
8162
|
var _hostContextPattern = _polyfillHostContext + _parenSuffix + "?([^{]*)";
|
|
8192
8163
|
var _cssColonHostContextReGlobal = new RegExp(`${_cssScopedPseudoFunctionPrefix}(${_hostContextPattern})`, "gim");
|
|
8164
|
+
var _cssColonHostContextRe = new RegExp(_hostContextPattern, "im");
|
|
8193
8165
|
var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
|
|
8194
8166
|
var _polyfillHostNoCombinatorOutsidePseudoFunction = new RegExp(`${_polyfillHostNoCombinator}(?![^(]*\\))`, "g");
|
|
8195
8167
|
var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s,]*)/;
|
|
@@ -31011,7 +30983,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
|
|
|
31011
30983
|
function compileDeclareClassMetadata(metadata) {
|
|
31012
30984
|
const definitionMap = new DefinitionMap();
|
|
31013
30985
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
31014
|
-
definitionMap.set("version", literal("20.3.
|
|
30986
|
+
definitionMap.set("version", literal("20.3.12"));
|
|
31015
30987
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31016
30988
|
definitionMap.set("type", metadata.type);
|
|
31017
30989
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -31030,7 +31002,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
31030
31002
|
callbackReturnDefinitionMap.set("ctorParameters", metadata.ctorParameters ?? literal(null));
|
|
31031
31003
|
callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
|
|
31032
31004
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
31033
|
-
definitionMap.set("version", literal("20.3.
|
|
31005
|
+
definitionMap.set("version", literal("20.3.12"));
|
|
31034
31006
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31035
31007
|
definitionMap.set("type", metadata.type);
|
|
31036
31008
|
definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -31099,7 +31071,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
31099
31071
|
const definitionMap = new DefinitionMap();
|
|
31100
31072
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
31101
31073
|
definitionMap.set("minVersion", literal(minVersion));
|
|
31102
|
-
definitionMap.set("version", literal("20.3.
|
|
31074
|
+
definitionMap.set("version", literal("20.3.12"));
|
|
31103
31075
|
definitionMap.set("type", meta.type.value);
|
|
31104
31076
|
if (meta.isStandalone !== void 0) {
|
|
31105
31077
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -31426,7 +31398,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$4 = "12.0.0";
|
|
|
31426
31398
|
function compileDeclareFactoryFunction(meta) {
|
|
31427
31399
|
const definitionMap = new DefinitionMap();
|
|
31428
31400
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
31429
|
-
definitionMap.set("version", literal("20.3.
|
|
31401
|
+
definitionMap.set("version", literal("20.3.12"));
|
|
31430
31402
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31431
31403
|
definitionMap.set("type", meta.type.value);
|
|
31432
31404
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -31449,7 +31421,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
|
|
|
31449
31421
|
function createInjectableDefinitionMap(meta) {
|
|
31450
31422
|
const definitionMap = new DefinitionMap();
|
|
31451
31423
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
31452
|
-
definitionMap.set("version", literal("20.3.
|
|
31424
|
+
definitionMap.set("version", literal("20.3.12"));
|
|
31453
31425
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31454
31426
|
definitionMap.set("type", meta.type.value);
|
|
31455
31427
|
if (meta.providedIn !== void 0) {
|
|
@@ -31487,7 +31459,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
|
|
|
31487
31459
|
function createInjectorDefinitionMap(meta) {
|
|
31488
31460
|
const definitionMap = new DefinitionMap();
|
|
31489
31461
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
31490
|
-
definitionMap.set("version", literal("20.3.
|
|
31462
|
+
definitionMap.set("version", literal("20.3.12"));
|
|
31491
31463
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31492
31464
|
definitionMap.set("type", meta.type.value);
|
|
31493
31465
|
definitionMap.set("providers", meta.providers);
|
|
@@ -31511,7 +31483,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
31511
31483
|
throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
|
|
31512
31484
|
}
|
|
31513
31485
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
31514
|
-
definitionMap.set("version", literal("20.3.
|
|
31486
|
+
definitionMap.set("version", literal("20.3.12"));
|
|
31515
31487
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31516
31488
|
definitionMap.set("type", meta.type.value);
|
|
31517
31489
|
if (meta.bootstrap.length > 0) {
|
|
@@ -31546,7 +31518,7 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
|
|
|
31546
31518
|
function createPipeDefinitionMap(meta) {
|
|
31547
31519
|
const definitionMap = new DefinitionMap();
|
|
31548
31520
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
31549
|
-
definitionMap.set("version", literal("20.3.
|
|
31521
|
+
definitionMap.set("version", literal("20.3.12"));
|
|
31550
31522
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31551
31523
|
definitionMap.set("type", meta.type.value);
|
|
31552
31524
|
if (meta.isStandalone !== void 0) {
|
|
@@ -31643,7 +31615,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
31643
31615
|
return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
|
|
31644
31616
|
}
|
|
31645
31617
|
__name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
|
|
31646
|
-
var VERSION = new Version("20.3.
|
|
31618
|
+
var VERSION = new Version("20.3.12");
|
|
31647
31619
|
publishFacade(_global);
|
|
31648
31620
|
// Annotate the CommonJS export names for ESM import in node:
|
|
31649
31621
|
0 && (module.exports = {
|
|
@@ -31909,7 +31881,7 @@ publishFacade(_global);
|
|
|
31909
31881
|
|
|
31910
31882
|
@angular/compiler/fesm2022/compiler.mjs:
|
|
31911
31883
|
(**
|
|
31912
|
-
* @license Angular v20.3.
|
|
31884
|
+
* @license Angular v20.3.12
|
|
31913
31885
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
31914
31886
|
* License: MIT
|
|
31915
31887
|
*)
|