index.js 1.2 KB

1234567891011121314151617181920212223242526
  1. "use strict";
  2. /**
  3. * Use of this source code is governed by an MIT-style license that can be
  4. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  5. */
  6. Object.defineProperty(exports, "__esModule", { value: true });
  7. exports.updateToV19 = updateToV19;
  8. exports.postUpdate = postUpdate;
  9. const schematics_1 = require("@angular/cdk/schematics");
  10. const migrations_1 = require("./migrations");
  11. const upgrade_data_1 = require("./upgrade-data");
  12. const upgrade_rules_1 = require("./upgrade-rules");
  13. function updateToV19() {
  14. return (0, schematics_1.createMigrationSchematicRule)(schematics_1.TargetVersion.V19, [...upgrade_rules_1.nzUpgradeRules, ...migrations_1.nzMigrations], upgrade_data_1.nzUpgradeData, postUpdate);
  15. }
  16. /** Post-update schematic to be called when update is finished. */
  17. function postUpdate(context, targetVersion, hasFailures) {
  18. context.logger.info('');
  19. context.logger.info(` ✓ Updated NG-ZORRO to ${targetVersion}`);
  20. context.logger.info('');
  21. if (hasFailures) {
  22. context.logger.warn(' ⚠ Some issues were detected but could not be fixed automatically. Please check the ' +
  23. 'output above and fix these issues manually.');
  24. }
  25. }
  26. //# sourceMappingURL=index.js.map