@angular-eslint/bundled-angular-compiler 22.2.1-alpha.0 → 22.2.1-alpha.2
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 +47 -31
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -299,7 +299,6 @@ __export(index_exports, {
|
|
|
299
299
|
publishFacade: () => publishFacade,
|
|
300
300
|
r3JitTypeSourceSpan: () => r3JitTypeSourceSpan,
|
|
301
301
|
sanitizeIdentifier: () => sanitizeIdentifier,
|
|
302
|
-
setEnableTemplateSourceLocations: () => setEnableTemplateSourceLocations,
|
|
303
302
|
splitNsName: () => splitNsName,
|
|
304
303
|
tmplAstVisitAll: () => visitAll$1,
|
|
305
304
|
verifyHostBindings: () => verifyHostBindings,
|
|
@@ -307,7 +306,7 @@ __export(index_exports, {
|
|
|
307
306
|
});
|
|
308
307
|
module.exports = __toCommonJS(index_exports);
|
|
309
308
|
|
|
310
|
-
// ../../node_modules/.pnpm/@angular+compiler@22.1.
|
|
309
|
+
// ../../node_modules/.pnpm/@angular+compiler@22.1.4/node_modules/@angular/compiler/fesm2022/compiler.mjs
|
|
311
310
|
var _SELECTOR_REGEXP = new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`, "g");
|
|
312
311
|
var CssSelector = class _CssSelector {
|
|
313
312
|
static {
|
|
@@ -8087,14 +8086,14 @@ var ShadowCss = class {
|
|
|
8087
8086
|
}
|
|
8088
8087
|
_animationDeclarationKeyframesRe = /(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;
|
|
8089
8088
|
_scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet) {
|
|
8090
|
-
let content = rule.content.replace(/((
|
|
8089
|
+
let content = rule.content.replace(/((?:^|[\s;{])(?:-webkit-)?animation\s*:\s*)([^;}]+)/g, (_, start, animationDeclarations) => start + animationDeclarations.replace(this._animationDeclarationKeyframesRe, (original, leadingSpaces, quote = "", quotedName, nonQuotedName) => {
|
|
8091
8090
|
if (quotedName) {
|
|
8092
8091
|
return `${leadingSpaces}${this._scopeAnimationKeyframe(`${quote}${quotedName}${quote}`, scopeSelector, unscopedKeyframesSet)}`;
|
|
8093
8092
|
} else {
|
|
8094
8093
|
return animationKeywords.has(nonQuotedName) ? original : `${leadingSpaces}${this._scopeAnimationKeyframe(nonQuotedName, scopeSelector, unscopedKeyframesSet)}`;
|
|
8095
8094
|
}
|
|
8096
8095
|
}));
|
|
8097
|
-
content = content.replace(/((
|
|
8096
|
+
content = content.replace(/((?:^|[\s;{])(?:-webkit-)?animation-name(?:\s*):(?:\s*))([^;}]+)/g, (_match, start, commaSeparatedKeyframes) => `${start}${commaSeparatedKeyframes.split(",").map((keyframe) => this._scopeAnimationKeyframe(keyframe, scopeSelector, unscopedKeyframesSet)).join(",")}`);
|
|
8098
8097
|
return {
|
|
8099
8098
|
...rule,
|
|
8100
8099
|
content
|
|
@@ -25579,14 +25578,6 @@ function updateParameterReferences(root) {
|
|
|
25579
25578
|
}
|
|
25580
25579
|
__name(updateParameterReferences, "updateParameterReferences");
|
|
25581
25580
|
var ENABLE_TEMPLATE_SOURCE_LOCATIONS = false;
|
|
25582
|
-
function setEnableTemplateSourceLocations(value) {
|
|
25583
|
-
ENABLE_TEMPLATE_SOURCE_LOCATIONS = value;
|
|
25584
|
-
}
|
|
25585
|
-
__name(setEnableTemplateSourceLocations, "setEnableTemplateSourceLocations");
|
|
25586
|
-
function getTemplateSourceLocationsEnabled() {
|
|
25587
|
-
return ENABLE_TEMPLATE_SOURCE_LOCATIONS;
|
|
25588
|
-
}
|
|
25589
|
-
__name(getTemplateSourceLocationsEnabled, "getTemplateSourceLocationsEnabled");
|
|
25590
25581
|
function renderFlagCheckIfStmt(flags, statements) {
|
|
25591
25582
|
return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null), statements);
|
|
25592
25583
|
}
|
|
@@ -27656,7 +27647,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
27656
27647
|
allDeferrableDepsFn = variable(fnName);
|
|
27657
27648
|
}
|
|
27658
27649
|
const compilationMode = meta.isStandalone && !meta.hasDirectiveDependencies ? TemplateCompilationMode.DomOnly : TemplateCompilationMode.Full;
|
|
27659
|
-
const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, compilationMode, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.defer, allDeferrableDepsFn, meta.relativeTemplatePath,
|
|
27650
|
+
const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, compilationMode, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.defer, allDeferrableDepsFn, meta.relativeTemplatePath, meta.enableTemplateSourceLocations || ENABLE_TEMPLATE_SOURCE_LOCATIONS, meta.legacyOptionalChaining, meta.foreignImports);
|
|
27660
27651
|
transform(tpl, CompilationJobKind.Tmpl);
|
|
27661
27652
|
const templateFn = emitTemplateFn(tpl, constantPool);
|
|
27662
27653
|
if (tpl.contentSelectors !== null) {
|
|
@@ -29318,7 +29309,8 @@ var CompilerFacadeImpl = class {
|
|
|
29318
29309
|
relativeContextFilePath: "",
|
|
29319
29310
|
i18nUseExternalIds: true,
|
|
29320
29311
|
relativeTemplatePath: null,
|
|
29321
|
-
foreignImports: null
|
|
29312
|
+
foreignImports: null,
|
|
29313
|
+
enableTemplateSourceLocations: false
|
|
29322
29314
|
};
|
|
29323
29315
|
const jitExpressionSourceMap = `ng:///${facade.name}.js`;
|
|
29324
29316
|
return this.compileComponentFromMeta(angularCoreEnv, jitExpressionSourceMap, meta);
|
|
@@ -29558,7 +29550,8 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
|
|
|
29558
29550
|
relativeTemplatePath: null,
|
|
29559
29551
|
hasDirectiveDependencies,
|
|
29560
29552
|
legacyOptionalChaining: decl.legacyOptionalChaining ?? LEGACY_OPTIONAL_CHAINING_DEFAULT,
|
|
29561
|
-
foreignImports: null
|
|
29553
|
+
foreignImports: null,
|
|
29554
|
+
enableTemplateSourceLocations: false
|
|
29562
29555
|
};
|
|
29563
29556
|
}
|
|
29564
29557
|
__name(convertDeclareComponentFacadeToMetadata, "convertDeclareComponentFacadeToMetadata");
|
|
@@ -31519,7 +31512,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
|
|
|
31519
31512
|
function compileDeclareClassMetadata(metadata) {
|
|
31520
31513
|
const definitionMap = new DefinitionMap();
|
|
31521
31514
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
31522
|
-
definitionMap.set("version", literal("22.1.
|
|
31515
|
+
definitionMap.set("version", literal("22.1.4"));
|
|
31523
31516
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31524
31517
|
definitionMap.set("type", metadata.type);
|
|
31525
31518
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -31538,7 +31531,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
31538
31531
|
callbackReturnDefinitionMap.set("ctorParameters", metadata.ctorParameters ?? literal(null));
|
|
31539
31532
|
callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
|
|
31540
31533
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
31541
|
-
definitionMap.set("version", literal("22.1.
|
|
31534
|
+
definitionMap.set("version", literal("22.1.4"));
|
|
31542
31535
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31543
31536
|
definitionMap.set("type", metadata.type);
|
|
31544
31537
|
definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -31615,7 +31608,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
31615
31608
|
const definitionMap = new DefinitionMap();
|
|
31616
31609
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
31617
31610
|
definitionMap.set("minVersion", literal(minVersion));
|
|
31618
|
-
definitionMap.set("version", literal("22.1.
|
|
31611
|
+
definitionMap.set("version", literal("22.1.4"));
|
|
31619
31612
|
definitionMap.set("type", meta.type.value);
|
|
31620
31613
|
if (meta.isStandalone !== void 0) {
|
|
31621
31614
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -31971,7 +31964,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$5 = "12.0.0";
|
|
|
31971
31964
|
function compileDeclareFactoryFunction(meta) {
|
|
31972
31965
|
const definitionMap = new DefinitionMap();
|
|
31973
31966
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
31974
|
-
definitionMap.set("version", literal("22.1.
|
|
31967
|
+
definitionMap.set("version", literal("22.1.4"));
|
|
31975
31968
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31976
31969
|
definitionMap.set("type", meta.type.value);
|
|
31977
31970
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -31998,7 +31991,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
|
|
|
31998
31991
|
function createInjectableDefinitionMap(meta) {
|
|
31999
31992
|
const definitionMap = new DefinitionMap();
|
|
32000
31993
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
32001
|
-
definitionMap.set("version", literal("22.1.
|
|
31994
|
+
definitionMap.set("version", literal("22.1.4"));
|
|
32002
31995
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32003
31996
|
definitionMap.set("type", meta.type.value);
|
|
32004
31997
|
if (meta.providedIn !== void 0) {
|
|
@@ -32040,7 +32033,7 @@ __name(compileDeclareServiceFromMetadata, "compileDeclareServiceFromMetadata");
|
|
|
32040
32033
|
function createServiceDefinitionMap(meta) {
|
|
32041
32034
|
const definitionMap = new DefinitionMap();
|
|
32042
32035
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
32043
|
-
definitionMap.set("version", literal("22.1.
|
|
32036
|
+
definitionMap.set("version", literal("22.1.4"));
|
|
32044
32037
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32045
32038
|
definitionMap.set("type", meta.type.value);
|
|
32046
32039
|
if (meta.autoProvided === false) {
|
|
@@ -32067,7 +32060,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
|
|
|
32067
32060
|
function createInjectorDefinitionMap(meta) {
|
|
32068
32061
|
const definitionMap = new DefinitionMap();
|
|
32069
32062
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
32070
|
-
definitionMap.set("version", literal("22.1.
|
|
32063
|
+
definitionMap.set("version", literal("22.1.4"));
|
|
32071
32064
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32072
32065
|
definitionMap.set("type", meta.type.value);
|
|
32073
32066
|
definitionMap.set("providers", meta.providers);
|
|
@@ -32098,7 +32091,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
32098
32091
|
throw new Error("Invalid path! Isolated compilation mode should not get into the partial compilation path");
|
|
32099
32092
|
}
|
|
32100
32093
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
32101
|
-
definitionMap.set("version", literal("22.1.
|
|
32094
|
+
definitionMap.set("version", literal("22.1.4"));
|
|
32102
32095
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32103
32096
|
definitionMap.set("type", meta.type.value);
|
|
32104
32097
|
if (meta.bootstrap.length > 0) {
|
|
@@ -32137,7 +32130,7 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
|
|
|
32137
32130
|
function createPipeDefinitionMap(meta) {
|
|
32138
32131
|
const definitionMap = new DefinitionMap();
|
|
32139
32132
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
32140
|
-
definitionMap.set("version", literal("22.1.
|
|
32133
|
+
definitionMap.set("version", literal("22.1.4"));
|
|
32141
32134
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32142
32135
|
definitionMap.set("type", meta.type.value);
|
|
32143
32136
|
if (meta.isStandalone !== void 0) {
|
|
@@ -32212,7 +32205,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
32212
32205
|
return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
|
|
32213
32206
|
}
|
|
32214
32207
|
__name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
|
|
32215
|
-
var VERSION = new Version("22.1.
|
|
32208
|
+
var VERSION = new Version("22.1.4");
|
|
32216
32209
|
var HOST_BINDING_GUARD_COMMENT_TEXT = "hostBindingsBlockGuard";
|
|
32217
32210
|
function createHostElement(type, selector, nameSpan, hostObjectLiteralBindings, hostBindingDecorators, hostListenerDecorators) {
|
|
32218
32211
|
const bindings = [];
|
|
@@ -32709,10 +32702,18 @@ var TcbExprTranslator = class {
|
|
|
32709
32702
|
}
|
|
32710
32703
|
visitPropertyRead(ast) {
|
|
32711
32704
|
const receiver = this.translate(ast.receiver);
|
|
32712
|
-
|
|
32705
|
+
const isSafeChain = this.isStrictSafeNavigationChain(ast.receiver);
|
|
32706
|
+
if (!isSafeChain) {
|
|
32713
32707
|
receiver.wrapForTypeChecker();
|
|
32714
32708
|
}
|
|
32715
|
-
|
|
32709
|
+
const node = new TcbExpr(`${receiver.print()}.${ast.name}`).addParseSpanInfo(ast.nameSpan);
|
|
32710
|
+
let result;
|
|
32711
|
+
if (isSafeChain) {
|
|
32712
|
+
result = new TcbExpr(node.print());
|
|
32713
|
+
} else {
|
|
32714
|
+
result = node.wrapForTypeChecker();
|
|
32715
|
+
}
|
|
32716
|
+
return result.addParseSpanInfo(ast.sourceSpan);
|
|
32716
32717
|
}
|
|
32717
32718
|
visitSafePropertyRead(ast) {
|
|
32718
32719
|
let node;
|
|
@@ -32835,7 +32836,7 @@ var TcbExprTranslator = class {
|
|
|
32835
32836
|
const expr = exprNode.print();
|
|
32836
32837
|
const args = argNodes.map((node) => node.print()).join(", ");
|
|
32837
32838
|
if (this.config.strictSafeNavigationTypes) {
|
|
32838
|
-
return new TcbExpr(
|
|
32839
|
+
return new TcbExpr(`${expr}?.(${args})`);
|
|
32839
32840
|
}
|
|
32840
32841
|
if (VeSafeLhsInferenceBugDetector.veWillInferAnyFor(ast)) {
|
|
32841
32842
|
return new TcbExpr(`(${expr} as any)(${args})`);
|
|
@@ -32846,7 +32847,23 @@ var TcbExprTranslator = class {
|
|
|
32846
32847
|
return value.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\${/g, "$\\{");
|
|
32847
32848
|
}
|
|
32848
32849
|
isStrictSafeNavigationChain(ast) {
|
|
32849
|
-
|
|
32850
|
+
if (!this.config.strictSafeNavigationTypes) {
|
|
32851
|
+
return false;
|
|
32852
|
+
}
|
|
32853
|
+
let current = ast;
|
|
32854
|
+
while (current) {
|
|
32855
|
+
if (current instanceof SafePropertyRead || current instanceof SafeKeyedRead || current instanceof SafeCall) {
|
|
32856
|
+
return true;
|
|
32857
|
+
}
|
|
32858
|
+
if (current instanceof PropertyRead || current instanceof KeyedRead || current instanceof Call) {
|
|
32859
|
+
current = current.receiver;
|
|
32860
|
+
} else if (current instanceof NonNullAssert) {
|
|
32861
|
+
current = current.expression;
|
|
32862
|
+
} else {
|
|
32863
|
+
break;
|
|
32864
|
+
}
|
|
32865
|
+
}
|
|
32866
|
+
return false;
|
|
32850
32867
|
}
|
|
32851
32868
|
};
|
|
32852
32869
|
var VeSafeLhsInferenceBugDetector = class _VeSafeLhsInferenceBugDetector {
|
|
@@ -35548,7 +35565,6 @@ publishFacade(_global);
|
|
|
35548
35565
|
publishFacade,
|
|
35549
35566
|
r3JitTypeSourceSpan,
|
|
35550
35567
|
sanitizeIdentifier,
|
|
35551
|
-
setEnableTemplateSourceLocations,
|
|
35552
35568
|
splitNsName,
|
|
35553
35569
|
tmplAstVisitAll,
|
|
35554
35570
|
verifyHostBindings,
|
|
@@ -35558,7 +35574,7 @@ publishFacade(_global);
|
|
|
35558
35574
|
|
|
35559
35575
|
@angular/compiler/fesm2022/compiler.mjs:
|
|
35560
35576
|
(**
|
|
35561
|
-
* @license Angular v22.1.
|
|
35577
|
+
* @license Angular v22.1.4
|
|
35562
35578
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
35563
35579
|
* License: MIT
|
|
35564
35580
|
*)
|