UNPKG

2.67 kBJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, '__esModule', {
4 value: true
5});
6exports.default = void 0;
7
8function _chalk() {
9 const data = _interopRequireDefault(require('chalk'));
10
11 _chalk = function () {
12 return data;
13 };
14
15 return data;
16}
17
18function _prettyFormat() {
19 const data = require('pretty-format');
20
21 _prettyFormat = function () {
22 return data;
23 };
24
25 return data;
26}
27
28function _interopRequireDefault(obj) {
29 return obj && obj.__esModule ? obj : {default: obj};
30}
31
32/**
33 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
34 *
35 * This source code is licensed under the MIT license found in the
36 * LICENSE file in the root directory of this source tree.
37 */
38const format = value =>
39 (0, _prettyFormat().format)(value, {
40 min: true
41 });
42
43const deprecatedOptions = {
44 browser: () =>
45 ` Option ${_chalk().default.bold(
46 '"browser"'
47 )} 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`,
48 preprocessorIgnorePatterns: options => ` Option ${_chalk().default.bold(
49 '"preprocessorIgnorePatterns"'
50 )} was replaced by ${_chalk().default.bold(
51 '"transformIgnorePatterns"'
52 )}, which support multiple preprocessors.
53
54 Jest now treats your current configuration as:
55 {
56 ${_chalk().default.bold(
57 '"transformIgnorePatterns"'
58 )}: ${_chalk().default.bold(format(options.preprocessorIgnorePatterns))}
59 }
60
61 Please update your configuration.`,
62 scriptPreprocessor: options => ` Option ${_chalk().default.bold(
63 '"scriptPreprocessor"'
64 )} was replaced by ${_chalk().default.bold(
65 '"transform"'
66 )}, which support multiple preprocessors.
67
68 Jest now treats your current configuration as:
69 {
70 ${_chalk().default.bold('"transform"')}: ${_chalk().default.bold(
71 `{".*": ${format(options.scriptPreprocessor)}}`
72 )}
73 }
74
75 Please update your configuration.`,
76 setupTestFrameworkScriptFile: _options => ` Option ${_chalk().default.bold(
77 '"setupTestFrameworkScriptFile"'
78 )} was replaced by configuration ${_chalk().default.bold(
79 '"setupFilesAfterEnv"'
80 )}, which supports multiple paths.
81
82 Please update your configuration.`,
83 testPathDirs: options => ` Option ${_chalk().default.bold(
84 '"testPathDirs"'
85 )} was replaced by ${_chalk().default.bold('"roots"')}.
86
87 Jest now treats your current configuration as:
88 {
89 ${_chalk().default.bold('"roots"')}: ${_chalk().default.bold(
90 format(options.testPathDirs)
91 )}
92 }
93
94 Please update your configuration.
95 `
96};
97var _default = deprecatedOptions;
98exports.default = _default;