From 132e815f95cad24b0ea28cd2f3aecaf8c87b047a Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 28 Aug 2022 17:09:26 +0200 Subject: [PATCH] chore: update to TypeScript 4.8 (#13177) --- .../testFailingJasmine.test.ts.snap | 4 +- examples/angular/package.json | 2 +- examples/typescript/package.json | 2 +- package.json | 5 +- packages/expect/package.json | 2 +- packages/jest-config/package.json | 2 +- packages/jest-expect/package.json | 2 +- .../jest-jasmine2/src/jasmineAsyncInstall.ts | 1 + packages/jest-mock/package.json | 2 +- packages/jest-reporters/package.json | 2 +- packages/jest-resolve/package.json | 2 +- packages/jest-runner/package.json | 2 +- packages/jest-snapshot/package.json | 2 +- packages/jest-types/package.json | 2 +- packages/jest-worker/package.json | 2 +- packages/jest/package.json | 2 +- yarn.lock | 87 ++++++++++--------- 17 files changed, 64 insertions(+), 59 deletions(-) diff --git a/e2e/__tests__/__snapshots__/testFailingJasmine.test.ts.snap b/e2e/__tests__/__snapshots__/testFailingJasmine.test.ts.snap index 2a6200f91f69..b78baf85b380 100644 --- a/e2e/__tests__/__snapshots__/testFailingJasmine.test.ts.snap +++ b/e2e/__tests__/__snapshots__/testFailingJasmine.test.ts.snap @@ -46,7 +46,7 @@ FAIL __tests__/worksWithConcurrentMode.test.js 15 | }); 16 | - at Function.failing (../../packages/jest-jasmine2/build/jasmineAsyncInstall.js:197:11) + at Function.failing (../../packages/jest-jasmine2/build/jasmineAsyncInstall.js:198:11) at Suite.failing (__tests__/worksWithConcurrentMode.test.js:13:17) at Object.describe (__tests__/worksWithConcurrentMode.test.js:8:1) @@ -80,7 +80,7 @@ FAIL __tests__/worksWithConcurrentOnlyMode.test.js 15 | }); 16 | - at Function.failing (../../packages/jest-jasmine2/build/jasmineAsyncInstall.js:197:11) + at Function.failing (../../packages/jest-jasmine2/build/jasmineAsyncInstall.js:198:11) at Suite.failing (__tests__/worksWithConcurrentOnlyMode.test.js:13:22) at Object.describe (__tests__/worksWithConcurrentOnlyMode.test.js:8:1) diff --git a/examples/angular/package.json b/examples/angular/package.json index d7e38c7293e0..4e651adc9bd8 100644 --- a/examples/angular/package.json +++ b/examples/angular/package.json @@ -15,7 +15,7 @@ "core-js": "^3.2.1", "rxjs": "^7.5.5", "tslib": "^2.0.0", - "typescript": "^4.7.4", + "typescript": "^4.8.2", "zone.js": "~0.11.3" }, "devDependencies": { diff --git a/examples/typescript/package.json b/examples/typescript/package.json index 938f9aa1698c..6799e61d96dc 100644 --- a/examples/typescript/package.json +++ b/examples/typescript/package.json @@ -5,7 +5,7 @@ "dependencies": { "react": "17.0.2", "react-dom": "^17.0.1", - "typescript": "^4.7.4" + "typescript": "^4.8.2" }, "devDependencies": { "@babel/core": "^7.11.6", diff --git a/package.json b/package.json index b78221f4388a..82eea80f8b1d 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@lerna-lite/cli": "^1.10.0", "@microsoft/api-extractor": "^7.29.0", "@tsconfig/node14": "^1.0.3", - "@tsd/typescript": "~4.7.4", + "@tsd/typescript": "~4.8.2", "@types/babel__core": "^7.1.14", "@types/babel__generator": "^7.0.0", "@types/babel__template": "^7.0.2", @@ -82,7 +82,7 @@ "tempy": "^1.0.0", "ts-node": "^10.5.0", "type-fest": "^2.11.2", - "typescript": "^4.7.4", + "typescript": "^4.8.2", "which": "^2.0.1" }, "scripts": { @@ -171,6 +171,7 @@ }, "resolutions": { "@types/node": "~14.14.45", + "ansi-escapes/type-fest": "^2.0.0", "babel-jest": "workspace:*", "enzyme/cheerio": "=1.0.0-rc.3", "jest": "workspace:*", diff --git a/packages/expect/package.json b/packages/expect/package.json index 1395ca1baeec..c963c4d51834 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -26,7 +26,7 @@ }, "devDependencies": { "@jest/test-utils": "workspace:^", - "@tsd/typescript": "~4.7.4", + "@tsd/typescript": "~4.8.2", "chalk": "^4.0.0", "fast-check": "^3.0.0", "immutable": "^4.0.0", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 160ac1c3c3e7..43f78dec883d 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -58,7 +58,7 @@ "@types/micromatch": "^4.0.1", "semver": "^7.3.5", "ts-node": "^10.5.0", - "typescript": "^4.7.4" + "typescript": "^4.8.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" diff --git a/packages/jest-expect/package.json b/packages/jest-expect/package.json index ddf9d35e3809..d527d360e285 100644 --- a/packages/jest-expect/package.json +++ b/packages/jest-expect/package.json @@ -21,7 +21,7 @@ "jest-snapshot": "workspace:^" }, "devDependencies": { - "@tsd/typescript": "~4.7.4", + "@tsd/typescript": "~4.8.2", "tsd-lite": "^0.6.0" }, "engines": { diff --git a/packages/jest-jasmine2/src/jasmineAsyncInstall.ts b/packages/jest-jasmine2/src/jasmineAsyncInstall.ts index 693966fded07..2971d361f068 100644 --- a/packages/jest-jasmine2/src/jasmineAsyncInstall.ts +++ b/packages/jest-jasmine2/src/jasmineAsyncInstall.ts @@ -79,6 +79,7 @@ function promisifyLifeCycleFunction( // didn't return a promise. const asyncJestLifecycle = function (done: DoneFn) { const wrappedFn = isGeneratorFn(fn) ? co.wrap(fn) : fn; + // @ts-expect-error: TS thinks `wrappedFn` is a generator function const returnValue = wrappedFn.call({}, doneFnNoop); if (isPromise(returnValue)) { diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index ba46c280dedf..c969b4c52308 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -21,7 +21,7 @@ "@types/node": "*" }, "devDependencies": { - "@tsd/typescript": "~4.7.4", + "@tsd/typescript": "~4.8.2", "tsd-lite": "^0.6.0" }, "engines": { diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 53aa9c3536b8..23f2de2a9c81 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -40,7 +40,7 @@ }, "devDependencies": { "@jest/test-utils": "workspace:^", - "@tsd/typescript": "~4.7.4", + "@tsd/typescript": "~4.8.2", "@types/exit": "^0.1.30", "@types/glob": "^7.1.1", "@types/graceful-fs": "^4.1.3", diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 8f0aeb311c86..4d62cb7edeb1 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -28,7 +28,7 @@ "slash": "^3.0.0" }, "devDependencies": { - "@tsd/typescript": "~4.7.4", + "@tsd/typescript": "~4.8.2", "@types/graceful-fs": "^4.1.3", "@types/pnpapi": "^0.0.2", "@types/resolve": "^1.20.2", diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 90d48ec3b90b..ae0d1f96f3a3 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -40,7 +40,7 @@ "source-map-support": "0.5.13" }, "devDependencies": { - "@tsd/typescript": "~4.7.4", + "@tsd/typescript": "~4.8.2", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.3", "@types/source-map-support": "^0.5.0", diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index e5ad8a2cf05b..fc6e5868d68b 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -46,7 +46,7 @@ "@babel/preset-flow": "^7.7.2", "@babel/preset-react": "^7.12.1", "@jest/test-utils": "workspace:^", - "@tsd/typescript": "~4.7.4", + "@tsd/typescript": "~4.8.2", "@types/graceful-fs": "^4.1.3", "@types/natural-compare": "^1.4.0", "@types/semver": "^7.1.0", diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index 143d85d2fb11..525bda9ad343 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -28,7 +28,7 @@ "chalk": "^4.0.0" }, "devDependencies": { - "@tsd/typescript": "~4.7.4", + "@tsd/typescript": "~4.8.2", "tsd-lite": "^0.6.0" }, "publishConfig": { diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index d15f651d8a6f..cd608552f6e2 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -22,7 +22,7 @@ "supports-color": "^8.0.0" }, "devDependencies": { - "@tsd/typescript": "~4.7.4", + "@tsd/typescript": "~4.8.2", "@types/merge-stream": "^1.1.2", "@types/supports-color": "^8.1.0", "get-stream": "^6.0.0", diff --git a/packages/jest/package.json b/packages/jest/package.json index e45d01b9f23d..21cc61f3caef 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -19,7 +19,7 @@ "jest-cli": "workspace:^" }, "devDependencies": { - "@tsd/typescript": "~4.7.4", + "@tsd/typescript": "~4.8.2", "tsd-lite": "^0.6.0" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index d873b176e743..751b3a9ff96c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2693,7 +2693,7 @@ __metadata: version: 0.0.0-use.local resolution: "@jest/expect@workspace:packages/jest-expect" dependencies: - "@tsd/typescript": ~4.7.4 + "@tsd/typescript": ~4.8.2 expect: "workspace:^" jest-snapshot: "workspace:^" tsd-lite: ^0.6.0 @@ -2742,7 +2742,7 @@ __metadata: "@lerna-lite/cli": ^1.10.0 "@microsoft/api-extractor": ^7.29.0 "@tsconfig/node14": ^1.0.3 - "@tsd/typescript": ~4.7.4 + "@tsd/typescript": ~4.8.2 "@types/babel__core": ^7.1.14 "@types/babel__generator": ^7.0.0 "@types/babel__template": ^7.0.2 @@ -2809,7 +2809,7 @@ __metadata: tempy: ^1.0.0 ts-node: ^10.5.0 type-fest: ^2.11.2 - typescript: ^4.7.4 + typescript: ^4.8.2 which: ^2.0.1 languageName: unknown linkType: soft @@ -2825,7 +2825,7 @@ __metadata: "@jest/transform": "workspace:^" "@jest/types": "workspace:^" "@jridgewell/trace-mapping": ^0.3.15 - "@tsd/typescript": ~4.7.4 + "@tsd/typescript": ~4.8.2 "@types/exit": ^0.1.30 "@types/glob": ^7.1.1 "@types/graceful-fs": ^4.1.3 @@ -3017,7 +3017,7 @@ __metadata: resolution: "@jest/types@workspace:packages/jest-types" dependencies: "@jest/schemas": "workspace:^" - "@tsd/typescript": ~4.7.4 + "@tsd/typescript": ~4.8.2 "@types/istanbul-lib-coverage": ^2.0.0 "@types/istanbul-reports": ^3.0.0 "@types/node": "*" @@ -4276,13 +4276,10 @@ __metadata: languageName: node linkType: hard -"@tsd/typescript@npm:~4.7.4": - version: 4.7.4 - resolution: "@tsd/typescript@npm:4.7.4" - bin: - tsc: typescript/bin/tsc - tsserver: typescript/bin/tsserver - checksum: 1a84773cb4bb01898fb0b6011ec5c2fb3e3c91585ea009bbf9d525b46d40f1827417dfc5f7b1efdf534b111a5947b063ae04490d147bda37b038e1a7d264672d +"@tsd/typescript@npm:~4.8.2": + version: 4.8.2 + resolution: "@tsd/typescript@npm:4.8.2" + checksum: c193a64d2347ba7da7e426e41d9cf9186ad71e782be2404db8ead310b3975a17ad206e0ba5f2c60bf9d8714cbccd7fbebde0345f2dce1938c1d1a8168e23f6b7 languageName: node linkType: hard @@ -5673,7 +5670,7 @@ __metadata: jest-zone-patch: "*" rxjs: ^7.5.5 tslib: ^2.0.0 - typescript: ^4.7.4 + typescript: ^4.8.2 zone.js: ~0.11.3 languageName: unknown linkType: soft @@ -9540,7 +9537,7 @@ __metadata: jest: "workspace:*" react: 17.0.2 react-dom: ^17.0.1 - typescript: ^4.7.4 + typescript: ^4.8.2 languageName: unknown linkType: soft @@ -9604,7 +9601,7 @@ __metadata: dependencies: "@jest/expect-utils": "workspace:^" "@jest/test-utils": "workspace:^" - "@tsd/typescript": ~4.7.4 + "@tsd/typescript": ~4.8.2 chalk: ^4.0.0 fast-check: ^3.0.0 immutable: ^4.0.0 @@ -12345,7 +12342,7 @@ __metadata: slash: ^3.0.0 strip-json-comments: ^3.1.1 ts-node: ^10.5.0 - typescript: ^4.7.4 + typescript: ^4.8.2 peerDependencies: "@types/node": "*" ts-node: ">=9.0.0" @@ -12615,7 +12612,7 @@ __metadata: resolution: "jest-mock@workspace:packages/jest-mock" dependencies: "@jest/types": "workspace:^" - "@tsd/typescript": ~4.7.4 + "@tsd/typescript": ~4.8.2 "@types/node": "*" tsd-lite: ^0.6.0 languageName: unknown @@ -12704,7 +12701,7 @@ __metadata: version: 0.0.0-use.local resolution: "jest-resolve@workspace:packages/jest-resolve" dependencies: - "@tsd/typescript": ~4.7.4 + "@tsd/typescript": ~4.8.2 "@types/graceful-fs": ^4.1.3 "@types/pnpapi": ^0.0.2 "@types/resolve": ^1.20.2 @@ -12744,7 +12741,7 @@ __metadata: "@jest/test-result": "workspace:^" "@jest/transform": "workspace:^" "@jest/types": "workspace:^" - "@tsd/typescript": ~4.7.4 + "@tsd/typescript": ~4.8.2 "@types/exit": ^0.1.30 "@types/graceful-fs": ^4.1.3 "@types/node": "*" @@ -12845,7 +12842,7 @@ __metadata: "@jest/test-utils": "workspace:^" "@jest/transform": "workspace:^" "@jest/types": "workspace:^" - "@tsd/typescript": ~4.7.4 + "@tsd/typescript": ~4.8.2 "@types/babel__traverse": ^7.0.6 "@types/graceful-fs": ^4.1.3 "@types/natural-compare": ^1.4.0 @@ -13034,7 +13031,7 @@ __metadata: version: 0.0.0-use.local resolution: "jest-worker@workspace:packages/jest-worker" dependencies: - "@tsd/typescript": ~4.7.4 + "@tsd/typescript": ~4.8.2 "@types/merge-stream": ^1.1.2 "@types/node": "*" "@types/supports-color": ^8.1.0 @@ -13084,7 +13081,7 @@ __metadata: dependencies: "@jest/core": "workspace:^" "@jest/types": "workspace:^" - "@tsd/typescript": ~4.7.4 + "@tsd/typescript": ~4.8.2 import-local: ^3.0.2 jest-cli: "workspace:^" tsd-lite: ^0.6.0 @@ -20217,13 +20214,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.21.3": - version: 0.21.3 - resolution: "type-fest@npm:0.21.3" - checksum: e6b32a3b3877f04339bae01c193b273c62ba7bfc9e325b8703c4ee1b32dc8fe4ef5dfa54bf78265e069f7667d058e360ae0f37be5af9f153b22382cd55a9afe0 - languageName: node - linkType: hard - "type-fest@npm:^0.4.1": version: 0.4.1 resolution: "type-fest@npm:0.4.1" @@ -20252,17 +20242,10 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^1.0.2": - version: 1.4.0 - resolution: "type-fest@npm:1.4.0" - checksum: b011c3388665b097ae6a109a437a04d6f61d81b7357f74cbcb02246f2f5bd72b888ae33631b99871388122ba0a87f4ff1c94078e7119ff22c70e52c0ff828201 - languageName: node - linkType: hard - -"type-fest@npm:^2.11.2, type-fest@npm:^2.5.0": - version: 2.18.0 - resolution: "type-fest@npm:2.18.0" - checksum: 0737128d9d77b93793c6ee443e304462a792f5b723a6be035d6cb488c5610a8baa00522805421341c04324c80efba9849885bbfbc5a9623d0672fe8712969f62 +"type-fest@npm:^2.0.0, type-fest@npm:^2.11.2, type-fest@npm:^2.5.0": + version: 2.19.0 + resolution: "type-fest@npm:2.19.0" + checksum: a4ef07ece297c9fba78fc1bd6d85dff4472fe043ede98bd4710d2615d15776902b595abf62bd78339ed6278f021235fb28a96361f8be86ed754f778973a0d278 languageName: node linkType: hard @@ -20292,7 +20275,17 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^4.7.4, typescript@npm:~4.7.4": +"typescript@npm:^4.8.2": + version: 4.8.2 + resolution: "typescript@npm:4.8.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 7f5b81d0d558c9067f952c7af52ab7f19c2e70a916817929e4a5b256c93990bf3178eccb1ac8a850bc75df35f6781b6f4cb3370ce20d8b1ded92ed462348f628 + languageName: node + linkType: hard + +"typescript@npm:~4.7.4": version: 4.7.4 resolution: "typescript@npm:4.7.4" bin: @@ -20302,7 +20295,17 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@^4.7.4#~builtin, typescript@patch:typescript@~4.7.4#~builtin": +"typescript@patch:typescript@^4.8.2#~builtin": + version: 4.8.2 + resolution: "typescript@patch:typescript@npm%3A4.8.2#~builtin::version=4.8.2&hash=a1c5e5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 5cb0f02f414f5405f4b0e7ee1fd7fa9177b6a8783c9017b6cad85f56ce4c4f93e0e6f2ce37e863cb597d44227cd009474c9fbd85bf7a50004e5557426cb58079 + languageName: node + linkType: hard + +"typescript@patch:typescript@~4.7.4#~builtin": version: 4.7.4 resolution: "typescript@patch:typescript@npm%3A4.7.4#~builtin::version=4.7.4&hash=a1c5e5" bin: