Skip to content

Commit d7a7b42

Browse files
SimenBthymikee
authored andcommitted
chore: upgrade chalk to v3 (#9154)
* chore: upgrade chalk * import Color from chalk rather than hard coding * import require only in ts * update tests
1 parent 62dfcc9 commit d7a7b42

File tree

102 files changed

+188
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+188
-219
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
2525
"babel-plugin-typescript-strip-namespaces": "^1.1.1",
2626
"camelcase": "^5.0.0",
27-
"chalk": "^2.0.1",
27+
"chalk": "^3.0.0",
2828
"codecov": "^3.0.0",
2929
"debug": "^4.0.1",
3030
"eslint": "^6.2.2",

packages/babel-jest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@types/babel__core": "^7.1.0",
1717
"babel-plugin-istanbul": "^5.1.0",
1818
"babel-preset-jest": "^24.9.0",
19-
"chalk": "^2.4.2",
19+
"chalk": "^3.0.0",
2020
"slash": "^3.0.0"
2121
},
2222
"devDependencies": {

packages/babel-jest/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
transformSync as babelTransform,
1717
loadPartialConfig,
1818
} from '@babel/core';
19-
import chalk from 'chalk';
19+
import chalk = require('chalk');
2020
import slash = require('slash');
2121

2222
const THIS_FILE = fs.readFileSync(__filename);

packages/jest-circus/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@jest/environment": "^24.9.0",
1515
"@jest/test-result": "^24.9.0",
1616
"@jest/types": "^24.9.0",
17-
"chalk": "^2.0.1",
17+
"chalk": "^3.0.0",
1818
"co": "^4.6.0",
1919
"expect": "^24.9.0",
2020
"is-generator-fn": "^2.0.0",

packages/jest-circus/src/formatNodeAssertErrors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
printExpected,
1414
printReceived,
1515
} from 'jest-matcher-utils';
16-
import chalk from 'chalk';
16+
import chalk = require('chalk');
1717
import prettyFormat = require('pretty-format');
1818

1919
interface AssertionErrorWithStack extends AssertionError {

packages/jest-circus/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import chalk from 'chalk';
8+
import chalk = require('chalk');
99
import {bind as bindEach} from 'jest-each';
1010
import {formatExecError} from 'jest-message-util';
1111
import {ErrorWithStack, isPromise} from 'jest-util';

packages/jest-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@jest/core": "^24.9.0",
99
"@jest/test-result": "^24.9.0",
1010
"@jest/types": "^24.9.0",
11-
"chalk": "^2.0.1",
11+
"chalk": "^3.0.0",
1212
"exit": "^0.1.2",
1313
"import-local": "^3.0.2",
1414
"is-ci": "^2.0.0",

packages/jest-cli/src/cli/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {clearLine} from 'jest-util';
1212
import {validateCLIOptions} from 'jest-validate';
1313
import {deprecationEntries} from 'jest-config';
1414
import {getVersion, runCLI} from '@jest/core';
15-
import chalk from 'chalk';
15+
import chalk = require('chalk');
1616
import exit = require('exit');
1717
import yargs = require('yargs');
1818
import {sync as realpath} from 'realpath-native';

packages/jest-cli/src/init/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import * as fs from 'fs';
99
import * as path from 'path';
10-
import chalk from 'chalk';
10+
import chalk = require('chalk');
1111
import prompts = require('prompts');
1212
import {sync as realpath} from 'realpath-native';
1313
import defaultQuestions, {testScriptQuestion} from './questions';

packages/jest-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@jest/test-sequencer": "^24.9.0",
1515
"@jest/types": "^24.9.0",
1616
"babel-jest": "^24.9.0",
17-
"chalk": "^2.0.1",
17+
"chalk": "^3.0.0",
1818
"glob": "^7.1.1",
1919
"jest-environment-jsdom": "^24.9.0",
2020
"jest-environment-node": "^24.9.0",

0 commit comments

Comments
 (0)