@angular/compiler 15.1.1 → 15.1.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.1.1
2
+ * @license Angular v15.1.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.1.1
2
+ * @license Angular v15.1.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -7160,7 +7160,7 @@ class _AstToIrVisitor {
7160
7160
  return null;
7161
7161
  },
7162
7162
  visitNonNullAssert(ast) {
7163
- return null;
7163
+ return visit(this, ast.expression);
7164
7164
  },
7165
7165
  visitPropertyRead(ast) {
7166
7166
  return visit(this, ast.receiver);
@@ -7562,6 +7562,7 @@ const animationKeywords = new Set([
7562
7562
  */
7563
7563
  class ShadowCss {
7564
7564
  constructor() {
7565
+ // TODO: Is never re-assigned, could be removed.
7565
7566
  this.strictStyling = true;
7566
7567
  /**
7567
7568
  * Regular expression used to extrapolate the possible keyframes from an
@@ -8071,6 +8072,13 @@ class ShadowCss {
8071
8072
  while ((res = sep.exec(selector)) !== null) {
8072
8073
  const separator = res[1];
8073
8074
  const part = selector.slice(startIndex, res.index).trim();
8075
+ // A space following an escaped hex value and followed by another hex character
8076
+ // (ie: ".\fc ber" for ".über") is not a separator between 2 selectors
8077
+ // also keep in mind that backslashes are replaced by a placeholder by SafeSelector
8078
+ // These escaped selectors happen for example when esbuild runs with optimization.minify.
8079
+ if (part.match(_placeholderRe) && selector[res.index + 1]?.match(/[a-fA-F\d]/)) {
8080
+ continue;
8081
+ }
8074
8082
  shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
8075
8083
  const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;
8076
8084
  scopedSelector += `${scopedPart} ${separator} `;
@@ -8110,7 +8118,7 @@ class SafeSelector {
8110
8118
  });
8111
8119
  }
8112
8120
  restore(content) {
8113
- return content.replace(/__ph-(\d+)__/g, (_ph, index) => this.placeholders[+index]);
8121
+ return content.replace(_placeholderRe, (_ph, index) => this.placeholders[+index]);
8114
8122
  }
8115
8123
  content() {
8116
8124
  return this._content;
@@ -8158,6 +8166,7 @@ const _polyfillHostRe = /-shadowcsshost/gim;
8158
8166
  const _colonHostRe = /:host/gim;
8159
8167
  const _colonHostContextRe = /:host-context/gim;
8160
8168
  const _commentRe = /\/\*[\s\S]*?\*\//g;
8169
+ const _placeholderRe = /__ph-(\d+)__/g;
8161
8170
  function stripComments(input) {
8162
8171
  return input.replace(_commentRe, '');
8163
8172
  }
@@ -19913,7 +19922,7 @@ function publishFacade(global) {
19913
19922
  * @description
19914
19923
  * Entry point for all public APIs of the compiler package.
19915
19924
  */
19916
- const VERSION = new Version('15.1.1');
19925
+ const VERSION = new Version('15.1.3');
19917
19926
 
19918
19927
  class CompilerConfig {
19919
19928
  constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, useJit = true, missingTranslation = null, preserveWhitespaces, strictInjectionParameters } = {}) {
@@ -21838,7 +21847,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
21838
21847
  function compileDeclareClassMetadata(metadata) {
21839
21848
  const definitionMap = new DefinitionMap();
21840
21849
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
21841
- definitionMap.set('version', literal('15.1.1'));
21850
+ definitionMap.set('version', literal('15.1.3'));
21842
21851
  definitionMap.set('ngImport', importExpr(Identifiers.core));
21843
21852
  definitionMap.set('type', metadata.type);
21844
21853
  definitionMap.set('decorators', metadata.decorators);
@@ -21941,7 +21950,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
21941
21950
  function createDirectiveDefinitionMap(meta) {
21942
21951
  const definitionMap = new DefinitionMap();
21943
21952
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
21944
- definitionMap.set('version', literal('15.1.1'));
21953
+ definitionMap.set('version', literal('15.1.3'));
21945
21954
  // e.g. `type: MyDirective`
21946
21955
  definitionMap.set('type', meta.internalType);
21947
21956
  if (meta.isStandalone) {
@@ -22166,7 +22175,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
22166
22175
  function compileDeclareFactoryFunction(meta) {
22167
22176
  const definitionMap = new DefinitionMap();
22168
22177
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
22169
- definitionMap.set('version', literal('15.1.1'));
22178
+ definitionMap.set('version', literal('15.1.3'));
22170
22179
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22171
22180
  definitionMap.set('type', meta.internalType);
22172
22181
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -22201,7 +22210,7 @@ function compileDeclareInjectableFromMetadata(meta) {
22201
22210
  function createInjectableDefinitionMap(meta) {
22202
22211
  const definitionMap = new DefinitionMap();
22203
22212
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
22204
- definitionMap.set('version', literal('15.1.1'));
22213
+ definitionMap.set('version', literal('15.1.3'));
22205
22214
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22206
22215
  definitionMap.set('type', meta.internalType);
22207
22216
  // Only generate providedIn property if it has a non-null value
@@ -22252,7 +22261,7 @@ function compileDeclareInjectorFromMetadata(meta) {
22252
22261
  function createInjectorDefinitionMap(meta) {
22253
22262
  const definitionMap = new DefinitionMap();
22254
22263
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
22255
- definitionMap.set('version', literal('15.1.1'));
22264
+ definitionMap.set('version', literal('15.1.3'));
22256
22265
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22257
22266
  definitionMap.set('type', meta.internalType);
22258
22267
  definitionMap.set('providers', meta.providers);
@@ -22282,7 +22291,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
22282
22291
  function createNgModuleDefinitionMap(meta) {
22283
22292
  const definitionMap = new DefinitionMap();
22284
22293
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
22285
- definitionMap.set('version', literal('15.1.1'));
22294
+ definitionMap.set('version', literal('15.1.3'));
22286
22295
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22287
22296
  definitionMap.set('type', meta.internalType);
22288
22297
  // We only generate the keys in the metadata if the arrays contain values.
@@ -22333,7 +22342,7 @@ function compileDeclarePipeFromMetadata(meta) {
22333
22342
  function createPipeDefinitionMap(meta) {
22334
22343
  const definitionMap = new DefinitionMap();
22335
22344
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
22336
- definitionMap.set('version', literal('15.1.1'));
22345
+ definitionMap.set('version', literal('15.1.3'));
22337
22346
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22338
22347
  // e.g. `type: MyPipe`
22339
22348
  definitionMap.set('type', meta.internalType);