upgrade-data.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. "use strict";
  2. /**
  3. * @license
  4. * Copyright Google LLC All Rights Reserved.
  5. *
  6. * Use of this source code is governed by an MIT-style license that can be
  7. * found in the LICENSE file at https://angular.io/license
  8. */
  9. Object.defineProperty(exports, "__esModule", { value: true });
  10. const version_changes_1 = require("../update-tool/version-changes");
  11. const data_1 = require("./data");
  12. /** Upgrade data for the Angular CDK. */
  13. exports.cdkUpgradeData = {
  14. attributeSelectors: data_1.attributeSelectors,
  15. classNames: data_1.classNames,
  16. constructorChecks: data_1.constructorChecks,
  17. cssSelectors: data_1.cssSelectors,
  18. elementSelectors: data_1.elementSelectors,
  19. inputNames: data_1.inputNames,
  20. methodCallChecks: data_1.methodCallChecks,
  21. outputNames: data_1.outputNames,
  22. propertyNames: data_1.propertyNames,
  23. };
  24. /**
  25. * Gets the reduced upgrade data for the specified data key from the rule walker options.
  26. *
  27. * The function reads out the target version and upgrade data object from the rule options and
  28. * resolves the specified data portion that is specifically tied to the target version.
  29. */
  30. function getVersionUpgradeData(r, dataName) {
  31. // Note that below we need to cast to `unknown` first TS doesn't infer the type of T correctly.
  32. return version_changes_1.getChangesForTarget(r.targetVersion, r.upgradeData[dataName]);
  33. }
  34. exports.getVersionUpgradeData = getVersionUpgradeData;
  35. //# sourceMappingURL=upgrade-data.js.map