Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update typescript to 4.8 #14880

Merged
merged 5 commits into from Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -72,7 +72,7 @@
"shelljs": "^0.8.5",
"test262-stream": "^1.4.0",
"through2": "^4.0.0",
"typescript": "~4.7.4"
"typescript": "~4.8.2"
},
"workspaces": [
"codemods/*",
Expand Down
2 changes: 2 additions & 0 deletions packages/babel-core/src/config/caching.ts
Expand Up @@ -395,6 +395,8 @@ export function assertSimpleType(value: unknown): SimpleType {
"Cache keys must be either string, boolean, number, null, or undefined.",
);
}
// @ts-expect-error Type 'unknown' is not assignable to type 'SimpleType'. This can be removed
// when strictNullCheck is enabled
return value;
}

Expand Down
4 changes: 3 additions & 1 deletion packages/babel-core/src/config/helpers/deep-array.ts
Expand Up @@ -10,7 +10,9 @@ export function finalize<T>(deepArr: DeepArray<T>): ReadonlyDeepArray<T> {
return Object.freeze(deepArr) as ReadonlyDeepArray<T>;
}

export function flattenToSet<T>(arr: ReadonlyDeepArray<T>): Set<T> {
export function flattenToSet<T extends string>(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T is constrained to string so that Array.isArray(el) can effectively differentiate between ReadonlyDeepArray<T> and T.

arr: ReadonlyDeepArray<T>,
): Set<T> {
const result = new Set<T>();
const stack = [arr];
while (stack.length > 0) {
Expand Down
7 changes: 0 additions & 7 deletions packages/babel-parser/tsconfig.json

This file was deleted.

18 changes: 9 additions & 9 deletions yarn.lock
Expand Up @@ -5947,7 +5947,7 @@ __metadata:
shelljs: ^0.8.5
test262-stream: ^1.4.0
through2: ^4.0.0
typescript: ~4.7.4
typescript: ~4.8.2
dependenciesMeta:
core-js:
built: false
Expand Down Expand Up @@ -14762,23 +14762,23 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"typescript@npm:~4.7.4":
version: 4.7.4
resolution: "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: 5750181b1cd7e6482c4195825547e70f944114fb47e58e4aa7553e62f11b3f3173766aef9c281783edfd881f7b8299cf35e3ca8caebe73d8464528c907a164df
checksum: 7f5b81d0d558c9067f952c7af52ab7f19c2e70a916817929e4a5b256c93990bf3178eccb1ac8a850bc75df35f6781b6f4cb3370ce20d8b1ded92ed462348f628
languageName: node
linkType: hard

"typescript@patch:typescript@~4.7.4#~builtin<compat/typescript>":
version: 4.7.4
resolution: "typescript@patch:typescript@npm%3A4.7.4#~builtin<compat/typescript>::version=4.7.4&hash=493e53"
"typescript@patch:typescript@~4.8.2#~builtin<compat/typescript>":
version: 4.8.2
resolution: "typescript@patch:typescript@npm%3A4.8.2#~builtin<compat/typescript>::version=4.8.2&hash=493e53"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 96d3030cb01143570567cb4f3a616b10df65f658f0e74e853e77a089a6a954e35c800be7db8b9bfe9a1ae05d9c2897e281359f65e4caa1caf266368e1c4febd3
checksum: 6f49363af8af2fe480da1d5fa68712644438785208b06690a3cbe5e7365fd652c3a0f1e587bc8684d78fb69de3dde4de185c0bad7bb4f3664ddfc813ce8caad6
languageName: node
linkType: hard

Expand Down