From 8b2d8498e6db142b324ac67ae0ba5b923ef6b03e Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Wed, 1 Jul 2020 08:58:40 -0700 Subject: [PATCH] Upgrade to TypeScript 3.9 Summary: Upgrading to TypeScript 3.9 so that we can use `// ts-expect-error`, that allows us to basically write unit tests for typings. Fixed the typescript path in `settings.json`, because otherwise VSCode kept picking the built-in version (3.8.3 atm) of ts when opening the `sonar` folder as workspace. Reviewed By: passy Differential Revision: D22255818 fbshipit-source-id: ae54aedb237445f32f1797b4290656dbfb0e528f --- .vscode/settings.json | 3 ++- desktop/babel-transformer/package.json | 2 +- desktop/doctor/package.json | 2 +- desktop/flipper-plugin/package.json | 2 +- desktop/package.json | 2 +- desktop/pkg-lib/package.json | 2 +- desktop/pkg/package.json | 2 +- desktop/plugin-lib/package.json | 2 +- desktop/yarn.lock | 8 ++++---- 9 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 14a097045..e46398291 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -32,5 +32,6 @@ "jest.enableInlineErrorMessages": true, "jest.runAllTestsFirst": false, "jest.pathToConfig": "desktop/jest.config.js", - "jest.pathToJest": "desktop/node_modules/.bin/jest" + "jest.pathToJest": "desktop/node_modules/.bin/jest", + "typescript.tsdk": "desktop/node_modules/typescript/lib" } diff --git a/desktop/babel-transformer/package.json b/desktop/babel-transformer/package.json index e8c0bedce..7fb911d07 100644 --- a/desktop/babel-transformer/package.json +++ b/desktop/babel-transformer/package.json @@ -36,7 +36,7 @@ "rimraf": "^3.0.2", "ts-jest": "^26.0.0", "ts-node": "^8", - "typescript": "^3.7.2" + "typescript": "^3.9.5" }, "scripts": { "reset": "rimraf lib *.tsbuildinfo", diff --git a/desktop/doctor/package.json b/desktop/doctor/package.json index 8ab99acb4..027321ccd 100644 --- a/desktop/doctor/package.json +++ b/desktop/doctor/package.json @@ -21,7 +21,7 @@ "prettier": "^2.0.0", "ts-jest": "^26.0.0", "tslint-config-prettier": "^1.18.0", - "typescript": "^3.7.2" + "typescript": "^3.9.5" }, "scripts": { "reset": "rimraf lib *.tsbuildinfo", diff --git a/desktop/flipper-plugin/package.json b/desktop/flipper-plugin/package.json index e2f1038e5..648079193 100644 --- a/desktop/flipper-plugin/package.json +++ b/desktop/flipper-plugin/package.json @@ -12,7 +12,7 @@ "@testing-library/react": "^10.4.3" }, "devDependencies": { - "typescript": "^3.9.2" + "typescript": "^3.9.5" }, "scripts": { "reset": "rimraf lib *.tsbuildinfo", diff --git a/desktop/package.json b/desktop/package.json index c10d37ad9..702f5ad6a 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -209,7 +209,7 @@ "tmp": "^0.2.1", "ts-jest": "^26.0.0", "ts-node": "^8.8.1", - "typescript": "^3.9.2", + "typescript": "^3.9.5", "yargs": "^15.3.1", "yazl": "^2.5.1" }, diff --git a/desktop/pkg-lib/package.json b/desktop/pkg-lib/package.json index 7a47a65c1..b0ddfb310 100644 --- a/desktop/pkg-lib/package.json +++ b/desktop/pkg-lib/package.json @@ -26,7 +26,7 @@ "rimraf": "^3.0.2", "ts-jest": "^26.0.0", "ts-node": "^8", - "typescript": "^3.7.2" + "typescript": "^3.9.5" }, "scripts": { "reset": "rimraf lib *.tsbuildinfo", diff --git a/desktop/pkg/package.json b/desktop/pkg/package.json index 0c9174542..7662d638e 100644 --- a/desktop/pkg/package.json +++ b/desktop/pkg/package.json @@ -41,7 +41,7 @@ "rimraf": "^3.0.2", "ts-jest": "^26.0.0", "ts-node": "^8", - "typescript": "^3.7.2" + "typescript": "^3.9.5" }, "scripts": { "reset": "rimraf lib *.tsbuildinfo", diff --git a/desktop/plugin-lib/package.json b/desktop/plugin-lib/package.json index 40534492f..e85f71cb7 100644 --- a/desktop/plugin-lib/package.json +++ b/desktop/plugin-lib/package.json @@ -28,7 +28,7 @@ "rimraf": "^3.0.2", "ts-jest": "^26.0.0", "ts-node": "^8", - "typescript": "^3.9.2" + "typescript": "^3.9.5" }, "scripts": { "reset": "rimraf lib *.tsbuildinfo", diff --git a/desktop/yarn.lock b/desktop/yarn.lock index fc3c5a7bb..648a7394b 100644 --- a/desktop/yarn.lock +++ b/desktop/yarn.lock @@ -11957,10 +11957,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.7.2, typescript@^3.9.2: - version "3.9.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.2.tgz#64e9c8e9be6ea583c54607677dd4680a1cf35db9" - integrity sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw== +typescript@^3.9.5: + version "3.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.5.tgz#586f0dba300cde8be52dd1ac4f7e1009c1b13f36" + integrity sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ== ua-parser-js@^0.7.18: version "0.7.20"