@angular-eslint/bundled-angular-compiler 15.2.2-alpha.10 → 15.2.2-alpha.3

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 +30 -13
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.2.5
2
+ * @license Angular v15.1.4
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -8314,6 +8314,7 @@ function parse(value) {
8314
8314
  let valueStart = 0;
8315
8315
  let propStart = 0;
8316
8316
  let currentProp = null;
8317
+ let valueHasQuotes = false;
8317
8318
  while (i < value.length) {
8318
8319
  const token = value.charCodeAt(i++);
8319
8320
  switch (token) {
@@ -8326,6 +8327,7 @@ function parse(value) {
8326
8327
  case 39 /* Char.QuoteSingle */:
8327
8328
  // valueStart needs to be there since prop values don't
8328
8329
  // have quotes in CSS
8330
+ valueHasQuotes = valueHasQuotes || valueStart > 0;
8329
8331
  if (quote === 0 /* Char.QuoteNone */) {
8330
8332
  quote = 39 /* Char.QuoteSingle */;
8331
8333
  }
@@ -8335,6 +8337,7 @@ function parse(value) {
8335
8337
  break;
8336
8338
  case 34 /* Char.QuoteDouble */:
8337
8339
  // same logic as above
8340
+ valueHasQuotes = valueHasQuotes || valueStart > 0;
8338
8341
  if (quote === 0 /* Char.QuoteNone */) {
8339
8342
  quote = 34 /* Char.QuoteDouble */;
8340
8343
  }
@@ -8351,20 +8354,34 @@ function parse(value) {
8351
8354
  case 59 /* Char.Semicolon */:
8352
8355
  if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0 /* Char.QuoteNone */) {
8353
8356
  const styleVal = value.substring(valueStart, i - 1).trim();
8354
- styles.push(currentProp, styleVal);
8357
+ styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal);
8355
8358
  propStart = i;
8356
8359
  valueStart = 0;
8357
8360
  currentProp = null;
8361
+ valueHasQuotes = false;
8358
8362
  }
8359
8363
  break;
8360
8364
  }
8361
8365
  }
8362
8366
  if (currentProp && valueStart) {
8363
8367
  const styleVal = value.slice(valueStart).trim();
8364
- styles.push(currentProp, styleVal);
8368
+ styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal);
8365
8369
  }
8366
8370
  return styles;
8367
8371
  }
8372
+ function stripUnnecessaryQuotes(value) {
8373
+ const qS = value.charCodeAt(0);
8374
+ const qE = value.charCodeAt(value.length - 1);
8375
+ if (qS == qE && (qS == 39 /* Char.QuoteSingle */ || qS == 34 /* Char.QuoteDouble */)) {
8376
+ const tempValue = value.substring(1, value.length - 1);
8377
+ // special case to avoid using a multi-quoted string that was just chomped
8378
+ // (e.g. `font-family: "Verdana", "sans-serif"`)
8379
+ if (tempValue.indexOf('\'') == -1 && tempValue.indexOf('"') == -1) {
8380
+ value = tempValue;
8381
+ }
8382
+ }
8383
+ return value;
8384
+ }
8368
8385
  function hyphenate(value) {
8369
8386
  return value
8370
8387
  .replace(/[a-z][A-Z]/g, v => {
@@ -10137,8 +10154,7 @@ class _ParseAST {
10137
10154
  const sourceSpan = this.sourceSpan(keyStart);
10138
10155
  values.push(new PropertyRead(span, sourceSpan, sourceSpan, new ImplicitReceiver(span, sourceSpan), key));
10139
10156
  }
10140
- } while (this.consumeOptionalCharacter($COMMA) &&
10141
- !this.next.isCharacter($RBRACE));
10157
+ } while (this.consumeOptionalCharacter($COMMA));
10142
10158
  this.rbracesExpected--;
10143
10159
  this.expectCharacter($RBRACE);
10144
10160
  }
@@ -19709,7 +19725,7 @@ function publishFacade(global) {
19709
19725
  * @description
19710
19726
  * Entry point for all public APIs of the compiler package.
19711
19727
  */
19712
- const VERSION = new Version('15.2.5');
19728
+ const VERSION = new Version('15.1.4');
19713
19729
 
19714
19730
  class CompilerConfig {
19715
19731
  constructor({ defaultEncapsulation = exports.ViewEncapsulation.Emulated, useJit = true, missingTranslation = null, preserveWhitespaces, strictInjectionParameters } = {}) {
@@ -21400,6 +21416,7 @@ class TemplateBinder extends RecursiveAstVisitor {
21400
21416
  this.scope = scope;
21401
21417
  this.template = template;
21402
21418
  this.level = level;
21419
+ this.pipesUsed = [];
21403
21420
  // Save a bit of processing time by constructing this closure in advance.
21404
21421
  this.visitNode = (node) => node.visit(this);
21405
21422
  }
@@ -21635,7 +21652,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
21635
21652
  function compileDeclareClassMetadata(metadata) {
21636
21653
  const definitionMap = new DefinitionMap();
21637
21654
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
21638
- definitionMap.set('version', literal('15.2.5'));
21655
+ definitionMap.set('version', literal('15.1.4'));
21639
21656
  definitionMap.set('ngImport', importExpr(Identifiers.core));
21640
21657
  definitionMap.set('type', metadata.type);
21641
21658
  definitionMap.set('decorators', metadata.decorators);
@@ -21739,7 +21756,7 @@ function createDirectiveDefinitionMap(meta) {
21739
21756
  var _a;
21740
21757
  const definitionMap = new DefinitionMap();
21741
21758
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
21742
- definitionMap.set('version', literal('15.2.5'));
21759
+ definitionMap.set('version', literal('15.1.4'));
21743
21760
  // e.g. `type: MyDirective`
21744
21761
  definitionMap.set('type', meta.internalType);
21745
21762
  if (meta.isStandalone) {
@@ -21961,7 +21978,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
21961
21978
  function compileDeclareFactoryFunction(meta) {
21962
21979
  const definitionMap = new DefinitionMap();
21963
21980
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
21964
- definitionMap.set('version', literal('15.2.5'));
21981
+ definitionMap.set('version', literal('15.1.4'));
21965
21982
  definitionMap.set('ngImport', importExpr(Identifiers.core));
21966
21983
  definitionMap.set('type', meta.internalType);
21967
21984
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -21996,7 +22013,7 @@ function compileDeclareInjectableFromMetadata(meta) {
21996
22013
  function createInjectableDefinitionMap(meta) {
21997
22014
  const definitionMap = new DefinitionMap();
21998
22015
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
21999
- definitionMap.set('version', literal('15.2.5'));
22016
+ definitionMap.set('version', literal('15.1.4'));
22000
22017
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22001
22018
  definitionMap.set('type', meta.internalType);
22002
22019
  // Only generate providedIn property if it has a non-null value
@@ -22047,7 +22064,7 @@ function compileDeclareInjectorFromMetadata(meta) {
22047
22064
  function createInjectorDefinitionMap(meta) {
22048
22065
  const definitionMap = new DefinitionMap();
22049
22066
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
22050
- definitionMap.set('version', literal('15.2.5'));
22067
+ definitionMap.set('version', literal('15.1.4'));
22051
22068
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22052
22069
  definitionMap.set('type', meta.internalType);
22053
22070
  definitionMap.set('providers', meta.providers);
@@ -22077,7 +22094,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
22077
22094
  function createNgModuleDefinitionMap(meta) {
22078
22095
  const definitionMap = new DefinitionMap();
22079
22096
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
22080
- definitionMap.set('version', literal('15.2.5'));
22097
+ definitionMap.set('version', literal('15.1.4'));
22081
22098
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22082
22099
  definitionMap.set('type', meta.internalType);
22083
22100
  // We only generate the keys in the metadata if the arrays contain values.
@@ -22128,7 +22145,7 @@ function compileDeclarePipeFromMetadata(meta) {
22128
22145
  function createPipeDefinitionMap(meta) {
22129
22146
  const definitionMap = new DefinitionMap();
22130
22147
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
22131
- definitionMap.set('version', literal('15.2.5'));
22148
+ definitionMap.set('version', literal('15.1.4'));
22132
22149
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22133
22150
  // e.g. `type: MyPipe`
22134
22151
  definitionMap.set('type', meta.internalType);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/bundled-angular-compiler",
3
- "version": "15.2.2-alpha.10+9dacfe8",
3
+ "version": "15.2.2-alpha.3+5f729bc",
4
4
  "description": "A CJS bundled version of @angular/compiler",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -15,5 +15,5 @@
15
15
  "package.json",
16
16
  "README.md"
17
17
  ],
18
- "gitHead": "9dacfe8b9859a2514bae23bd0dea672d5da21200"
18
+ "gitHead": "5f729bc75ca345b98deb208b6a790705b9b8c538"
19
19
  }