Deprecated.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', {
  3. value: true
  4. });
  5. var _chalk;
  6. function _load_chalk() {
  7. return (_chalk = _interopRequireDefault(require('chalk')));
  8. }
  9. var _prettyFormat;
  10. function _load_prettyFormat() {
  11. return (_prettyFormat = _interopRequireDefault(require('pretty-format')));
  12. }
  13. function _interopRequireDefault(obj) {
  14. return obj && obj.__esModule ? obj : {default: obj};
  15. }
  16. /**
  17. * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
  18. *
  19. * This source code is licensed under the MIT license found in the
  20. * LICENSE file in the root directory of this source tree.
  21. *
  22. *
  23. */
  24. const format = value =>
  25. (0, (_prettyFormat || _load_prettyFormat()).default)(value, {min: true});
  26. exports.default = {
  27. mapCoverage: () => ` Option ${(_chalk || _load_chalk()).default.bold(
  28. '"mapCoverage"'
  29. )} has been removed, as it's no longer necessary.
  30. Please update your configuration.`,
  31. preprocessorIgnorePatterns: options => ` Option ${(
  32. _chalk || _load_chalk()
  33. ).default.bold('"preprocessorIgnorePatterns"')} was replaced by ${(
  34. _chalk || _load_chalk()
  35. ).default.bold(
  36. '"transformIgnorePatterns"'
  37. )}, which support multiple preprocessors.
  38. Jest now treats your current configuration as:
  39. {
  40. ${(_chalk || _load_chalk()).default.bold('"transformIgnorePatterns"')}: ${(
  41. _chalk || _load_chalk()
  42. ).default.bold(format(options.preprocessorIgnorePatterns))}
  43. }
  44. Please update your configuration.`,
  45. scriptPreprocessor: options => ` Option ${(
  46. _chalk || _load_chalk()
  47. ).default.bold('"scriptPreprocessor"')} was replaced by ${(
  48. _chalk || _load_chalk()
  49. ).default.bold('"transform"')}, which support multiple preprocessors.
  50. Jest now treats your current configuration as:
  51. {
  52. ${(_chalk || _load_chalk()).default.bold('"transform"')}: ${(
  53. _chalk || _load_chalk()
  54. ).default.bold(`{".*": ${format(options.scriptPreprocessor)}}`)}
  55. }
  56. Please update your configuration.`,
  57. testPathDirs: options => ` Option ${(_chalk || _load_chalk()).default.bold(
  58. '"testPathDirs"'
  59. )} was replaced by ${(_chalk || _load_chalk()).default.bold('"roots"')}.
  60. Jest now treats your current configuration as:
  61. {
  62. ${(_chalk || _load_chalk()).default.bold('"roots"')}: ${(
  63. _chalk || _load_chalk()
  64. ).default.bold(format(options.testPathDirs))}
  65. }
  66. Please update your configuration.
  67. `
  68. };