Skip to content

Commit

Permalink
chore: bump typescript to v4.7 (#12901)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrazauskas committed Jun 3, 2022
1 parent bd1fcbe commit 3e38157
Show file tree
Hide file tree
Showing 27 changed files with 113 additions and 84 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@

- `[@jest/expect-utils]` Fix deep equality of ImmutableJS OrderedMaps ([#12763](https://github.com/facebook/jest/pull/12899))
- `[jest-docblock]` Handle multiline comments in parseWithComments ([#12845](https://github.com/facebook/jest/pull/12845))
- `[jest-mock]` Improve `spyOn` error messages ([#12901](https://github.com/facebook/jest/pull/12901))
- `[jest-worker]` Make `JestWorkerFarm` helper type to include methods of worker module that take more than one argument ([#12839](https://github.com/facebook/jest/pull/12839))

### Chore & Maintenance
Expand Down
2 changes: 1 addition & 1 deletion e2e/coverage-remapping/package.json
Expand Up @@ -7,6 +7,6 @@
"testEnvironment": "node"
},
"dependencies": {
"typescript": "^4.6.2"
"typescript": "^4.7.2"
}
}
18 changes: 9 additions & 9 deletions e2e/coverage-remapping/yarn.lock
Expand Up @@ -9,26 +9,26 @@ __metadata:
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
dependencies:
typescript: ^4.6.2
typescript: ^4.7.2
languageName: unknown
linkType: soft

"typescript@npm:^4.6.2":
version: 4.6.3
resolution: "typescript@npm:4.6.3"
"typescript@npm:^4.7.2":
version: 4.7.2
resolution: "typescript@npm:4.7.2"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 255bb26c8cb846ca689dd1c3a56587af4f69055907aa2c154796ea28ee0dea871535b1c78f85a6212c77f2657843a269c3a742d09d81495b97b914bf7920415b
checksum: 5163585e6b56410f77d5483b698d9489bbee8902c99029eb70cf6d21525a186530ce19a00951af84eefd4a131cc51d0959f5118e25e70ab61f45ac4057dbd1ef
languageName: node
linkType: hard

"typescript@patch:typescript@^4.6.2#~builtin<compat/typescript>":
version: 4.6.3
resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=7ad353"
"typescript@patch:typescript@^4.7.2#~builtin<compat/typescript>":
version: 4.7.2
resolution: "typescript@patch:typescript@npm%3A4.7.2#~builtin<compat/typescript>::version=4.7.2&hash=7ad353"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 6bf45caf847062420592e711bc9c28bf5f9a9a7fa8245343b81493e4ededae33f1774009d1234d911422d1646a2c839f44e1a23ecb111b40a60ac2ea4c1482a8
checksum: 7e2b9a9f4a70fb7616f1b0d986977f8e34a74f046202fa7f24fdee79589598277810fa216b3776c20c0683a9235872c73be34fdb93f67f98c1efaca40999422f
languageName: node
linkType: hard
2 changes: 1 addition & 1 deletion e2e/stack-trace-source-maps-with-coverage/package.json
Expand Up @@ -8,6 +8,6 @@
"testRegex": "fails"
},
"dependencies": {
"typescript": "^4.6.2"
"typescript": "^4.7.2"
}
}
18 changes: 9 additions & 9 deletions e2e/stack-trace-source-maps-with-coverage/yarn.lock
Expand Up @@ -9,26 +9,26 @@ __metadata:
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
dependencies:
typescript: ^4.6.2
typescript: ^4.7.2
languageName: unknown
linkType: soft

"typescript@npm:^4.6.2":
version: 4.6.3
resolution: "typescript@npm:4.6.3"
"typescript@npm:^4.7.2":
version: 4.7.2
resolution: "typescript@npm:4.7.2"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 255bb26c8cb846ca689dd1c3a56587af4f69055907aa2c154796ea28ee0dea871535b1c78f85a6212c77f2657843a269c3a742d09d81495b97b914bf7920415b
checksum: 5163585e6b56410f77d5483b698d9489bbee8902c99029eb70cf6d21525a186530ce19a00951af84eefd4a131cc51d0959f5118e25e70ab61f45ac4057dbd1ef
languageName: node
linkType: hard

"typescript@patch:typescript@^4.6.2#~builtin<compat/typescript>":
version: 4.6.3
resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=7ad353"
"typescript@patch:typescript@^4.7.2#~builtin<compat/typescript>":
version: 4.7.2
resolution: "typescript@patch:typescript@npm%3A4.7.2#~builtin<compat/typescript>::version=4.7.2&hash=7ad353"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 6bf45caf847062420592e711bc9c28bf5f9a9a7fa8245343b81493e4ededae33f1774009d1234d911422d1646a2c839f44e1a23ecb111b40a60ac2ea4c1482a8
checksum: 7e2b9a9f4a70fb7616f1b0d986977f8e34a74f046202fa7f24fdee79589598277810fa216b3776c20c0683a9235872c73be34fdb93f67f98c1efaca40999422f
languageName: node
linkType: hard
2 changes: 1 addition & 1 deletion e2e/stack-trace-source-maps/package.json
Expand Up @@ -8,6 +8,6 @@
"testRegex": "fails"
},
"dependencies": {
"typescript": "^4.6.2"
"typescript": "^4.7.2"
}
}
18 changes: 9 additions & 9 deletions e2e/stack-trace-source-maps/yarn.lock
Expand Up @@ -9,26 +9,26 @@ __metadata:
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
dependencies:
typescript: ^4.6.2
typescript: ^4.7.2
languageName: unknown
linkType: soft

"typescript@npm:^4.6.2":
version: 4.6.3
resolution: "typescript@npm:4.6.3"
"typescript@npm:^4.7.2":
version: 4.7.2
resolution: "typescript@npm:4.7.2"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 255bb26c8cb846ca689dd1c3a56587af4f69055907aa2c154796ea28ee0dea871535b1c78f85a6212c77f2657843a269c3a742d09d81495b97b914bf7920415b
checksum: 5163585e6b56410f77d5483b698d9489bbee8902c99029eb70cf6d21525a186530ce19a00951af84eefd4a131cc51d0959f5118e25e70ab61f45ac4057dbd1ef
languageName: node
linkType: hard

"typescript@patch:typescript@^4.6.2#~builtin<compat/typescript>":
version: 4.6.3
resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=7ad353"
"typescript@patch:typescript@^4.7.2#~builtin<compat/typescript>":
version: 4.7.2
resolution: "typescript@patch:typescript@npm%3A4.7.2#~builtin<compat/typescript>::version=4.7.2&hash=7ad353"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 6bf45caf847062420592e711bc9c28bf5f9a9a7fa8245343b81493e4ededae33f1774009d1234d911422d1646a2c839f44e1a23ecb111b40a60ac2ea4c1482a8
checksum: 7e2b9a9f4a70fb7616f1b0d986977f8e34a74f046202fa7f24fdee79589598277810fa216b3776c20c0683a9235872c73be34fdb93f67f98c1efaca40999422f
languageName: node
linkType: hard
2 changes: 1 addition & 1 deletion e2e/typescript-coverage/package.json
Expand Up @@ -7,6 +7,6 @@
"testEnvironment": "node"
},
"dependencies": {
"typescript": "^4.6.2"
"typescript": "^4.7.2"
}
}
18 changes: 9 additions & 9 deletions e2e/typescript-coverage/yarn.lock
Expand Up @@ -9,26 +9,26 @@ __metadata:
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
dependencies:
typescript: ^4.6.2
typescript: ^4.7.2
languageName: unknown
linkType: soft

"typescript@npm:^4.6.2":
version: 4.6.3
resolution: "typescript@npm:4.6.3"
"typescript@npm:^4.7.2":
version: 4.7.2
resolution: "typescript@npm:4.7.2"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 255bb26c8cb846ca689dd1c3a56587af4f69055907aa2c154796ea28ee0dea871535b1c78f85a6212c77f2657843a269c3a742d09d81495b97b914bf7920415b
checksum: 5163585e6b56410f77d5483b698d9489bbee8902c99029eb70cf6d21525a186530ce19a00951af84eefd4a131cc51d0959f5118e25e70ab61f45ac4057dbd1ef
languageName: node
linkType: hard

"typescript@patch:typescript@^4.6.2#~builtin<compat/typescript>":
version: 4.6.3
resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=7ad353"
"typescript@patch:typescript@^4.7.2#~builtin<compat/typescript>":
version: 4.7.2
resolution: "typescript@patch:typescript@npm%3A4.7.2#~builtin<compat/typescript>::version=4.7.2&hash=7ad353"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 6bf45caf847062420592e711bc9c28bf5f9a9a7fa8245343b81493e4ededae33f1774009d1234d911422d1646a2c839f44e1a23ecb111b40a60ac2ea4c1482a8
checksum: 7e2b9a9f4a70fb7616f1b0d986977f8e34a74f046202fa7f24fdee79589598277810fa216b3776c20c0683a9235872c73be34fdb93f67f98c1efaca40999422f
languageName: node
linkType: hard
2 changes: 1 addition & 1 deletion examples/angular/package.json
Expand Up @@ -15,7 +15,7 @@
"core-js": "^3.2.1",
"rxjs": "^7.5.5",
"tslib": "^2.0.0",
"typescript": "^4.6.2",
"typescript": "^4.7.2",
"zone.js": "~0.11.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/package.json
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"react": "17.0.2",
"react-dom": "^17.0.1",
"typescript": "^4.6.2"
"typescript": "^4.7.2"
},
"devDependencies": {
"@babel/core": "^7.11.6",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -14,7 +14,7 @@
"@jest/test-utils": "workspace:*",
"@microsoft/api-extractor": "^7.23.0",
"@tsconfig/node12": "^1.0.9",
"@tsd/typescript": "~4.6.2",
"@tsd/typescript": "~4.7.2",
"@types/babel__core": "^7.1.14",
"@types/babel__generator": "^7.0.0",
"@types/babel__template": "^7.0.2",
Expand Down Expand Up @@ -81,7 +81,7 @@
"throat": "^6.0.1",
"ts-node": "^10.5.0",
"type-fest": "^2.11.2",
"typescript": "^4.6.2",
"typescript": "^4.7.2",
"which": "^2.0.1"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/expect/package.json
Expand Up @@ -26,7 +26,7 @@
},
"devDependencies": {
"@jest/test-utils": "^28.1.0",
"@tsd/typescript": "~4.6.2",
"@tsd/typescript": "~4.7.2",
"chalk": "^4.0.0",
"fast-check": "^3.0.0",
"immutable": "^4.0.0",
Expand Down
@@ -1,6 +1,6 @@
{
"name": "typescript_in_dev_dependencies",
"devDependencies": {
"typescript": "^4.6.2"
"typescript": "^4.7.2"
}
}
@@ -1,6 +1,6 @@
{
"name": "only-package-json",
"dependencies": {
"typescript": "^4.6.2"
"typescript": "^4.7.2"
}
}
2 changes: 1 addition & 1 deletion packages/jest-config/package.json
Expand Up @@ -58,7 +58,7 @@
"@types/micromatch": "^4.0.1",
"semver": "^7.3.5",
"ts-node": "^10.5.0",
"typescript": "^4.6.2"
"typescript": "^4.7.2"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-expect/package.json
Expand Up @@ -21,7 +21,7 @@
"jest-snapshot": "^28.1.0"
},
"devDependencies": {
"@tsd/typescript": "~4.6.2",
"@tsd/typescript": "~4.7.2",
"tsd-lite": "^0.5.1"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-mock/package.json
Expand Up @@ -21,7 +21,7 @@
"@types/node": "*"
},
"devDependencies": {
"@tsd/typescript": "~4.6.2",
"@tsd/typescript": "~4.7.2",
"tsd-lite": "^0.5.1"
},
"engines": {
Expand Down
20 changes: 14 additions & 6 deletions packages/jest-mock/src/index.ts
Expand Up @@ -1087,7 +1087,9 @@ export class ModuleMocker {
if (!this.isMockFunction(original)) {
if (typeof original !== 'function') {
throw new Error(
`Cannot spy the ${methodName} property because it is not a function; ${this._typeOf(
`Cannot spy the ${String(
methodName,
)} property because it is not a function; ${this._typeOf(
original,
)} given instead`,
);
Expand Down Expand Up @@ -1149,7 +1151,9 @@ export class ModuleMocker {

if (!obj) {
throw new Error(
`spyOn could not find an object to spy upon for ${propertyName}`,
`spyOn could not find an object to spy upon for ${String(
propertyName,
)}`,
);
}

Expand All @@ -1166,16 +1170,18 @@ export class ModuleMocker {
}

if (!descriptor) {
throw new Error(`${propertyName} property does not exist`);
throw new Error(`${String(propertyName)} property does not exist`);
}

if (!descriptor.configurable) {
throw new Error(`${propertyName} is not declared configurable`);
throw new Error(`${String(propertyName)} is not declared configurable`);
}

if (!descriptor[accessType]) {
throw new Error(
`Property ${propertyName} does not have access type ${accessType}`,
`Property ${String(
propertyName,
)} does not have access type ${accessType}`,
);
}

Expand All @@ -1184,7 +1190,9 @@ export class ModuleMocker {
if (!this.isMockFunction(original)) {
if (typeof original !== 'function') {
throw new Error(
`Cannot spy the ${propertyName} property because it is not a function; ${this._typeOf(
`Cannot spy the ${String(
propertyName,
)} property because it is not a function; ${this._typeOf(
original,
)} given instead`,
);
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-reporters/package.json
Expand Up @@ -40,7 +40,7 @@
},
"devDependencies": {
"@jest/test-utils": "^28.1.0",
"@tsd/typescript": "~4.6.2",
"@tsd/typescript": "~4.7.2",
"@types/exit": "^0.1.30",
"@types/glob": "^7.1.1",
"@types/graceful-fs": "^4.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-resolve/package.json
Expand Up @@ -28,7 +28,7 @@
"slash": "^3.0.0"
},
"devDependencies": {
"@tsd/typescript": "~4.6.2",
"@tsd/typescript": "~4.7.2",
"@types/graceful-fs": "^4.1.3",
"@types/pnpapi": "^0.0.2",
"@types/resolve": "^1.20.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-runner/package.json
Expand Up @@ -40,7 +40,7 @@
"throat": "^6.0.1"
},
"devDependencies": {
"@tsd/typescript": "~4.6.2",
"@tsd/typescript": "~4.7.2",
"@types/exit": "^0.1.30",
"@types/graceful-fs": "^4.1.3",
"@types/source-map-support": "^0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-snapshot/package.json
Expand Up @@ -45,7 +45,7 @@
"@babel/preset-flow": "^7.7.2",
"@babel/preset-react": "^7.12.1",
"@jest/test-utils": "^28.1.0",
"@tsd/typescript": "~4.6.2",
"@tsd/typescript": "~4.7.2",
"@types/graceful-fs": "^4.1.3",
"@types/natural-compare": "^1.4.0",
"@types/semver": "^7.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-types/package.json
Expand Up @@ -28,7 +28,7 @@
"chalk": "^4.0.0"
},
"devDependencies": {
"@tsd/typescript": "~4.6.2",
"@tsd/typescript": "~4.7.2",
"tsd-lite": "^0.5.1"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-worker/package.json
Expand Up @@ -22,7 +22,7 @@
"supports-color": "^8.0.0"
},
"devDependencies": {
"@tsd/typescript": "~4.6.2",
"@tsd/typescript": "~4.7.2",
"@types/merge-stream": "^1.1.2",
"@types/supports-color": "^8.1.0",
"get-stream": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest/package.json
Expand Up @@ -19,7 +19,7 @@
"jest-cli": "^28.1.0"
},
"devDependencies": {
"@tsd/typescript": "~4.6.2",
"@tsd/typescript": "~4.7.2",
"tsd-lite": "^0.5.1"
},
"peerDependencies": {
Expand Down

0 comments on commit 3e38157

Please sign in to comment.