From ca26d1d5bb1f66de005f72119f8cc9b345f5c77c Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Fri, 30 Oct 2020 10:09:13 +0100 Subject: [PATCH] chore: add missing dependencies uncovered by PnP (#10738) --- package.json | 7 ++++++- packages/jest-circus/package.json | 3 ++- .../jest-create-cache-key-function/package.json | 3 +++ packages/jest-fake-timers/package.json | 3 ++- packages/jest-haste-map/package.json | 1 + packages/test-utils/package.json | 1 + .../test-utils/src/alignedAnsiStyleSerializer.ts | 4 ++-- test-types/top-level-globals.test.ts | 1 - test-types/top-level-jest-namespace.test.ts | 1 - yarn.lock | 14 ++++++++++++-- 10 files changed, 29 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 5ab165371362..c1cab19f2fe6 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.0.0", "@babel/register": "^7.0.0", - "@jest/test-utils": "^26.0.0", + "@jest/globals": "workspace:packages/jest-globals", + "@jest/test-utils": "workspace:packages/test-utils", "@types/babel__core": "^7.0.0", "@types/babel__generator": "^7.0.0", "@types/babel__template": "^7.0.0", @@ -54,9 +55,12 @@ "istanbul-lib-report": "^3.0.0", "istanbul-reports": "^3.0.0", "jest": "workspace:packages/jest", + "jest-changed-files": "workspace:packages/jest-changed-files", "jest-junit": "^12.0.0", + "jest-mock": "workspace:packages/jest-mock", "jest-runner-tsd": "^1.1.0", "jest-silent-reporter": "^0.2.1", + "jest-snapshot": "workspace:packages/jest-snapshot", "jest-snapshot-serializer-raw": "^1.1.0", "jest-watch-typeahead": "^0.6.0", "jquery": "^3.2.1", @@ -72,6 +76,7 @@ "rimraf": "^3.0.0", "semver": "^7.3.2", "slash": "^3.0.0", + "stealthy-require": "^1.1.1", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", "tempy": "^1.0.0", diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 310e94dc9e93..40703afbe192 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -42,7 +42,8 @@ "@types/graceful-fs": "^4.1.3", "@types/stack-utils": "^2.0.0", "execa": "^4.0.0", - "graceful-fs": "^4.2.4" + "graceful-fs": "^4.2.4", + "jest-snapshot-serializer-raw": "^1.1.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-create-cache-key-function/package.json b/packages/jest-create-cache-key-function/package.json index 528f1864c606..d5937335cc07 100644 --- a/packages/jest-create-cache-key-function/package.json +++ b/packages/jest-create-cache-key-function/package.json @@ -6,6 +6,9 @@ "url": "https://github.com/facebook/jest.git", "directory": "packages/jest-create-cache-key-function" }, + "dependencies": { + "@jest/types": "^26.6.1" + }, "devDependencies": { "@types/node": "*" }, diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index 9b0a320df1e9..c9d31223388c 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -18,7 +18,8 @@ "jest-util": "^26.6.1" }, "devDependencies": { - "@types/sinonjs__fake-timers": "^6.0.1" + "@types/sinonjs__fake-timers": "^6.0.1", + "jest-snapshot-serializer-raw": "^1.1.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index 2b286efe6375..2b7b1530d79e 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -30,6 +30,7 @@ "@types/fb-watchman": "^2.0.0", "@types/micromatch": "^4.0.0", "@types/sane": "^2.0.0", + "jest-snapshot-serializer-raw": "^1.1.0", "slash": "^3.0.0" }, "optionalDependencies": { diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 16686dd92ff1..71340cbe825f 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -11,6 +11,7 @@ "@types/semver": "^7.1.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.1.0", + "pretty-format": "^26.6.1", "semver": "^7.3.2" }, "engines": { diff --git a/packages/test-utils/src/alignedAnsiStyleSerializer.ts b/packages/test-utils/src/alignedAnsiStyleSerializer.ts index bc92b21d4969..e007e5e0aacd 100644 --- a/packages/test-utils/src/alignedAnsiStyleSerializer.ts +++ b/packages/test-utils/src/alignedAnsiStyleSerializer.ts @@ -7,9 +7,9 @@ import ansiRegex = require('ansi-regex'); import style = require('ansi-styles'); -import prettyFormat = require('pretty-format'); +import type {NewPlugin} from 'pretty-format'; -export const alignedAnsiStyleSerializer: prettyFormat.NewPlugin = { +export const alignedAnsiStyleSerializer: NewPlugin = { serialize(val: string): string { // Return the string itself, not escaped nor enclosed in double quote marks. return val.replace(ansiRegex(), match => { diff --git a/test-types/top-level-globals.test.ts b/test-types/top-level-globals.test.ts index 9b6499411362..8d3827b76e22 100644 --- a/test-types/top-level-globals.test.ts +++ b/test-types/top-level-globals.test.ts @@ -15,7 +15,6 @@ import { beforeEach, describe, test, - //eslint-disable-next-line import/no-extraneous-dependencies } from '@jest/globals'; const fn = () => {}; diff --git a/test-types/top-level-jest-namespace.test.ts b/test-types/top-level-jest-namespace.test.ts index fe03300cdea5..b00e69b62021 100644 --- a/test-types/top-level-jest-namespace.test.ts +++ b/test-types/top-level-jest-namespace.test.ts @@ -8,7 +8,6 @@ */ import {expectError, expectType} from 'mlh-tsd'; -//eslint-disable-next-line import/no-extraneous-dependencies import {jest} from '@jest/globals'; import type {Mock} from 'jest-mock'; diff --git a/yarn.lock b/yarn.lock index ed4ddcb99837..73b84ede4268 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1808,6 +1808,7 @@ __metadata: version: 0.0.0-use.local resolution: "@jest/create-cache-key-function@workspace:packages/jest-create-cache-key-function" dependencies: + "@jest/types": ^26.6.1 "@types/node": "*" languageName: unknown linkType: soft @@ -1833,6 +1834,7 @@ __metadata: "@types/sinonjs__fake-timers": ^6.0.1 jest-message-util: ^26.6.1 jest-mock: ^26.6.1 + jest-snapshot-serializer-raw: ^1.1.0 jest-util: ^26.6.1 languageName: unknown linkType: soft @@ -1961,7 +1963,7 @@ __metadata: languageName: unknown linkType: soft -"@jest/test-utils@^26.0.0, @jest/test-utils@^26.5.0, @jest/test-utils@workspace:packages/test-utils": +"@jest/test-utils@^26.5.0, @jest/test-utils@workspace:packages/test-utils": version: 0.0.0-use.local resolution: "@jest/test-utils@workspace:packages/test-utils" dependencies: @@ -1970,6 +1972,7 @@ __metadata: "@types/semver": ^7.1.0 ansi-regex: ^5.0.0 ansi-styles: ^4.1.0 + pretty-format: ^26.6.1 semver: ^7.3.2 languageName: unknown linkType: soft @@ -11480,6 +11483,7 @@ fsevents@^1.2.7: jest-runner: ^26.6.1 jest-runtime: ^26.6.1 jest-snapshot: ^26.6.1 + jest-snapshot-serializer-raw: ^1.1.0 jest-util: ^26.6.1 pretty-format: ^26.6.1 stack-utils: ^2.0.2 @@ -11663,6 +11667,7 @@ fsevents@^1.2.7: graceful-fs: ^4.2.4 jest-regex-util: ^26.0.0 jest-serializer: ^26.5.0 + jest-snapshot-serializer-raw: ^1.1.0 jest-util: ^26.6.1 jest-worker: ^26.6.1 micromatch: ^4.0.2 @@ -17181,7 +17186,8 @@ fsevents@^1.2.7: "@babel/preset-react": ^7.0.0 "@babel/preset-typescript": ^7.0.0 "@babel/register": ^7.0.0 - "@jest/test-utils": ^26.0.0 + "@jest/globals": "workspace:packages/jest-globals" + "@jest/test-utils": "workspace:packages/test-utils" "@types/babel__core": ^7.0.0 "@types/babel__generator": ^7.0.0 "@types/babel__template": ^7.0.0 @@ -17224,9 +17230,12 @@ fsevents@^1.2.7: istanbul-lib-report: ^3.0.0 istanbul-reports: ^3.0.0 jest: "workspace:packages/jest" + jest-changed-files: "workspace:packages/jest-changed-files" jest-junit: ^12.0.0 + jest-mock: "workspace:packages/jest-mock" jest-runner-tsd: ^1.1.0 jest-silent-reporter: ^0.2.1 + jest-snapshot: "workspace:packages/jest-snapshot" jest-snapshot-serializer-raw: ^1.1.0 jest-watch-typeahead: ^0.6.0 jquery: ^3.2.1 @@ -17242,6 +17251,7 @@ fsevents@^1.2.7: rimraf: ^3.0.0 semver: ^7.3.2 slash: ^3.0.0 + stealthy-require: ^1.1.1 string-length: ^4.0.1 strip-ansi: ^6.0.0 tempy: ^1.0.0