@angular-eslint/bundled-angular-compiler 17.3.1-alpha.1 → 17.3.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.
Files changed (2) hide show
  1. package/dist/index.js +25 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  /**
4
- * @license Angular v17.3.0
5
- * (c) 2010-2022 Google LLC. https://angular.io/
4
+ * @license Angular v17.3.4
5
+ * (c) 2010-2024 Google LLC. https://angular.io/
6
6
  * License: MIT
7
7
  */
8
8
 
@@ -23420,6 +23420,9 @@ function optimizeTrackFns(job) {
23420
23420
  op.trackByFn = importExpr(Identifiers.repeaterTrackByIdentity);
23421
23421
  }
23422
23422
  else if (isTrackByFunctionCall(job.root.xref, op.track)) {
23423
+ // Mark the function as using the component instance to play it safe
23424
+ // since the method might be using `this` internally (see #53628).
23425
+ op.usesComponentInstance = true;
23423
23426
  // Top-level method calls in the form of `fn($index, item)` can be passed in directly.
23424
23427
  if (op.track.receiver.receiver.view === unit.xref) {
23425
23428
  // TODO: this may be wrong
@@ -25245,15 +25248,23 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
25245
25248
  root = child;
25246
25249
  }
25247
25250
  }
25248
- // If we've found a single root node, its tag name and *static* attributes can be copied
25249
- // to the surrounding template to be used for content projection. Note that it's important
25250
- // that we don't copy any bound attributes since they don't participate in content projection
25251
- // and they can be used in directive matching (in the case of `Template.templateAttrs`).
25251
+ // If we've found a single root node, its tag name and attributes can be
25252
+ // copied to the surrounding template to be used for content projection.
25252
25253
  if (root !== null) {
25254
+ // Collect the static attributes for content projection purposes.
25253
25255
  for (const attr of root.attributes) {
25254
25256
  const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME$1, attr.name, true);
25255
25257
  unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
25256
25258
  }
25259
+ // Also collect the inputs since they participate in content projection as well.
25260
+ // Note that TDB used to collect the outputs as well, but it wasn't passing them into
25261
+ // the template instruction. Here we just don't collect them.
25262
+ for (const attr of root.inputs) {
25263
+ if (attr.type !== 4 /* e.BindingType.Animation */ && attr.type !== 1 /* e.BindingType.Attribute */) {
25264
+ const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME$1, attr.name, true);
25265
+ unit.create.push(createExtractedAttributeOp(xref, BindingKind.Property, null, attr.name, null, null, null, securityContext));
25266
+ }
25267
+ }
25257
25268
  const tagName = root instanceof Element$1 ? root.name : root.tagName;
25258
25269
  // Don't pass along `ng-template` tag name since it enables directive matching.
25259
25270
  return tagName === NG_TEMPLATE_TAG_NAME$1 ? null : tagName;
@@ -32709,7 +32720,7 @@ function publishFacade(global) {
32709
32720
  * @description
32710
32721
  * Entry point for all public APIs of the compiler package.
32711
32722
  */
32712
- const VERSION = new Version('17.3.0');
32723
+ const VERSION = new Version('17.3.4');
32713
32724
 
32714
32725
  class CompilerConfig {
32715
32726
  constructor({ defaultEncapsulation = exports.ViewEncapsulation.Emulated, preserveWhitespaces, strictInjectionParameters } = {}) {
@@ -34277,7 +34288,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$5 = '12.0.0';
34277
34288
  function compileDeclareClassMetadata(metadata) {
34278
34289
  const definitionMap = new DefinitionMap();
34279
34290
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
34280
- definitionMap.set('version', literal('17.3.0'));
34291
+ definitionMap.set('version', literal('17.3.4'));
34281
34292
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34282
34293
  definitionMap.set('type', metadata.type);
34283
34294
  definitionMap.set('decorators', metadata.decorators);
@@ -34373,7 +34384,7 @@ function createDirectiveDefinitionMap(meta) {
34373
34384
  const definitionMap = new DefinitionMap();
34374
34385
  const minVersion = getMinimumVersionForPartialOutput(meta);
34375
34386
  definitionMap.set('minVersion', literal(minVersion));
34376
- definitionMap.set('version', literal('17.3.0'));
34387
+ definitionMap.set('version', literal('17.3.4'));
34377
34388
  // e.g. `type: MyDirective`
34378
34389
  definitionMap.set('type', meta.type.value);
34379
34390
  if (meta.isStandalone) {
@@ -34762,7 +34773,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
34762
34773
  function compileDeclareFactoryFunction(meta) {
34763
34774
  const definitionMap = new DefinitionMap();
34764
34775
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
34765
- definitionMap.set('version', literal('17.3.0'));
34776
+ definitionMap.set('version', literal('17.3.4'));
34766
34777
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34767
34778
  definitionMap.set('type', meta.type.value);
34768
34779
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -34797,7 +34808,7 @@ function compileDeclareInjectableFromMetadata(meta) {
34797
34808
  function createInjectableDefinitionMap(meta) {
34798
34809
  const definitionMap = new DefinitionMap();
34799
34810
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
34800
- definitionMap.set('version', literal('17.3.0'));
34811
+ definitionMap.set('version', literal('17.3.4'));
34801
34812
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34802
34813
  definitionMap.set('type', meta.type.value);
34803
34814
  // Only generate providedIn property if it has a non-null value
@@ -34848,7 +34859,7 @@ function compileDeclareInjectorFromMetadata(meta) {
34848
34859
  function createInjectorDefinitionMap(meta) {
34849
34860
  const definitionMap = new DefinitionMap();
34850
34861
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
34851
- definitionMap.set('version', literal('17.3.0'));
34862
+ definitionMap.set('version', literal('17.3.4'));
34852
34863
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34853
34864
  definitionMap.set('type', meta.type.value);
34854
34865
  definitionMap.set('providers', meta.providers);
@@ -34881,7 +34892,7 @@ function createNgModuleDefinitionMap(meta) {
34881
34892
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
34882
34893
  }
34883
34894
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
34884
- definitionMap.set('version', literal('17.3.0'));
34895
+ definitionMap.set('version', literal('17.3.4'));
34885
34896
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34886
34897
  definitionMap.set('type', meta.type.value);
34887
34898
  // We only generate the keys in the metadata if the arrays contain values.
@@ -34932,7 +34943,7 @@ function compileDeclarePipeFromMetadata(meta) {
34932
34943
  function createPipeDefinitionMap(meta) {
34933
34944
  const definitionMap = new DefinitionMap();
34934
34945
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
34935
- definitionMap.set('version', literal('17.3.0'));
34946
+ definitionMap.set('version', literal('17.3.4'));
34936
34947
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34937
34948
  // e.g. `type: MyPipe`
34938
34949
  definitionMap.set('type', meta.type.value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/bundled-angular-compiler",
3
- "version": "17.3.1-alpha.1",
3
+ "version": "17.3.1-alpha.2",
4
4
  "description": "A CJS bundled version of @angular/compiler",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",