Deprecated.js 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. function _chalk() {
  7. const data = _interopRequireDefault(require('chalk'));
  8. _chalk = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. function _interopRequireDefault(obj) {
  14. return obj && obj.__esModule ? obj : {default: obj};
  15. }
  16. /**
  17. * Copyright (c) Meta Platforms, Inc. and affiliates.
  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. const deprecatedOptions = {
  23. browser: () =>
  24. ` Option ${_chalk().default.bold(
  25. '"browser"'
  26. )} has been deprecated. Please install "browser-resolve" and use the "resolver" option in Jest configuration as shown in the documentation: https://jestjs.io/docs/configuration#resolver-string`,
  27. collectCoverageOnlyFrom: _options => ` Option ${_chalk().default.bold(
  28. '"collectCoverageOnlyFrom"'
  29. )} was replaced by ${_chalk().default.bold('"collectCoverageFrom"')}.
  30. Please update your configuration.`,
  31. extraGlobals: _options => ` Option ${_chalk().default.bold(
  32. '"extraGlobals"'
  33. )} was replaced by ${_chalk().default.bold('"sandboxInjectedGlobals"')}.
  34. Please update your configuration.`,
  35. moduleLoader: _options => ` Option ${_chalk().default.bold(
  36. '"moduleLoader"'
  37. )} was replaced by ${_chalk().default.bold('"runtime"')}.
  38. Please update your configuration.`,
  39. preprocessorIgnorePatterns: _options => ` Option ${_chalk().default.bold(
  40. '"preprocessorIgnorePatterns"'
  41. )} was replaced by ${_chalk().default.bold(
  42. '"transformIgnorePatterns"'
  43. )}, which support multiple preprocessors.
  44. Please update your configuration.`,
  45. scriptPreprocessor: _options => ` Option ${_chalk().default.bold(
  46. '"scriptPreprocessor"'
  47. )} was replaced by ${_chalk().default.bold(
  48. '"transform"'
  49. )}, which support multiple preprocessors.
  50. Please update your configuration.`,
  51. setupTestFrameworkScriptFile: _options => ` Option ${_chalk().default.bold(
  52. '"setupTestFrameworkScriptFile"'
  53. )} was replaced by configuration ${_chalk().default.bold(
  54. '"setupFilesAfterEnv"'
  55. )}, which supports multiple paths.
  56. Please update your configuration.`,
  57. testPathDirs: _options => ` Option ${_chalk().default.bold(
  58. '"testPathDirs"'
  59. )} was replaced by ${_chalk().default.bold('"roots"')}.
  60. Please update your configuration.
  61. `,
  62. testURL: _options => ` Option ${_chalk().default.bold(
  63. '"testURL"'
  64. )} was replaced by passing the URL via ${_chalk().default.bold(
  65. '"testEnvironmentOptions.url"'
  66. )}.
  67. Please update your configuration.`,
  68. timers: _options => ` Option ${_chalk().default.bold(
  69. '"timers"'
  70. )} was replaced by ${_chalk().default.bold('"fakeTimers"')}.
  71. Please update your configuration.`
  72. };
  73. var _default = deprecatedOptions;
  74. exports.default = _default;