diff --git a/package.json b/package.json index d2bbb1b422bc..654310f2d425 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@typescript-eslint/eslint-plugin": "^2.2.0", "@typescript-eslint/parser": "^2.2.0", "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", + "ansi-styles": "^4.2.0", "babel-eslint": "^10.0.3", "babel-loader": "^8.0.5", "babel-plugin-replace-ts-export-assignment": "^0.0.2", diff --git a/packages/expect/package.json b/packages/expect/package.json index 18e7ac720c16..541b127d7366 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -19,7 +19,6 @@ "jest-regex-util": "^24.9.0" }, "devDependencies": { - "@types/ansi-styles": "^3.2.1", "immutable": "^4.0.0-rc.12" }, "engines": { diff --git a/packages/jest-snapshot/src/__tests__/printSnapshot.test.ts b/packages/jest-snapshot/src/__tests__/printSnapshot.test.ts index 692f47ffc274..885d030e2e6a 100644 --- a/packages/jest-snapshot/src/__tests__/printSnapshot.test.ts +++ b/packages/jest-snapshot/src/__tests__/printSnapshot.test.ts @@ -6,7 +6,7 @@ */ import ansiRegex = require('ansi-regex'); -import * as styles from 'ansi-styles'; +import styles = require('ansi-styles'); import chalk = require('chalk'); import format = require('pretty-format'); diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 2cf3aef0334f..c0dce8cba8a0 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -19,7 +19,6 @@ "react-is": "^16.8.4" }, "devDependencies": { - "@types/ansi-styles": "^3.2.1", "@types/react": "*", "@types/react-is": "^16.7.1", "@types/react-test-renderer": "*", diff --git a/packages/pretty-format/src/__tests__/ConvertAnsi.test.ts b/packages/pretty-format/src/__tests__/ConvertAnsi.test.ts index c562f67a8123..6e74956c34f5 100644 --- a/packages/pretty-format/src/__tests__/ConvertAnsi.test.ts +++ b/packages/pretty-format/src/__tests__/ConvertAnsi.test.ts @@ -5,9 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import ansiStyle from 'ansi-styles'; - -import prettyFormat from '../'; +import ansiStyle = require('ansi-styles'); +import prettyFormat = require('../'); const {ConvertAnsi} = prettyFormat.plugins; diff --git a/packages/pretty-format/src/index.ts b/packages/pretty-format/src/index.ts index 606416400e26..71472395d107 100644 --- a/packages/pretty-format/src/index.ts +++ b/packages/pretty-format/src/index.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import * as style from 'ansi-styles'; +import style = require('ansi-styles'); import * as PrettyFormat from './types'; import { diff --git a/packages/pretty-format/src/plugins/ConvertAnsi.ts b/packages/pretty-format/src/plugins/ConvertAnsi.ts index bce68b352f75..fac377372f6c 100644 --- a/packages/pretty-format/src/plugins/ConvertAnsi.ts +++ b/packages/pretty-format/src/plugins/ConvertAnsi.ts @@ -6,7 +6,7 @@ */ import ansiRegex = require('ansi-regex'); -import * as style from 'ansi-styles'; +import style = require('ansi-styles'); import {Config, NewPlugin, Printer, Refs} from '../types'; const toHumanReadableAnsi = (text: string) => diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 5bc4138dd9c1..ed95efe30de5 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -8,8 +8,5 @@ "dependencies": { "ansi-regex": "^5.0.0", "ansi-styles": "^4.1.0" - }, - "devDependencies": { - "@types/ansi-styles": "^3.2.1" } } diff --git a/packages/test-utils/src/alignedAnsiStyleSerializer.ts b/packages/test-utils/src/alignedAnsiStyleSerializer.ts index 99ea8900d842..a919aafddbf8 100644 --- a/packages/test-utils/src/alignedAnsiStyleSerializer.ts +++ b/packages/test-utils/src/alignedAnsiStyleSerializer.ts @@ -6,7 +6,7 @@ */ import ansiRegex = require('ansi-regex'); -import * as style from 'ansi-styles'; +import style = require('ansi-styles'); export const alignedAnsiStyleSerializer = { serialize(val: string): string { diff --git a/yarn.lock b/yarn.lock index 16ace8631146..33db4b653f33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1792,13 +1792,6 @@ "@testing-library/dom" "^6.0.0" "@types/react-dom" "^16.8.5" -"@types/ansi-styles@^3.2.1": - version "3.2.1" - resolved "https://registry.yarnpkg.com/@types/ansi-styles/-/ansi-styles-3.2.1.tgz#49e996bb6e0b7957ca831205df31eb9a0702492c" - integrity sha512-UFa7mfKgSutXdT+elzJo8Ulr7FHgLNAyglVIOZYXFNJVQERm8DPrcwPret5BYk66LBE7fwm1XoVGi76MJkQ6ow== - dependencies: - "@types/color-name" "*" - "@types/anymatch@^1.3.1": version "1.3.1" resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a" @@ -1876,7 +1869,7 @@ resolved "https://registry.yarnpkg.com/@types/co/-/co-4.6.2.tgz#027177ea7a3e34adbd55424e8b949fceb80fda32" integrity sha512-tCPGk0b+zVZgFq6JovNM9MPH78BdLBE4RQMa21GCe2LhSs91kCSegS2Qdpb1NdRmfa7Asay9+rY2u1Z8Iw0s8A== -"@types/color-name@*": +"@types/color-name@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== @@ -2611,11 +2604,12 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.1.0.tgz#d3ba8047b818293eaaa7978321dd61bff9842cfc" - integrity sha512-Qts4KCLKG+waHc9C4m07weIY8qyeixoS0h6RnbsNVD6Fw+pEZGW3vTyObL3WXpE09Mq4Oi7/lBEyLmOiLtlYWQ== +ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.0.tgz#5681f0dcf7ae5880a7841d8831c4724ed9cc0172" + integrity sha512-7kFQgnEaMdRtwf6uSfUnVr9gSGC7faurn+J/Mv90/W+iTtN0405/nLdopfMWwchyxhbGYl6TC4Sccn9TUkGAgg== dependencies: + "@types/color-name" "^1.1.1" color-convert "^2.0.1" ansi-wrap@0.1.0, ansi-wrap@^0.1.0: