@angular/material 15.1.1 → 15.1.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.
@@ -22986,14 +22986,22 @@ var RuntimeCodeMigration = class extends import_schematics3.Migration {
22986
22986
  this._hasPossibleTemplateMigrations = true;
22987
22987
  }
22988
22988
  visitNode(node) {
22989
- if (ts.isSourceFile(node)) {
22990
- this._migrateSourceFileReferences(node);
22991
- } else if (this._isComponentDecorator(node)) {
22992
- this._migrateComponentDecorator(node);
22993
- } else if (this._isImportExpression(node)) {
22994
- this._migrateModuleSpecifier(node.arguments[0]);
22995
- } else if (this._isTypeImportExpression(node)) {
22996
- this._migrateModuleSpecifier(node.argument.literal);
22989
+ try {
22990
+ if (ts.isSourceFile(node)) {
22991
+ this._migrateSourceFileReferences(node);
22992
+ } else if (this._isComponentDecorator(node)) {
22993
+ this._migrateComponentDecorator(node);
22994
+ } else if (this._isImportExpression(node)) {
22995
+ this._migrateModuleSpecifier(node.arguments[0]);
22996
+ } else if (this._isTypeImportExpression(node)) {
22997
+ this._migrateModuleSpecifier(node.argument.literal);
22998
+ }
22999
+ } catch (e) {
23000
+ this.context.logger.error(`${e}`);
23001
+ if (e instanceof Error) {
23002
+ this.logger.error(`${e.stack}`);
23003
+ }
23004
+ this.context.logger.warn(`Failed to process file: ${node.getSourceFile().fileName} (see error above).`);
22997
23005
  }
22998
23006
  }
22999
23007
  _migrateSourceFileReferences(sourceFile) {
@@ -23096,7 +23104,9 @@ var RuntimeCodeMigration = class extends import_schematics3.Migration {
23096
23104
  this._stylesMigration = new ThemingStylesMigration(this.program, this.typeChecker, this.targetVersion, this.context, this.upgradeData, this.fileSystem, this.logger);
23097
23105
  }
23098
23106
  node.initializer.forEachChild((stringLiteralNode) => {
23099
- this._migratePropertyAssignment(stringLiteralNode, this._stylesMigration);
23107
+ if (ts.isStringLiteralLike(stringLiteralNode)) {
23108
+ this._migratePropertyAssignment(stringLiteralNode, this._stylesMigration);
23109
+ }
23100
23110
  });
23101
23111
  }
23102
23112
  _migrateTemplate(node) {
@@ -23109,7 +23119,9 @@ var RuntimeCodeMigration = class extends import_schematics3.Migration {
23109
23119
  this._templateMigration = new TemplateMigration(this.program, this.typeChecker, this.targetVersion, this.context, templateUpgradeData, this.fileSystem, this.logger);
23110
23120
  }
23111
23121
  }
23112
- this._migratePropertyAssignment(node.initializer, this._templateMigration);
23122
+ if (ts.isStringLiteralLike(node.initializer)) {
23123
+ this._migratePropertyAssignment(node.initializer, this._templateMigration);
23124
+ }
23113
23125
  }
23114
23126
  _migratePropertyAssignment(node, migration) {
23115
23127
  let migratedText = migration.migrate(node.text, node.getSourceFile().fileName, true);